mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
PHP attributes usage cause unexpected changes #6896
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mpiot on GitHub (Jan 7, 2022).
Bug Report
Summary
In a project I try to update from Doctrine Annotations to PHP Attributes, but it causing unexpected schema changes. (Replace the doctrine/migrations#1222)
Current behavior
Previous annotations:
New attributes:
When executing a migrations we have something like:
If I dump fromSchema and toSchema from the Doctrine/Migration DiffGenerator, I have something like:
Before:
After (with attributes):
Expected behavior
By changing from DoctrineAnnotations to PHP Attributes, this change should not appear. This appear 10 times for 51 ManyToMany relations.
The change is always the same, we loose the 'ON DELETE CASCADE' and the constraint name is uppercase.