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

don't stop processing for class usage after raising an issue #6899

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

pilif
Copy link
Contributor

@pilif pilif commented Nov 12, 2021

this fixes #6887

@orklah orklah added the release:fix The PR will be included in 'Fixes' section of the release notes label Nov 12, 2021
public function testSeesClassesUsedAfterUnevaluatedCodeIssue(): void
{
$this->project_analyzer->getConfig()->throw_exception = false;
$file_path = getcwd() . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'somefile.php';
Copy link
Contributor Author

@pilif pilif Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw: the other tests in this file use a broken $file_path and only work by accident because the project analyzer is configured to throw rather than record the issue.

the other tests use self::$src_dir_path . 'somefile.php'; which points to the src dir which isn't in the project directory used by the test project_analyzer (which is getcwd() . '/tests' which causes it to not record any issues (the throwing check is happening way before the issue-recording check)

This took me a while to find, especially because everything is nicely failing silently along the path once you tell the config to not throw exceptions.

@orklah orklah merged commit 2d0758a into vimeo:master Nov 12, 2021
@orklah
Copy link
Collaborator

orklah commented Nov 12, 2021

Great! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix The PR will be included in 'Fixes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UneavaluatedCode issue causes further processing to stop for detecting class usage
2 participants