Following or not PSR-5 is like following or not PSR-1 and 2. You do it if you want to.
But if this PSR affects how most annotations work in PHP today (I only know about the PHPUnit system and the Doctrine system which is used like everywhere) then we agree that's a big deal right? It will affect a lot of project and developers.
I'm not saying this shouldn't happen (I've been harassing you enough with @type and namespaced annotations Mike :) I actually like your suggestion, it makes sense. We have to find a way to differentiate between phpdoc tags and annotations eventually. But it's the big change that frightens me a bit (and for me PHP-DI will be affected by it so I'm a bit concerned on that too).
BTW I know that supporting old annotations will obviously happen, it still is a big change for projects and developers.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/5f812565-b0a0-4b22-ae96-035667f1b1f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/5440C232.40604%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAHjTTqOvMuSUWNCGozOadmeK1s%2Br41V9inBvakkbPDdTgMnZTg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/3b91a866-fbfa-46f4-b102-6b31df63df7c%40googlegroups.com.
Ok. You make a fair point. But probably not the one that you intended on making ;)
I think it is unclear as to why I am proposing this so I am going to take a step back and write a big wall of text why this is necessary, including alternatives.
tldr
----
In order to support Doctrine's notation of multiple annotations on a single line we need to distinguish between what is an annotation and a part of a tag's description.
The problem or challenge
------------------------
Doctrine Annotations has a syntax for using multiple Annotations on the same line. This is not supported by the current PHPDoc Standard and is incompatible with the technical definition of tags.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CADyq6sL%2B7hMMbL_zY2d7PXBu8ggBzWT0tCaeiTCJy-dE33nKnQ%40mail.gmail.com.
If I understood correctly, the proposal is to modify Doctrine Annotations to either:
Both sound like a bad idea to change. =\2- Accept only one declaration per line1- Always enforce parenthesis
Again, we shouldn't fix a language problem by modifying tools to workaround a solution. The root problem is the language, not the lack of parenthesis, uppercase enforcement or multi line declarations. IMO, we should pressure more core towards native Annotations support (and again...).
Mike,
What about this alternative solution: multiple tags per line (annotations or phpdoc tags) are allowed. However, @ must be the first character after the previous tag (excluding spaces).
Eg:
- 2 phpdoc tags: @api @deprecated- 2 annotations: @Column @Id- 1 phpdoc tag: @param string $test This @param tag is not interpreted- 1 annotation: @expectedExceptionMessage The @var annotation is invalid
Your current solution breaks Doctrine and PHPUnit's annotations. It will break many many applications out there.Today, annotations and phpdoc actually work. Improving the current situation is good, but not at the expense of annotations. They are too widespread today.
And I agree that pushing annotations into PHP core is out of scope. I am definitely in favor of it of course, but that doesn't solve the problem here.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/8c866aa7-05e5-4449-8801-fc78b63753fc%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/544CC74A.1070700%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAFp73XtpF7R1bZVcezX67TMnof%3DhjqmGS0qpVKWi9zfyZ2BG2Q%40mail.gmail.com.