Skip to content

Commit b10febb

Browse files
committed
Remove some indirect deprecations
1 parent fc2b792 commit b10febb

File tree

9 files changed

+42
-20
lines changed

9 files changed

+42
-20
lines changed

src/Cropperjs/tests/Kernel/FrameworkAppKernel.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
4242
'validation' => [
4343
'email_validation_mode' => 'html5',
4444
],
45+
'handle_all_throwables' => true,
4546
];
4647

47-
if (self::VERSION_ID >= 60200) {
48-
$frameworkConfig['handle_all_throwables'] = true;
49-
}
50-
5148
$container->loadFromExtension('framework', $frameworkConfig);
5249
});
5350
}

src/Cropperjs/tests/Kernel/TwigAppKernel.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,9 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
4545
'validation' => [
4646
'email_validation_mode' => 'html5',
4747
],
48+
'handle_all_throwables' => true,
4849
];
4950

50-
if (self::VERSION_ID >= 60200) {
51-
$frameworkConfig['handle_all_throwables'] = true;
52-
}
53-
5451
$container->loadFromExtension('framework', $frameworkConfig);
5552
$container->loadFromExtension('twig', ['default_path' => __DIR__.'/templates', 'strict_variables' => true, 'exception_controller' => null]);
5653

src/Dropzone/tests/Kernel/FrameworkAppKernel.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ public function registerBundles(): iterable
3434
public function registerContainerConfiguration(LoaderInterface $loader): void
3535
{
3636
$loader->load(function (ContainerBuilder $container) {
37-
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true]);
37+
$container->loadFromExtension('framework', [
38+
'secret' => '$ecret',
39+
'test' => true,
40+
...(self::VERSION_ID >= 70300 ? [
41+
'property_info' => ['with_constructor_extractor' => false],
42+
] : []),
43+
]);
3844
});
3945
}
4046
}

src/Icons/tests/Fixtures/TestKernel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ protected function configureContainer(ContainerConfigurator $container): void
4747
'property_access' => true,
4848
'http_client' => true,
4949
'handle_all_throwables' => true,
50+
...(self::VERSION_ID >= 70300 ? [
51+
'property_info' => ['with_constructor_extractor' => false],
52+
] : []),
5053
]);
5154

5255
$container->extension('twig', [

src/LiveComponent/tests/Fixtures/Kernel.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,13 @@ protected function configureContainer(ContainerConfigurator $c): void
103103
'validation' => [
104104
'email_validation_mode' => 'html5',
105105
],
106+
'handle_all_throwables' => true,
107+
...(self::VERSION_ID >= 70300 ? [
108+
'property_info' => ['with_constructor_extractor' => false],
109+
] : []),
106110
];
107111

108112
if (self::VERSION_ID >= 60400) {
109-
$frameworkConfig['handle_all_throwables'] = true;
110113
$frameworkConfig['session'] = [
111114
'storage_factory_id' => 'session.storage.factory.mock_file',
112115
'cookie_secure' => 'auto',
@@ -143,7 +146,14 @@ protected function configureContainer(ContainerConfigurator $c): void
143146
'anonymous_template_directory' => 'components/',
144147
]);
145148

146-
$c->extension('zenstruck_foundry', []);
149+
$foundryConfig = [];
150+
if (null !== $doctrineBundleVersion = InstalledVersions::getVersion('zenstruck/foundry')) {
151+
if (version_compare($doctrineBundleVersion, '2.5.0', '>=')) {
152+
$doctrineConfig['persistence']['flush_once'] = true;
153+
}
154+
}
155+
156+
$c->extension('zenstruck_foundry', $foundryConfig);
147157

148158
$doctrineConfig = [
149159
'dbal' => [

src/Map/src/Test/RendererTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use PHPUnit\Framework\Attributes\DataProvider;
1515
use PHPUnit\Framework\TestCase;
16+
use Spatie\Snapshots\Drivers\TextDriver;
1617
use Spatie\Snapshots\MatchesSnapshots;
1718
use Symfony\UX\Map\Elements;
1819
use Symfony\UX\Map\Map;
@@ -40,7 +41,7 @@ public function testRenderMap(RendererInterface $renderer, Map $map, array $attr
4041
$rendered = $this->prettify($rendered);
4142

4243
$this->assertElementsHaveComputedId($rendered);
43-
$this->assertMatchesSnapshot($rendered);
44+
$this->assertMatchesSnapshot($rendered, new TextDriver());
4445
}
4546

4647
private function prettify(string $html): string

src/Map/tests/Kernel/FrameworkAppKernel.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ public function registerBundles(): iterable
3535
public function registerContainerConfiguration(LoaderInterface $loader): void
3636
{
3737
$loader->load(function (ContainerBuilder $container) {
38-
$container->loadFromExtension('framework', ['secret' => '$ecret', 'test' => true, 'http_method_override' => false]);
38+
$container->loadFromExtension('framework', [
39+
'secret' => '$ecret',
40+
'test' => true,
41+
'http_method_override' => false,
42+
...(self::VERSION_ID >= 70300 ? [
43+
'property_info' => ['with_constructor_extractor' => false],
44+
] : []),
45+
]);
3946
$container->loadFromExtension('ux_map', []);
4047

4148
$container->setAlias('test.ux_map.renderers', 'ux_map.renderers')->setPublic(true);

src/TogglePassword/tests/Kernel/TwigAppKernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
3939
'secret' => '$ecret',
4040
'test' => true,
4141
'http_method_override' => false,
42+
'handle_all_throwables' => true,
4243
'php_errors' => [
4344
'log' => true,
4445
],
46+
...(self::VERSION_ID >= 70300 ? [
47+
'property_info' => ['with_constructor_extractor' => false],
48+
] : []),
4549
];
4650

47-
if (self::VERSION_ID >= 60200) {
48-
$frameworkConfig['handle_all_throwables'] = true;
49-
}
50-
5151
$container->loadFromExtension('framework', $frameworkConfig);
5252
$container->loadFromExtension('twig', [
5353
'default_path' => __DIR__.'/templates',

src/TwigComponent/tests/Fixtures/Kernel.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ protected function configureContainer(ContainerConfigurator $c): void
4444
'router' => ['utf8' => true],
4545
'secrets' => false,
4646
'http_method_override' => false,
47+
'handle_all_throwables' => true,
4748
'php_errors' => ['log' => true],
49+
...(self::VERSION_ID >= 70300 ? [
50+
'property_info' => ['with_constructor_extractor' => false],
51+
] : []),
4852
];
49-
if (self::VERSION_ID >= 60200) {
50-
$frameworkConfig['handle_all_throwables'] = true;
51-
}
5253
$c->extension('framework', $frameworkConfig);
5354

5455
$c->extension('twig', [

0 commit comments

Comments
 (0)