Skip to content

IBX-11939: Added the schema alignment test - #861

Merged
Steveb-p merged 5 commits into
4.6from
feature/schema-alignment-test-4.6
Oct 30, 2026
Merged

Steveb-p merged 5 commits into
4.6from
feature/schema-alignment-test-4.6

Conversation

@Steveb-p

@Steveb-p Steveb-p commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-11939

Related PRs:

Description:

Adds ibexa/test-core#68's schema alignment test to the kernel-based integration suite (phpunit-integration.xml), and runs that suite on the Doctrine Migrations install path too, which core's CI didn't do yet.

  • The SQLite, PostgreSQL and MySQL jobs each get one more run, on the newest PHP and the oldest server version, through a single include with schema_builder_event: false. The existing runs get schema_builder_event: true, and their names stay as they were.
  • Those runs only run phpunit-integration.xml: the legacy integration suite installs its own schema whatever the path, and PHPStan and the unit tests don't depend on it.
  • phpunit-integration-legacy.xml and phpunit-integration-legacy-solr.xml exclude the new test, like the kernel-based suite's other tests.
  • tests/integration/bootstrap.php switches between DatabaseSchemaHook and DoctrineMigrationsSchemaHook with IBEXA_TEST_SCHEMA_BUILDER_EVENT_ENABLED. The base fixture loads on both paths, like the kernel's own test_data.yaml, which the tests assert against.
  • The test kernel registers the two Doctrine Migrations bundles that path needs, so doctrine/doctrine-migrations-bundle is in require-dev now.

On those runs, SchemaAlignmentTest checks that core's migrations create the schema SchemaBuilderEvent declares. That includes ezcontentclass_attribute_ml's SQLite foreign key, fixed in #856.

Locally the kernel-based suite passes on both paths on SQLite, PostgreSQL 14 and MySQL 8.0.

@Steveb-p
Steveb-p force-pushed the feature/schema-alignment-test-4.6 branch from 8c5f89a to 4ff7193 Compare October 5, 2026 10:22
@Steveb-p
Steveb-p force-pushed the feature/schema-parity-4.6 branch from c9d5111 to c2f78c9 Compare October 5, 2026 10:37
Base automatically changed from feature/schema-parity-4.6 to 4.6 October 5, 2026 11:35
@Steveb-p
Steveb-p force-pushed the feature/schema-alignment-test-4.6 branch from 4ff7193 to 8528379 Compare October 5, 2026 11:59
@Steveb-p
Steveb-p marked this pull request as ready for review October 5, 2026 15:39
The kernel-based integration suite now also runs on the Doctrine Migrations install path, in one
extra CI run per database on the newest PHP and the oldest server version, and SchemaAlignmentTest
checks there that the migrations create the schema SchemaBuilderEvent declares. The bootstrap
switches between the two paths with IBEXA_TEST_SCHEMA_BUILDER_EVENT_ENABLED, and the test kernel
registers the two Doctrine Migrations bundles that path needs.

Those runs skip PHPStan, the unit tests and the legacy integration suite, which installs its own
schema whatever the path. The legacy suites' configs exclude the test, like the kernel-based
suite's other tests.
The schema_builder_event=false legs skipped PHPStan, the unit tests and the legacy integration
suite, and ran phpunit-integration.xml in a step of their own. They now run the same steps as
the other legs, and IBEXA_TEST_SCHEMA_BUILDER_EVENT_ENABLED (1 or 0) picks the install path.
The legacy suite doesn't read it, so it runs the same on every leg.
…n the bootstrap

ibexa/test-core#73 returns the DatabaseSchemaHook and DoctrineMigrationsSchemaHook options for
either path, so the bootstrap only reads IBEXA_TEST_SCHEMA_BUILDER_EVENT_ENABLED itself.
The single_line_empty_body rule of PHP CS Fixer 3.95 wants it, and CI resolves that version here
now.
@Steveb-p
Steveb-p force-pushed the feature/schema-alignment-test-4.6 branch from 3732631 to 6313d16 Compare October 29, 2026 10:29
@sonarqubecloud

Copy link
Copy Markdown

@Steveb-p
Steveb-p merged commit 6907d77 into 4.6 Oct 30, 2026
40 checks passed
@Steveb-p
Steveb-p deleted the feature/schema-alignment-test-4.6 branch October 30, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants