Consistency icon indicating copy to clipboard operation
Consistency copied to clipboard

Do not use flexEntity in Hoa itself

Open ondrejmirtes opened this issue 5 years ago • 2 comments

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

ondrejmirtes avatar Jan 25 '20 12:01 ondrejmirtes

Ot it seems this is used a lot: https://github.com/search?l=PHP&q=org%3Ahoaproject+flexEntity&type=Code

staabm avatar Jan 26 '20 08:01 staabm

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.

Hywan avatar Jan 27 '20 12:01 Hywan