Skip to content

Conversation

@OskarStark
Copy link
Contributor

@OskarStark OskarStark commented Dec 1, 2025

Closes #258

@OskarStark OskarStark force-pushed the upgrade-doctrine-packages branch 24 times, most recently from c93aad9 to 926763e Compare December 1, 2025 09:32
@stof
Copy link
Member

stof commented Dec 1, 2025

tests are failing there, for some database-related issue, which is likely related.

@OskarStark
Copy link
Contributor Author

Yes, I tried to fix them, but wasn't successful :-(

Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

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

As you have upgraded DBAL to version 4, I think the strategy used for AUTO has changed for Postgresql. This probably requires generating a DB migration to have the DB schema in sync with the behavior of the code, or changing the DoctrineBundle config to restore the previous behavior.

@stof
Copy link
Member

stof commented Dec 1, 2025

See https://github.com/doctrine/dbal/blob/4.4.x/UPGRADE.md#bc-break-auto-increment-columns-on-postgresql-are-implemented-as-identity-not-serial and https://github.com/doctrine/orm/blob/3.5.x/UPGRADE.md#bc-break-auto-keyword-for-identity-generation-defaults-to-identity-for-postgresql-when-using-doctrinedbal-4

As the existing setup uses the sequence generator for AUTO, there is 2 migrations paths:

  • configure a preference to keep using sequence
  • migrate to the new IDENTITY setup by adding the appropriate DB migration (however, I just noticed that the Doctrine docs only document the DB migration from SERIAL to IDENTITY, not the migration for SEQUENCE)

@OskarStark
Copy link
Contributor Author

Thanks, will have a look

@OskarStark OskarStark force-pushed the upgrade-doctrine-packages branch 4 times, most recently from 4ef0267 to 788bf69 Compare December 1, 2025 17:10
- doctrine/dbal: ^2.13 → ^4.2
- doctrine/doctrine-bundle: ^2.4 → ^2.13
- doctrine/doctrine-migrations-bundle: ^3.0 → ^3.4
- doctrine/orm: ^2.7 → ^3.3
- Remove doctrine/common (no longer required)
- Remove naming_strategy config (now default in ORM 3.x)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@OskarStark OskarStark force-pushed the upgrade-doctrine-packages branch from 788bf69 to 678dea1 Compare December 1, 2025 17:11
@OskarStark OskarStark requested a review from stof December 1, 2025 17:15
@OskarStark
Copy link
Contributor Author

@stof I could not go with CPP as it cannot generate the name properly

@OskarStark OskarStark merged commit efa7a20 into master Dec 2, 2025
4 checks passed
@OskarStark OskarStark deleted the upgrade-doctrine-packages branch December 2, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants