Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

First Beta of Slim Framework 3

DZone's Guide to

First Beta of Slim Framework 3

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

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.

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.

Topics:
php ,slim framework ,html5

Published at DZone with permission of Rob Allen, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}