PHP-DI / Slim-Bridge

PHP-DI integration with the Slim framework
http://php-di.org/doc/frameworks/slim.html
MIT License
176 stars 38 forks source link

New Request and Response aliases #45

Closed odahcam closed 5 years ago

odahcam commented 5 years ago

Why?

Because this way allows users to use different parameter names and aligns the container with the Slim documentation examples, which uses injection trough bindings that differ from $request and $response.

Tests

There are 2 new tests with 20 assertions (in 3 tests).

mnapoli commented 5 years ago

Thank you that sounds like a good idea!

Could you add tests that check that the new parameters actually work in a controller? Because I'm not sure they do. This class is responsible for passing parameters to controllers and it doesn't use your new parameters.

You can see tests like what I mean in this test class.

odahcam commented 5 years ago

Sure, I'll do ASAP.

odahcam commented 5 years ago

I couldn't figure out, until now, how to bind the interfaces injection on ControllerInvoker.

odahcam commented 5 years ago

I'm looking forward for Slim 4.