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

Fix autoloading of PhpunitCompatibilityTrait #145

Merged
merged 3 commits into from
Oct 9, 2020

Conversation

mglaman
Copy link
Owner

@mglaman mglaman commented Oct 8, 2020

Relates #143

@mglaman
Copy link
Owner Author

mglaman commented Oct 8, 2020

Notes:

  • When using the trait's identifier, it is loaded in _HumbugBoxf43f7c5c5350\Roave\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber::createClass
  • Able to reach _HumbugBoxf43f7c5c5350\Roave\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber::addTraitUse

But then the located source is somehow still null.

Screen Shot 2020-10-08 at 11 55 22 AM

@mglaman
Copy link
Owner Author

mglaman commented Oct 8, 2020

That's weird. It generates a stub but cannot locate the actual file. It has the comments, the use statement, etc.

Screen Shot 2020-10-08 at 12 00 47 PM

@mglaman
Copy link
Owner Author

mglaman commented Oct 8, 2020

Even more confused, as here it shows it has been autoloader by the analyzer.

Screen Shot 2020-10-08 at 12 05 38 PM

@mglaman
Copy link
Owner Author

mglaman commented Oct 8, 2020

Okay, I can confirm it is version 0.12.43 and the update of nikic/php-parser to 4.10.0 or ondrejmirtes/better-reflection to 4.3.29 (phpstan/phpstan-src@ff092a0)

@mglaman
Copy link
Owner Author

mglaman commented Oct 8, 2020

ondrejmirtes/better-reflection:4.3.29 was just a bump to nikic/php-parser:4.10.0: ondrejmirtes/BetterReflection@8221ddf

@mglaman
Copy link
Owner Author

mglaman commented Oct 8, 2020

Link to changes for php-parser: nikic/PHP-Parser@v4.9.1...v4.10.0

@mglaman mglaman changed the title Fix autoloading of test traits Fix autoloading of PhpunitCompatibilityTrait Oct 9, 2020
@mglaman mglaman merged commit 9d218ec into master Oct 9, 2020
@mglaman mglaman deleted the fix-autoloading-latest-phpstan branch October 9, 2020 14:15
@mglaman mglaman mentioned this pull request Apr 28, 2021
2 tasks
markdorison pushed a commit to markdorison/phpstan-drupal that referenced this pull request Jun 17, 2021
markdorison pushed a commit to markdorison/phpstan-drupal that referenced this pull request Jun 17, 2021
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