Pragmatism in the real world

Slim 3.4.0 now provides PSR-7!

I’ve been neglecting Slim‘s PR queue recently, so this weekend I dedicated a lot of time to merging all the good work that our contributors have done. As a result, I’m delighted to release version 3.4.0!

This release has a larger set of changes in it than I would have ideally liked which is a direct consequence of having gone two months between releases rather than one.

One particularly interesting addition that we have a made this release is adding a provide section to our composer.json file:

    "provide": {
        "psr/http-message-implementation": "1.0"

This means that we have informed Composer that Slim provides a valid implementation of the interfaces in psr/http-message-implementation virtual package that defines the PSR-7 interfaces.

This means that when you install a Composer package that requires psr/http-message-implementation in your Slim project, then Composer will now recognise that Slim satisfies this requirement and won’t insist you install another PSR-7 implementation just for package resolution!

There’s lots of other goodies in 3.4.0, so check out the release notes and upgrade!

5 thoughts on “Slim 3.4.0 now provides PSR-7!

  1. Hi Rob,

    I have a question is there a way we can understand which are the implementors for psr-7 than the providers. I wished if we could get a list of the real psr-7 implementors than the framework implementations as in for I fear more and more frameworks adding the same to composer.json . I think it better suits for . But I am not sure what is the best way to deal with not to install other psr-7 implementations in that case.

  2. Hi Hari,

    I agree. I wasn't sure if we should add this or not as Slim is not "just an implementation" of PSR-7. However, when I realised that composer was requiring people to install diactoros to meet dependency requirements, I merged the PR :)

    1. Hi Rob,

      Thank you for your reply. Didn't got any message when you replied me back. ie why the delay. I guess the problem you mentioned about "when I realised that composer was requiring people to install diactoros to meet dependency requirements" is due to slim not requiring the slim/http package. But implemented it in the core itself. Why didn't you guys use the slim/http package? Or is slim/http a split like what symfony is doing for components ?

      Else I guess this would have solved the issue.

      1. Slim\Http is intended to be an extraction of the the PSR-7 component from Slim 3.

        Even if we required slim/http in slim 3, one of them would still need to "provide" psr/http-message-implementation in order for Composer to recognise it as suitable when installing something that requires psr/http-message-implementation.

Comments are closed.