Skip to content

IBX-12358: Introduced Bootstrapper / Hooks for integration tests - #234

Open
Steveb-p wants to merge 4 commits into
4.6from
kernel-test-bootstrap-v2
Open

IBX-12358: Introduced Bootstrapper / Hooks for integration tests#234
Steveb-p wants to merge 4 commits into
4.6from
kernel-test-bootstrap-v2

Conversation

@Steveb-p

@Steveb-p Steveb-p commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12358

Related PRs:

Description:

Swaps the hand-rolled tests/integration/bootstrap.php for ibexa/test-core's new Bootstrapper, and registers IbexaTestCoreBundle in tests/integration/IbexaTestKernel.php right after parent::registerBundles().

Bootstrapper::OPTION_PREPARE_DATABASE is set to false, with both DatabaseSchemaHook and FixtureHook disabled. That matches what the old script was already telling us — it built the kernel, built a console Application and immediately shut down again, with a comment saying "Skipping database initialization until really needed by integration tests". So there was never a DB step to replace here, this suite only needs the kernel booted. The Application object itself wasn't used for anything either (no command ever ran against it), so I dropped it rather than carrying it over as dead code.

IbexaTestKernel didn't have any getSchemaFiles()/getFixtures()/getMigrationFiles() overrides to worry about, and there's no IbexaKernelTestTrait usage in this repo either, so the conversion is pretty mechanical.

For QA:

Not applicable.


Verification:

  • ibexa/test-core's 4.6.x-dev branch alias resolved fine via dependencies.json (no need to fall back to the ^0.1.x-dev constraint currently in composer.json) — composer install picked up ibexa/test-core (dev-kernel-test-bootstrap-v2 e90c557) cleanly.
  • composer.json restored byte-identical after the dependencies.json dry-run/real run (confirmed via git diff).
  • composer test-integration: 17 tests, 28 assertions, all green. No var/test.db or any other SQLite file got created.
  • composer phpstan: no errors.
  • composer check-cs: clean, no changes needed.

Replaces the hand-rolled bootstrap.php with ibexa/test-core's shared
Bootstrapper, registering IbexaTestCoreBundle in the test kernel and
running the Bootstrapper/hooks in place of the manual kernel boot.

Database preparation and the schema/fixture hooks are disabled, matching
the original script's own documented intent ("Skipping database
initialization until really needed by integration tests") since this
suite boots the kernel only and never touches a database.

The console Application object the old script built was dead code (built
and never used before kernel shutdown), so it is dropped rather than
preserved.
Points CI at the branch that adds the Bootstrapper/hooks, so this PR's
tests can run before that PR merges. Must be removed before merging.
@Steveb-p
Steveb-p marked this pull request as ready for review August 26, 2026 13:46
@Steveb-p
Steveb-p requested a review from a team August 26, 2026 13:46
Same root cause as the other packages fixed in this rollout: pinned to a stale
~0.1.x-dev constraint that predates the versioning scheme used everywhere else,
masked for the duration of the rollout by the (now-removed) dependencies.json
override. Bumping to ~4.6.x-dev, matching every other package here.
@sonarqubecloud

Copy link
Copy Markdown

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