mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Enable schema modification before comparison #7065
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 @derrabus on GitHub (Nov 7, 2022).
Feature Request
Summary
In doctrine/dbal#5784, the event system of the DBAL has been deprecated. In ORM projects, the DBAL events were often used to modify the schema that the ORM generated, before it was compared to the current database. Possible use-cases are:
I think, we should create such a hook in the ORM, which would allow projects to migrate away from DBAL's event system.
@stof commented on GitHub (Nov 7, 2022):
The ORM already triggers
\Doctrine\ORM\Tools\ToolEvents::postGenerateSchemato let event listeners modify the schema exactly at that point. And this covers at least the first 2 bullet points (I'm doing that in prod since years). For the last 2 bullet points, it depends whether such things can be achieved with the Schema API (if the Schema cannot represent them, no extension points allowing to change the Schema before comparing it will ever support them)@nicolas-grekas commented on GitHub (Dec 12, 2022):
This is the last issue in the v2.14 milestone, should we move it to v2.15? Or maybe just do nothing and close after @stof's comment?