You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to use aliased String namespace since 8.2 #11152
Fatal error: Cannot alias 'Foo\Bar\String' as it is a built-in type in ... on line 3
But I expected this output instead:
Note that Foo\Bar\String is just a namespace (part), not a class/interface/trait/enum.
I checked the 8.2 documentation (migration guide, backward incompatible changes, changelog) and it seems to me this was not really intended. Worked fine up until 8.1.x.
Hmm, I think this is an oversight of #9402. @Girgias The use-case above looks valid as long as we support these keywords in namespaces, so I'm thinking we should revert the PR.
Fine with me, this only came up because someone on Room 11 was doing some weird stuff and not understanding the weird error message that resulted later.
Feel free to revert now or I'll do this next week when I get back from holiday. :)
Activity
InvisibleSmiley commentedon Apr 28, 2023
I was told the issue was caused by this:
#9402
iluuu1994 commentedon Apr 28, 2023
Hi @InvisibleSmiley! What's the use case for this? This would've failed before as well, just in a different location.
https://3v4l.org/QM5mP
InvisibleSmiley commentedon Apr 28, 2023
As I said, my case is about namespaces only. Example (actual things / inheritance etc. in the NS are irrelevant):
https://3v4l.org/Q9Fbi
iluuu1994 commentedon Apr 28, 2023
Hmm, I think this is an oversight of #9402.
@Girgias The use-case above looks valid as long as we support these keywords in namespaces, so I'm thinking we should revert the PR.
Girgias commentedon Apr 28, 2023
Fine with me, this only came up because someone on Room 11 was doing some weird stuff and not understanding the weird error message that resulted later.
Feel free to revert now or I'll do this next week when I get back from holiday. :)
Allow aliasing namespaces ending in reserved class names
Allow aliasing namespaces containing reserved class names