-
-
Notifications
You must be signed in to change notification settings - Fork 416
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 Entity directory does not exist #311
Conversation
OMG - finally! So happy to see this PR! And, it was even simpler than I expected! We do have test failures, unfortunately. @yceruto could you take a look at them? They could be false failures. But it might also be an indication that using the new way may cause an unintended exception to be thrown in some cases. Thanks! |
Also, see #310 - I think the other PR may have "hit" the same issue that's causing the tests to fail here 🤔 |
Yep, (in the same life time of the script) the first time that Even if the last commit resolves part of the problem I guess there are still other cached properties related to the mapping type that need to be invalidated for the same reason. So I think we should go back to the |
Also we could re-think the way this Annotation Mapping requirement is validated, because currently it's checked after the entity was already generated. |
Well, I've fixed an invalid mapping from the fixture of the two remaining fails and all green again. |
$metadataDriver = $em->getConfiguration()->getMetadataDriverImpl(); | ||
if ($metadataDriver instanceof MappingDriverChain) { | ||
foreach ($metadataDriver->getDrivers() as $driver) { | ||
if ($driver instanceof AnnotationDriver) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! Yea, this issue is a bummer - but nice job at least finding a workaround.
Does this only affect the AnnotationDriver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also for StaticPHPDriver
but we only support annotation driver, right?
This PR was squashed before being merged into the 1.0-dev branch (closes #311). Discussion ---------- Fix Entity directory does not exist Closes #299 according to #185 (comment) Also alternative for #185, #265 and #310 Commits ------- 5f37c5d Remove invalid field mapping 06f5399 Invalidating cached AnnotationDriver::$classNames to find new entities 8b7c291 Fix 'src/Entity' directory does not exist
Thank you very much for figuring this out @yceruto! |
Closes #299 according to #185 (comment)
Also alternative for #185, #265 and #310