IBX-12530: Allowed Bootstrapper to run against any KernelInterface, not just IbexaTestKernel - #44
Merged
Merged
Conversation
This was referenced Sep 8, 2026
Steveb-p
force-pushed
the
bootstrapper-generic-kernel
branch
from
September 8, 2026 21:39
54d82db to
b9473f4
Compare
Steveb-p
force-pushed
the
bootstrapper-generic-kernel
branch
from
September 9, 2026 07:37
b9473f4 to
ac46fa1
Compare
Steveb-p
force-pushed
the
bootstrapper-generic-kernel
branch
from
September 9, 2026 08:05
ac46fa1 to
54d5fca
Compare
Steveb-p
force-pushed
the
bootstrapper-generic-kernel
branch
2 times, most recently
from
September 9, 2026 10:01
dee38b6 to
e7b79c2
Compare
Steveb-p
force-pushed
the
bootstrapper-generic-kernel
branch
from
September 9, 2026 10:16
e7b79c2 to
b717cc5
Compare
Steveb-p
marked this pull request as ready for review
September 9, 2026 12:00
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 07:50
konradoboza
approved these changes
Sep 10, 2026
ibexa-workflow-automation-1
Bot
requested review from
konradoboza
and removed request for
a team
September 10, 2026 10:55
…ernel KernelProvider asserted an IbexaTestKernel subclass and DatabasePreparer/Bootstrapper echoed that in their signatures, yet none of those bodies touch anything beyond KernelInterface: an Application to run console commands through, a container, and shutdown(). Relaxed all of them, so a package testing its own bundle in isolation can bring its own kernel. FixtureKernelMethodProvider already worked this way, duck-typing getFixtures() off a plain KernelInterface. That alone wasn't enough: FixtureHook autowires FixtureImporter (registered by IbexaTestKernel::loadServices()) and both purge hooks reference "ibexa.spi.search" (registered by IbexaCoreBundle), so a minimal kernel failed container compilation just for registering IbexaTestCoreBundle. Added them to RemoveUnsatisfiableHooksPass, which already drops DatabaseSchemaHook the same way -- one mechanism for every built-in hook rather than a special case per hook.
Steveb-p
force-pushed
the
bootstrapper-generic-kernel
branch
from
September 10, 2026 12:06
5ab9118 to
8f9cca2
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.
Related PRs:
RemoveUnsatisfiableHooksPass, which this PR extends); retarget to4.6once that landsDescription:
Bootstrappercouldn't be used by a package testing its own bundle in isolation, for two independent reasons.The type was the smaller one.
KernelProviderasserted anIbexaTestKernelsubclass andDatabasePreparer/Bootstrapperechoed that in their signatures — but none of those bodies touch anything beyondKernelInterface: anApplicationto run console commands through, a container, andshutdown(). All relaxed.FixtureKernelMethodProvideralready worked this way, duck-typinggetFixtures()off a plainKernelInterfacewith a docblock noting kernels are expected to move away from these methods anyway.The bigger one was this bundle's own hooks.
FixtureHookautowiresFixtureImporter(registered byIbexaTestKernel::loadServices()), and both purge hooks referenceibexa.spi.search(registered byIbexaCoreBundle). So merely registeringIbexaTestCoreBundlein a minimal kernel blew up container compilation before any test ran — relaxing the type alone would have got you nowhere.#43 already added
RemoveUnsatisfiableHooksPassforDatabaseSchemaHook, so this just adds the other three to its requirements map. One mechanism for every built-in hook rather than a special case per hook, and a kernel ends up withHooksExecutorplus whatever it can actually satisfy.For QA:
KernelProviderTestgainedtestAcceptsAnyKernelInterfaceImplementation, booting a plainKernelsubclass that is deliberately not anIbexaTestKernel(39 tests total).Behaviour checked in both directions:
ibexa/activity-log) — all four hooks still registered, 124 tests / 855 assertions with the same single pre-existing failure as before, i.e. the pass removes nothing when the services are presentibexa/doctrine-migrations, noibexa/coredependency at all) — all four hooks dropped,HooksExecutorpresent with zero hooks, suite green at 8 tests / 18 assertions