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

Nette\Neon\Exception not found in 1.10.58 #10587

Closed
brendt opened this issue Feb 15, 2024 · 12 comments
Closed

Nette\Neon\Exception not found in 1.10.58 #10587

brendt opened this issue Feb 15, 2024 · 12 comments

Comments

@brendt
Copy link

brendt commented Feb 15, 2024

Bug report

Run vendor/bin/phpstan --error-format=github
Note: Using configuration file /home/runner/work/tempest-framework/tempest-framework/phpstan.neon.dist.
   0/177 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
 177/177 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] [10](https://github.com/tempestphp/tempest-framework/actions/runs/7916414140/job/21610274440#step:5:11)0%

Error: Instantiated class _PHPStan_[11](https://github.com/tempestphp/tempest-framework/actions/runs/7916414140/job/21610274440#step:5:12)268e5ee\Nette\Neon\Exception not found.
Error: Instantiated class _PHPStan_1[12](https://github.com/tempestphp/tempest-framework/actions/runs/7916414140/job/21610274440#step:5:13)68e5ee\Nette\Neon\Exception not found.
Error: Process completed with exit code 1.

Code snippet that reproduces the problem

No response

Expected output

For PHPStan to work, it does on 1.10.57, but not on 1.10.58

Did PHPStan help you today? Did it make you happy in any way?

No response

Copy link

mergeable bot commented Feb 15, 2024

This bug report is missing a link to reproduction at phpstan.org/try.

It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

What's the config you're running with?

@brendt
Copy link
Author

brendt commented Feb 15, 2024

Here it is:

parameters:
	level: 0
	paths:
		- src
		- app
		- tests

@ondrejmirtes
Copy link
Member

I can't reproduce that. Are you using phpstan/extension-installer? Maybe it's caused by a different neon file?

@brendt
Copy link
Author

brendt commented Feb 15, 2024

I'm not using phpstan/extension-installer as far as I'm aware. You can check out the failing run here and see its dependencies if that helps: https://github.com/tempestphp/tempest-framework/actions/runs/7916414140/job/21610274440

@ondrejmirtes
Copy link
Member

I'm going to look into it.

@ondrejmirtes
Copy link
Member

The message is correct - you're throwing a prefixed Exception coming from phpstan.phar: https://github.com/tempestphp/tempest-framework/blob/d2b5065928b58a68795c47070a6db7c339be259e/src/Tempest.php#L7

FYI you can remove --error-format=github. It detects the CI environment automatically.

@brendt
Copy link
Author

brendt commented Feb 16, 2024

Oh, I'm so sorry for the overhead!

@staabm
Copy link
Contributor

staabm commented Feb 21, 2024

ohh interessting.. I had the very same problem today with a
use _PHPStan_156ee64ba\Symfony\Component\String\Exception\RuntimeException;

not sure why this happens.. maybe its worth reporting a PHPStan rule error when a class uses a _PHPStan_ class-use?

edit: hmm actually its already a reported error...

grafik

is this something which we started to report in newer versions?

@ondrejmirtes
Copy link
Member

We'd have to check for this basically in all rules that check for unknown classes. You can list them by looking where ClassCaseSensitivityCheck is called from.

@ondrejmirtes
Copy link
Member

The errors are going to be much more clear: phpstan/phpstan-src#2932

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2024
staabm referenced this issue in sebastianbergmann/phpunit Apr 6, 2024
… some symbols where their name begins with PHPUnit\ in the future
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants