Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/contracts/IbexaTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,21 @@ public function getSchemaFiles(): iterable
}

/**
* When the Doctrine Migrations schema-install path is active (as opposed to the legacy,
* event-driven SchemaBuilderEvent path), core's own ImportDataMigration already inserts this
* same baseline content as part of schema install -- importing it again here would violate
* unique constraints. Package-specific fixtures added by subclasses (via
* `yield from parent::getFixtures(); yield new Fixture(...)`) are unaffected and still run in
* both modes, since they're additive rather than overlapping with ImportDataMigration's output.
*
* @return iterable<\Ibexa\Contracts\Core\Test\Persistence\Fixture>
*/
public function getFixtures(): iterable
{
if (getenv('IBEXA_TEST_SCHEMA_BUILDER_EVENT_ENABLED') === '0') {
return;
}

yield from (new DefaultFixtureProvider())->getFixtures();
}

Expand Down
Loading