April 2016
Intermediate to advanced
290 pages
5h 51m
English
There are times when we only care about quick and dirty prototyping for a service. We don't know the service details and it is an ongoing job, which means that the service parameters might change over and over again.
It makes the service definition a little tricky. Imagine how many times we would have to refactor the service until we reach the final structure. Luckily, we can create a service with minimal configuration. Introduced in Symfony 2.8, with autowiring, we can ignore details of the service definition and let Symfony find and handle any dependency for us:
services:
som_service:
class: some_class
autowire:trueYou can read more about it here:
https://symfony.com/doc/current/components/dependency_injection/autowiring.html ...