Consistency
Consistency copied to clipboard
Do not use flexEntity in Hoa itself
Hi, I'm trying to integrate Hoa regex parser into PHPStan itself, and I've stumbled upon a problem.
Some code from Hoa project itself is using class aliases defined through flexEntity
. For example Hoa\File\Generic
extends Hoa\Stream
, but there are many more.
This makes prefixing the project by php-scoper for using inside scoped PHAR harder. I also suspect it'd make static analysis harder because these symbols aren't known to static reflection.
I'm also skeptical if this feature is needed at all, you could declare a new major version and stop supporting this aliases.
Related: https://github.com/hoaproject/Consistency/issues/29
Ot it seems this is used a lot: https://github.com/search?l=PHP&q=org%3Ahoaproject+flexEntity&type=Code
This is something we remove in the next version of Hoa. But life happened, and development had slow down. I'll fix this as soon as possible. We all agreed that it brings more troubles than it solves problems.