Skip to content

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

Merged
Steveb-p merged 3 commits into
4.6from
kernel-test-bootstrap-v2
Aug 31, 2026
Merged

IBX-12358: Introduced Bootstrapper / Hooks for integration tests#139
Steveb-p merged 3 commits into
4.6from
kernel-test-bootstrap-v2

Conversation

@Steveb-p

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

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12358

Related PRs:

Description:

Fifth rollout sample, picked as a "kernel-method-style provider" case (bucket 2): the old
tests/bootstrap.php was a plain kernel boot, doctrine:database:create, and schema/fixture import
loop, no migrations or bespoke extras.

  • tests/bootstrap.php: collapsed to (new Bootstrapper())->bootstrap();.
  • tests/integration/IbexaTestKernel.php:
    • Now extends ibexa/test-core's IbexaTestKernel, not ibexa/core's own legacy
      Ibexa\Contracts\Core\Test\IbexaTestKernel it extended before - the Bootstrapper mechanism
      requires the former.
    • Registers IbexaTestCoreBundle itself.
    • getSchemaFiles() is gone, replaced by UserSchemaFilesProvider, a tagged provider service
      that constructor-injects ibexa/test-core's DefaultSchemaFilesProvider to add this package's
      own schema file on top of the built-in default. No fixture override existed before (this
      package relies entirely on the built-in base fixture), so nothing to convert there.
  • New tests/integration/Resources/services.php: declares the schema provider as a tagged service.
  • Added ibexa/test-core to require-dev (wasn't required at all before).

For QA:

Not applicable - test infrastructure only, no runtime behavior change.

Verified locally: real schema/fixture import (55 tables, 18 content objects in the resulting
database), 9 integration + 57 bundle/lib tests pass, PHPStan and cs-fixer clean.

tests/bootstrap.php was a plain kernel boot + doctrine:database:create +
schema/fixture import loop. Collapsed to (new Bootstrapper())->bootstrap().

- tests/integration/IbexaTestKernel.php:
  - Now extends ibexa/test-core's IbexaTestKernel, not ibexa/core's own
    legacy Ibexa\Contracts\Core\Test\IbexaTestKernel it extended before -
    the Bootstrapper mechanism requires the former.
  - Registers IbexaTestCoreBundle itself.
  - getSchemaFiles() is gone, replaced by UserSchemaFilesProvider, a
    tagged provider service that constructor-injects test-core's
    DefaultSchemaFilesProvider to add this package's own schema file on
    top of the built-in default. No fixture override existed before
    (this package relies entirely on the built-in base fixture), so
    nothing to convert there.
- New tests/integration/Resources/services.php: declares the schema
  provider as a tagged service.
- Added ibexa/test-core to require-dev (wasn't required at all before).

Verified: real schema/fixture import (55 tables, 18 content objects in
the resulting database), 9 integration + 57 bundle/lib tests pass,
PHPStan and cs-fixer clean.
Points CI at the branch that adds Bootstrapper, so this PR's tests can
run before that PR merges. Must be removed before merging.
@Steveb-p Steveb-p changed the title Adopt ibexa/test-core's Bootstrapper for the integration test bootstrap IBX-12358: Introduced Bootstrapper / Hooks for integration tests Aug 26, 2026
@Steveb-p
Steveb-p marked this pull request as ready for review August 26, 2026 13:47
@Steveb-p
Steveb-p requested a review from a team August 26, 2026 13:47
@sonarqubecloud

Copy link
Copy Markdown

@Steveb-p
Steveb-p merged commit 09ee69c into 4.6 Aug 31, 2026
15 checks passed
@Steveb-p
Steveb-p deleted the kernel-test-bootstrap-v2 branch August 31, 2026 12:07
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.

5 participants