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 Infinite loop on annotate classes #296

Merged
merged 2 commits into from Nov 25, 2022
Merged

Conversation

asgraf
Copy link
Contributor

@asgraf asgraf commented Nov 24, 2022

Fixes #295

@dereuromark
Copy link
Owner

Are you sure we dont need try/catch?
What if the code is broken in that model? Will reflection not throw exception here?

@dereuromark dereuromark changed the title #295 Fix Fix Infinite loop on annotate classes Nov 24, 2022
@asgraf
Copy link
Contributor Author

asgraf commented Nov 25, 2022

This is my first time writing any reflection code
I removed try catch because i assumed there will be no more runtime errors caused by instantiating class, but after second thought i think you are correct. If class has some syntax errors exception will be still thrown in that case.

Re-added try catch block to take care of any parse errors
@asgraf
Copy link
Contributor Author

asgraf commented Nov 25, 2022

I have readded try/catch block to the patch

@dereuromark dereuromark merged commit aebf269 into dereuromark:master Nov 25, 2022
@asgraf asgraf deleted the patch-1 branch November 25, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite loop on annotate classes with custom App\Model\Table\Table class
2 participants