|
You are here |
tomasvotruba.com | ||
| | | | |
richardmiller.co.uk
|
|
| | | | | Background I am recreating Lime Thinking's current website [http://www.limethinking.co.uk] using Symfony2 [http://symfony.com/], much of the site is made up of what are effectively static pages. The main content of the page is stored as an XML file which then has the overall XSL template | |
| | | | |
brandonsavage.net
|
|
| | | | | PHP more or less has two kinds of dependency injection available: constructor injection, and setter injection. Constructor injection is the process of injecting dependencies through the constructor arguments, like so: The dependencies are injected via the constructor, on object creation, and the object has them from the very beginning. Setter injection is different; instead of [...] | |
| | | | |
symfony.com
|
|
| | | | | In Symfony 4.1 you can get all container parameters in a service injecting one of its constructor arguments with the ParameterBagInterface. | |
| | | | |
tomasvotruba.com
|
|
| | | PHP CLI apps usually accept config, to setup their behavior. For PHPUnit it's `phpunit.xml`, for PHP CS Fixer it's `.php_cs`, for ECS it's `ecs.php`, for PHPStan it's `phpstan.neon` and so on. In the first post about PHP CLI Apps I wrote about [poor DI support in PHP CLI projects](/blog/2018/05/07/why-you-should-combine-symfony-console-and-dependency-injection/). Today we look on the first barrier that leads most people to prefer static over DI - **how to load config with services**. | ||