-
-
Notifications
You must be signed in to change notification settings - Fork 424
Another way to resolve "No directory for Entity issue" #315
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
Another way to resolve "No directory for Entity issue" #315
Conversation
src/Maker/MakeEntity.php
Outdated
@@ -464,22 +453,9 @@ private function printAvailableTypes(ConsoleStyle $io) | |||
$printSection($allTypes); | |||
} | |||
|
|||
private function createEntityClassQuestion(string $questionText): Question | |||
private function createEntityClassQuestion(string $questionText, bool $isFirstInteract = false): Question |
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.
This 2nd arg isn't needed anymore
0f90718
to
2baf318
Compare
Thanks for taking another attempt at this! It's much more complex than I expected :). Can you explain a bit more why the tests are failing? On master, the tests ARE currently passing. So why does this change cause those tests to fail? |
today I cd to the test project for testing "MakeEntityXmlMappingError" maker-bundle/tests/fixtures/MakeEntityXmlMappingError/config/doctrine/User.orm.xml Line 10 in e873047
Another test tries to create UserAvatarPhoto entity and expects that annotation error for existing user xml Entity will be thrown. But current code checks only Entity which is about to be generated. |
2baf318
to
b357776
Compare
Ok, hmm, this helps. Question: if you revert your changes (i.e. use the master branch of this bundle), run the test, and then move into the test project for "MakeEntityXmlMappingError", do you get the error? |
yes there is no such error which is weird. Actually I know the answer this error is thrown after the fix and not thrown on master because after the fix DoctrineHelper:getEntitiesForAutocomplete() loads metadata before generating an Entity and application sees that there is an error in functional test metadata
|
Merged the other pull request - thanks! |
Here is actually yet another workaround idea as alternative to #311 to resolve issue with not loaded doctrine annotation metadata.
Just requiring file after entity is dumped to the file.
Also some tests are seems to be broken.
That's why they failing for #311 too.
maker-bundle/tests/Maker/FunctionalTest.php
Line 1124 in cc5c0d9
and
maker-bundle/tests/Maker/FunctionalTest.php
Line 1148 in cc5c0d9
Annotation error asserted in those test was thrown not because metadata type is wrong but because for the issue we are trying to resolve.
:)