Pragmatism in the real world

First beta of Slim Framework 3

Last night, I tagged beta 1 of Slim Framework 3! This is a significant upgrade to v2 with a number of changes that you can read on the Slim blog.

For me, the two key features that I’m most excited about are:

  • PSR-7 support, along with the standard middleware signature of:
        function($request, $response, $next) { return $response; }
  • Dependency injection container with container-interop compliance. We ship with Pimple by default, but I’m planning to use Zend\ServiceManager.

There’s lots of other changes and we believe we have kept to the key tenants of Slim, keeping it focussed as a micro-framework suitable for building any application that you want to build. Slim is a particularly good choice our new Composer-based world where you can pick the best of breed components to build your application.

Testing

The easiest way to get going with a Slim 3 application is to use my skeleton application:

$ composer create-project -n -s dev akrabat/slim3-skeleton my-app
$ cd my-app
$ php -S 0.0.0.0:8888 -t public public/index.php

and browse to http://localhost:8888. I wrote up some more about my skeleton application previously.

Alternatively, the README file has information on starting from scratch.

This is a Beta!

Obviously, this is beta release – we are sure there are bugs and issues to be improved. We really want you to test it and kick the tyres. Please report any issues you find to us. We also appreciate pull requests!

You can also find helpful people on IRC in the #slimphp channel on Freenode.

Also not that while we hope that we won’t need to change any function signatures, we aren’t promising that we’ll keep BC before 3.0 stable.

Docs

The new docs are very much a work in progress! They are incomplete and out of date in places. Again, please report any issues and pull requests are very welcome!

Next steps

We shall be concentrating on documentation and ensuring that Slim 3 is as stable as we can make it. This is an exciting time and I’m looking forward to when Slim 3.0 final is released.

5 thoughts on “First beta of Slim Framework 3

  1. Hi, im trying to learn slim 3, so i download the Slim 3 Skeleton, but i have a question.

    How can i get the access to container in app/src/Action/HomeAction.php inside dispatch method?

    Thanks =)

  2. thanks!!! i was thinking to do it that way, but i dont know if it was the proper way to do it.

Comments are closed.