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

Rethink: "Deprecate extension via schema manipulation events" #6824

Open
lyrixx opened this issue Mar 6, 2025 · 0 comments
Open

Rethink: "Deprecate extension via schema manipulation events" #6824

lyrixx opened this issue Mar 6, 2025 · 0 comments

Comments

@lyrixx
Copy link

lyrixx commented Mar 6, 2025

Hello,

I had to fix this deprecation, and honestly, I'm not really happy with the result.


My use case is the following:

I have some special columns in my DB that my Entity does not need. It's a speciel fields for indexing data. See https://www.postgresql.org/docs/current/datatype-textsearch.html

So, in order to avoid a diff each time I run doctrine:scheme:validate or doctrine:migration:diff I added a small listener to remove the column, and the indices.

Today, I migrated to DBAL 4, and I had to replace this. I may be wrong, but I ended with this commit :

jolicode/qotd@dcd5313

  1. There is no interface on AbstractSchemaManager. So I needed to "implements" some protected method, But there a not used at all
  2. There is a lot of method to decorate
  3. Schema::getSchemaConfig() does not exist

I think this use case is a bit common, so I'm proposing the following

  1. Create a SchemaManager Interface
  2. If possible, an AbstractDecoratedSchemaManager (a bit like AbstractDriverMiddleware)
  3. Add Schema::getSchemaConfig()

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant