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

Early version of using PHPStan for parsing. #1383

Closed
wants to merge 7 commits into from
Closed

Early version of using PHPStan for parsing. #1383

wants to merge 7 commits into from

Conversation

patrickkusebauch
Copy link
Collaborator

@patrickkusebauch patrickkusebauch commented Mar 2, 2024

The current run on deptrac itself finds new dependencies not found with the old method when calling parent::method() by resolving the parent to the actual class.

There are 10_000 things surely wrong with the implementation that need fixing in the next passes, there are no tests, BUT, it works.

Big thanks to @TomasVotruba for Rector and his blog as it allowed me by example to integrate PHPStan DIC to deptrac.

While it does not add much on its own, I see how this might allow us to resolve many open issues in the future, like the oldest open issue #449.

@gennadigennadigennadi
Copy link
Member

@patrickkusebauch thank you very much for the contributions you are doing for Deptrac. I still reading all the PRs, but unfortunately I can’t work on Deptrac as much as I would like too.

But I might get enough spare time the week before eastern to prepare the new release process, what means new releases will be easier to cut.

@patrickkusebauch patrickkusebauch changed the title Very early version of using PHPStan for parsing. Early version of using PHPStan for parsing. Mar 5, 2024
Current run on deptrac itself finds new dependencies not found with the old method when calling `parent::method()` by resolving the `parent` to the actual class.

There is 10_000 things surely wrong with the implementation that needs fixing in the next passes, there are no tests, BUT, it works.

Big thanks to Tomas Votruba for Rector and his blog as it allowed me by example to integrate PHPStan DIC to deptrac.
…ing and leave creating references to dedicated extractors.

As a consequence the FileReferenceVisitor code is way more readable now.
…entations. Similar to how PHPStan custom rules work. Also allows us to call extractors only when they apply to the node in question.
@gennadigennadigennadi
Copy link
Member

Please update the git origin for development to https://github.com/qossmic/deptrac-src and reopen the PR.
Thank you very much!

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

Successfully merging this pull request may close these issues.

2 participants