Skip to content

IBX-12358: Generated bundles now bootstrap integration tests through Bootstrapper - #46

Merged
Steveb-p merged 1 commit into
mainfrom
feature/bootstrapper-skeleton
Sep 10, 2026
Merged

IBX-12358: Generated bundles now bootstrap integration tests through Bootstrapper#46
Steveb-p merged 1 commit into
mainfrom
feature/bootstrapper-skeleton

Conversation

@Steveb-p

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

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12358

Related PRs:

Description:

The skeleton still ships the pre-IBX-12358 hand-rolled bootstrap — boot the kernel, drop and
create the database, run doctrine:schema:update, loop getSchemaFiles() through
LegacySchemaImporter, loop getFixtures(), purge the search index. So every newly generated
bundle is born on a flow the rest of the org has already moved off, and one that a maintainer then
has to migrate by hand. ibexa/test-core 5.0 — which the skeleton already requires — has shipped
Bootstrapper for a while.

tests/integration/bootstrap.php becomes the same five-line call every other package uses, and
TestKernel registers IbexaTestCoreBundle, which Bootstrapper needs for
HooksExecutorInterface and the built-in hooks.

The getSchemaFiles() override is dropped. It did:

yield from parent::getSchemaFiles();
yield from [$this->locateResource('@IbexaCoreBundle/Resources/config/storage/legacy/schema.yaml')];

— but parent::getSchemaFiles() already yields exactly that file via DefaultSchemaFilesProvider,
so it was listing it twice. It is redundant today, and ibexa/test-core#43 deprecates the whole
schema-file API on top of that. getFixtures() and getExposedServicesByClass() stay as
passthrough scaffolding, since those are still the hooks a bundle author fills in.

Both skeletons (ibexa-oss and ibexa-ee) were identical here and get the identical change.

For QA:

Generated a bundle from the modified skeleton and booted it for real:

php bin/ibexa-bundle-generator schema-hook-probe target \
  --vendor-name=ibexa --vendor-namespace=Ibexa --bundle-name=IbexaSchemaHookProbe \
  --skeleton-name=ibexa-oss -n
cd target && composer update && composer test-integration

Bootstrap completes cleanly (No tests executed! — the skeleton ships no tests yet) against
ibexa/test-core 5.0.x-dev.

Then, to confirm this is behaviour-preserving rather than merely non-crashing, the same generated
bundle was run twice against the same installed vendor/ — once with the old hand-rolled
bootstrap.php/TestKernel, once with the new ones — and the resulting SQLite schemas compared:
52 tables each, table lists identical.

composer phpstan and composer check-cs on this repo are clean. Note the repo's own tests/
tree contains no test files, so nothing here asserts on generated output — the verification above
was manual.

The skeleton still shipped the pre-IBX-12358 hand-rolled bootstrap: boot the kernel, drop and
create the database, run doctrine:schema:update, loop getSchemaFiles() through
LegacySchemaImporter, loop getFixtures(), purge the search index. Every newly generated bundle
was therefore born on a flow the rest of the org has already moved off, and ibexa/test-core 5.0
has shipped Bootstrapper for a while.

tests/integration/bootstrap.php is now the same five-line Bootstrapper call every other package
uses, and TestKernel registers IbexaTestCoreBundle, which Bootstrapper requires.

The getSchemaFiles() override is dropped. It yielded parent::getSchemaFiles() and then yielded
@IbexaCoreBundle's legacy schema.yaml again — which the parent already provides — so it was
duplicating a file even before ibexa/test-core#43 deprecated the whole schema-file API.
@sonarqubecloud

Copy link
Copy Markdown

@konradoboza konradoboza left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

@Steveb-p
Steveb-p marked this pull request as ready for review September 10, 2026 09:29
@Steveb-p
Steveb-p merged commit f3b94df into main Sep 10, 2026
4 checks passed
@Steveb-p
Steveb-p deleted the feature/bootstrapper-skeleton branch September 10, 2026 12:14
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.

4 participants