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

Migrate more usages of SchemaTool::createSchema() #9874

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Jul 1, 2022

When I introduced OrmFunctionalTestCase::createSchemaForModels(), I made
several wrong assumptions:

  • the call is always wrapped in a try / catch;
  • that try / catch is always typed with "Exception".

Because of that, I missed, many, many occurrences of
SchemaTool::createSchema().

I recently noticed that contributors kept using the
SchemaTool::createSchema() and figured not everything had been
migrated.

Migrating some of them did not result in something far better until I
also introduced similar methods for
SchemaTool::getUpdateSchemaSql() and SchemaTool::getSchemaFromMetadata().

@greg0ire greg0ire force-pushed the migrate-to-csfm branch 3 times, most recently from 803be99 to 8a94d0c Compare July 1, 2022 19:37
When I introduced OrmFunctionalTestCase::createSchemaForModels(), I made
several wrong assumptions:
- the call is always wrapped in a try / catch;
- that try / catch is always typed with "Exception".

Because of that, I missed, many, many occurrences of
SchemaTool::createSchema().

I recently noticed that contributors kept using the
SchemaTool::createSchema() and figured not everything had been
migrated.

Migrating some of them did not result in something far better until I
also introduced similar methods for
SchemaTool::getUpdateSchemaSql() and SchemaTool::getSchemaFromMetadata().
@greg0ire greg0ire marked this pull request as ready for review July 1, 2022 19:57
@greg0ire greg0ire added this to the 2.12.4 milestone Jul 1, 2022
@greg0ire greg0ire merged commit 3295ccf into doctrine:2.12.x Jul 1, 2022
@greg0ire greg0ire deleted the migrate-to-csfm branch July 1, 2022 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants