This course is still being released! Check back later for more chapters.
Dependency Injection #[Attributes]
In modern Symfony, services can be configured using native PHP attributes, integrating configuration directly within the code. Let’s explore this with a practical example.
- intermediate
- 149 students
- EN/ES Captions
- EN/ES Script
- Certificate of Completion
Your Guides
About this course
Traditionally, Symfony services were configured in XML or YAML files. This creates a bit of a disconnect between your code and the configuration. In modern Symfony, we can use native PHP attributes to configure services. This allows us to keep our service configuration right in our code as native PHP metadata, which is pretty cool! Let's dive into these Dependency Injection attributes in the context of a fun example.
Looking forward to this course! Thank you!