Closed
Description
Description
The following code:
<?php
use Foo\Bar\String as MyString;
Resulted in this output:
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.
PHP Version
8.2.0
Operating System
No response