Skip to content

IBX-11939: Replaced ibexa.installer.schema_builder_event with an opt-in ibexa.installer.doctrine_migrations - #892

Open
Steveb-p wants to merge 3 commits into
4.6from
feature/doctrine-migrations-opt-in-4.6
Open

Steveb-p wants to merge 3 commits into
4.6from
feature/doctrine-migrations-opt-in-4.6

Conversation

@Steveb-p

@Steveb-p Steveb-p commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-11939

Related PRs:

Description:

ibexa.installer.schema_builder_event.enabled: false turned out to be hard to explain: you turn the new Doctrine Migrations install path on by turning the legacy one off. This replaces it with a positive opt-in:

ibexa:
    installer:
        doctrine_migrations: true

ibexa.installer.doctrine_migrations is a bundle configuration node built with canBeEnabled(), so doctrine_migrations: { enabled: true } works too. It defaults to false, which keeps ibexa:install on SchemaBuilderEvent, same as before. Once the default flips in a later major, the node becomes canBeDisabled().

IbexaCoreExtension hands the resolved value to CoreInstaller through the ibexa.installer.doctrine_migrations.enabled container parameter. CoreInstaller's $schemaBuilderEventEnabled argument became $doctrineMigrationsEnabled, with both importSchema() and importData() inverted to match.

There's no BC layer for the old key on purpose: it came in with #785 and no release contains it yet. Configuring it now fails with Unrecognized option "schema_builder_event" under "ibexa.installer".

ibexa/installer's product installers get CoreInstaller's arguments through parent: as named ones, so ibexa/installer#239 renames the argument there as well. With only one of the two in, the container doesn't build (method "__construct()" has no argument named "$doctrineMigrationsEnabled"), same as with #785 and ibexa/installer#213.

The two new IbexaCoreExtensionTest cases bring the unit suite to 239 direct deprecations out of the allowed 240: every extension load triggers 2 of them, from the old-style setDeprecated() calls in Configuration\Parser\Common.

Checked with a fresh ibexa:install ibexa-commerce on 4.6 (MySQL 8.0 and PostgreSQL 16): with doctrine_migrations: true all 25 migrations end up executed; with false the legacy path runs and none are.

Documentation:

The option to document is ibexa.installer.doctrine_migrations (default false), replacing ibexa.installer.schema_builder_event.enabled. When it's true, ibexa:install installs the database schema and the core data by running the Ibexa-tagged Doctrine Migrations instead of dispatching SchemaBuilderEvent; that needs ibexa/doctrine-migrations. ibexa/documentation-developer#3337 doesn't mention either key yet.

…" setting with an opt-in "ibexa.installer.doctrine_migrations"
Comment thread src/bundle/Core/DependencyInjection/IbexaCoreExtension.php Outdated
Comment thread tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php
…ling back in the extension

Covered the nested "enabled" syntax of "ibexa.installer.doctrine_migrations" in the extension test as well.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Doc needed The changes require some documentation Improvement Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants