-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
BC BREAK: removed Scanner
component, removed FileReflection
, removed NameInformation
and made DocBlockScanner
@internal
#58
Conversation
Also here: BEFORE merging, we need Github Actions to actually run on the codebase. I went way overtime with this, but my aim is to do that Wednesday after work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
I've checked the documentation and README.md file, and there are no mentions at all of scanning, so I think with a CHANGELOG.md entry, you're good to go.
…ved `NameInformation` and made `DocBlockScanner` `@internal` The scanners were full of incomplete, untested and generally experimental code that would simply crash when presented with something like PHP 8 code. In addition to that, they were extremely unmaintainable due to the code being written for PHP 5, and never being touched afterwards (too complex). In order to slim down things and keep maintenance cost low, the complete `Laminas\Code\Scanner` component has been trashed, with the exception of `Laminas\Code\Scanner\DocBlockScanner`, which is still used in in some reflection internals. It is advised for end-users to move to more modern tooling, such as [`roave/better-reflection`](https://github.com/Roave/BetterReflection) which provides a safer (and well tested) API to scan source directories and extract reflection information without loading any potentially dangerous PHP files. The following components have been removed from the public API: * `Laminas\Code\Scanner\*` * `Laminas\Code\NameInformation` (unused in this package) * `Laminas\Code\Reflection\FileReflection` (use `roave/better-reflection` instead) * `Laminas\Code\Generic\Prototype\*`, which contains utilities to define custom docblock types: please consider using something like https://github.com/phpDocumentor/ReflectionDocBlock instead. Signed-off-by: Marco Pivetta <[email protected]>
…ity-check` since `3.5.x` See https://github.com/Roave/BackwardCompatibilityCheck Signed-off-by: Marco Pivetta <[email protected]>
…l` addition or deletions Signed-Off-By: Marco Pivetta <[email protected]>
19601c0
to
ab21223
Compare
The scanners were full of incomplete, untested and generally experimental code that would simply
crash when presented with something like PHP 8 code.
In addition to that, they were extremely unmaintainable due to the code being written for PHP 5,
and never being touched afterwards (too complex).
In order to slim down things and keep maintenance cost low, the complete
Laminas\Code\Scanner
component has been trashed, with the exception of
Laminas\Code\Scanner\DocBlockScanner
, whichis still used in in some reflection internals.
It is advised for end-users to move to more modern tooling, such as
roave/better-reflection
which provides a safer (and well tested) API to scan source directories and extract reflection
information without loading any potentially dangerous PHP files.
The following components have been removed from the public API:
Laminas\Code\Scanner\*
Laminas\Code\NameInformation
(unused in this package)Laminas\Code\Reflection\FileReflection
(useroave/better-reflection
instead)Laminas\Code\Generic\Prototype\*
, which contains utilities to define custom docblock types:please consider using something like https://github.com/phpDocumentor/ReflectionDocBlock instead.
TODOs:
CHANGELOG.md
entry (992c26e)Scanner
component, removedFileReflection
, removedNameInformation
and madeDocBlockScanner
@internal
#58 (review) )