-
Notifications
You must be signed in to change notification settings - Fork 51
Madness with exceptions #95
Comments
Hello :-), The purpose of flex entities is to keep BC when a class is moved into a namespace of the same name. This happens sometimes, and flex entities are here to solve this issue. When using PHPStorm, you might take a look at https://github.com/hoaproject/Devtools#expandflexentities. Running |
I close the issue because I answered it, but feel free to re-open if you still have a question. |
I don't get it. Do you mean |
Let's consider |
@Hywan OK, but it still solves with If I understand it right, it's better to refactor it. |
Maybe it's just a PhpStorm's bug, but I really didn't find the root
Exception
class.— what is that? Aliasing sub-namespace or aliasing class
Exception
in the namespaceHoa
?If first, how does it work:
?
If second, I see no class
Exception
in the namespaceHoa
(onlyHoa\Exception\Exception
).It looks like black magic. What's the purpose?
And aliasing is still supported by most popular IDE (PhpStorm) quite bad, e.g. find usages ignores aliased classes. I know that it's not an argument ("they should fix it"), but it also leads to confusions when reading code. Is it possible to resolve all aliases?
And I still don't get purpose of
Consistency::flexEntity
.The text was updated successfully, but these errors were encountered: