diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index d0e3337a9239c..6b023138755f7 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -114,6 +114,6 @@ private function isNamedArguments(Node $arguments): bool private function getVarName(): string { - return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); + return sprintf('__internal_%s', hash('xxh128', uniqid(mt_rand(), true))); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/EventListener/ConsoleProfilerListener.php b/src/Symfony/Bundle/FrameworkBundle/EventListener/ConsoleProfilerListener.php index d3fc3810631b6..19f0794d4927d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/EventListener/ConsoleProfilerListener.php +++ b/src/Symfony/Bundle/FrameworkBundle/EventListener/ConsoleProfilerListener.php @@ -72,7 +72,7 @@ public function initialize(ConsoleCommandEvent $event): void return; } - $request->attributes->set('_stopwatch_token', substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); + $request->attributes->set('_stopwatch_token', substr(hash('xxh128', uniqid(mt_rand(), true)), 0, 6)); $this->stopwatch->openSection(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php index 460c899e377bc..4fa2ab34c2060 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -1693,7 +1693,7 @@ public function testCachePoolServices() ->replaceArgument(0, $expectedSeed) ->replaceArgument(1, 12), (new ChildDefinition('cache.adapter.redis')) - ->replaceArgument(0, new Reference('.cache_connection.kYdiLgf')) + ->replaceArgument(0, new Reference('.cache_connection.U5HliuY')) ->replaceArgument(1, $expectedSeed) ->replaceArgument(2, 12), ], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php index ea01daa96bf73..858f99e748635 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php @@ -137,7 +137,7 @@ public function testFirewalls() [ 'simple', 'security.user_checker', - '.security.request_matcher.h5ibf38', + '.security.request_matcher.rud_2nr', false, false, '', @@ -187,7 +187,7 @@ public function testFirewalls() [ 'host', 'security.user_checker', - '.security.request_matcher.bcmu4fb', + '.security.request_matcher.ap9sh8g', true, false, 'security.user.provider.concrete.default', diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php index e29e9e2989eff..49d0ba32b7900 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php @@ -217,7 +217,7 @@ public function process(ContainerBuilder $container): void private function getNamespace(string $seed, string $id): string { - return substr(str_replace('/', '-', base64_encode(hash('sha256', $id.$seed, true))), 0, 10); + return substr(str_replace('/', '-', base64_encode(hash('xxh128', $id.$seed, true))), 0, 10); } /** diff --git a/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php b/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php index 18647fb283cdf..98a093ed0222f 100644 --- a/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php +++ b/src/Symfony/Component/Cache/Tests/DependencyInjection/CachePoolPassTest.php @@ -49,7 +49,7 @@ public function testNamespaceArgumentIsReplaced() $this->cachePoolPass->process($container); - $this->assertSame('z3X945Jbf5', $cachePool->getArgument(0)); + $this->assertSame('cKLcR15Llk', $cachePool->getArgument(0)); } public function testNamespaceArgumentIsSeededWithAdapterClassName() @@ -70,7 +70,7 @@ public function testNamespaceArgumentIsSeededWithAdapterClassName() $this->cachePoolPass->process($container); - $this->assertSame('xmOJ8gqF-Y', $cachePool->getArgument(0)); + $this->assertSame('mVXLns1cYU', $cachePool->getArgument(0)); } public function testNamespaceArgumentIsSeededWithAdapterClassNameWithoutAffectingOtherCachePools() @@ -97,7 +97,7 @@ public function testNamespaceArgumentIsSeededWithAdapterClassNameWithoutAffectin $this->cachePoolPass->process($container); - $this->assertSame('xmOJ8gqF-Y', $cachePool->getArgument(0)); + $this->assertSame('mVXLns1cYU', $cachePool->getArgument(0)); } public function testNamespaceArgumentIsNotReplacedIfArrayAdapterIsUsed() @@ -153,7 +153,7 @@ public function testArgsAreReplaced() $this->assertInstanceOf(Reference::class, $cachePool->getArgument(0)); $this->assertSame('foobar', (string) $cachePool->getArgument(0)); - $this->assertSame('6Ridbw4aMn', $cachePool->getArgument(1)); + $this->assertSame('ZmalVIjCbI', $cachePool->getArgument(1)); $this->assertSame(3, $cachePool->getArgument(2)); } @@ -174,7 +174,7 @@ public function testWithNameAttribute() $this->cachePoolPass->process($container); - $this->assertSame('PeXBWSl6ca', $cachePool->getArgument(1)); + $this->assertSame('5SvqAqqNBH', $cachePool->getArgument(1)); } public function testThrowsExceptionWhenCachePoolTagHasUnknownAttributes() diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 4f29e6a5d1b9a..a5942a0b8effc 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -1592,7 +1592,7 @@ public static function getInitializedConditionals(mixed $value): array */ public static function hash(mixed $value): string { - $hash = substr(base64_encode(hash('sha256', serialize($value), true)), 0, 7); + $hash = substr(base64_encode(hash('xxh128', serialize($value), true)), 0, 7); return str_replace(['/', '+'], ['.', '_'], $hash); } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php index 31cef8d5f9895..282353916a970 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php @@ -146,6 +146,6 @@ public function getProxyClass(Definition $definition, bool $asGhostObject, \Refl return preg_replace('/^.*\\\\/', '', $definition->getClass()) .($asGhostObject ? 'Ghost' : 'Proxy') - .ucfirst(substr(hash('sha256', $this->salt.'+'.$class->name.'+'.serialize($definition->getTag('proxy'))), -7)); + .ucfirst(substr(hash('xxh128', $this->salt.'+'.$class->name.'+'.serialize($definition->getTag('proxy'))), -7)); } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php index b5e2458c337e3..0d943f46151e2 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php @@ -462,7 +462,7 @@ public static function getSubscribedServices(): array 'autowired' => new ServiceClosureArgument(new TypedReference('service.id', 'stdClass', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'autowired', [new Autowire(service: 'service.id')])), 'autowired.nullable' => new ServiceClosureArgument(new TypedReference('service.id', 'stdClass', ContainerInterface::IGNORE_ON_INVALID_REFERENCE, 'autowired.nullable', [new Autowire(service: 'service.id')])), 'autowired.parameter' => new ServiceClosureArgument('foobar'), - 'autowire.decorated' => new ServiceClosureArgument(new Reference('.service_locator.oO4rxCy.inner', ContainerInterface::NULL_ON_INVALID_REFERENCE)), + 'autowire.decorated' => new ServiceClosureArgument(new Reference('.service_locator.420ES7z.inner', ContainerInterface::NULL_ON_INVALID_REFERENCE)), 'target' => new ServiceClosureArgument(new TypedReference('stdClass', 'stdClass', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'target', [new Target('someTarget')])), ]; $this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0)); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute.php index 8134075865d25..950c28ae12f0a 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute.php @@ -78,14 +78,14 @@ protected static function getFooService($container) protected static function getFoo2Service($container, $lazyLoad = true) { if (true === $lazyLoad) { - return $container->privates['.lazy.Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Foo'] = $container->createProxy('FooProxy4048957', static fn () => \FooProxy4048957::createLazyProxy(static fn () => self::getFoo2Service($container, false))); + return $container->privates['.lazy.Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Foo'] = $container->createProxy('FooProxyCd8d23a', static fn () => \FooProxyCd8d23a::createLazyProxy(static fn () => self::getFoo2Service($container, false))); } return ($container->services['foo'] ??= new \Symfony\Component\DependencyInjection\Tests\Compiler\Foo()); } } -class FooProxy4048957 extends \Symfony\Component\DependencyInjection\Tests\Compiler\Foo implements \Symfony\Component\VarExporter\LazyObjectInterface +class FooProxyCd8d23a extends \Symfony\Component\DependencyInjection\Tests\Compiler\Foo implements \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyProxyTrait; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute_with_intersection.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute_with_intersection.php index 8dc0eb50e62fb..d09a2133b70e5 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute_with_intersection.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute_with_intersection.php @@ -39,7 +39,7 @@ public function isCompiled(): bool public function getRemovedIds(): array { return [ - '.lazy.foo.gDmfket' => true, + '.lazy.foo.qFdMZVK' => true, ]; } @@ -55,7 +55,7 @@ protected function createProxy($class, \Closure $factory) */ protected static function getFooService($container) { - $a = ($container->privates['.lazy.foo.gDmfket'] ?? self::get_Lazy_Foo_GDmfketService($container)); + $a = ($container->privates['.lazy.foo.qFdMZVK'] ?? self::get_Lazy_Foo_QFdMZVKService($container)); if (isset($container->services['foo'])) { return $container->services['foo']; @@ -65,21 +65,21 @@ protected static function getFooService($container) } /** - * Gets the private '.lazy.foo.gDmfket' shared service. + * Gets the private '.lazy.foo.qFdMZVK' shared service. * * @return \object */ - protected static function get_Lazy_Foo_GDmfketService($container, $lazyLoad = true) + protected static function get_Lazy_Foo_QFdMZVKService($container, $lazyLoad = true) { if (true === $lazyLoad) { - return $container->privates['.lazy.foo.gDmfket'] = $container->createProxy('objectProxy8ac8e9a', static fn () => \objectProxy8ac8e9a::createLazyProxy(static fn () => self::get_Lazy_Foo_GDmfketService($container, false))); + return $container->privates['.lazy.foo.qFdMZVK'] = $container->createProxy('objectProxy1fd6daa', static fn () => \objectProxy1fd6daa::createLazyProxy(static fn () => self::get_Lazy_Foo_QFdMZVKService($container, false))); } return ($container->services['foo'] ?? self::getFooService($container)); } } -class objectProxy8ac8e9a implements \Symfony\Component\DependencyInjection\Tests\Compiler\AInterface, \Symfony\Component\DependencyInjection\Tests\Compiler\IInterface, \Symfony\Component\VarExporter\LazyObjectInterface +class objectProxy1fd6daa implements \Symfony\Component\DependencyInjection\Tests\Compiler\AInterface, \Symfony\Component\DependencyInjection\Tests\Compiler\IInterface, \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyProxyTrait; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt index 28a641d76222b..84a981bcca22d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt @@ -6,11 +6,11 @@ namespace Container%s; include_once $container->targetDir.''.'/Fixtures/includes/foo.php'; -class FooClassGhostEe53b95 extends \Bar\FooClass implements \Symfony\Component\VarExporter\LazyObjectInterface +class FooClassGhost1728205 extends \Bar\FooClass implements \Symfony\Component\VarExporter\LazyObjectInterface %A -if (!\class_exists('FooClassGhostEe53b95', false)) { - \class_alias(__NAMESPACE__.'\\FooClassGhostEe53b95', 'FooClassGhostEe53b95', false); +if (!\class_exists('FooClassGhost1728205', false)) { + \class_alias(__NAMESPACE__.'\\FooClassGhost1728205', 'FooClassGhost1728205', false); } [Container%s/ProjectServiceContainer.php] => services['lazy_foo'] = $container->createProxy('FooClassGhostEe53b95', static fn () => \FooClassGhostEe53b95::createLazyGhost(static fn ($proxy) => self::getLazyFooService($container, $proxy))); + return $container->services['lazy_foo'] = $container->createProxy('FooClassGhost1728205', static fn () => \FooClassGhost1728205::createLazyGhost(static fn ($proxy) => self::getLazyFooService($container, $proxy))); } include_once $container->targetDir.''.'/Fixtures/includes/foo_lazy.php'; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy.php index 006820f527fd8..60add492ba1cd 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy.php @@ -52,7 +52,7 @@ protected function createProxy($class, \Closure $factory) protected static function getBarService($container, $lazyLoad = true) { if (true === $lazyLoad) { - return $container->services['bar'] = $container->createProxy('stdClassGhost2fc7938', static fn () => \stdClassGhost2fc7938::createLazyGhost(static fn ($proxy) => self::getBarService($container, $proxy))); + return $container->services['bar'] = $container->createProxy('stdClassGhostAa01f12', static fn () => \stdClassGhostAa01f12::createLazyGhost(static fn ($proxy) => self::getBarService($container, $proxy))); } return $lazyLoad; @@ -66,7 +66,7 @@ protected static function getBarService($container, $lazyLoad = true) protected static function getBazService($container, $lazyLoad = true) { if (true === $lazyLoad) { - return $container->services['baz'] = $container->createProxy('stdClassProxy2fc7938', static fn () => \stdClassProxy2fc7938::createLazyProxy(static fn () => self::getBazService($container, false))); + return $container->services['baz'] = $container->createProxy('stdClassProxyAa01f12', static fn () => \stdClassProxyAa01f12::createLazyProxy(static fn () => self::getBazService($container, false))); } return \foo_bar(); @@ -80,7 +80,7 @@ protected static function getBazService($container, $lazyLoad = true) protected static function getBuzService($container, $lazyLoad = true) { if (true === $lazyLoad) { - return $container->services['buz'] = $container->createProxy('stdClassProxy2fc7938', static fn () => \stdClassProxy2fc7938::createLazyProxy(static fn () => self::getBuzService($container, false))); + return $container->services['buz'] = $container->createProxy('stdClassProxyAa01f12', static fn () => \stdClassProxyAa01f12::createLazyProxy(static fn () => self::getBuzService($container, false))); } return \foo_bar(); @@ -94,14 +94,14 @@ protected static function getBuzService($container, $lazyLoad = true) protected static function getFooService($container, $lazyLoad = true) { if (true === $lazyLoad) { - return $container->services['foo'] = $container->createProxy('stdClassGhost2fc7938', static fn () => \stdClassGhost2fc7938::createLazyGhost(static fn ($proxy) => self::getFooService($container, $proxy))); + return $container->services['foo'] = $container->createProxy('stdClassGhostAa01f12', static fn () => \stdClassGhostAa01f12::createLazyGhost(static fn ($proxy) => self::getFooService($container, $proxy))); } return $lazyLoad; } } -class stdClassGhost2fc7938 extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface +class stdClassGhostAa01f12 extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyGhostTrait; @@ -113,7 +113,7 @@ class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); -class stdClassProxy2fc7938 extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface +class stdClassProxyAa01f12 extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyProxyTrait; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php index d3685cf9d9e00..913d2ab4d829f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_duplicates.php @@ -41,7 +41,7 @@ public function isCompiled(): bool public function getRemovedIds(): array { return [ - '.service_locator.mtT6G8y' => true, + '.service_locator.lViPm9k' => true, 'foo' => true, ]; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_ghost.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_ghost.php index 0082641c56ed0..b03463295309e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_ghost.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_ghost.php @@ -68,14 +68,14 @@ protected static function getFooService($container, $lazyLoad = true) $container->factories['service_container']['foo'] ??= self::getFooService(...); if (true === $lazyLoad) { - return $container->createProxy('stdClassGhost2fc7938', static fn () => \stdClassGhost2fc7938::createLazyGhost(static fn ($proxy) => self::getFooService($container, $proxy))); + return $container->createProxy('stdClassGhostAa01f12', static fn () => \stdClassGhostAa01f12::createLazyGhost(static fn ($proxy) => self::getFooService($container, $proxy))); } return $lazyLoad; } } -class stdClassGhost2fc7938 extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface +class stdClassGhostAa01f12 extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyGhostTrait; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_public.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_public.php index dbf0f5d5e1134..7f870f886abcb 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_public.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_public.php @@ -51,7 +51,7 @@ protected static function getFooService($container, $lazyLoad = true) $container->factories['foo'] ??= fn () => self::getFooService($container); if (true === $lazyLoad) { - return $container->createProxy('FooLazyClassGhost2108fce', static fn () => \FooLazyClassGhost2108fce::createLazyGhost(static fn ($proxy) => self::getFooService($container, $proxy))); + return $container->createProxy('FooLazyClassGhost82ad1a4', static fn () => \FooLazyClassGhost82ad1a4::createLazyGhost(static fn ($proxy) => self::getFooService($container, $proxy))); } static $include = true; @@ -66,7 +66,7 @@ protected static function getFooService($container, $lazyLoad = true) } } -class FooLazyClassGhost2108fce extends \Bar\FooLazyClass implements \Symfony\Component\VarExporter\LazyObjectInterface +class FooLazyClassGhost82ad1a4 extends \Bar\FooLazyClass implements \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyGhostTrait; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php index a092759862e15..130d73c8240e7 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php @@ -43,7 +43,7 @@ public function isCompiled(): bool public function getRemovedIds(): array { return [ - '.service_locator.PWbaRiJ' => true, + '.service_locator.DyWBOhJ' => true, ]; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php index 83e8d3a3a75b3..963f7ea10306e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php @@ -44,7 +44,7 @@ public function isCompiled(): bool public function getRemovedIds(): array { return [ - '.service_locator.ZP1tNYN' => true, + '.service_locator.X7o4UPP' => true, 'foo2' => true, 'foo3' => true, 'foo4' => true, diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php index 0565bd68ce279..67242fe119f95 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php @@ -43,9 +43,9 @@ public function isCompiled(): bool public function getRemovedIds(): array { return [ - '.service_locator.2hyyc9y' => true, - '.service_locator.KGUGnmw' => true, - '.service_locator.KGUGnmw.foo_service' => true, + '.service_locator.2x56Fsq' => true, + '.service_locator.2x56Fsq.foo_service' => true, + '.service_locator.K8KBCZO' => true, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true, ]; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy.php index f52f226597625..b2940c88569f4 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy.php @@ -56,7 +56,7 @@ protected function createProxy($class, \Closure $factory) protected static function getWitherService($container, $lazyLoad = true) { if (true === $lazyLoad) { - return $container->services['wither'] = $container->createProxy('WitherProxy580fe0f', static fn () => \WitherProxy580fe0f::createLazyProxy(static fn () => self::getWitherService($container, false))); + return $container->services['wither'] = $container->createProxy('WitherProxy1991f2a', static fn () => \WitherProxy1991f2a::createLazyProxy(static fn () => self::getWitherService($container, false))); } $instance = new \Symfony\Component\DependencyInjection\Tests\Compiler\Wither(); @@ -71,7 +71,7 @@ protected static function getWitherService($container, $lazyLoad = true) } } -class WitherProxy580fe0f extends \Symfony\Component\DependencyInjection\Tests\Compiler\Wither implements \Symfony\Component\VarExporter\LazyObjectInterface +class WitherProxy1991f2a extends \Symfony\Component\DependencyInjection\Tests\Compiler\Wither implements \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyProxyTrait; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy_non_shared.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy_non_shared.php index 0867347a6f845..0df7e0c98e274 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy_non_shared.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither_lazy_non_shared.php @@ -58,7 +58,7 @@ protected static function getWitherService($container, $lazyLoad = true) $container->factories['wither'] ??= fn () => self::getWitherService($container); if (true === $lazyLoad) { - return $container->createProxy('WitherProxyDd381be', static fn () => \WitherProxyDd381be::createLazyProxy(static fn () => self::getWitherService($container, false))); + return $container->createProxy('WitherProxyE94fdba', static fn () => \WitherProxyE94fdba::createLazyProxy(static fn () => self::getWitherService($container, false))); } $instance = new \Symfony\Component\DependencyInjection\Tests\Compiler\Wither(); @@ -73,7 +73,7 @@ protected static function getWitherService($container, $lazyLoad = true) } } -class WitherProxyDd381be extends \Symfony\Component\DependencyInjection\Tests\Compiler\Wither implements \Symfony\Component\VarExporter\LazyObjectInterface +class WitherProxyE94fdba extends \Symfony\Component\DependencyInjection\Tests\Compiler\Wither implements \Symfony\Component\VarExporter\LazyObjectInterface { use \Symfony\Component\VarExporter\LazyProxyTrait; diff --git a/src/Symfony/Component/DomCrawler/Field/FileFormField.php b/src/Symfony/Component/DomCrawler/Field/FileFormField.php index a52ffcb28b6c6..e125a3d906c44 100644 --- a/src/Symfony/Component/DomCrawler/Field/FileFormField.php +++ b/src/Symfony/Component/DomCrawler/Field/FileFormField.php @@ -55,7 +55,7 @@ public function setValue(?string $value): void $name = $info['basename']; // copy to a tmp location - $tmp = sys_get_temp_dir().'/'.strtr(substr(base64_encode(hash('sha256', uniqid(mt_rand(), true), true)), 0, 7), '/', '_'); + $tmp = sys_get_temp_dir().'/'.strtr(substr(base64_encode(hash('xxh128', uniqid(mt_rand(), true), true)), 0, 7), '/', '_'); if (\array_key_exists('extension', $info)) { $tmp .= '.'.$info['extension']; } diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index 20da6a427ec65..844153745b2cb 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -134,7 +134,7 @@ public function setAutoLastModified(): static */ public function setAutoEtag(): static { - $this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true))); + $this->setEtag(base64_encode(hash_file('xxh128', $this->file->getPathname(), true))); return $this; } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php index 49b5ee5878c7f..8ba28835d77ca 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php @@ -169,7 +169,7 @@ public function getMetadataBag(): MetadataBag */ protected function generateId(): string { - return hash('sha256', uniqid('ss_mock_', true)); + return hash('xxh128', uniqid('ss_mock_', true)); } protected function loadSession(): void diff --git a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php index d31ce75816cf2..2b2e2e28125c5 100644 --- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -27,7 +27,7 @@ protected function beforeDispatch(string $eventName, object $event): void { switch ($eventName) { case KernelEvents::REQUEST: - $event->getRequest()->attributes->set('_stopwatch_token', substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); + $event->getRequest()->attributes->set('_stopwatch_token', substr(hash('xxh128', uniqid(mt_rand(), true)), 0, 6)); $this->stopwatch->openSection(); break; case KernelEvents::VIEW: diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php index b022ed979f5be..44fef547f49e0 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -136,7 +136,7 @@ public function collect(Request $request, Response $response, \Throwable $except return null; } - $profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); + $profile = new Profile(substr(hash('xxh128', uniqid(mt_rand(), true)), 0, 6)); $profile->setTime(time()); $profile->setUrl($request->getUri()); $profile->setMethod($request->getMethod()); diff --git a/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php b/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php index d22200f1d2721..49004ee3dfad0 100644 --- a/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php +++ b/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php @@ -75,7 +75,7 @@ public function testCompleteWriteProcessAddFiles() - + a trans_en_a @@ -93,7 +93,7 @@ public function testCompleteWriteProcessAddFiles() - + post.num_comments {count, plural, one {# comment} other {# comments}} @@ -171,7 +171,7 @@ public function testWriteAddFileServerError() - + a trans_en_a @@ -236,7 +236,7 @@ public function testWriteUpdateFileServerError() - + a trans_en_a @@ -308,7 +308,7 @@ public function testWriteUploadTranslationsServerError() - + a trans_fr_a @@ -326,7 +326,7 @@ public function testWriteUploadTranslationsServerError() - + a trans_en_a @@ -415,11 +415,11 @@ public function testCompleteWriteProcessUpdateFiles() - + a trans_en_a - + b trans_en_b @@ -489,7 +489,7 @@ public function testCompleteWriteProcessAddFileAndUploadTranslations(TranslatorB - + a trans_en_a @@ -575,7 +575,7 @@ public static function getResponsesForProcessAddFileAndUploadTranslations(): \Ge - + a trans_fr_a @@ -602,7 +602,7 @@ public static function getResponsesForProcessAddFileAndUploadTranslations(): \Ge - + a trans_en_gb_a diff --git a/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php b/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php index 40de212b62f26..d965e0ee1e306 100644 --- a/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php +++ b/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php @@ -797,11 +797,11 @@ public function writeProvider(): \Generator - + general.back - + general.cancel Cancel @@ -837,11 +837,11 @@ public function writeProvider(): \Generator - + general.back zurück - + general.cancel Abbrechen diff --git a/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php b/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php index 22f0227b9d52f..382bb678bee11 100644 --- a/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php @@ -93,7 +93,7 @@ private function dumpXliff1(string $defaultLocale, MessageCatalogue $messages, ? foreach ($messages->all($domain) as $source => $target) { $translation = $dom->createElement('trans-unit'); - $translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._')); + $translation->setAttribute('id', strtr(substr(base64_encode(hash('xxh128', $source, true)), 0, 7), '/+', '._')); $translation->setAttribute('resname', $source); $s = $translation->appendChild($dom->createElement('source')); @@ -167,7 +167,7 @@ private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ? foreach ($messages->all($domain) as $source => $target) { $translation = $dom->createElement('unit'); - $translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._')); + $translation->setAttribute('id', strtr(substr(base64_encode(hash('xxh128', $source, true)), 0, 7), '/+', '._')); if (\strlen($source) <= 80) { $translation->setAttribute('name', $source); diff --git a/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php index c753495f9ddd7..c8ecf1cf9ae86 100644 --- a/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php +++ b/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php @@ -93,11 +93,11 @@ public function testPullNewXlf12Messages() - + new.foo newFoo - + note NOTE @@ -114,7 +114,7 @@ public function testPullNewXlf12Messages() - + say_hello Welcome, {firstname}! @@ -131,11 +131,11 @@ public function testPullNewXlf12Messages() - + new.foo nouveauFoo - + note NOTE @@ -152,7 +152,7 @@ public function testPullNewXlf12Messages() - + say_hello Bonjour, {firstname}! @@ -199,13 +199,13 @@ public function testPullNewXlf20Messages() - + new.foo newFoo - + note NOTE @@ -219,13 +219,13 @@ public function testPullNewXlf20Messages() - + new.foo nouveauFoo - + note NOTE @@ -377,11 +377,11 @@ public function testPullForceMessages() - + note UPDATED NOTE - + new.foo newFoo @@ -398,11 +398,11 @@ public function testPullForceMessages() - + note NOTE MISE À JOUR - + new.foo nouveauFoo @@ -420,11 +420,11 @@ public function testPullForceMessages() - + foo.error Bad value - + bar.error Bar error @@ -441,11 +441,11 @@ public function testPullForceMessages() - + foo.error Valeur invalide - + bar.error Bar erreur @@ -500,11 +500,11 @@ public function testPullForceIntlIcuMessages() - + note UPDATED NOTE - + new.foo newFoo @@ -521,11 +521,11 @@ public function testPullForceIntlIcuMessages() - + note NOTE MISE À JOUR - + new.foo nouveauFoo @@ -576,11 +576,11 @@ public function testPullMessagesWithDefaultLocale() - + new.foo newFoo - + note NOTE @@ -597,11 +597,11 @@ public function testPullMessagesWithDefaultLocale() - + new.foo nouveauFoo - + note NOTE @@ -653,11 +653,11 @@ public function testPullMessagesMultipleDomains() - + new.foo newFoo - + note NOTE @@ -674,11 +674,11 @@ public function testPullMessagesMultipleDomains() - + new.foo newFoo - + note NOTE diff --git a/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0+intl-icu.xlf b/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0+intl-icu.xlf index 6294f162fd7b0..f96a786d540e8 100644 --- a/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0+intl-icu.xlf +++ b/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0+intl-icu.xlf @@ -1,7 +1,7 @@ - + foo bar diff --git a/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0-clean.xlf b/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0-clean.xlf index ccc5ef7a72bd0..6002848bdf72d 100644 --- a/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0-clean.xlf +++ b/src/Symfony/Component/Translation/Tests/Fixtures/resources-2.0-clean.xlf @@ -1,25 +1,25 @@ - + foo bar - + key - + key.with.cdata & ]]> - + translation.key.that.is.longer.than.eighty.characters.should.not.have.name.attribute value diff --git a/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xlf b/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xlf index 00c8a5c2416e8..df163b952d37d 100644 --- a/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xlf +++ b/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xlf @@ -5,18 +5,18 @@ - + foo bar baz - + key baz qux - + key.with.cdata & ]]> diff --git a/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xliff b/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xliff index 00c8a5c2416e8..df163b952d37d 100644 --- a/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xliff +++ b/src/Symfony/Component/Translation/Tests/Fixtures/resources-clean.xliff @@ -5,18 +5,18 @@ - + foo bar baz - + key baz qux - + key.with.cdata & ]]> diff --git a/src/Symfony/Component/Translation/Tests/Fixtures/resources-notes-meta.xlf b/src/Symfony/Component/Translation/Tests/Fixtures/resources-notes-meta.xlf index 7d5bbd40f643f..ba8fcd813e165 100644 --- a/src/Symfony/Component/Translation/Tests/Fixtures/resources-notes-meta.xlf +++ b/src/Symfony/Component/Translation/Tests/Fixtures/resources-notes-meta.xlf @@ -1,7 +1,7 @@ - + new true @@ -12,7 +12,7 @@ bar - + x_content Fuzzy diff --git a/src/Symfony/Component/Translation/Tests/Fixtures/resources-target-attributes.xlf b/src/Symfony/Component/Translation/Tests/Fixtures/resources-target-attributes.xlf index 700d28186e89e..e5f37cc6ee0e8 100644 --- a/src/Symfony/Component/Translation/Tests/Fixtures/resources-target-attributes.xlf +++ b/src/Symfony/Component/Translation/Tests/Fixtures/resources-target-attributes.xlf @@ -5,7 +5,7 @@ - + foo bar diff --git a/src/Symfony/Component/Translation/Tests/Fixtures/resources-tool-info.xlf b/src/Symfony/Component/Translation/Tests/Fixtures/resources-tool-info.xlf index 1c2ae954e5fcc..fc6e2e9272e93 100644 --- a/src/Symfony/Component/Translation/Tests/Fixtures/resources-tool-info.xlf +++ b/src/Symfony/Component/Translation/Tests/Fixtures/resources-tool-info.xlf @@ -5,7 +5,7 @@ - + foo bar diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 63037c574c0e7..0d8e24d325dc8 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -324,7 +324,7 @@ private function getFallbackContent(MessageCatalogue $catalogue): string private function getCatalogueCachePath(string $locale): string { - return $this->cacheDir.'/catalogue.'.$locale.'.'.strtr(substr(base64_encode(hash('sha256', serialize($this->cacheVary), true)), 0, 7), '/', '_').'.php'; + return $this->cacheDir.'/catalogue.'.$locale.'.'.strtr(substr(base64_encode(hash('xxh128', serialize($this->cacheVary), true)), 0, 7), '/', '_').'.php'; } /**