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

ClassAnalyzer::hasTrait returns false if $parentClass is NULL #114

Merged
merged 1 commit into from
Jun 17, 2014
Merged

ClassAnalyzer::hasTrait returns false if $parentClass is NULL #114

merged 1 commit into from
Jun 17, 2014

Conversation

TomasVotruba
Copy link
Contributor

This throws class type error otherwise. I have my own BaseEntity class and ->getParentClass() returns null, so this collapses.

This throws class type error otherwise. I have my own BaseEntity class and ->getParentClass() returns null, so this collapses.
@TomasVotruba TomasVotruba changed the title ClassAnalyzer::hasTrait returns false if not \ReflectionClass ClassAnalyzer::hasTrait returns false if $parentClass is NULL Jun 9, 2014
@docteurklein
Copy link
Contributor

thanks! do you have time to add some tests ?

@TomasVotruba
Copy link
Contributor Author

Not really.

@TomasVotruba
Copy link
Contributor Author

Could you pls merge this? Other programmer in my project could not use this repo, unless they make the same fix as I did.

I'm making demo with KnpLabs to present that it's better than Gedmo and I need it to work to do so.

Is obvious, that $parentClass in return $this->hasTrait($parentClass, ...) is checked against type control, so NULL throws an error.

docteurklein added a commit that referenced this pull request Jun 17, 2014
ClassAnalyzer::hasTrait returns false if $parentClass is NULL
@docteurklein docteurklein merged commit 3b9c1e4 into KnpLabs:master Jun 17, 2014
@TomasVotruba
Copy link
Contributor Author

Thanks! :)

@TomasVotruba TomasVotruba deleted the patch-1 branch June 17, 2014 10:40
@TomasVotruba
Copy link
Contributor Author

Could I ask you to tag this version? Since it's bugfix it should be tagged 1.0.2

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