Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions src/contracts/IbexaTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
self::prepareIOServices($container);
self::createPublicAliasesForServicesUnderTest($container);
self::setUpTestLogger($container);
self::configureTwigComponent($container);
});
}

Expand Down Expand Up @@ -214,6 +215,22 @@ protected function loadSecurity(LoaderInterface $loader): void
$loader->load(self::getResourcesPath() . '/config/security.yaml');
}

/**
* Projects get this configuration from the symfony/ux-twig-component Flex recipe; test kernels
* registering TwigComponentBundle need it too, or the bundle deprecates the missing options.
*/
private static function configureTwigComponent(ContainerBuilder $container): void
{
if (!$container->hasExtension('twig_component')) {
return;
}

$container->loadFromExtension('twig_component', [
'anonymous_template_directory' => 'components/',
'defaults' => [],
]);
}

/**
* @return iterable<class-string>
*/
Expand Down
4 changes: 4 additions & 0 deletions src/contracts/Resources/config/doctrine.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@
'logging' => false,
'use_savepoints' => true,
],
'orm' => array_filter([
'controller_resolver' => ['auto_mapping' => false],
'enable_native_lazy_objects' => \PHP_VERSION_ID >= 80400 ? true : null,
], static fn ($v) => $v !== null),
]);
};
2 changes: 2 additions & 0 deletions src/contracts/Resources/config/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ framework:
app: cache.adapter.array
router:
resource: '%ibexa.core.test.resource_dir%/config/routes.yaml'
property_info:
with_constructor_extractor: false
Loading