diff --git a/.github/workflows/package-tests.yml b/.github/workflows/package-tests.yml index 859e1e6328380..f04bacd0170d3 100644 --- a/.github/workflows/package-tests.yml +++ b/.github/workflows/package-tests.yml @@ -21,7 +21,7 @@ jobs: - name: Find packages id: find-packages - run: echo "packages=$(php .github/get-modified-packages.php $(find src/Symfony -mindepth 2 -maxdepth 6 -type f -name composer.json -printf '%h\n' | jq -R -s -c 'split("\n")[:-1]') $(git diff --name-only origin/${{ github.base_ref }} HEAD | grep src/ | jq -R -s -c 'split("\n")[:-1]'))" >> $GITHUB_OUTPUT + run: echo "packages=$(php .github/get-modified-packages.php $(find src/Symfony -mindepth 2 -type f -name composer.json -printf '%h\n' | jq -R -s -c 'split("\n")[:-1]') $(git diff --name-only origin/${{ github.base_ref }} HEAD | grep src/ | jq -R -s -c 'split("\n")[:-1]'))" >> $GITHUB_OUTPUT - name: Verify meta files are correct run: | diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0e0d37be56a2c..d9db4efcc94ab 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -93,7 +93,7 @@ jobs: echo SYMFONY_DEPRECATIONS_HELPER=weak >> $GITHUB_ENV cp composer.json composer.json.orig echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json - php .github/build-packages.php HEAD^ $SYMFONY_VERSION $(find src/Symfony -mindepth 2 -maxdepth 6 -type f -name composer.json -printf '%h\n') + php .github/build-packages.php HEAD^ $SYMFONY_VERSION $(find src/Symfony -mindepth 2 -type f -name composer.json -printf '%h\n') mv composer.json composer.json.phpunit mv composer.json.orig composer.json fi diff --git a/composer.json b/composer.json index cfcb791901c41..4a7c301ff4326 100644 --- a/composer.json +++ b/composer.json @@ -197,15 +197,6 @@ { "type": "path", "url": "src/Symfony/Component/Runtime" - }, - { - "type": "path", - "url": "src/Symfony/Component/Notifier/Bridge/Mercure/Tests/stella-maris-clock", - "options": { - "versions": { - "stella-maris/clock": "0.1.x-dev" - } - } } ], "minimum-stability": "dev" diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index ebcf2c06f8d4f..cd5fc91cb32b7 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -301,8 +301,8 @@ private function detectMappingType(string $directory, ContainerBuilder $containe break; } if ( - preg_match('/^ \* @.*'.$quotedMappingObjectName.'\b/m', $content) || - preg_match('/^ \* @.*Embeddable\b/m', $content) + preg_match('/^(?: \*|\/\*\*) @.*'.$quotedMappingObjectName.'\b/m', $content) || + preg_match('/^(?: \*|\/\*\*) @.*Embeddable\b/m', $content) ) { $type = 'annotation'; break; diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php index 62f426a3546c8..2e0913f25a826 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -279,6 +279,7 @@ public function testUnrecognizedCacheDriverException() public function providerBundles() { yield ['AnnotationsBundle', 'annotation', '/Entity']; + yield ['AnnotationsOneLineBundle', 'annotation', '/Entity']; yield ['FullEmbeddableAnnotationsBundle', 'annotation', '/Entity']; yield ['AttributesBundle', 'attribute', '/Entity']; yield ['FullEmbeddableAttributesBundle', 'attribute', '/Entity']; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/AnnotationsOneLineBundle.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/AnnotationsOneLineBundle.php new file mode 100644 index 0000000000000..6d401bae4f987 --- /dev/null +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/AnnotationsOneLineBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fixtures\Bundles\AnnotationsOneLineBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class AnnotationsOneLineBundle extends Bundle +{ +} diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php new file mode 100644 index 0000000000000..b55fe6f86503b --- /dev/null +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fixtures\Bundles\AnnotationsOneLineBundle\Entity; + +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Doctrine\ORM\Mapping\Id; + +/** @Entity */ +class Person +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string") */ + public $name; + + public function __construct($id, $name) + { + $this->id = $id; + $this->name = $name; + } + + public function __toString(): string + { + return (string) $this->name; + } +} diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 8e12deca1c919..593e7c5adf3a9 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "doctrine/annotations": "^1.12|^2", - "egulias/email-validator": "^2.1.10|^3", + "egulias/email-validator": "^2.1.10|^3|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/asset": "^5.4|^6.0", "symfony/dependency-injection": "^5.4|^6.0", diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php index 222b5c7b75af0..942eb635b26f3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; +use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; @@ -38,6 +39,16 @@ public function process(ContainerBuilder $container) } } + foreach ($container->getAliases() as $id => $target) { + while ($container->hasAlias($target = (string) $target)) { + $target = $container->getAlias($target); + } + + if ($definitions[$target]->hasTag('container.private')) { + $privateServices[$id] = new ServiceClosureArgument(new Reference($target)); + } + } + $privateContainer->replaceArgument(0, $privateServices); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 56d76a65a1829..0f2a3dc78c419 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1569,11 +1569,14 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde $loader->load('annotations.php'); + // registerUniqueLoader exists since doctrine/annotations v1.6 if (!method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) { + // registerLoader exists only in doctrine/annotations v1 if (method_exists(AnnotationRegistry::class, 'registerLoader')) { $container->getDefinition('annotations.dummy_registry') ->setMethodCalls([['registerLoader', ['class_exists']]]); } else { + // remove the dummy registry when doctrine/annotations v2 is used $container->removeDefinition('annotations.dummy_registry'); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php index 65a3f4e8ffd90..ec86fed495498 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php @@ -25,7 +25,7 @@ ->set('annotations.reader', AnnotationReader::class) ->call('addGlobalIgnoredName', [ 'required', - service('annotations.dummy_registry')->ignoreOnInvalid(), // dummy arg to register class_exists as annotation loader only when required + service('annotations.dummy_registry')->nullOnInvalid(), // dummy arg to register class_exists as annotation loader only when required ]) ->set('annotations.dummy_registry', AnnotationRegistry::class) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php index 7dc9e6f59ec99..355b1527d64bf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TestServiceContainerRefPassesTest.php @@ -43,6 +43,13 @@ public function testProcess() ->setPublic(true) ->addTag('container.private', ['package' => 'foo/bar', 'version' => '1.42']) ; + $container->register('Test\soon_private_service_decorated') + ->setPublic(true) + ->addTag('container.private', ['package' => 'foo/bar', 'version' => '1.42']) + ; + $container->register('Test\soon_private_service_decorator') + ->setDecoratedService('Test\soon_private_service_decorated') + ->setArguments(['Test\soon_private_service_decorator.inner']); $container->register('Test\private_used_shared_service'); $container->register('Test\private_unused_shared_service'); @@ -55,6 +62,8 @@ public function testProcess() 'Test\private_used_shared_service' => new ServiceClosureArgument(new Reference('Test\private_used_shared_service')), 'Test\private_used_non_shared_service' => new ServiceClosureArgument(new Reference('Test\private_used_non_shared_service')), 'Test\soon_private_service' => new ServiceClosureArgument(new Reference('.container.private.Test\soon_private_service')), + 'Test\soon_private_service_decorator' => new ServiceClosureArgument(new Reference('.container.private.Test\soon_private_service_decorated')), + 'Test\soon_private_service_decorated' => new ServiceClosureArgument(new Reference('.container.private.Test\soon_private_service_decorated')), ]; $privateServices = $container->getDefinition('test.private_services_locator')->getArgument(0); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php index b4f38b4273479..d2df9a80f8321 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php @@ -43,6 +43,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed foreach ($calls as $i => $call) { [$method, $arguments] = $call; $parameters = null; + $resolvedKeys = []; $resolvedArguments = []; foreach ($arguments as $key => $argument) { @@ -51,6 +52,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed } if (\is_int($key)) { + $resolvedKeys[$key] = $key; $resolvedArguments[$key] = $argument; continue; } @@ -71,9 +73,11 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed if ($key === '$'.$p->name) { if ($p->isVariadic() && \is_array($argument)) { foreach ($argument as $variadicArgument) { + $resolvedKeys[$j] = $j; $resolvedArguments[$j++] = $variadicArgument; } } else { + $resolvedKeys[$j] = $p->name; $resolvedArguments[$j] = $argument; } @@ -91,6 +95,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed $typeFound = false; foreach ($parameters as $j => $p) { if (!\array_key_exists($j, $resolvedArguments) && ProxyHelper::getTypeHint($r, $p, true) === $key) { + $resolvedKeys[$j] = $p->name; $resolvedArguments[$j] = $argument; $typeFound = true; } @@ -103,6 +108,12 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed if ($resolvedArguments !== $call[1]) { ksort($resolvedArguments); + + if (!$value->isAutowired() && !array_is_list($resolvedArguments)) { + ksort($resolvedKeys); + $resolvedArguments = array_combine($resolvedKeys, $resolvedArguments); + } + $calls[$i][1] = $resolvedArguments; } } diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index b563018bbc683..2c57c8995d787 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -1035,7 +1035,7 @@ private function createService(Definition $definition, array &$inlineServices, b } else { $r = new \ReflectionClass($parameterBag->resolveValue($definition->getClass())); - $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs(array_values($arguments)); + $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments); if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ")) { trigger_deprecation('', '', 'The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name); diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index eb7906d503a80..bab59e288a9ac 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -743,7 +743,7 @@ private function addServiceMethodCalls(Definition $definition, string $variableN $witherAssignation = ''; if ($call[2] ?? false) { - if (null !== $sharedNonLazyId && $lastWitherIndex === $k) { + if (null !== $sharedNonLazyId && $lastWitherIndex === $k && 'instance' === $variableName) { $witherAssignation = sprintf('$this->%s[\'%s\'] = ', $definition->isPublic() ? 'services' : 'privates', $sharedNonLazyId); } $witherAssignation .= sprintf('$%s = ', $variableName); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php index 4e9973bb30e9c..2c28949486f24 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php @@ -165,7 +165,7 @@ public function testInterfaceTypedArgument() $pass = new ResolveNamedArgumentsPass(); $pass->process($container); - $this->assertSame($expected, $definition->getArgument(3)); + $this->assertSame($expected, $definition->getArgument('container')); } public function testResolvesMultipleArgumentsOfTheSameType() diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index a7545fc12be20..2c23dbdd2a382 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -1731,6 +1731,24 @@ public function testFindTags() $this->assertSame(['tag1', 'tag2', 'tag3'], $container->findTags()); } + + /** + * @requires PHP 8 + */ + public function testNamedArgument() + { + $container = new ContainerBuilder(); + $container->register(E::class) + ->setPublic(true) + ->setArguments(['$second' => 2]); + + $container->compile(); + + $e = $container->get(E::class); + + $this->assertSame('', $e->first); + $this->assertSame(2, $e->second); + } } class FooClass @@ -1759,3 +1777,15 @@ class C implements X class D implements X { } + +class E +{ + public $first; + public $second; + + public function __construct($first = '', $second = '') + { + $this->first = $first; + $this->second = $second; + } +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index f88fa49f72fda..29861c6283ebb 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -1396,7 +1396,8 @@ public function testAliasCanBeFoundInTheDumpedContainerWhenBothTheAliasAndTheSer public function testWither() { $container = new ContainerBuilder(); - $container->register(Foo::class); + $container->register(Foo::class) + ->setAutowired(true); $container ->register('wither', Wither::class) diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php index ff714d5595e05..a556dee1d9e24 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php @@ -15,6 +15,14 @@ class Foo { + /** + * @required + * @return static + */ + public function cloneFoo() + { + return clone $this; + } } class Bar diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php index 869e6af975d10..7d9a32a567538 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_wither.php @@ -53,6 +53,7 @@ protected function getWitherService() $instance = new \Symfony\Component\DependencyInjection\Tests\Compiler\Wither(); $a = new \Symfony\Component\DependencyInjection\Tests\Compiler\Foo(); + $a = $a->cloneFoo(); $instance = $instance->withFoo1($a); $this->services['wither'] = $instance = $instance->withFoo2($a); diff --git a/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php b/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php index 02f1d51d494e7..730fb38b8e9b3 100644 --- a/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php +++ b/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php @@ -37,6 +37,10 @@ public function registerClient(string $name, TraceableHttpClient $client) * {@inheritdoc} */ public function collect(Request $request, Response $response, \Throwable $exception = null) + { + } + + public function lateCollect() { $this->reset(); @@ -50,12 +54,7 @@ public function collect(Request $request, Response $response, \Throwable $except $this->data['request_count'] += \count($traces); $this->data['error_count'] += $errorCount; - } - } - public function lateCollect() - { - foreach ($this->clients as $client) { $client->reset(); } } diff --git a/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php b/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php index 76bbbe7c57c65..15a3136da6b73 100755 --- a/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php +++ b/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php @@ -15,8 +15,6 @@ use Symfony\Component\HttpClient\DataCollector\HttpClientDataCollector; use Symfony\Component\HttpClient\NativeHttpClient; use Symfony\Component\HttpClient\TraceableHttpClient; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\HttpClient\Test\TestHttpServer; class HttpClientDataCollectorTest extends TestCase @@ -50,7 +48,7 @@ public function testItCollectsRequestCount() $sut->registerClient('http_client2', $httpClient2); $sut->registerClient('http_client3', $httpClient3); $this->assertEquals(0, $sut->getRequestCount()); - $sut->collect(new Request(), new Response()); + $sut->lateCollect(); $this->assertEquals(3, $sut->getRequestCount()); } @@ -79,7 +77,7 @@ public function testItCollectsErrorCount() $sut->registerClient('http_client2', $httpClient2); $sut->registerClient('http_client3', $httpClient3); $this->assertEquals(0, $sut->getErrorCount()); - $sut->collect(new Request(), new Response()); + $sut->lateCollect(); $this->assertEquals(1, $sut->getErrorCount()); } @@ -108,7 +106,7 @@ public function testItCollectsErrorCountByClient() $sut->registerClient('http_client2', $httpClient2); $sut->registerClient('http_client3', $httpClient3); $this->assertEquals([], $sut->getClients()); - $sut->collect(new Request(), new Response()); + $sut->lateCollect(); $collectedData = $sut->getClients(); $this->assertEquals(0, $collectedData['http_client1']['error_count']); $this->assertEquals(1, $collectedData['http_client2']['error_count']); @@ -140,7 +138,7 @@ public function testItCollectsTracesByClient() $sut->registerClient('http_client2', $httpClient2); $sut->registerClient('http_client3', $httpClient3); $this->assertEquals([], $sut->getClients()); - $sut->collect(new Request(), new Response()); + $sut->lateCollect(); $collectedData = $sut->getClients(); $this->assertCount(2, $collectedData['http_client1']['traces']); $this->assertCount(1, $collectedData['http_client2']['traces']); @@ -157,7 +155,7 @@ public function testItIsEmptyAfterReset() ]); $sut = new HttpClientDataCollector(); $sut->registerClient('http_client1', $httpClient1); - $sut->collect(new Request(), new Response()); + $sut->lateCollect(); $collectedData = $sut->getClients(); $this->assertCount(1, $collectedData['http_client1']['traces']); $sut->reset(); diff --git a/src/Symfony/Component/Mailer/composer.json b/src/Symfony/Component/Mailer/composer.json index bd6d83ce5613a..1ce62a3b11a11 100644 --- a/src/Symfony/Component/Mailer/composer.json +++ b/src/Symfony/Component/Mailer/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": ">=8.0.2", - "egulias/email-validator": "^2.1.10|^3", + "egulias/email-validator": "^2.1.10|^3|^4", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^5.4|^6.0", diff --git a/src/Symfony/Component/Mime/composer.json b/src/Symfony/Component/Mime/composer.json index 98713198c4446..02e3a07f06c83 100644 --- a/src/Symfony/Component/Mime/composer.json +++ b/src/Symfony/Component/Mime/composer.json @@ -21,7 +21,7 @@ "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", + "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/property-access": "^5.4|^6.0", diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/stella-maris-clock/ClockInterface.php b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/stella-maris-clock/ClockInterface.php deleted file mode 100644 index d8b2e86692260..0000000000000 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/stella-maris-clock/ClockInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - and ClockInterfaceContributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - */ - -namespace StellaMaris\Clock; - -use DateTimeImmutable; - -interface ClockInterface -{ - /** - * Return the current point in time as a DateTimeImmutable object - */ - public function now() : DateTimeImmutable; -} diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/stella-maris-clock/composer.json b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/stella-maris-clock/composer.json deleted file mode 100644 index fb838caed6e88..0000000000000 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/stella-maris-clock/composer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "stella-maris/clock", - "description": "A local fork to workaround gitlab failing to serve the package reliably", - "homepage": "https://gitlab.com/stella-maris/clock", - "license": "MIT", - "authors": [ - { - "name": "Andreas Heigl", - "role": "Maintainer" - } - ], - "autoload": { - "psr-4": { - "StellaMaris\\Clock\\": "" - } - } -} diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json b/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json index 1943dfaba6230..8c353375d76f4 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json @@ -28,16 +28,5 @@ "/Tests/" ] }, - "repositories": [ - { - "type": "path", - "url": "Tests/stella-maris-clock", - "options": { - "versions": { - "stella-maris/clock": "0.1.x-dev" - } - } - } - ], "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index cdd1195f5d7c3..88508d5cbe9b1 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -50,7 +50,7 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri /** * Converts a YAML string to a PHP value. * - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * @param array $references Mapping of variable names to values * * @throws ParseException diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index c599b3332d727..b0c05259fbc3a 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -43,7 +43,7 @@ class Parser * Parses a YAML file into a PHP value. * * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * * @throws ParseException If the file could not be read or the YAML is not valid */ @@ -70,7 +70,7 @@ public function parseFile(string $filename, int $flags = 0): mixed * Parses a YAML string to a PHP value. * * @param string $value A YAML string - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * * @throws ParseException If the YAML is not valid */ @@ -694,7 +694,7 @@ private function moveToPreviousLine(): bool * Parses a YAML value. * * @param string $value A YAML value - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * @param string $context The parser context (either sequence or mapping) * * @throws ParseException When reference does not exist