IBX-12530: Deprecated the schema-file API and moved DatabaseSchemaHook onto SchemaApplier - #47
Open
Steveb-p wants to merge 2 commits into
Open
IBX-12530: Deprecated the schema-file API and moved DatabaseSchemaHook onto SchemaApplier#47Steveb-p wants to merge 2 commits into
Steveb-p wants to merge 2 commits into
Conversation
Steveb-p
marked this pull request as ready for review
September 10, 2026 08:17
ibexa-workflow-automation-1
Bot
requested review from
ViniTou,
alongosz,
barw4,
bnowak,
ciastektk,
konradoboza,
mikadamczyk,
tbialcz and
wiewiurdp
and removed request for
a team
September 10, 2026 10:55
Steveb-p
force-pushed
the
bootstrapper-generic-kernel
branch
from
September 10, 2026 12:06
5ab9118 to
8f9cca2
Compare
…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.
Steveb-p
force-pushed
the
feature/deprecate-schema-files-provider
branch
from
September 10, 2026 12:51
b344f1e to
50d670d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This branch includes a temporary commit (
dependencies.json) that points CI atibexa/doctrine-schema#49 so tests can run before that PR merges. Must be removed before
merging this PR.
Related PRs:
SchemaApplierused hereIbexaKernelTestTrait::loadSchema()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-schemaPR.Two things:
DatabaseSchemaHookusesSchemaApplier. It reimplemented the sametoSql()-and-execute loopthat ibexa/core's
LegacySchemaImporterhas; both now call doctrine-schema's new applier. The hookpasses
$dropExistingTables = false, sinceBootstrapperalways hands it a freshly createddatabase.
RemoveUnsatisfiableHooksPassgainsSchemaApplierInterfacein the hook's requirements,so a kernel without
DoctrineSchemaBundlestill drops the hook cleanly rather than failing toautowire.
DefaultSchemaFilesProviderandIbexaTestKernel::getSchemaFiles()are deprecated. Nothing inthis package reads either any more — the schema comes from
SchemaBuilderEvent, so whicheverbundles a kernel registers is what the schema contains. They are deprecated rather than removed
because
Ibexa\Contracts\Core\Test\IbexaTestKernelInterfacestill mandatesgetSchemaFiles(), andibexa/core's
IbexaKernelTestTraitkept reading it until ibexa/core#823. Removal is a 6.0 job, andwants 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-usergives 11 / 19, identical to what it gives against #43 alone — so routing the hookthrough
SchemaApplierproduces the same schema.Note this branch also merges in the current tip of #43. #44 was cut before #43 gained the
IbexaTestKernelbundle registration, so both #44 and this branch were missing it; #44 has beenupdated too. Without it a consumer's schema comes out empty, which is exactly how this was caught.