Skip to content

IBX-12530: Deprecated the schema-file API and moved DatabaseSchemaHook onto SchemaApplier - #47

Open
Steveb-p wants to merge 2 commits into
4.6from
feature/deprecate-schema-files-provider
Open

IBX-12530: Deprecated the schema-file API and moved DatabaseSchemaHook onto SchemaApplier#47
Steveb-p wants to merge 2 commits into
4.6from
feature/deprecate-schema-files-provider

Conversation

@Steveb-p

@Steveb-p Steveb-p commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Warning

This branch includes a temporary commit (dependencies.json) that points CI at
ibexa/doctrine-schema#49 so tests can run before that PR merges. Must be removed before
merging this PR.

🎫 Issue IBX-12530

Related PRs:

Description:

Tidy-up after #43, deliberately kept out of #43 so that PR — which 26 package PRs depend on —
does not acquire a dependency on an unmerged ibexa/doctrine-schema PR.

Two things:

DatabaseSchemaHook uses SchemaApplier. It reimplemented the same toSql()-and-execute loop
that ibexa/core's LegacySchemaImporter has; both now call doctrine-schema's new applier. The hook
passes $dropExistingTables = false, since Bootstrapper always hands it a freshly created
database. RemoveUnsatisfiableHooksPass gains SchemaApplierInterface in the hook's requirements,
so a kernel without DoctrineSchemaBundle still drops the hook cleanly rather than failing to
autowire.

DefaultSchemaFilesProvider and IbexaTestKernel::getSchemaFiles() are deprecated. Nothing in
this package reads either any more — the schema comes from SchemaBuilderEvent, so whichever
bundles a kernel registers is what the schema contains. They are deprecated rather than removed
because Ibexa\Contracts\Core\Test\IbexaTestKernelInterface still mandates getSchemaFiles(), and
ibexa/core's IbexaKernelTestTrait kept reading it until ibexa/core#823. Removal is a 6.0 job, and
wants to happen in step with that interface.

For QA:

composer test — 39 tests / 92 assertions, unchanged. PHPStan and code style clean.

End-to-end against a real consumer, with this branch and doctrine-schema#49 both symlinked in:
ibexa/dam-user gives 11 / 19, identical to what it gives against #43 alone — so routing the hook
through SchemaApplier produces the same schema.

Note this branch also merges in the current tip of #43. #44 was cut before #43 gained the
IbexaTestKernel bundle registration, so both #44 and this branch were missing it; #44 has been
updated too. Without it a consumer's schema comes out empty, which is exactly how this was caught.

@Steveb-p Steveb-p changed the title Deprecated the schema-file API and moved DatabaseSchemaHook onto SchemaApplier IBX-12530: Deprecated the schema-file API and moved DatabaseSchemaHook onto SchemaApplier Sep 9, 2026
@Steveb-p
Steveb-p marked this pull request as ready for review September 10, 2026 08:17
@Steveb-p
Steveb-p requested a review from a team September 10, 2026 10:55
@Steveb-p
Steveb-p force-pushed the bootstrapper-generic-kernel branch from 5ab9118 to 8f9cca2 Compare September 10, 2026 12:06
Base automatically changed from bootstrapper-generic-kernel to 4.6 September 10, 2026 12:06
…maApplier

DatabaseSchemaHook reimplemented the toSql()-and-execute loop that ibexa/core's
LegacySchemaImporter also has; both now use doctrine-schema's SchemaApplier. The hook needs no
dropping, since Bootstrapper always hands it a freshly created database.

DefaultSchemaFilesProvider and IbexaTestKernel::getSchemaFiles() are deprecated. Nothing in this
package reads them any more: the schema comes from SchemaBuilderEvent, so whichever bundles a
kernel registers is what the schema contains. They stay because
IbexaTestKernelInterface still mandates getSchemaFiles(), and ibexa/core's IbexaKernelTestTrait
kept reading it until ibexa/core#823.
…ema#49

Points CI at the branch that adds SchemaApplier, so this PR's tests can run before that PR
merges. Must be removed before merging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant