Nikita Popov
Nikita Popov
Closing this as won't fix.
We have since moved to using phpyacc, and https://github.com/nikic/PHP-Parser/pull/770 has split up the files to make reuse a bit simpler, which is about as far as I'm willing to go...
I've implemented a variation on this (with some additional handling for doc strings) in https://github.com/nikic/PHP-Parser/commit/f5adbb5e3fa57d2ff7b9ea179b88bcd2ced153e0.
Given how another year has passed in the meantime (ooops), I'll probably go for a PHP 7.4 requirement after all.
Implemented REPLACE_WITH_NULL in https://github.com/nikic/PHP-Parser/commit/afe1628a7221697726c9d677eb6c74fe394c792e.
What was the original motivation for this request? Above I've been thinking about the "radical" approach, but this could certainly also be introduced in a more minimal way, i.e. keeping...
I've implemented this variant in https://github.com/nikic/PHP-Parser/commit/a1ccf57727b4e74ea4043561dae968976fd2bec0. Let me know if this is not what you had in mind.
Given that dynamic properties are deprecated now, I think it's safe to close this.
Closing this tracking issue as done. If there are issues with formatting preservation, they should get reported as separate issues.
Adding a use statement outside a namespace (but in the top level statements) should work fine. There's not enough information here to determine where the assertion failure comes from.