Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate scanner functionality (4.0), drop it (5.0) in favor of #17

Closed
weierophinney opened this issue Dec 31, 2019 · 3 comments · Fixed by #58
Closed

Deprecate scanner functionality (4.0), drop it (5.0) in favor of #17

weierophinney opened this issue Dec 31, 2019 · 3 comments · Fixed by #58
Assignees
Labels
BC Break Enhancement Question Further information is requested
Milestone

Comments

@weierophinney
Copy link
Member

Basically, parsing via regexes is simply not acceptable/viable anymore, and absolutely doesn't scale, as the syntax of PHP keeps changing.

@asgrim has been building https://github.com/Roave/BetterReflection since last year, and the library is stable/mature, so I'd suggest that we chop the head off this part of zend-code's functionality.

Thoughts?


Originally posted by @Ocramius at zendframework/zend-code#91

@weierophinney weierophinney added BC Break Enhancement Question Further information is requested labels Dec 31, 2019
@weierophinney
Copy link
Member Author

No problem here, that's the sort of thing BR can do I believe (though I'm not intimately familiar with the scanner here). If there is missing functionality in BR, I'm happy to take PRs or feature requests.


Originally posted by @asgrim at zendframework/zend-code#91 (comment)

@weierophinney
Copy link
Member Author

I'm 👍 for this. While I've been happy we've had this feature in zend-code, it's difficult to maintain, and, particularly with the fast pace of language additions/changes, hard to keep up-to-date. The only way we could accomplish that is with a rewrite to use an AST and/or tokenization approach (the latter of which BR uses, IIRC), which would be a significant undertaking. Since another tool exists, I'd be happy to point folks to that instead.


Originally posted by @weierophinney at zendframework/zend-code#91 (comment)

@Ocramius
Copy link
Member

Dropped directly in 4.0 via #58 - the scanners were completely unusable on PHP 8.0.0+ codebases anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break Enhancement Question Further information is requested
Projects
None yet
2 participants