-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Create postGenerateComparisonSchema event #11374
Conversation
It seems there are CI jobs failing. Please take a look at this guide for more on how to handle those. |
30cdf61
to
c946ff3
Compare
Retargeting to 3.1.x since 3.0.x is not maintained anymore. |
Please kindly squash your commits together. If you don't, we'll try to remember to do it for you but it's best if you save us this trouble. How to do that?
|
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.
docs/en/reference/events.rst
needs to document the new event
7fc5f68
to
71d6576
Compare
Since this is not a patch, I think we should target 3.2.x 🤔 |
The base branch was changed.
Yes. 3.2.x is a bit behind. I'll retarget after a merge up. |
); | ||
$schemaTool = new SchemaTool($em); | ||
|
||
$schema = $schemaTool->getUpdateSchemaSql([]); |
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.
Unused variable $schema
.
self::assertTrue($listener->schemaCalled); | ||
self::assertTrue($listener->comparisonSchemaCalled); |
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.
The test does not really show me that I was able to influence the generated schema or SQL.
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.
Tried to improve the tests. This should show you that you can access the schema which the comparator uses.
71d6576
to
5ba0c02
Compare
5086074
to
1b938ab
Compare
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
This pull request was closed due to inactivity. |
Schemas generated from metadata cause the event
ToolEvents::postGenerateSchema
to be triggered in the methodSchemaTool::getSchemaFromMetadata
. It would be helpful to do the same for schemas generated for comparison inSchemaTool::createSchemaForComparison
. This PR introduces the new eventToolEvents::postGenerateComparisonSchema
.PR relates to an attempt to fix doctrine/migrations#1406. It is a requirement of doctrine/migrations#1418 and doctrine/DoctrineMigrationsBundle#529.