-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fix Doctrine deprecations #50524
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 Doctrine deprecations #50524
Conversation
nicolas-grekas
commented
Jun 1, 2023
•
edited
Loading
edited
Q | A |
---|---|
Branch? | 5.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Tickets | Fix #50481 |
License | MIT |
Doc PR | - |
58e449f
to
cfc74e6
Compare
cfc74e6
to
6a3a4d7
Compare
@@ -480,9 +480,11 @@ private function updateSchema(): void | |||
|
|||
$schemaManager = $this->createSchemaManager(); | |||
$comparator = $this->createComparator($schemaManager); | |||
$schemaDiff = $this->compareSchemas($comparator, $schemaManager->createSchema(), $this->getSchema()); | |||
$schemaDiff = $this->compareSchemas($comparator, method_exists($schemaManager, 'introspectSchema') ? $schemaManager->introspectSchema() : $schemaManager->createSchema(), $this->getSchema()); |
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.
@nicolas-grekas actually this change deletes all existing tables in the database π¬
Reverting this code-block fixes the issue.
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.
Can you please open a new issue if you think that this change is wrong (best with a failing example application)? Comments on closed PRs are likely to get lost.
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.
By the way, reading the code I fail to see how this change can change the actual behaviour (the new instrospectSchema()
method calls createSchema()
internally).
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.
@xabbuh yeah, I also thought so, but when I just reverted this code block (not the entire file) it continued to work as expected. But yes, I'll create a follow-up ticket with a reproducible case. Thanks so far ππ