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
12 changes: 11 additions & 1 deletion src/Chartjs/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);

$container->setAlias('test.chartjs.builder', 'chartjs.builder')->setPublic(true);
Expand Down
7 changes: 3 additions & 4 deletions src/Cropperjs/tests/Kernel/FrameworkAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
'validation' => [
'email_validation_mode' => 'html5',
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
];

if (self::VERSION_ID >= 60200) {
$frameworkConfig['handle_all_throwables'] = true;
}

$container->loadFromExtension('framework', $frameworkConfig);
});
}
Expand Down
7 changes: 3 additions & 4 deletions src/Cropperjs/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
'validation' => [
'email_validation_mode' => 'html5',
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
];

if (self::VERSION_ID >= 60200) {
$frameworkConfig['handle_all_throwables'] = true;
}

$container->loadFromExtension('framework', $frameworkConfig);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);

Expand Down
8 changes: 7 additions & 1 deletion src/Dropzone/tests/Kernel/FrameworkAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
...(self::VERSION_ID >= 70300 ? [
'property_info' => ['with_constructor_extractor' => false],
] : []),
]);
});
}
}
12 changes: 11 additions & 1 deletion src/Dropzone/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', [
'default_path' => __DIR__.'/templates',
'strict_variables' => true,
Expand Down
7 changes: 6 additions & 1 deletion src/Icons/tests/Fixtures/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ protected function configureContainer(ContainerConfigurator $container): void
'php_errors' => ['log' => true],
'property_access' => true,
'http_client' => true,
'handle_all_throwables' => true,
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
...(self::VERSION_ID >= 70300 ? [
'property_info' => ['with_constructor_extractor' => false],
] : []),
]);

$container->extension('twig', [
Expand Down
12 changes: 11 additions & 1 deletion src/LazyImage/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);

$container->setAlias('test.lazy_image.blur_hash', 'lazy_image.blur_hash')->setPublic(true);
Expand Down
16 changes: 14 additions & 2 deletions src/LiveComponent/tests/Fixtures/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,15 @@ protected function configureContainer(ContainerConfigurator $c): void
'validation' => [
'email_validation_mode' => 'html5',
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
...(self::VERSION_ID >= 70300 ? [
'property_info' => ['with_constructor_extractor' => false],
] : []),
];

if (self::VERSION_ID >= 60400) {
$frameworkConfig['handle_all_throwables'] = true;
$frameworkConfig['session'] = [
'storage_factory_id' => 'session.storage.factory.mock_file',
'cookie_secure' => 'auto',
Expand Down Expand Up @@ -143,7 +148,14 @@ protected function configureContainer(ContainerConfigurator $c): void
'anonymous_template_directory' => 'components/',
]);

$c->extension('zenstruck_foundry', []);
$foundryConfig = [];
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('zenstruck/foundry')) {
if (version_compare($doctrineBundleVersion, '2.5.0', '>=')) {
$doctrineConfig['persistence']['flush_once'] = true;
}
}

$c->extension('zenstruck_foundry', $foundryConfig);

$doctrineConfig = [
'dbal' => [
Expand Down
3 changes: 2 additions & 1 deletion src/Map/src/Test/RendererTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Spatie\Snapshots\Drivers\TextDriver;
use Spatie\Snapshots\MatchesSnapshots;
use Symfony\UX\Map\Elements;
use Symfony\UX\Map\Map;
Expand Down Expand Up @@ -40,7 +41,7 @@ public function testRenderMap(RendererInterface $renderer, Map $map, array $attr
$rendered = $this->prettify($rendered);

$this->assertElementsHaveComputedId($rendered);
$this->assertMatchesSnapshot($rendered);
$this->assertMatchesSnapshot($rendered, new TextDriver());
}

private function prettify(string $html): string
Expand Down
9 changes: 8 additions & 1 deletion src/Map/tests/Kernel/FrameworkAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
...(self::VERSION_ID >= 70300 ? [
'property_info' => ['with_constructor_extractor' => false],
] : []),
]);
$container->loadFromExtension('ux_map', []);

$container->setAlias('test.ux_map.renderers', 'ux_map.renderers')->setPublic(true);
Expand Down
12 changes: 11 additions & 1 deletion src/Map/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);
$container->loadFromExtension('ux_map', []);

Expand Down
12 changes: 11 additions & 1 deletion src/Notify/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);
$container->loadFromExtension('mercure', [
'hubs' => [
Expand Down
12 changes: 11 additions & 1 deletion src/React/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);

$container->setAlias('test.twig', 'twig')->setPublic(true);
Expand Down
4 changes: 3 additions & 1 deletion src/StimulusBundle/tests/fixtures/StimulusTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ protected function configureContainer(ContainerConfigurator $container): void
'importmap_path' => '%kernel.project_dir%/'.(class_exists(ImportMapConfigReader::class) ? 'importmap.php' : 'legacy/importmap.php'),
],
'test' => true,
'handle_all_throwables' => true,
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
'php_errors' => ['log' => true],
]);

Expand Down
12 changes: 11 additions & 1 deletion src/Svelte/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);

$container->setAlias('test.twig', 'twig')->setPublic(true);
Expand Down
10 changes: 6 additions & 4 deletions src/TogglePassword/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
...(self::VERSION_ID >= 70300 ? [
'property_info' => ['with_constructor_extractor' => false],
] : []),
];

if (self::VERSION_ID >= 60200) {
$frameworkConfig['handle_all_throwables'] = true;
}

$container->loadFromExtension('framework', $frameworkConfig);
$container->loadFromExtension('twig', [
'default_path' => __DIR__.'/templates',
Expand Down
5 changes: 3 additions & 2 deletions src/Toolkit/tests/Fixtures/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ protected function configureContainer(ContainerConfigurator $container): void
'php_errors' => ['log' => true],
'property_access' => true,
'http_client' => true,
'handle_all_throwables' => true,

...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
...(self::VERSION_ID >= 70300 ? [
'property_info' => ['with_constructor_extractor' => false],
] : []),
Expand Down
9 changes: 6 additions & 3 deletions src/TwigComponent/tests/Fixtures/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ protected function configureContainer(ContainerConfigurator $c): void
'secrets' => false,
'http_method_override' => false,
'php_errors' => ['log' => true],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
...(self::VERSION_ID >= 70300 ? [
'property_info' => ['with_constructor_extractor' => false],
] : []),
];
if (self::VERSION_ID >= 60200) {
$frameworkConfig['handle_all_throwables'] = true;
}
$c->extension('framework', $frameworkConfig);

$c->extension('twig', [
Expand Down
12 changes: 11 additions & 1 deletion src/Vue/tests/Kernel/TwigAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ public function registerBundles(): iterable
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
$container->loadFromExtension('framework', [
'secret' => '$ecret',
'test' => true,
'http_method_override' => false,
'php_errors' => [
'log' => true,
],
...(self::VERSION_ID >= 60200 ? [
'handle_all_throwables' => true,
] : []),
]);
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);

$container->setAlias('test.twig', 'twig')->setPublic(true);
Expand Down
Loading