Yuriy Belenko aa61220db2
[php-slim4] Add dependency injection container 2 (#11159)
* Change packages order alphabetically

* Add PHP-DI package to Composer template

* Remove ContainerInterface from APIs

User shouldn't access container directly, it's an anti-pattern.

Ref: https://php-di.org/doc/best-practices.html#rules-for-using-a-container-and-dependency-injection

* Change app templates to use PHP-DI

Application looks more like a default Slim skeleton now.

Ref: https://github.com/slimphp/Slim-Skeleton

* Rename SlimRouter to RegisterRoutes

Since it's callable class new name fits better.

* Add short documentation

* Refresh samples
2021-12-29 10:57:19 +08:00
..