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

[DEPRECATION] Usage of static factory methods #361

Open
jaapio opened this issue Mar 20, 2024 · 0 comments
Open

[DEPRECATION] Usage of static factory methods #361

jaapio opened this issue Mar 20, 2024 · 0 comments
Milestone

Comments

@jaapio
Copy link
Member

jaapio commented Mar 20, 2024

Parsing types and variables is becoming more complex these days. Types are evolving faster than the limited time I have to maintain this package while a large number of projects still depends on this library to fully support all kind of type definitions.

To keep up with the ecosystem, it was easier to switch to phpstan/parser to some of the tags. These tags are currently created by a static factory method that contains all the parsing logic for that tag. This has been replaced with a more advanced way of creating those tags using a dedicated factory that can handle the phpstan AST.

I assume that nobody is creating tag object directly, however I cannot be sure. By deprecating the create method in v5 and removing it in v6. There is a more clear migration path for users. If you are using the tags as stand-alone object you should stop doing that and move to the normal docblock factory as shown in the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant