Closed mindplay-dk closed 5 years ago
When namespaces were added to PHP we had a huge incident with Symfony migrating to namespaces and NOT adding leading slash to any of PHPDOC FQNs. Thousand users reported PhpStorm not supporting namespaces properly.... Fortunately our strong "NOPE ITS THEM, AND WE WON'T SUPPORT NONDETERMINISTIC NAME RESOLUTION EVER" [global function lookup is more than enough :(] made our users push on sensiolabs and they fixed it. AFAIK there is no such cases out there and(==because) all tools support only "resolution rules as prescribed by PHP itself". So no real issue, but having this in spec may be nice.
@neuro159 , are you meaning the spec should specify "fully qualified is required... relative/unqualified is not allowed" ?
ABNF changes are now in PR #162
Rules in docs shall be the same as in code ==> all relative names used in docs shall have proper imports. Took a lot to convince everyone but fortunately, its de facto a standard, so let's write it down.
@neuro159 ok, now I'm following you.
@mindplay-dk , please bring this up as a new thread on the FIG mailing list for discussion -- https://groups.google.com/forum/#!forum/php-fig
Since this work on the BNF and over the period of this PSR standing still, use of qualified and unqualified (rather than fully-qualified) type-declarations have become commonplace in codebases everywhere.
IDE and tool support is there.
So I think we need to expand the definition of type-declarations to include qualified and unqualified type-declarations, including resolution rules as prescribed by PHP itself.
Merely allowing fully-qualified references to structural elements at this point seems insufficient?