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

Add a configuration setting to disable generating type comments #6150

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

stof
Copy link
Member

@stof stof commented Sep 13, 2023

Q A
Type feature
Fixed issues closes #6056

Summary

This allows to opt-in for a schema generated without type comments once the project is migrating to the new schema tooling that does not need them, allowing to have a clean DB schema without waiting for DBAL 4.0 and to decouple the schema migration from the DBAL upgrade itself.

I decided to name that field disable* so that the opt-in for the new behavior is done by setting it to true

This allows to opt-in for a schema generated without type comments once
the project is migrating to the new schema tooling that does not need
them, allowing to have a clean DB schema without waiting for DBAL 4.0
and to decouple the schema migration from the DBAL upgrade itself.
Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the upgrade note introduced in #5509 be improved to point to the new configuration method?

@stof
Copy link
Member Author

stof commented Sep 13, 2023

I don't think so. The upgrade note is more for direct consumers of those APIs. But for most projects, those direct consumers are in the DBAL schema tool anyway.
The upgrade needed in downstream projects is to migrate to the new schema diffing APIs (which for most projects is a matter of updating doctrine/migrations to the latest version).

This new setting is something those projects can turn on once they have performed this upgrade.

@greg0ire greg0ire requested a review from derrabus September 13, 2023 19:52
@derrabus derrabus added this to the 3.7.0 milestone Sep 14, 2023
@derrabus derrabus merged commit 2dd7eb8 into doctrine:3.7.x Sep 14, 2023
81 checks passed
@stof stof deleted the skip_comment branch September 14, 2023 07:44
derrabus added a commit to derrabus/dbal that referenced this pull request Sep 18, 2023
* 3.7.x:
  Run tests against Postgres 16 (doctrine#6154)
  PHPStan 1.10.34, PHPUnit 9.6.12 (doctrine#6151)
  Bump CI workflows (doctrine#6152)
  Add a configuration setting to disable generating type comments (doctrine#6150)
  Fix invalid SQL in the document
  docs: link to the testing guidelines in CONTRIBUTING.md
  Fix IBM DB2 tests
  Implement binary array parameter type
  Document `driverOptions` for SQL Server connections (doctrine#6140)
derrabus added a commit to derrabus/dbal that referenced this pull request Sep 18, 2023
* 3.7.x:
  Run tests against Postgres 16 (doctrine#6154)
  PHPStan 1.10.34, PHPUnit 9.6.12 (doctrine#6151)
  Bump CI workflows (doctrine#6152)
  Add a configuration setting to disable generating type comments (doctrine#6150)
  Fix invalid SQL in the document
  docs: link to the testing guidelines in CONTRIBUTING.md
  Fix IBM DB2 tests
  Implement binary array parameter type
  Document `driverOptions` for SQL Server connections (doctrine#6140)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants