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

Prevent uncaught class-not-found exceptions #6160

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jul 18, 2024

analog #6159

@staabm
Copy link
Contributor Author

staabm commented Jul 18, 2024

after this PR there is only one remaining place where reflectionProvider->getClass() is called without a previous hasClass() call.

return $this->reflectionProvider->getClass($className);

I don't see a way how this method could return gracefully in this case.
I guess we could e.g. add a return null case, but this would mean a BC break for this method.

not sure how important this method is and how often used in 3rd party packages

(but this is something to consider as a separate issue and should not block this PR here)

@samsonasik samsonasik merged commit d119ad2 into rectorphp:main Jul 18, 2024
34 checks passed
@samsonasik
Copy link
Member

Thank you @staabm

@staabm staabm deleted the has-class branch July 18, 2024 14:34
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