3 ms·
Everything in the Symfony/Doctrine ecosystem that uses annotations does so as an option for those who prefer them. If you don't like them, you can usually just
by larzang 7y ago
Everything in the Symfony/Doctrine ecosystem that uses annotations does so as an option for those who prefer them. If you don't like them, you can usually just as easily use YAML or XML or PHP configuration.
Most developers seem to like them (brevity, locational grouping of concerns), so they tend to get treated as a default, but they're not the only option or the only one treated as a first-class choice. Like much of new-PHP, this also seems to be something largely borrowed from the Java world, it's hardly something new or invented by PHP.
- esistgut 7y agoDoctrine is deprecating YAML support. As you said docblock annotations are treated as default. I would like to add that this is so true by a large margin. To the extend that using alternatives feels like an (undocumented) extra step. To clarify my previous statement: I like annotations. I just don't like how a large part of the community is forced into the docblock hack.