| "Without the special @Template comment, Symfony does not know where to find the template file." First off, this is completely false. With symfony2 the action needs to return a Response object. This annotation isn't required and the team I work with, we rarely use this. It's very useful for when you are just adding a page that contains no real business logic. "Doctrine 2 does the same thing when declaring object properties based on database table columns1:" Oh look, there's a footnote. "Fortunately, Doctrine also allows you to declare property metadata using PHP, YAML, or XML" What? "Because code comments should never be necessary for a script to function properly" So your points are that we need @Template annotation to be able to render a template, which is FALSE, and you state the same with with Doctrine2 which you point out there are other ways to do it. All your points for "DX Regressions" are completely wrong. Unless I am using a special plugin with my IDE it's not going to link "AcmeBlogBundle:Post" to src/Acme/BlogBundle/Entity/Post.php. Most of what you point out is complete bullshit. What do I gain to hope by using var_dump() on an annotation? I know that in a Doctrine Entity that the column type is a string. Articles and posts like this drive me banana's with the complete lack of understanding what you're writing about. |
Correct. But if you want use the form where you just return an array of variables to use inside your template, and have Symfony smartly located the template for you, you have to use an annotation. See http://stackoverflow.com/questions/12922827/symfony-2-php-te... for an example.
> and you state the same with with Doctrine2 which you point out there are other ways to do it.
Yes, there are other BETTER ways to do it. Making comment-based annotations available as one of the ways pretty much guarantees that people will use it, and that seems like a bad idea to me. Just remove them so no one is able to choose the bad practice.
> All your points for "DX Regressions" are completely wrong.
Uhh, OK? How about comment folding in text editors? Would you, as a developer, be happy if you encountered some code that made heavy use of annotations for critical application logic? I wouldn't--this is what I mean by DX.
> What do I gain to hope by using var_dump() on an annotation?
The same thing you gain by var_dump()ing any variable--an understand of what's happening under the hood.