From d2f6322af9444ac5cd1ef3ac6f280dbef7f9d1fb Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 3 Mar 2022 11:39:01 +0100 Subject: [PATCH 0001/1170] [HttpKernel] Remove private headers before storing responses with HttpCache --- .../Component/HttpKernel/HttpCache/Store.php | 20 ++++++++++++++++--- .../HttpKernel/Tests/HttpCache/StoreTest.php | 13 ++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Store.php b/src/Symfony/Component/HttpKernel/HttpCache/Store.php index eeb7a6ef948b1..43bd7c808252c 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Store.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Store.php @@ -26,19 +26,29 @@ class Store implements StoreInterface { protected $root; private $keyCache; - private $locks; + private $locks = []; + private $options; /** + * Constructor. + * + * The available options are: + * + * * private_headers Set of response headers that should not be stored + * when a response is cached. (default: Set-Cookie) + * * @throws \RuntimeException */ - public function __construct(string $root) + public function __construct(string $root, array $options = []) { $this->root = $root; if (!file_exists($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); } $this->keyCache = new \SplObjectStorage(); - $this->locks = []; + $this->options = array_merge([ + 'private_headers' => ['Set-Cookie'], + ], $options); } /** @@ -215,6 +225,10 @@ public function write(Request $request, Response $response) $headers = $this->persistResponse($response); unset($headers['age']); + foreach ($this->options['private_headers'] as $h) { + unset($headers[strtolower($h)]); + } + array_unshift($entries, [$storedEnv, $headers]); if (!$this->save($key, serialize($entries))) { diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php index da1f649127405..239361bc8c337 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php @@ -12,8 +12,10 @@ namespace Symfony\Component\HttpKernel\Tests\HttpCache; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpCache\HttpCache; use Symfony\Component\HttpKernel\HttpCache\Store; class StoreTest extends TestCase @@ -317,6 +319,17 @@ public function testPurgeHttpAndHttps() $this->assertEmpty($this->getStoreMetadata($requestHttps)); } + public function testDoesNotStorePrivateHeaders() + { + $request = Request::create('https://example.com/foo'); + $response = new Response('foo'); + $response->headers->setCookie(Cookie::fromString('foo=bar')); + + $this->store->write($request, $response); + $this->assertArrayNotHasKey('set-cookie', $this->getStoreMetadata($request)[0][1]); + $this->assertNotEmpty($response->headers->getCookies()); + } + protected function storeSimpleEntry($path = null, $headers = []) { if (null === $path) { From 9ac7fb1f0700a322bc4228168116a61dcae85899 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Aug 2022 11:31:21 +0200 Subject: [PATCH 0002/1170] [Serializer] Revert deprecation of `ContextAwareEncoderInterface` and `ContextAwareDecoderInterface` --- .github/expected-missing-return-types.diff | 6 +++--- src/Symfony/Component/Serializer/CHANGELOG.md | 2 -- src/Symfony/Component/Serializer/Encoder/ChainDecoder.php | 6 +++++- src/Symfony/Component/Serializer/Encoder/ChainEncoder.php | 6 +++++- .../Serializer/Encoder/ContextAwareDecoderInterface.php | 2 -- .../Serializer/Encoder/ContextAwareEncoderInterface.php | 2 -- src/Symfony/Component/Serializer/Encoder/CsvEncoder.php | 8 ++------ .../Component/Serializer/Encoder/DecoderInterface.php | 5 ++--- .../Component/Serializer/Encoder/EncoderInterface.php | 5 ++--- src/Symfony/Component/Serializer/Encoder/JsonDecode.php | 4 +--- src/Symfony/Component/Serializer/Encoder/JsonEncode.php | 4 +--- src/Symfony/Component/Serializer/Encoder/JsonEncoder.php | 8 ++------ src/Symfony/Component/Serializer/Encoder/XmlEncoder.php | 8 ++------ src/Symfony/Component/Serializer/Encoder/YamlEncoder.php | 8 ++------ .../Serializer/Tests/Encoder/ChainDecoderTest.php | 3 ++- .../Serializer/Tests/Encoder/ChainEncoderTest.php | 5 +++-- 16 files changed, 32 insertions(+), 50 deletions(-) diff --git a/.github/expected-missing-return-types.diff b/.github/expected-missing-return-types.diff index fe0381a0b0a7e..cf4c237e3070c 100644 --- a/.github/expected-missing-return-types.diff +++ b/.github/expected-missing-return-types.diff @@ -899,11 +899,11 @@ index f38069e471..0966eb3e89 100644 + public function decode(string $data, string $format, array $context = []): mixed; /** -@@ -45,4 +45,4 @@ interface DecoderInterface +@@ -44,4 +44,4 @@ interface DecoderInterface * @return bool */ -- public function supportsDecoding(string $format /* , array $context = [] */); -+ public function supportsDecoding(string $format /* , array $context = [] */): bool; +- public function supportsDecoding(string $format); ++ public function supportsDecoding(string $format): bool; } diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 44ba45f581..3398115497 100644 diff --git a/src/Symfony/Component/Serializer/CHANGELOG.md b/src/Symfony/Component/Serializer/CHANGELOG.md index c2b3ebfb3c6c2..0a475a0eafb9c 100644 --- a/src/Symfony/Component/Serializer/CHANGELOG.md +++ b/src/Symfony/Component/Serializer/CHANGELOG.md @@ -9,8 +9,6 @@ CHANGELOG * Set `Context` annotation as not final * Deprecate `ContextAwareNormalizerInterface`, use `NormalizerInterface` instead * Deprecate `ContextAwareDenormalizerInterface`, use `DenormalizerInterface` instead - * Deprecate `ContextAwareEncoderInterface`, use `EncoderInterface` instead - * Deprecate `ContextAwareDecoderInterface`, use `DecoderInterface` instead * Deprecate supporting denormalization for `AbstractUid` in `UidNormalizer`, use one of `AbstractUid` child class instead * Deprecate denormalizing to an abstract class in `UidNormalizer` * Add support for `can*()` methods to `ObjectNormalizer` diff --git a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php index 0f7f94fad8842..7a01938ab4d52 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php @@ -67,9 +67,13 @@ private function getDecoder(string $format, array $context): DecoderInterface return $this->decoders[$this->decoderByFormat[$format]]; } + $cache = true; foreach ($this->decoders as $i => $decoder) { + $cache = $cache && !$decoder instanceof ContextAwareDecoderInterface; if ($decoder->supportsDecoding($format, $context)) { - $this->decoderByFormat[$format] = $i; + if ($cache) { + $this->decoderByFormat[$format] = $i; + } return $decoder; } diff --git a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php index 70d7c9fd10645..061a9cf748bd8 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php @@ -90,9 +90,13 @@ private function getEncoder(string $format, array $context): EncoderInterface return $this->encoders[$this->encoderByFormat[$format]]; } + $cache = true; foreach ($this->encoders as $i => $encoder) { + $cache = $cache && !$encoder instanceof ContextAwareEncoderInterface; if ($encoder->supportsEncoding($format, $context)) { - $this->encoderByFormat[$format] = $i; + if ($cache) { + $this->encoderByFormat[$format] = $i; + } return $encoder; } diff --git a/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php index 910b26bac1fc8..6ac2e38cc4657 100644 --- a/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php @@ -15,8 +15,6 @@ * Adds the support of an extra $context parameter for the supportsDecoding method. * * @author Kévin Dunglas - * - * @deprecated since symfony/serializer 6.1, use DecoderInterface instead */ interface ContextAwareDecoderInterface extends DecoderInterface { diff --git a/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php b/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php index f828f87a4f82f..832b600eeca57 100644 --- a/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php @@ -15,8 +15,6 @@ * Adds the support of an extra $context parameter for the supportsEncoding method. * * @author Kévin Dunglas - * - * @deprecated since symfony/serializer 6.1, use EncoderInterface instead */ interface ContextAwareEncoderInterface extends EncoderInterface { diff --git a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php index b2c6fcd81d4ae..a3733a53dee24 100644 --- a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php @@ -124,10 +124,8 @@ public function encode(mixed $data, string $format, array $context = []): string /** * {@inheritdoc} - * - * @param array $context */ - public function supportsEncoding(string $format /* , array $context = [] */): bool + public function supportsEncoding(string $format): bool { return self::FORMAT === $format; } @@ -212,10 +210,8 @@ public function decode(string $data, string $format, array $context = []): mixed /** * {@inheritdoc} - * - * @param array $context */ - public function supportsDecoding(string $format /* , array $context = [] */): bool + public function supportsDecoding(string $format): bool { return self::FORMAT === $format; } diff --git a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php index 5014b9bd514ab..84a84ad1f3e69 100644 --- a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php @@ -39,10 +39,9 @@ public function decode(string $data, string $format, array $context = []); /** * Checks whether the deserializer can decode from given format. * - * @param string $format Format name - * @param array $context Options that decoders have access to + * @param string $format Format name * * @return bool */ - public function supportsDecoding(string $format /* , array $context = [] */); + public function supportsDecoding(string $format); } diff --git a/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php b/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php index c913ac3fb14ad..e0f303b1e3dcd 100644 --- a/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php @@ -32,8 +32,7 @@ public function encode(mixed $data, string $format, array $context = []): string /** * Checks whether the serializer can encode to given format. * - * @param string $format Format name - * @param array $context Options that normalizers/encoders have access to + * @param string $format Format name */ - public function supportsEncoding(string $format /* , array $context = [] */): bool; + public function supportsEncoding(string $format): bool; } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 50d2d2e3f266f..ad094afaca161 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -95,10 +95,8 @@ public function decode(string $data, string $format, array $context = []): mixed /** * {@inheritdoc} - * - * @param array $context */ - public function supportsDecoding(string $format /* , array $context = [] */): bool + public function supportsDecoding(string $format): bool { return JsonEncoder::FORMAT === $format; } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index 86baf99994eb6..23d0fdd960e3e 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -57,10 +57,8 @@ public function encode(mixed $data, string $format, array $context = []): string /** * {@inheritdoc} - * - * @param array $context */ - public function supportsEncoding(string $format /* , array $context = [] */): bool + public function supportsEncoding(string $format): bool { return JsonEncoder::FORMAT === $format; } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php index e6ccbfba50b2b..d17ef049285ef 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -47,20 +47,16 @@ public function decode(string $data, string $format, array $context = []): mixed /** * {@inheritdoc} - * - * @param array $context */ - public function supportsEncoding(string $format /* , array $context = [] */): bool + public function supportsEncoding(string $format): bool { return self::FORMAT === $format; } /** * {@inheritdoc} - * - * @param array $context */ - public function supportsDecoding(string $format /* , array $context = [] */): bool + public function supportsDecoding(string $format): bool { return self::FORMAT === $format; } diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index a47e6d69583f3..2474f4439a443 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -166,20 +166,16 @@ public function decode(string $data, string $format, array $context = []): mixed /** * {@inheritdoc} - * - * @param array $context */ - public function supportsEncoding(string $format /* , array $context = [] */): bool + public function supportsEncoding(string $format): bool { return self::FORMAT === $format; } /** * {@inheritdoc} - * - * @param array $context */ - public function supportsDecoding(string $format /* , array $context = [] */): bool + public function supportsDecoding(string $format): bool { return self::FORMAT === $format; } diff --git a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php index ecb9815eee553..51f600786aa3b 100644 --- a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php @@ -67,10 +67,8 @@ public function encode(mixed $data, string $format, array $context = []): string /** * {@inheritdoc} - * - * @param array $context */ - public function supportsEncoding(string $format /* , array $context = [] */): bool + public function supportsEncoding(string $format): bool { return self::FORMAT === $format || self::ALTERNATIVE_FORMAT === $format; } @@ -87,10 +85,8 @@ public function decode(string $data, string $format, array $context = []): mixed /** * {@inheritdoc} - * - * @param array $context */ - public function supportsDecoding(string $format /* , array $context = [] */): bool + public function supportsDecoding(string $format): bool { return self::FORMAT === $format || self::ALTERNATIVE_FORMAT === $format; } diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php index 5cac8d99a5270..a181bb145c571 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Encoder\ChainDecoder; +use Symfony\Component\Serializer\Encoder\ContextAwareDecoderInterface; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Exception\RuntimeException; @@ -28,7 +29,7 @@ class ChainDecoderTest extends TestCase protected function setUp(): void { - $this->decoder1 = $this->createMock(DecoderInterface::class); + $this->decoder1 = $this->createMock(ContextAwareDecoderInterface::class); $this->decoder1 ->method('supportsDecoding') ->willReturnMap([ diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php index 848087145bafe..227e251c1dc6f 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php @@ -14,6 +14,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Debug\TraceableEncoder; use Symfony\Component\Serializer\Encoder\ChainEncoder; +use Symfony\Component\Serializer\Encoder\ContextAwareEncoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface; use Symfony\Component\Serializer\Exception\RuntimeException; @@ -30,7 +31,7 @@ class ChainEncoderTest extends TestCase protected function setUp(): void { - $this->encoder1 = $this->createMock(EncoderInterface::class); + $this->encoder1 = $this->createMock(ContextAwareEncoderInterface::class); $this->encoder1 ->method('supportsEncoding') ->willReturnMap([ @@ -106,7 +107,7 @@ public function testNeedsNormalizationTraceableEncoder() class NormalizationAwareEncoder implements EncoderInterface, NormalizationAwareInterface { - public function supportsEncoding(string $format, array $context = []): bool + public function supportsEncoding(string $format): bool { return true; } From 9b7bdc9b1894cca49dca94531b736f2f2f7e2ac5 Mon Sep 17 00:00:00 2001 From: wuchen90 Date: Wed, 9 Jun 2021 12:37:01 +0200 Subject: [PATCH 0003/1170] [Validator] Add the When constraint and validator --- .../FrameworkExtension.php | 5 + .../Resources/config/validator.php | 7 + src/Symfony/Component/Validator/CHANGELOG.md | 1 + .../Component/Validator/Constraints/When.php | 69 ++++++ .../Validator/Constraints/WhenValidator.php | 61 +++++ .../Fixtures/WhenTestWithAttributes.php | 39 ++++ .../Validator/Tests/Constraints/WhenTest.php | 197 ++++++++++++++++ .../Tests/Constraints/WhenValidatorTest.php | 219 ++++++++++++++++++ 8 files changed, 598 insertions(+) create mode 100644 src/Symfony/Component/Validator/Constraints/When.php create mode 100644 src/Symfony/Component/Validator/Constraints/WhenValidator.php create mode 100644 src/Symfony/Component/Validator/Tests/Constraints/Fixtures/WhenTestWithAttributes.php create mode 100644 src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php create mode 100644 src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 706773fa60522..b32e6ca69ab63 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -221,6 +221,7 @@ use Symfony\Component\Translation\Translator; use Symfony\Component\Uid\Factory\UuidFactory; use Symfony\Component\Uid\UuidV4; +use Symfony\Component\Validator\Constraints\WhenValidator; use Symfony\Component\Validator\ConstraintValidatorInterface; use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader; use Symfony\Component\Validator\ObjectInitializerInterface; @@ -1570,6 +1571,10 @@ private function registerValidationConfiguration(array $config, ContainerBuilder if (!class_exists(ExpressionLanguage::class)) { $container->removeDefinition('validator.expression_language'); } + + if (!class_exists(WhenValidator::class)) { + $container->removeDefinition('validator.when'); + } } private function registerValidatorMapping(ContainerBuilder $container, array $config, array &$files) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.php index 3fd066ee37f1f..c397e73d42505 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.php @@ -17,6 +17,7 @@ use Symfony\Component\Validator\Constraints\EmailValidator; use Symfony\Component\Validator\Constraints\ExpressionValidator; use Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator; +use Symfony\Component\Validator\Constraints\WhenValidator; use Symfony\Component\Validator\ContainerConstraintValidatorFactory; use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader; use Symfony\Component\Validator\Validation; @@ -95,6 +96,12 @@ 'alias' => NotCompromisedPasswordValidator::class, ]) + ->set('validator.when', WhenValidator::class) + ->args([service('validator.expression_language')->nullOnInvalid()]) + ->tag('validator.constraint_validator', [ + 'alias' => WhenValidator::class, + ]) + ->set('validator.property_info_loader', PropertyInfoLoader::class) ->args([ service('property_info'), diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md index 5d74eba99afb0..6dd7ffcd4bb0b 100644 --- a/src/Symfony/Component/Validator/CHANGELOG.md +++ b/src/Symfony/Component/Validator/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 6.2 --- + * Add the `When` constraint and validator * Deprecate the "loose" e-mail validation mode, use "html5" instead * Add the `negate` option to the `Expression` constraint, to inverse the logic of the violation's creation diff --git a/src/Symfony/Component/Validator/Constraints/When.php b/src/Symfony/Component/Validator/Constraints/When.php new file mode 100644 index 0000000000000..12434319c66af --- /dev/null +++ b/src/Symfony/Component/Validator/Constraints/When.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\ExpressionLanguage\Expression; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\Validator\Exception\LogicException; + +/** + * @Annotation + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) + */ +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] +class When extends Composite +{ + public $expression; + public $constraints = []; + public $values = []; + + public function __construct(string|Expression|array $expression, array $constraints = null, array $values = null, array $groups = null, $payload = null, array $options = []) + { + if (!class_exists(ExpressionLanguage::class)) { + throw new LogicException(sprintf('The "symfony/expression-language" component is required to use the "%s" constraint. Try running "composer require symfony/expression-language".', __CLASS__)); + } + + if (\is_array($expression)) { + $options = array_merge($expression, $options); + } else { + $options['expression'] = $expression; + $options['constraints'] = $constraints; + } + + if (null !== $groups) { + $options['groups'] = $groups; + } + + if (null !== $payload) { + $options['payload'] = $payload; + } + + parent::__construct($options); + + $this->values = $values ?? $this->values; + } + + public function getRequiredOptions(): array + { + return ['expression', 'constraints']; + } + + public function getTargets(): string|array + { + return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; + } + + protected function getCompositeOption(): string + { + return 'constraints'; + } +} diff --git a/src/Symfony/Component/Validator/Constraints/WhenValidator.php b/src/Symfony/Component/Validator/Constraints/WhenValidator.php new file mode 100644 index 0000000000000..505f4fccda982 --- /dev/null +++ b/src/Symfony/Component/Validator/Constraints/WhenValidator.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\LogicException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +final class WhenValidator extends ConstraintValidator +{ + private ?ExpressionLanguage $expressionLanguage; + + public function __construct(ExpressionLanguage $expressionLanguage = null) + { + $this->expressionLanguage = $expressionLanguage; + } + + /** + * {@inheritdoc} + */ + public function validate(mixed $value, Constraint $constraint): void + { + if (!$constraint instanceof When) { + throw new UnexpectedTypeException($constraint, When::class); + } + + $context = $this->context; + $variables = $constraint->values; + $variables['value'] = $value; + $variables['this'] = $context->getObject(); + + if ($this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) { + $context->getValidator()->inContext($context) + ->validate($value, $constraint->constraints); + } + } + + private function getExpressionLanguage(): ExpressionLanguage + { + if (null !== $this->expressionLanguage) { + return $this->expressionLanguage; + } + + if (!class_exists(ExpressionLanguage::class)) { + throw new LogicException(sprintf('The "symfony/expression-language" component is required to use the "%s" validator. Try running "composer require symfony/expression-language".', __CLASS__)); + } + + return $this->expressionLanguage = new ExpressionLanguage(); + } +} diff --git a/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/WhenTestWithAttributes.php b/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/WhenTestWithAttributes.php new file mode 100644 index 0000000000000..b106b414e479f --- /dev/null +++ b/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/WhenTestWithAttributes.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\When; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\MissingOptionsException; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Validator\Tests\Constraints\Fixtures\WhenTestWithAttributes; + +final class WhenTest extends TestCase +{ + public function testMissingOptionsExceptionIsThrown() + { + $this->expectException(MissingOptionsException::class); + $this->expectExceptionMessage('The options "expression", "constraints" must be set for constraint "Symfony\Component\Validator\Constraints\When".'); + + new When([]); + } + + public function testNonConstraintsAreRejected() + { + $this->expectException(ConstraintDefinitionException::class); + $this->expectExceptionMessage('The value "foo" is not an instance of Constraint in constraint "Symfony\Component\Validator\Constraints\When"'); + new When('true', [ + 'foo', + ]); + } + + public function testAnnotations() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata(WhenTestWithAnnotations::class); + + self::assertTrue($loader->loadClassMetadata($metadata)); + + [$classConstraint] = $metadata->getConstraints(); + + self::assertInstanceOf(When::class, $classConstraint); + self::assertSame('true', $classConstraint->expression); + self::assertEquals([ + new Callback([ + 'callback' => 'callback', + 'groups' => ['Default', 'WhenTestWithAnnotations'], + ]), + ], $classConstraint->constraints); + + [$fooConstraint] = $metadata->properties['foo']->getConstraints(); + + self::assertInstanceOf(When::class, $fooConstraint); + self::assertSame('true', $fooConstraint->expression); + self::assertEquals([ + new NotNull([ + 'groups' => ['Default', 'WhenTestWithAnnotations'], + ]), + new NotBlank([ + 'groups' => ['Default', 'WhenTestWithAnnotations'], + ]), + ], $fooConstraint->constraints); + self::assertSame(['Default', 'WhenTestWithAnnotations'], $fooConstraint->groups); + + [$barConstraint] = $metadata->properties['bar']->getConstraints(); + + self::assertInstanceOf(When::class, $fooConstraint); + self::assertSame('false', $barConstraint->expression); + self::assertEquals([ + new NotNull([ + 'groups' => ['foo'], + ]), + new NotBlank([ + 'groups' => ['foo'], + ]), + ], $barConstraint->constraints); + self::assertSame(['foo'], $barConstraint->groups); + + [$bazConstraint] = $metadata->getters['baz']->getConstraints(); + + self::assertInstanceOf(When::class, $bazConstraint); + self::assertSame('true', $bazConstraint->expression); + self::assertEquals([ + new NotNull([ + 'groups' => ['Default', 'WhenTestWithAnnotations'], + ]), + new NotBlank([ + 'groups' => ['Default', 'WhenTestWithAnnotations'], + ]), + ], $bazConstraint->constraints); + self::assertSame(['Default', 'WhenTestWithAnnotations'], $bazConstraint->groups); + } + + /** + * @requires PHP 8.1 + */ + public function testAttributes() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata(WhenTestWithAttributes::class); + + self::assertTrue($loader->loadClassMetadata($metadata)); + + [$classConstraint] = $metadata->getConstraints(); + + self::assertInstanceOf(When::class, $classConstraint); + self::assertSame('true', $classConstraint->expression); + self::assertEquals([ + new Callback([ + 'callback' => 'callback', + 'groups' => ['Default', 'WhenTestWithAttributes'], + ]), + ], $classConstraint->constraints); + + [$fooConstraint] = $metadata->properties['foo']->getConstraints(); + + self::assertInstanceOf(When::class, $fooConstraint); + self::assertSame('true', $fooConstraint->expression); + self::assertEquals([ + new NotNull([ + 'groups' => ['Default', 'WhenTestWithAttributes'], + ]), + new NotBlank([ + 'groups' => ['Default', 'WhenTestWithAttributes'], + ]), + ], $fooConstraint->constraints); + self::assertSame(['Default', 'WhenTestWithAttributes'], $fooConstraint->groups); + + [$barConstraint] = $metadata->properties['bar']->getConstraints(); + + self::assertInstanceOf(When::class, $fooConstraint); + self::assertSame('false', $barConstraint->expression); + self::assertEquals([ + new NotNull([ + 'groups' => ['foo'], + ]), + new NotBlank([ + 'groups' => ['foo'], + ]), + ], $barConstraint->constraints); + self::assertSame(['foo'], $barConstraint->groups); + + [$bazConstraint] = $metadata->getters['baz']->getConstraints(); + + self::assertInstanceOf(When::class, $bazConstraint); + self::assertSame('true', $bazConstraint->expression); + self::assertEquals([ + new NotNull([ + 'groups' => ['Default', 'WhenTestWithAttributes'], + ]), + new NotBlank([ + 'groups' => ['Default', 'WhenTestWithAttributes'], + ]), + ], $bazConstraint->constraints); + self::assertSame(['Default', 'WhenTestWithAttributes'], $bazConstraint->groups); + } +} + +/** + * @When(expression="true", constraints={@Callback("callback")}) + */ +class WhenTestWithAnnotations +{ + /** + * @When(expression="true", constraints={@NotNull, @NotBlank}) + */ + private $foo; + + /** + * @When(expression="false", constraints={@NotNull, @NotBlank}, groups={"foo"}) + */ + private $bar; + + /** + * @When(expression="true", constraints={@NotNull, @NotBlank}) + */ + public function getBaz() + { + return null; + } + + public function callback() + { + } +} diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php new file mode 100644 index 0000000000000..3fc8ba4a447a8 --- /dev/null +++ b/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Blank; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\NegativeOrZero; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\PositiveOrZero; +use Symfony\Component\Validator\Constraints\When; +use Symfony\Component\Validator\Constraints\WhenValidator; +use Symfony\Component\Validator\ConstraintValidatorInterface; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +final class WhenValidatorTest extends ConstraintValidatorTestCase +{ + public function testConstraintsAreExecuted() + { + $constraints = [ + new NotNull(), + new NotBlank(), + ]; + + $this->expectValidateValue(0, 'Foo', $constraints); + + $this->validator->validate('Foo', new When([ + 'expression' => 'true', + 'constraints' => $constraints, + ])); + } + + public function testConstraintsAreExecutedWithNull() + { + $constraints = [ + new NotNull(), + ]; + + $this->expectValidateValue(0, null, $constraints); + + $this->validator->validate(null, new When([ + 'expression' => 'true', + 'constraints' => $constraints, + ])); + } + + public function testConstraintsAreExecutedWithObject() + { + $number = new \stdClass(); + $number->type = 'positive'; + $number->value = 1; + + $this->setObject($number); + $this->setPropertyPath('value'); + + $constraints = [ + new PositiveOrZero(), + ]; + + $this->expectValidateValue(0, $number->value, $constraints); + + $this->validator->validate($number->value, new When([ + 'expression' => 'this.type === "positive"', + 'constraints' => $constraints, + ])); + } + + public function testConstraintsAreExecutedWithValue() + { + $constraints = [ + new Callback(), + ]; + + $this->expectValidateValue(0, 'foo', $constraints); + + $this->validator->validate('foo', new When([ + 'expression' => 'value === "foo"', + 'constraints' => $constraints, + ])); + } + + public function testConstraintsAreExecutedWithExpressionValues() + { + $constraints = [ + new Callback(), + ]; + + $this->expectValidateValue(0, 'foo', $constraints); + + $this->validator->validate('foo', new When([ + 'expression' => 'activated && value === compared_value', + 'constraints' => $constraints, + 'values' => [ + 'activated' => true, + 'compared_value' => 'foo', + ], + ])); + } + + public function testConstraintsNotExecuted() + { + $constraints = [ + new NotNull(), + new NotBlank(), + ]; + + $this->expectNoValidate(); + + $this->validator->validate('', new When([ + 'expression' => 'false', + 'constraints' => $constraints, + ])); + + $this->assertNoViolation(); + } + + public function testConstraintsNotExecutedWithObject() + { + $number = new \stdClass(); + $number->type = 'positive'; + $number->value = 1; + + $this->setObject($number); + $this->setPropertyPath('value'); + + $constraints = [ + new NegativeOrZero(), + ]; + + $this->expectNoValidate(); + + $this->validator->validate($number->value, new When([ + 'expression' => 'this.type !== "positive"', + 'constraints' => $constraints, + ])); + + $this->assertNoViolation(); + } + + public function testConstraintsNotExecutedWithValue() + { + $constraints = [ + new Callback(), + ]; + + $this->expectNoValidate(); + + $this->validator->validate('foo', new When([ + 'expression' => 'value === null', + 'constraints' => $constraints, + ])); + + $this->assertNoViolation(); + } + + public function testConstraintsNotExecutedWithExpressionValues() + { + $constraints = [ + new Callback(), + ]; + + $this->expectNoValidate(); + + $this->validator->validate('foo', new When([ + 'expression' => 'activated && value === compared_value', + 'constraints' => $constraints, + 'values' => [ + 'activated' => true, + 'compared_value' => 'bar', + ], + ])); + + $this->assertNoViolation(); + } + + public function testConstraintViolations() + { + $constraints = [ + new Blank([ + 'message' => 'my_message', + ]), + ]; + $this->expectFailingValueValidation( + 0, + 'foo', + $constraints, + null, + new ConstraintViolation( + 'my_message', + 'my_message', + [ + '{{ value }}' => 'foo', + ], + null, + '', + null, + null, + Blank::NOT_BLANK_ERROR + ), + ); + + $this->validator->validate('foo', new When('true', $constraints)); + } + + protected function createValidator(): ConstraintValidatorInterface + { + return new WhenValidator(); + } +} From 92b512af41809ce6a719944c4fbd96e628334bcd Mon Sep 17 00:00:00 2001 From: Jeroeny Date: Thu, 11 Feb 2021 12:49:22 +0100 Subject: [PATCH 0004/1170] add senders to SendMessageToTransportsEvent --- .../Event/SendMessageToTransportsEvent.php | 14 +++++++++++++- .../Messenger/Middleware/SendMessageMiddleware.php | 6 ++++-- .../Tests/Middleware/SendMessageMiddlewareTest.php | 8 ++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Messenger/Event/SendMessageToTransportsEvent.php b/src/Symfony/Component/Messenger/Event/SendMessageToTransportsEvent.php index 454cca700e36f..ec7fb7c9d00d1 100644 --- a/src/Symfony/Component/Messenger/Event/SendMessageToTransportsEvent.php +++ b/src/Symfony/Component/Messenger/Event/SendMessageToTransportsEvent.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Messenger\Event; use Symfony\Component\Messenger\Envelope; +use Symfony\Component\Messenger\Transport\Sender\SenderInterface; /** * Event is dispatched before a message is sent to the transport. @@ -28,9 +29,12 @@ final class SendMessageToTransportsEvent { private Envelope $envelope; - public function __construct(Envelope $envelope) + private array $senders; + + public function __construct(Envelope $envelope, array $senders) { $this->envelope = $envelope; + $this->senders = $senders; } public function getEnvelope(): Envelope @@ -42,4 +46,12 @@ public function setEnvelope(Envelope $envelope) { $this->envelope = $envelope; } + + /** + * @return array + */ + public function getSenders(): array + { + return $this->senders; + } } diff --git a/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php b/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php index dd921cd565780..0aa432b89f958 100644 --- a/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php @@ -55,9 +55,11 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope $this->logger->info('Received message {class}', $context); } else { $shouldDispatchEvent = true; - foreach ($this->sendersLocator->getSenders($envelope) as $alias => $sender) { + $senders = $this->sendersLocator->getSenders($envelope); + $senders = \is_array($senders) ? $senders : iterator_to_array($senders); + foreach ($senders as $alias => $sender) { if (null !== $this->eventDispatcher && $shouldDispatchEvent) { - $event = new SendMessageToTransportsEvent($envelope); + $event = new SendMessageToTransportsEvent($envelope, $senders); $this->eventDispatcher->dispatch($event); $envelope = $event->getEnvelope(); $shouldDispatchEvent = false; diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php index 0f5c3af14c61a..5286e7e7e0952 100644 --- a/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php +++ b/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php @@ -168,13 +168,13 @@ public function testItDispatchesTheEventOneTime() { $envelope = new Envelope(new DummyMessage('original envelope')); + $sender1 = $this->createMock(SenderInterface::class); + $sender2 = $this->createMock(SenderInterface::class); + $dispatcher = $this->createMock(EventDispatcherInterface::class); $dispatcher->expects($this->once()) ->method('dispatch') - ->with(new SendMessageToTransportsEvent($envelope)); - - $sender1 = $this->createMock(SenderInterface::class); - $sender2 = $this->createMock(SenderInterface::class); + ->with(new SendMessageToTransportsEvent($envelope, ['foo' => $sender1, 'bar' => $sender2])); $sendersLocator = $this->createSendersLocator([DummyMessage::class => ['foo', 'bar']], ['foo' => $sender1, 'bar' => $sender2]); $middleware = new SendMessageMiddleware($sendersLocator, $dispatcher); From 59023805f3fe3af28e3f6a137f94b02e231ccd72 Mon Sep 17 00:00:00 2001 From: Axel Guckelsberger Date: Tue, 28 Sep 2021 12:41:47 +0200 Subject: [PATCH 0005/1170] [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder --- .../Serializer/Encoder/ChainDecoder.php | 6 ++++- .../Serializer/Encoder/ChainEncoder.php | 6 ++++- .../Tests/Encoder/ChainDecoderTest.php | 22 ++++++++++++++++++- .../Tests/Encoder/ChainEncoderTest.php | 22 ++++++++++++++++++- 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php index 2a55d93a6066f..29c656397f1f0 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php @@ -67,9 +67,13 @@ private function getDecoder(string $format, array $context): DecoderInterface return $this->decoders[$this->decoderByFormat[$format]]; } + $cache = true; foreach ($this->decoders as $i => $decoder) { + $cache = $cache && !$decoder instanceof ContextAwareDecoderInterface; if ($decoder->supportsDecoding($format, $context)) { - $this->decoderByFormat[$format] = $i; + if ($cache) { + $this->decoderByFormat[$format] = $i; + } return $decoder; } diff --git a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php index b13333e88aabb..c2c9e3c8ad2e2 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php @@ -85,9 +85,13 @@ private function getEncoder(string $format, array $context): EncoderInterface return $this->encoders[$this->encoderByFormat[$format]]; } + $cache = true; foreach ($this->encoders as $i => $encoder) { + $cache = $cache && !$encoder instanceof ContextAwareEncoderInterface; if ($encoder->supportsEncoding($format, $context)) { - $this->encoderByFormat[$format] = $i; + if ($cache) { + $this->encoderByFormat[$format] = $i; + } return $encoder; } diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php index 5cac8d99a5270..8f433ce0fa15a 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Encoder\ChainDecoder; +use Symfony\Component\Serializer\Encoder\ContextAwareDecoderInterface; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Exception\RuntimeException; @@ -28,7 +29,7 @@ class ChainDecoderTest extends TestCase protected function setUp(): void { - $this->decoder1 = $this->createMock(DecoderInterface::class); + $this->decoder1 = $this->createMock(ContextAwareDecoderInterface::class); $this->decoder1 ->method('supportsDecoding') ->willReturnMap([ @@ -36,6 +37,7 @@ protected function setUp(): void [self::FORMAT_2, [], false], [self::FORMAT_3, [], false], [self::FORMAT_3, ['foo' => 'bar'], true], + [self::FORMAT_3, ['foo' => 'bar2'], false], ]); $this->decoder2 = $this->createMock(DecoderInterface::class); @@ -45,6 +47,8 @@ protected function setUp(): void [self::FORMAT_1, [], false], [self::FORMAT_2, [], true], [self::FORMAT_3, [], false], + [self::FORMAT_3, ['foo' => 'bar'], false], + [self::FORMAT_3, ['foo' => 'bar2'], true], ]); $this->chainDecoder = new ChainDecoder([$this->decoder1, $this->decoder2]); @@ -52,10 +56,26 @@ protected function setUp(): void public function testSupportsDecoding() { + $this->decoder1 + ->method('decode') + ->willReturn('result1'); + $this->decoder2 + ->method('decode') + ->willReturn('result2'); + $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_1)); + $this->assertEquals('result1', $this->chainDecoder->decode('', self::FORMAT_1, [])); + $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_2)); + $this->assertEquals('result2', $this->chainDecoder->decode('', self::FORMAT_2, [])); + $this->assertFalse($this->chainDecoder->supportsDecoding(self::FORMAT_3)); + $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_3, ['foo' => 'bar'])); + $this->assertEquals('result1', $this->chainDecoder->decode('', self::FORMAT_3, ['foo' => 'bar'])); + + $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_3, ['foo' => 'bar2'])); + $this->assertEquals('result2', $this->chainDecoder->decode('', self::FORMAT_3, ['foo' => 'bar2'])); } public function testDecode() diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php index e80dc4f1843a6..8ae9e38c1337a 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Encoder\ChainEncoder; +use Symfony\Component\Serializer\Encoder\ContextAwareEncoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface; use Symfony\Component\Serializer\Exception\RuntimeException; @@ -29,7 +30,7 @@ class ChainEncoderTest extends TestCase protected function setUp(): void { - $this->encoder1 = $this->createMock(EncoderInterface::class); + $this->encoder1 = $this->createMock(ContextAwareEncoderInterface::class); $this->encoder1 ->method('supportsEncoding') ->willReturnMap([ @@ -37,6 +38,7 @@ protected function setUp(): void [self::FORMAT_2, [], false], [self::FORMAT_3, [], false], [self::FORMAT_3, ['foo' => 'bar'], true], + [self::FORMAT_3, ['foo' => 'bar2'], false], ]); $this->encoder2 = $this->createMock(EncoderInterface::class); @@ -46,6 +48,8 @@ protected function setUp(): void [self::FORMAT_1, [], false], [self::FORMAT_2, [], true], [self::FORMAT_3, [], false], + [self::FORMAT_3, ['foo' => 'bar'], false], + [self::FORMAT_3, ['foo' => 'bar2'], true], ]); $this->chainEncoder = new ChainEncoder([$this->encoder1, $this->encoder2]); @@ -53,10 +57,26 @@ protected function setUp(): void public function testSupportsEncoding() { + $this->encoder1 + ->method('encode') + ->willReturn('result1'); + $this->encoder2 + ->method('encode') + ->willReturn('result2'); + $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_1)); + $this->assertEquals('result1', $this->chainEncoder->encode('', self::FORMAT_1, [])); + $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_2)); + $this->assertEquals('result2', $this->chainEncoder->encode('', self::FORMAT_2, [])); + $this->assertFalse($this->chainEncoder->supportsEncoding(self::FORMAT_3)); + $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_3, ['foo' => 'bar'])); + $this->assertEquals('result1', $this->chainEncoder->encode('', self::FORMAT_3, ['foo' => 'bar'])); + + $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_3, ['foo' => 'bar2'])); + $this->assertEquals('result2', $this->chainEncoder->encode('', self::FORMAT_3, ['foo' => 'bar2'])); } public function testEncode() From c30f057db29a8fcc819b71adf390532085b10c9f Mon Sep 17 00:00:00 2001 From: allison guilhem Date: Sat, 30 Jul 2022 17:36:59 +0200 Subject: [PATCH 0006/1170] [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum --- .../Normalizer/BackedEnumNormalizer.php | 2 +- .../DummyObjectWithEnumConstructor.php | 12 ++++ .../Normalizer/BackedEnumNormalizerTest.php | 5 +- .../Serializer/Tests/SerializerTest.php | 65 +++++++++++++++++++ 4 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 src/Symfony/Component/Serializer/Tests/Fixtures/DummyObjectWithEnumConstructor.php diff --git a/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php index 8d5566bcc86f5..ad9fb807aed19 100644 --- a/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php @@ -64,7 +64,7 @@ public function denormalize($data, string $type, string $format = null, array $c try { return $type::from($data); } catch (\ValueError $e) { - throw NotNormalizableValueException::createForUnexpectedDataType($e->getMessage(), $data, [Type::BUILTIN_TYPE_INT, Type::BUILTIN_TYPE_STRING], $context['deserialization_path'] ?? null, true, $e->getCode(), $e); + throw new InvalidArgumentException('The data must belong to a backed enumeration of type '.$type); } } diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/DummyObjectWithEnumConstructor.php b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyObjectWithEnumConstructor.php new file mode 100644 index 0000000000000..be5ea3cff0ece --- /dev/null +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyObjectWithEnumConstructor.php @@ -0,0 +1,12 @@ +expectException(NotNormalizableValueException::class); - $this->expectExceptionMessage('"POST" is not a valid backing value for enum "'.StringBackedEnumDummy::class.'"'); + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('The data must belong to a backed enumeration of type '.StringBackedEnumDummy::class); + $this->normalizer->denormalize('POST', StringBackedEnumDummy::class); } diff --git a/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/src/Symfony/Component/Serializer/Tests/SerializerTest.php index 761ea066b5962..b2a33cbc0e5db 100644 --- a/src/Symfony/Component/Serializer/Tests/SerializerTest.php +++ b/src/Symfony/Component/Serializer/Tests/SerializerTest.php @@ -36,6 +36,7 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; +use Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer; use Symfony\Component\Serializer\Normalizer\CustomNormalizer; use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; @@ -58,6 +59,7 @@ use Symfony\Component\Serializer\Tests\Fixtures\DummyMessageInterface; use Symfony\Component\Serializer\Tests\Fixtures\DummyMessageNumberOne; use Symfony\Component\Serializer\Tests\Fixtures\DummyMessageNumberTwo; +use Symfony\Component\Serializer\Tests\Fixtures\DummyObjectWithEnumConstructor; use Symfony\Component\Serializer\Tests\Fixtures\FalseBuiltInDummy; use Symfony\Component\Serializer\Tests\Fixtures\NormalizableTraversableDummy; use Symfony\Component\Serializer\Tests\Fixtures\Php74Full; @@ -1173,6 +1175,69 @@ public function testCollectDenormalizationErrorsWithConstructor(?ClassMetadataFa $this->assertSame($expected, $exceptionsAsArray); } + /** + * @requires PHP 8.1 + */ + public function testCollectDenormalizationErrorsWithEnumConstructor() + { + $serializer = new Serializer( + [ + new BackedEnumNormalizer(), + new ObjectNormalizer(), + ], + ['json' => new JsonEncoder()] + ); + + try { + $serializer->deserialize('{"invalid": "GET"}', DummyObjectWithEnumConstructor::class, 'json', [ + DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true, + ]); + } catch (\Throwable $th) { + $this->assertInstanceOf(PartialDenormalizationException::class, $th); + } + + $exceptionsAsArray = array_map(function (NotNormalizableValueException $e): array { + return [ + 'currentType' => $e->getCurrentType(), + 'useMessageForUser' => $e->canUseMessageForUser(), + 'message' => $e->getMessage(), + ]; + }, $th->getErrors()); + + $expected = [ + [ + 'currentType' => 'array', + 'useMessageForUser' => true, + 'message' => 'Failed to create object because the class misses the "get" property.', + ], + ]; + + $this->assertSame($expected, $exceptionsAsArray); + } + + /** + * @requires PHP 8.1 + */ + public function testNoCollectDenormalizationErrorsWithWrongEnum() + { + $serializer = new Serializer( + [ + new BackedEnumNormalizer(), + new ObjectNormalizer(), + ], + ['json' => new JsonEncoder()] + ); + + try { + $serializer->deserialize('{"get": "invalid"}', DummyObjectWithEnumConstructor::class, 'json', [ + DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true, + ]); + } catch (\Throwable $th) { + $this->assertNotInstanceOf(PartialDenormalizationException::class, $th); + $this->assertInstanceOf(InvalidArgumentException::class, $th); + } + } + public function provideCollectDenormalizationErrors() { return [ From 57c49b4e1305c17c4f0d1d50b31784836c22bf87 Mon Sep 17 00:00:00 2001 From: Ayke Halder Date: Thu, 18 Aug 2022 23:14:46 +0200 Subject: [PATCH 0007/1170] Email image parts: regex for single closing quote The regex for image src matches for single and double opening quotes: `([\'"])` The corresponding matching for non-closing characters is implemented for double quotes only: ([^"]+) This change adds a non-greedy regex `.+?` which matches for as few characters as possbile before the "correspondingly matched opening quote" `\\1` appears. --- src/Symfony/Component/Mime/Email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Mime/Email.php b/src/Symfony/Component/Mime/Email.php index 29da5ef2fdcb9..9cdde13e533c6 100644 --- a/src/Symfony/Component/Mime/Email.php +++ b/src/Symfony/Component/Mime/Email.php @@ -503,7 +503,7 @@ private function prepareParts(): ?array $html = stream_get_contents($html); } $htmlPart = new TextPart($html, $this->htmlCharset, 'html'); - preg_match_all('(]*src\s*=\s*(?:([\'"])cid:([^"]+)\\1|cid:([^>\s]+)))i', $html, $names); + preg_match_all('(]*src\s*=\s*(?:([\'"])cid:(.+?)\\1|cid:([^>\s]+)))i', $html, $names); $names = array_filter(array_unique(array_merge($names[2], $names[3]))); } From b714b04ec3bedbe239db93fd4a314c7c09943c22 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 17 Aug 2022 14:52:48 +0200 Subject: [PATCH 0008/1170] use the clock mock to fix transient MonotonicClock tests --- src/Symfony/Component/Clock/MonotonicClock.php | 6 +++--- .../Component/Clock/Tests/MonotonicClockTest.php | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/Clock/MonotonicClock.php b/src/Symfony/Component/Clock/MonotonicClock.php index 65f86e72a39fb..ef4bfd50cb697 100644 --- a/src/Symfony/Component/Clock/MonotonicClock.php +++ b/src/Symfony/Component/Clock/MonotonicClock.php @@ -28,9 +28,9 @@ public function __construct(\DateTimeZone|string $timezone = null) throw new \RuntimeException('hrtime() returned false: the runtime environment does not provide access to a monotonic timer.'); } - $time = gettimeofday(); - $this->sOffset = $time['sec'] - $offset[0]; - $this->usOffset = $time['usec'] - (int) ($offset[1] / 1000); + $time = explode(' ', microtime(), 2); + $this->sOffset = $time[1] - $offset[0]; + $this->usOffset = (int) ($time[0] * 1000000) - (int) ($offset[1] / 1000); if (\is_string($timezone ??= date_default_timezone_get())) { $this->timezone = new \DateTimeZone($timezone); diff --git a/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php b/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php index c4d49d1b321ee..3230c75371b2e 100644 --- a/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php +++ b/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php @@ -14,6 +14,9 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Clock\MonotonicClock; +/** + * @group time-sensitive + */ class MonotonicClockTest extends TestCase { public function testConstruct() @@ -32,14 +35,14 @@ public function testConstruct() public function testNow() { $clock = new MonotonicClock(); - $before = new \DateTimeImmutable(); + $before = microtime(true); usleep(10); $now = $clock->now(); usleep(10); - $after = new \DateTimeImmutable(); + $after = microtime(true); - $this->assertGreaterThan($before, $now); - $this->assertLessThan($after, $now); + $this->assertGreaterThan($before, (float) $now->format('U.u')); + $this->assertLessThan($after, (float) $now->format('U.u')); } public function testSleep() @@ -53,7 +56,7 @@ public function testSleep() usleep(10); $after = microtime(true); - $this->assertGreaterThan($before + 1.5, $now); + $this->assertGreaterThanOrEqual($before + 1.5, $now); $this->assertLessThan($after, $now); $this->assertLessThan(1.9, $now - $before); $this->assertSame($tz, $clock->now()->getTimezone()->getName()); From 8188f1cf153830f0ac4aefb45209c1eb49767ae8 Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Mon, 15 Aug 2022 19:09:15 +0200 Subject: [PATCH 0009/1170] [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones --- .../AbstractRequestRateLimiter.php | 20 +++++- .../AbstractRequestRateLimiterTest.php | 64 +++++++++++++++++++ .../MockAbstractRequestRateLimiter.php | 34 ++++++++++ .../Component/HttpFoundation/composer.json | 3 +- 4 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php create mode 100644 src/Symfony/Component/HttpFoundation/Tests/RateLimiter/MockAbstractRequestRateLimiter.php diff --git a/src/Symfony/Component/HttpFoundation/RateLimiter/AbstractRequestRateLimiter.php b/src/Symfony/Component/HttpFoundation/RateLimiter/AbstractRequestRateLimiter.php index c91d614fe30bf..a6dd993b7315b 100644 --- a/src/Symfony/Component/HttpFoundation/RateLimiter/AbstractRequestRateLimiter.php +++ b/src/Symfony/Component/HttpFoundation/RateLimiter/AbstractRequestRateLimiter.php @@ -35,9 +35,7 @@ public function consume(Request $request): RateLimit foreach ($limiters as $limiter) { $rateLimit = $limiter->consume(1); - if (null === $minimalRateLimit || $rateLimit->getRemainingTokens() < $minimalRateLimit->getRemainingTokens()) { - $minimalRateLimit = $rateLimit; - } + $minimalRateLimit = $minimalRateLimit ? self::getMinimalRateLimit($minimalRateLimit, $rateLimit) : $rateLimit; } return $minimalRateLimit; @@ -54,4 +52,20 @@ public function reset(Request $request): void * @return LimiterInterface[] a set of limiters using keys extracted from the request */ abstract protected function getLimiters(Request $request): array; + + private static function getMinimalRateLimit(RateLimit $first, RateLimit $second): RateLimit + { + if ($first->isAccepted() !== $second->isAccepted()) { + return $first->isAccepted() ? $second : $first; + } + + $firstRemainingTokens = $first->getRemainingTokens(); + $secondRemainingTokens = $second->getRemainingTokens(); + + if ($firstRemainingTokens === $secondRemainingTokens) { + return $first->getRetryAfter() < $second->getRetryAfter() ? $second : $first; + } + + return $firstRemainingTokens > $secondRemainingTokens ? $second : $first; + } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php new file mode 100644 index 0000000000000..4790eae183802 --- /dev/null +++ b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\RateLimiter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\RateLimiter\LimiterInterface; +use Symfony\Component\RateLimiter\RateLimit; + +class AbstractRequestRateLimiterTest extends TestCase +{ + /** + * @dataProvider provideRateLimits + */ + public function testConsume(array $rateLimits, ?RateLimit $expected) + { + $rateLimiter = new MockAbstractRequestRateLimiter(array_map(function (RateLimit $rateLimit) { + $limiter = $this->createStub(LimiterInterface::class); + $limiter->method('consume')->willReturn($rateLimit); + + return $limiter; + }, $rateLimits)); + + $this->assertSame($expected, $rateLimiter->consume(new Request())); + } + + public function provideRateLimits() + { + $now = new \DateTimeImmutable(); + + yield 'Both accepted with different count of remaining tokens' => [ + [ + $expected = new RateLimit(0, $now, true, 1), // less remaining tokens + new RateLimit(1, $now, true, 1), + ], + $expected, + ]; + + yield 'Both accepted with same count of remaining tokens' => [ + [ + $expected = new RateLimit(0, $now->add(new \DateInterval('P1D')), true, 1), // longest wait time + new RateLimit(0, $now, true, 1), + ], + $expected, + ]; + + yield 'Accepted and denied' => [ + [ + new RateLimit(0, $now, true, 1), + $expected = new RateLimit(0, $now, false, 1), // denied + ], + $expected, + ]; + } +} diff --git a/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/MockAbstractRequestRateLimiter.php b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/MockAbstractRequestRateLimiter.php new file mode 100644 index 0000000000000..0acc918bf4d5c --- /dev/null +++ b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/MockAbstractRequestRateLimiter.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\RateLimiter; + +use Symfony\Component\HttpFoundation\RateLimiter\AbstractRequestRateLimiter; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\RateLimiter\LimiterInterface; + +class MockAbstractRequestRateLimiter extends AbstractRequestRateLimiter +{ + /** + * @var LimiterInterface[] + */ + private $limiters; + + public function __construct(array $limiters) + { + $this->limiters = $limiters; + } + + protected function getLimiters(Request $request): array + { + return $this->limiters; + } +} diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index 452281794b615..cb8d59ffed0d5 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -27,7 +27,8 @@ "symfony/dependency-injection": "^5.4|^6.0", "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0" + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest" : { "symfony/mime": "To use the file extension guesser" From 29a25854aa38d4a620fd61f96cbc743c6cb74e14 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Mon, 10 May 2021 17:50:30 +0200 Subject: [PATCH 0010/1170] [Messenger] Add simple transport based rate limiter to Messenger --- .../Bundle/FrameworkBundle/CHANGELOG.md | 1 + .../DependencyInjection/Configuration.php | 4 ++ .../FrameworkExtension.php | 16 ++++++++ .../Resources/config/console.php | 1 + .../Resources/config/messenger.php | 5 +++ .../Resources/config/schema/symfony-1.0.xsd | 1 + .../Fixtures/php/messenger_transports.php | 1 + .../Fixtures/xml/messenger_transports.xml | 2 +- .../Fixtures/yml/messenger_transports.yml | 1 + .../FrameworkExtensionTest.php | 6 +++ src/Symfony/Component/Messenger/CHANGELOG.md | 1 + .../Command/ConsumeMessagesCommand.php | 10 ++++- .../Event/WorkerRateLimitedEvent.php | 37 ++++++++++++++++++ .../Component/Messenger/Tests/WorkerTest.php | 38 +++++++++++++++++++ src/Symfony/Component/Messenger/Worker.php | 29 +++++++++++++- src/Symfony/Component/Messenger/composer.json | 1 + 16 files changed, 150 insertions(+), 4 deletions(-) create mode 100755 src/Symfony/Component/Messenger/Event/WorkerRateLimitedEvent.php diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index 7c503eb35d52b..d738ac9cae80b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -15,6 +15,7 @@ CHANGELOG * Tag all workflows services with `workflow`, those with type=workflow are tagged with `workflow.workflow`, and those with type=state_machine with `workflow.state_machine` + * Add `rate_limiter` configuration option to `messenger.transport` to allow rate limited transports using the RateLimiter component 6.1 --- diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 4e6dec875faf1..d67ef55cacb16 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -1492,6 +1492,10 @@ function ($a) { ->integerNode('max_delay')->defaultValue(0)->min(0)->info('Max time in ms that a retry should ever be delayed (0 = infinite)')->end() ->end() ->end() + ->scalarNode('rate_limiter') + ->defaultNull() + ->info('Rate limiter name to use when processing messages') + ->end() ->end() ->end() ->end() diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index c5855b04cd992..8e522b5ec3d6c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -2102,6 +2102,7 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder $senderAliases = []; $transportRetryReferences = []; + $transportRateLimiterReferences = []; foreach ($config['transports'] as $name => $transport) { $serializerId = $transport['serializer'] ?? 'messenger.default_serializer'; $transportDefinition = (new Definition(TransportInterface::class)) @@ -2130,6 +2131,14 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder $transportRetryReferences[$name] = new Reference($retryServiceId); } + + if ($transport['rate_limiter']) { + if (!interface_exists(LimiterInterface::class)) { + throw new LogicException('Rate limiter cannot be used within Messenger as the RateLimiter component is not installed. Try running "composer require symfony/rate-limiter".'); + } + + $transportRateLimiterReferences[$name] = new Reference('limiter.'.$transport['rate_limiter']); + } } $senderReferences = []; @@ -2184,6 +2193,13 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder $container->getDefinition('messenger.retry_strategy_locator') ->replaceArgument(0, $transportRetryReferences); + if (!$transportRateLimiterReferences) { + $container->removeDefinition('messenger.rate_limiter_locator'); + } else { + $container->getDefinition('messenger.rate_limiter_locator') + ->replaceArgument(0, $transportRateLimiterReferences); + } + if (\count($failureTransports) > 0) { $container->getDefinition('console.command.messenger_failed_messages_retry') ->replaceArgument(0, $config['failure_transport']); diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php index 9ca75d099e5f9..6407f3e244400 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php @@ -160,6 +160,7 @@ [], // Receiver names service('messenger.listener.reset_services')->nullOnInvalid(), [], // Bus names + service('messenger.rate_limiter_locator')->nullOnInvalid(), ]) ->tag('console.command') ->tag('monolog.logger', ['channel' => 'messenger']) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.php index 813d503000de4..0a67d48474d03 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.php @@ -159,6 +159,11 @@ abstract_arg('max delay ms'), ]) + // rate limiter + ->set('messenger.rate_limiter_locator', ServiceLocator::class) + ->args([[]]) + ->tag('container.service_locator') + // worker event listener ->set('messenger.retry.send_failed_message_for_retry_listener', SendFailedMessageForRetryListener::class) ->args([ diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd index cd53d88db00ac..f1fe50d89ad47 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd @@ -554,6 +554,7 @@ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php index 8236fced45021..19f22f2c78c99 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php @@ -20,6 +20,7 @@ 'multiplier' => 3, 'max_delay' => 100, ], + 'rate_limiter' => 'customised_worker' ], 'failed' => 'in-memory:///', 'redis' => 'redis://127.0.0.1:6379/messages', diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml index d78c802810ae6..28e27e380bfe0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml @@ -10,7 +10,7 @@ - + Queue diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml index b16f9b6a8f09d..24471939c5435 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml @@ -18,6 +18,7 @@ framework: delay: 7 multiplier: 3 max_delay: 100 + rate_limiter: customised_worker failed: 'in-memory:///' redis: 'redis://127.0.0.1:6379/messages' beanstalkd: 'beanstalkd://127.0.0.1:11300' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 320483fb0dafc..472dd15355f49 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -949,6 +949,12 @@ public function testMessengerTransports() return array_shift($values); }, $failureTransports); $this->assertEquals($expectedTransportsByFailureTransports, $failureTransportsReferences); + + $rateLimitedTransports = $container->getDefinition('messenger.rate_limiter_locator')->getArgument(0); + $expectedRateLimitersByRateLimitedTransports = [ + 'customised' => new Reference('limiter.customised_worker'), + ]; + $this->assertEquals($expectedRateLimitersByRateLimitedTransports, $rateLimitedTransports); } public function testMessengerRouting() diff --git a/src/Symfony/Component/Messenger/CHANGELOG.md b/src/Symfony/Component/Messenger/CHANGELOG.md index 3824fcdcf75ed..8d6c34c8ddb11 100644 --- a/src/Symfony/Component/Messenger/CHANGELOG.md +++ b/src/Symfony/Component/Messenger/CHANGELOG.md @@ -6,6 +6,7 @@ CHANGELOG * Add new `messenger:stats` command that return a list of transports with their "to be processed" message count * Add `TransportNamesStamp` to change the transport while dispatching a message + * Add support for rate limited transports by using the RateLimiter component. 6.1 --- diff --git a/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php b/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php index a97fcc1874c97..c5f440957d676 100644 --- a/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php +++ b/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php @@ -47,8 +47,9 @@ class ConsumeMessagesCommand extends Command private array $receiverNames; private ?ResetServicesListener $resetServicesListener; private array $busIds; + private ?ContainerInterface $rateLimiterLocator; - public function __construct(RoutableMessageBus $routableBus, ContainerInterface $receiverLocator, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger = null, array $receiverNames = [], ResetServicesListener $resetServicesListener = null, array $busIds = []) + public function __construct(RoutableMessageBus $routableBus, ContainerInterface $receiverLocator, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger = null, array $receiverNames = [], ResetServicesListener $resetServicesListener = null, array $busIds = [], ContainerInterface $rateLimiterLocator = null) { $this->routableBus = $routableBus; $this->receiverLocator = $receiverLocator; @@ -57,6 +58,7 @@ public function __construct(RoutableMessageBus $routableBus, ContainerInterface $this->receiverNames = $receiverNames; $this->resetServicesListener = $resetServicesListener; $this->busIds = $busIds; + $this->rateLimiterLocator = $rateLimiterLocator; parent::__construct(); } @@ -156,6 +158,7 @@ protected function interact(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output): int { $receivers = []; + $rateLimiters = []; foreach ($receiverNames = $input->getArgument('receivers') as $receiverName) { if (!$this->receiverLocator->has($receiverName)) { $message = sprintf('The receiver "%s" does not exist.', $receiverName); @@ -167,6 +170,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $receivers[$receiverName] = $this->receiverLocator->get($receiverName); + if ($this->rateLimiterLocator?->has($receiverName)) { + $rateLimiters[$receiverName] = $this->rateLimiterLocator->get($receiverName); + } } if (null !== $this->resetServicesListener && !$input->getOption('no-reset')) { @@ -213,7 +219,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $bus = $input->getOption('bus') ? $this->routableBus->getMessageBus($input->getOption('bus')) : $this->routableBus; - $worker = new Worker($receivers, $bus, $this->eventDispatcher, $this->logger); + $worker = new Worker($receivers, $bus, $this->eventDispatcher, $this->logger, $rateLimiters); $options = [ 'sleep' => $input->getOption('sleep') * 1000000, ]; diff --git a/src/Symfony/Component/Messenger/Event/WorkerRateLimitedEvent.php b/src/Symfony/Component/Messenger/Event/WorkerRateLimitedEvent.php new file mode 100755 index 0000000000000..528127dadfd6e --- /dev/null +++ b/src/Symfony/Component/Messenger/Event/WorkerRateLimitedEvent.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 Symfony\Component\Messenger\Event; + +use Symfony\Component\RateLimiter\LimiterInterface; + +/** + * Dispatched after the worker has been blocked due to a configured rate limiter. + * Can be used to reset the rate limiter. + * + * @author Bob van de Vijver + */ +final class WorkerRateLimitedEvent +{ + public function __construct(private LimiterInterface $limiter, private string $transportName) + { + } + + public function getLimiter(): LimiterInterface + { + return $this->limiter; + } + + public function getTransportName(): string + { + return $this->transportName; + } +} diff --git a/src/Symfony/Component/Messenger/Tests/WorkerTest.php b/src/Symfony/Component/Messenger/Tests/WorkerTest.php index 747c6ed855d79..85419c78e45fa 100644 --- a/src/Symfony/Component/Messenger/Tests/WorkerTest.php +++ b/src/Symfony/Component/Messenger/Tests/WorkerTest.php @@ -20,6 +20,7 @@ use Symfony\Component\Messenger\Event\WorkerMessageFailedEvent; use Symfony\Component\Messenger\Event\WorkerMessageHandledEvent; use Symfony\Component\Messenger\Event\WorkerMessageReceivedEvent; +use Symfony\Component\Messenger\Event\WorkerRateLimitedEvent; use Symfony\Component\Messenger\Event\WorkerRunningEvent; use Symfony\Component\Messenger\Event\WorkerStartedEvent; use Symfony\Component\Messenger\Event\WorkerStoppedEvent; @@ -42,6 +43,8 @@ use Symfony\Component\Messenger\Transport\Receiver\QueueReceiverInterface; use Symfony\Component\Messenger\Transport\Receiver\ReceiverInterface; use Symfony\Component\Messenger\Worker; +use Symfony\Component\RateLimiter\RateLimiterFactory; +use Symfony\Component\RateLimiter\Storage\InMemoryStorage; use Symfony\Contracts\Service\ResetInterface; /** @@ -425,6 +428,41 @@ public function testWorkerMessageReceivedEventMutability() $this->assertCount(1, $envelope->all(\get_class($stamp))); } + public function testWorkerRateLimitMessages() + { + $envelope = [ + new Envelope(new DummyMessage('message1')), + new Envelope(new DummyMessage('message2')), + ]; + $receiver = new DummyReceiver([$envelope]); + + $bus = $this->createMock(MessageBusInterface::class); + $bus->method('dispatch')->willReturnArgument(0); + + $eventDispatcher = new EventDispatcher(); + $eventDispatcher->addSubscriber(new StopWorkerOnMessageLimitListener(2)); + + $rateLimitCount = 0; + $listener = function (WorkerRateLimitedEvent $event) use (&$rateLimitCount) { + ++$rateLimitCount; + $event->getLimiter()->reset(); // Reset limiter to continue test + }; + $eventDispatcher->addListener(WorkerRateLimitedEvent::class, $listener); + + $rateLimitFactory = new RateLimiterFactory([ + 'id' => 'bus', + 'policy' => 'fixed_window', + 'limit' => 1, + 'interval' => '1 minute', + ], new InMemoryStorage()); + + $worker = new Worker(['bus' => $receiver], $bus, $eventDispatcher, null, ['bus' => $rateLimitFactory]); + $worker->run(); + + $this->assertCount(2, $receiver->getAcknowledgedEnvelopes()); + $this->assertEquals(1, $rateLimitCount); + } + public function testWorkerShouldLogOnStop() { $bus = $this->createMock(MessageBusInterface::class); diff --git a/src/Symfony/Component/Messenger/Worker.php b/src/Symfony/Component/Messenger/Worker.php index 334e878fb1645..fee30a460f831 100644 --- a/src/Symfony/Component/Messenger/Worker.php +++ b/src/Symfony/Component/Messenger/Worker.php @@ -16,6 +16,7 @@ use Symfony\Component\Messenger\Event\WorkerMessageFailedEvent; use Symfony\Component\Messenger\Event\WorkerMessageHandledEvent; use Symfony\Component\Messenger\Event\WorkerMessageReceivedEvent; +use Symfony\Component\Messenger\Event\WorkerRateLimitedEvent; use Symfony\Component\Messenger\Event\WorkerRunningEvent; use Symfony\Component\Messenger\Event\WorkerStartedEvent; use Symfony\Component\Messenger\Event\WorkerStoppedEvent; @@ -29,6 +30,7 @@ use Symfony\Component\Messenger\Stamp\ReceivedStamp; use Symfony\Component\Messenger\Transport\Receiver\QueueReceiverInterface; use Symfony\Component\Messenger\Transport\Receiver\ReceiverInterface; +use Symfony\Component\RateLimiter\LimiterInterface; /** * @author Samuel Roze @@ -46,11 +48,12 @@ class Worker private WorkerMetadata $metadata; private array $acks = []; private \SplObjectStorage $unacks; + private ?array $rateLimiters; /** * @param ReceiverInterface[] $receivers Where the key is the transport name */ - public function __construct(array $receivers, MessageBusInterface $bus, EventDispatcherInterface $eventDispatcher = null, LoggerInterface $logger = null) + public function __construct(array $receivers, MessageBusInterface $bus, EventDispatcherInterface $eventDispatcher = null, LoggerInterface $logger = null, array $rateLimiters = null) { $this->receivers = $receivers; $this->bus = $bus; @@ -60,6 +63,7 @@ public function __construct(array $receivers, MessageBusInterface $bus, EventDis 'transportNames' => array_keys($receivers), ]); $this->unacks = new \SplObjectStorage(); + $this->rateLimiters = $rateLimiters; } /** @@ -102,6 +106,7 @@ public function run(array $options = []): void foreach ($envelopes as $envelope) { $envelopeHandled = true; + $this->rateLimit($transportName); $this->handleMessage($envelope, $transportName); $this->eventDispatcher?->dispatch(new WorkerRunningEvent($this, false)); @@ -217,6 +222,28 @@ private function ack(): bool return (bool) $acks; } + private function rateLimit(string $transportName): void + { + if (!$this->rateLimiters) { + return; + } + + if (!\array_key_exists($transportName, $this->rateLimiters)) { + return; + } + + /** @var LimiterInterface $rateLimiter */ + $rateLimiter = $this->rateLimiters[$transportName]->create(); + if ($rateLimiter->consume()->isAccepted()) { + return; + } + + $this->logger?->info('Transport {transport} is being rate limited, waiting for token to become available...', ['transport' => $transportName]); + + $this->eventDispatcher?->dispatch(new WorkerRateLimitedEvent($rateLimiter, $transportName)); + $rateLimiter->reserve()->wait(); + } + private function flush(bool $force): bool { $unacks = $this->unacks; diff --git a/src/Symfony/Component/Messenger/composer.json b/src/Symfony/Component/Messenger/composer.json index b9fdce89b97e7..63610781b4e55 100644 --- a/src/Symfony/Component/Messenger/composer.json +++ b/src/Symfony/Component/Messenger/composer.json @@ -27,6 +27,7 @@ "symfony/http-kernel": "^5.4|^6.0", "symfony/process": "^5.4|^6.0", "symfony/property-access": "^5.4|^6.0", + "symfony/rate-limiter": "^5.4|^6.0", "symfony/routing": "^5.4|^6.0", "symfony/serializer": "^5.4|^6.0", "symfony/service-contracts": "^1.1|^2|^3", From ccfb1e58bf1e6a851f81283fc483f17c3854def0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 19 Aug 2022 15:07:48 +0200 Subject: [PATCH 0011/1170] clean up unused variables --- .../DependencyInjection/FrameworkExtension.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 8e522b5ec3d6c..ea76107b01440 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -885,8 +885,6 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $ $registryDefinition = $container->getDefinition('.workflow.registry'); - $workflow = []; - foreach ($config['workflows'] as $name => $workflow) { $type = $workflow['type']; $workflowId = sprintf('%s.%s', $type, $name); @@ -974,8 +972,6 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $ $definitionDefinition->addArgument($initialMarking); $definitionDefinition->addArgument(new Reference(sprintf('%s.metadata_store', $workflowId))); - $workflows[$workflowId] = $definitionDefinition; - // Create MarkingStore if (isset($workflow['marking_store']['type'])) { $markingStoreDefinition = new ChildDefinition('workflow.marking_store.method'); From 2987d58708d2990386603387bf7ee62535bee9ce Mon Sep 17 00:00:00 2001 From: Mathieu Piot Date: Fri, 19 Aug 2022 14:56:02 +0200 Subject: [PATCH 0012/1170] [Security][AbstractToken] getUserIdentifier() must return a string --- .../Security/Core/Authentication/Token/AbstractToken.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php index 1385a8ba409d2..d08d382e42c83 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php @@ -48,7 +48,7 @@ public function getRoleNames(): array public function getUserIdentifier(): string { - return $this->user->getUserIdentifier(); + return $this->user ? $this->user->getUserIdentifier() : ''; } /** From 2e2c3e7dd466334f3c32fefd9dd9ef40d92f4562 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 19 Aug 2022 15:33:03 +0200 Subject: [PATCH 0013/1170] relax some assertions to transient NativeClock tests --- src/Symfony/Component/Clock/Tests/NativeClockTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/Clock/Tests/NativeClockTest.php b/src/Symfony/Component/Clock/Tests/NativeClockTest.php index c8983e15972fb..bb126d4a7c222 100644 --- a/src/Symfony/Component/Clock/Tests/NativeClockTest.php +++ b/src/Symfony/Component/Clock/Tests/NativeClockTest.php @@ -53,9 +53,8 @@ public function testSleep() usleep(10); $after = microtime(true); - $this->assertGreaterThan($before + 1.5, $now); + $this->assertGreaterThanOrEqual($before + 1.5, $now); $this->assertLessThan($after, $now); - $this->assertLessThan(1.9, $now - $before); $this->assertSame($tz, $clock->now()->getTimezone()->getName()); } From 049f15e9774098092f13dc785d556567d9fadf53 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Thu, 28 Jul 2022 12:33:29 -0400 Subject: [PATCH 0014/1170] [DependencyInjection] Allow service subscribers to return `SubscribedService[]` --- .../Compiler/AutowirePass.php | 69 +++++++++++-------- .../RegisterServiceSubscribersPass.php | 11 ++- .../RegisterServiceSubscribersPassTest.php | 66 ++++++++++++++++++ .../Fixtures/php/services_subscriber.php | 8 +-- .../DependencyInjection/TypedReference.php | 10 ++- src/Symfony/Contracts/CHANGELOG.md | 5 ++ .../Service/Attribute/SubscribedService.php | 20 +++++- .../Service/ServiceSubscriberInterface.php | 13 +++- .../Service/ServiceSubscriberTrait.php | 16 +++-- .../Service/ServiceSubscriberTraitTest.php | 7 ++ 10 files changed, 179 insertions(+), 46 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index 880ea41610753..a12a74294419f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -27,6 +27,7 @@ use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\TypedReference; +use Symfony\Contracts\Service\Attribute\SubscribedService; /** * Inspects existing service definitions and wires the autowired ones using the type hints of their classes. @@ -104,6 +105,19 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed private function doProcessValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof TypedReference) { + if ($attributes = $value->getAttributes()) { + $attribute = array_pop($attributes); + + if ($attributes) { + throw new AutowiringFailedException($this->currentId, sprintf('Using multiple attributes with "%s" is not supported.', SubscribedService::class)); + } + + if (!$attribute instanceof Target) { + return $this->processAttribute($attribute, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $value->getInvalidBehavior()); + } + + $value = new TypedReference($value->getType(), $value->getType(), $value->getInvalidBehavior(), $attribute->name); + } if ($ref = $this->getAutowiredReference($value, true)) { return $ref; } @@ -158,6 +172,29 @@ private function doProcessValue(mixed $value, bool $isRoot = false): mixed return $value; } + private function processAttribute(object $attribute, bool $isOptional = false): mixed + { + switch (true) { + case $attribute instanceof Autowire: + $value = $this->container->getParameterBag()->resolveValue($attribute->value); + + return $value instanceof Reference && $isOptional ? new Reference($value, ContainerInterface::NULL_ON_INVALID_REFERENCE) : $value; + + case $attribute instanceof TaggedIterator: + return new TaggedIteratorArgument($attribute->tag, $attribute->indexAttribute, $attribute->defaultIndexMethod, false, $attribute->defaultPriorityMethod, (array) $attribute->exclude); + + case $attribute instanceof TaggedLocator: + return new ServiceLocatorArgument(new TaggedIteratorArgument($attribute->tag, $attribute->indexAttribute, $attribute->defaultIndexMethod, true, $attribute->defaultPriorityMethod, (array) $attribute->exclude)); + + case $attribute instanceof MapDecorated: + $definition = $this->container->getDefinition($this->currentId); + + return new Reference($definition->innerServiceId ?? $this->currentId.'.inner', $definition->decorationOnInvalid ?? ContainerInterface::NULL_ON_INVALID_REFERENCE); + } + + throw new AutowiringFailedException($this->currentId, sprintf('"%s" is an unsupported attribute.', $attribute::class)); + } + private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot, bool $checkAttributes): array { $this->decoratedId = null; @@ -249,34 +286,8 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a if ($checkAttributes) { foreach ($parameter->getAttributes() as $attribute) { - if (TaggedIterator::class === $attribute->getName()) { - $attribute = $attribute->newInstance(); - $arguments[$index] = new TaggedIteratorArgument($attribute->tag, $attribute->indexAttribute, $attribute->defaultIndexMethod, false, $attribute->defaultPriorityMethod, (array) $attribute->exclude); - break; - } - - if (TaggedLocator::class === $attribute->getName()) { - $attribute = $attribute->newInstance(); - $arguments[$index] = new ServiceLocatorArgument(new TaggedIteratorArgument($attribute->tag, $attribute->indexAttribute, $attribute->defaultIndexMethod, true, $attribute->defaultPriorityMethod, (array) $attribute->exclude)); - break; - } - - if (Autowire::class === $attribute->getName()) { - $value = $attribute->newInstance()->value; - $value = $this->container->getParameterBag()->resolveValue($value); - - if ($value instanceof Reference && $parameter->allowsNull()) { - $value = new Reference($value, ContainerInterface::NULL_ON_INVALID_REFERENCE); - } - - $arguments[$index] = $value; - - break; - } - - if (MapDecorated::class === $attribute->getName()) { - $definition = $this->container->getDefinition($this->currentId); - $arguments[$index] = new Reference($definition->innerServiceId ?? $this->currentId.'.inner', $definition->decorationOnInvalid ?? ContainerInterface::NULL_ON_INVALID_REFERENCE); + if (\in_array($attribute->getName(), [TaggedIterator::class, TaggedLocator::class, Autowire::class, MapDecorated::class], true)) { + $arguments[$index] = $this->processAttribute($attribute->newInstance(), $parameter->allowsNull()); break; } @@ -315,7 +326,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a } $getValue = function () use ($type, $parameter, $class, $method) { - if (!$value = $this->getAutowiredReference($ref = new TypedReference($type, $type, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, Target::parseName($parameter)), true)) { + if (!$value = $this->getAutowiredReference($ref = new TypedReference($type, $type, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, Target::parseName($parameter)), false)) { $failureMessage = $this->createTypeNotFoundMessageCallback($ref, sprintf('argument "$%s" of method "%s()"', $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method)); if ($parameter->isDefaultValueAvailable()) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php index 7e1a3d061e4ec..7a42a390161bc 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php @@ -20,6 +20,7 @@ use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\TypedReference; use Symfony\Component\HttpFoundation\Session\SessionInterface; +use Symfony\Contracts\Service\Attribute\SubscribedService; use Symfony\Contracts\Service\ServiceProviderInterface; use Symfony\Contracts\Service\ServiceSubscriberInterface; @@ -73,6 +74,14 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed $subscriberMap = []; foreach ($class::getSubscribedServices() as $key => $type) { + $attributes = []; + + if ($type instanceof SubscribedService) { + $key = $type->key; + $attributes = $type->attributes; + $type = ($type->nullable ? '?' : '').($type->type ?? throw new InvalidArgumentException(sprintf('When "%s::getSubscribedServices()" returns "%s", a type must be set.', $class, SubscribedService::class))); + } + if (!\is_string($type) || !preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))(?(DEFINE)(?(?&cn)(?:\\\\(?&cn))*+))^\??(?&fqcn)(?:(?:\|(?&fqcn))*+|(?:&(?&fqcn))*+)$/', $type)) { throw new InvalidArgumentException(sprintf('"%s::getSubscribedServices()" must return valid PHP types for service "%s" key "%s", "%s" returned.', $class, $this->currentId, $key, \is_string($type) ? $type : get_debug_type($type))); } @@ -109,7 +118,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed $name = $this->container->has($type.' $'.$camelCaseName) ? $camelCaseName : $name; } - $subscriberMap[$key] = new TypedReference((string) $serviceMap[$key], $type, $optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name); + $subscriberMap[$key] = new TypedReference((string) $serviceMap[$key], $type, $optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name, $attributes); unset($serviceMap[$key]); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php index e4ca7499ff300..c2ecdf2f9f5ec 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php @@ -14,6 +14,13 @@ use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface as PsrContainerInterface; use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; +use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; +use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; +use Symfony\Component\DependencyInjection\Attribute\Autowire; +use Symfony\Component\DependencyInjection\Attribute\MapDecorated; +use Symfony\Component\DependencyInjection\Attribute\TaggedIterator; +use Symfony\Component\DependencyInjection\Attribute\TaggedLocator; +use Symfony\Component\DependencyInjection\Attribute\Target; use Symfony\Component\DependencyInjection\Compiler\AutowirePass; use Symfony\Component\DependencyInjection\Compiler\RegisterServiceSubscribersPass; use Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass; @@ -402,6 +409,65 @@ public static function getSubscribedServices(): array $this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0)); } + public function testSubscribedServiceWithAttributes() + { + if (!property_exists(SubscribedService::class, 'attributes')) { + $this->markTestSkipped('Requires symfony/service-contracts 3.2+'); + } + + $container = new ContainerBuilder(); + + $subscriber = new class() implements ServiceSubscriberInterface { + public static function getSubscribedServices(): array + { + return [ + new SubscribedService('tagged.iterator', 'iterable', attributes: new TaggedIterator('tag')), + new SubscribedService('tagged.locator', PsrContainerInterface::class, attributes: new TaggedLocator('tag')), + new SubscribedService('autowired', 'stdClass', attributes: new Autowire(service: 'service.id')), + new SubscribedService('autowired.nullable', 'stdClass', nullable: true, attributes: new Autowire(service: 'service.id')), + new SubscribedService('autowired.parameter', 'string', attributes: new Autowire('%parameter.1%')), + new SubscribedService('map.decorated', \stdClass::class, attributes: new MapDecorated()), + new SubscribedService('target', \stdClass::class, attributes: new Target('someTarget')), + ]; + } + }; + + $container->setParameter('parameter.1', 'foobar'); + $container->register('foo', \get_class($subscriber)) + ->addMethodCall('setContainer', [new Reference(PsrContainerInterface::class)]) + ->addTag('container.service_subscriber'); + + (new RegisterServiceSubscribersPass())->process($container); + (new ResolveServiceSubscribersPass())->process($container); + + $foo = $container->getDefinition('foo'); + $locator = $container->getDefinition((string) $foo->getMethodCalls()[0][1][0]); + + $expected = [ + 'tagged.iterator' => new ServiceClosureArgument(new TypedReference('iterable', 'iterable', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'tagged.iterator', [new TaggedIterator('tag')])), + 'tagged.locator' => new ServiceClosureArgument(new TypedReference(PsrContainerInterface::class, PsrContainerInterface::class, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'tagged.locator', [new TaggedLocator('tag')])), + 'autowired' => new ServiceClosureArgument(new TypedReference('stdClass', 'stdClass', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'autowired', [new Autowire(service: 'service.id')])), + 'autowired.nullable' => new ServiceClosureArgument(new TypedReference('stdClass', 'stdClass', ContainerInterface::IGNORE_ON_INVALID_REFERENCE, 'autowired.nullable', [new Autowire(service: 'service.id')])), + 'autowired.parameter' => new ServiceClosureArgument(new TypedReference('string', 'string', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'autowired.parameter', [new Autowire(service: '%parameter.1%')])), + 'map.decorated' => new ServiceClosureArgument(new TypedReference('stdClass', 'stdClass', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'map.decorated', [new MapDecorated()])), + '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)); + + (new AutowirePass())->process($container); + + $expected = [ + 'tagged.iterator' => new ServiceClosureArgument(new TaggedIteratorArgument('tag')), + 'tagged.locator' => new ServiceClosureArgument(new ServiceLocatorArgument(new TaggedIteratorArgument('tag', 'tag', needsIndexes: true))), + 'autowired' => new ServiceClosureArgument(new Reference('service.id')), + 'autowired.nullable' => new ServiceClosureArgument(new Reference('service.id', ContainerInterface::NULL_ON_INVALID_REFERENCE)), + 'autowired.parameter' => new ServiceClosureArgument('foobar'), + 'map.decorated' => new ServiceClosureArgument(new Reference('.service_locator.oZHAdom.inner', ContainerInterface::NULL_ON_INVALID_REFERENCE)), + 'target' => new ServiceClosureArgument(new TypedReference('stdClass', 'stdClass', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'someTarget')), + ]; + $this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0)); + } + public function testBinding() { $container = new ContainerBuilder(); 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 b0e9edfafa7fa..1928f94a41110 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php @@ -44,10 +44,10 @@ public function isCompiled(): bool public function getRemovedIds(): array { return [ - '.service_locator.JmEob1b' => true, - '.service_locator.KIgkoLM' => true, - '.service_locator.qUb.lJI' => true, - '.service_locator.qUb.lJI.foo_service' => true, + '.service_locator.0H1ht0q' => true, + '.service_locator.0H1ht0q.foo_service' => true, + '.service_locator.2hyyc9y' => true, + '.service_locator.KGUGnmw' => true, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true, ]; } diff --git a/src/Symfony/Component/DependencyInjection/TypedReference.php b/src/Symfony/Component/DependencyInjection/TypedReference.php index 946edb941d020..4c1e1c3f0c114 100644 --- a/src/Symfony/Component/DependencyInjection/TypedReference.php +++ b/src/Symfony/Component/DependencyInjection/TypedReference.php @@ -20,18 +20,21 @@ class TypedReference extends Reference { private string $type; private ?string $name; + private array $attributes; /** * @param string $id The service identifier * @param string $type The PHP type of the identified service * @param int $invalidBehavior The behavior when the service does not exist * @param string|null $name The name of the argument targeting the service + * @param array $attributes The attributes to be used */ - public function __construct(string $id, string $type, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, string $name = null) + public function __construct(string $id, string $type, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, string $name = null, array $attributes = []) { $this->name = $type === $id ? $name : null; parent::__construct($id, $invalidBehavior); $this->type = $type; + $this->attributes = $attributes; } public function getType() @@ -43,4 +46,9 @@ public function getName(): ?string { return $this->name; } + + public function getAttributes(): array + { + return $this->attributes; + } } diff --git a/src/Symfony/Contracts/CHANGELOG.md b/src/Symfony/Contracts/CHANGELOG.md index 5c9c3d08d4c9e..d8dd36863bafa 100644 --- a/src/Symfony/Contracts/CHANGELOG.md +++ b/src/Symfony/Contracts/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +3.2 +--- + + * Allow `ServiceSubscriberInterface::getSubscribedServices()` to return `SubscribedService[]` + 3.0 --- diff --git a/src/Symfony/Contracts/Service/Attribute/SubscribedService.php b/src/Symfony/Contracts/Service/Attribute/SubscribedService.php index 10d1bc38e8bf5..d98e1dfdbbeb1 100644 --- a/src/Symfony/Contracts/Service/Attribute/SubscribedService.php +++ b/src/Symfony/Contracts/Service/Attribute/SubscribedService.php @@ -11,9 +11,14 @@ namespace Symfony\Contracts\Service\Attribute; +use Symfony\Contracts\Service\ServiceSubscriberInterface; use Symfony\Contracts\Service\ServiceSubscriberTrait; /** + * For use as the return value for {@see ServiceSubscriberInterface}. + * + * @example new SubscribedService('http_client', HttpClientInterface::class, false, new Target('githubApi')) + * * Use with {@see ServiceSubscriberTrait} to mark a method's return type * as a subscribed service. * @@ -22,12 +27,21 @@ #[\Attribute(\Attribute::TARGET_METHOD)] final class SubscribedService { + /** @var object[] */ + public array $attributes; + /** - * @param string|null $key The key to use for the service - * If null, use "ClassName::methodName" + * @param string|null $key The key to use for the service + * @param class-string|null $type The service class + * @param bool $nullable Whether the service is optional + * @param object|object[] $attributes One or more dependency injection attributes to use */ public function __construct( - public ?string $key = null + public ?string $key = null, + public ?string $type = null, + public bool $nullable = false, + array|object $attributes = [], ) { + $this->attributes = \is_array($attributes) ? $attributes : [$attributes]; } } diff --git a/src/Symfony/Contracts/Service/ServiceSubscriberInterface.php b/src/Symfony/Contracts/Service/ServiceSubscriberInterface.php index 881ab971aa5a6..3da19169b0384 100644 --- a/src/Symfony/Contracts/Service/ServiceSubscriberInterface.php +++ b/src/Symfony/Contracts/Service/ServiceSubscriberInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Contracts\Service; +use Symfony\Contracts\Service\Attribute\SubscribedService; + /** * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. * @@ -29,7 +31,8 @@ interface ServiceSubscriberInterface { /** - * Returns an array of service types required by such instances, optionally keyed by the service names used internally. + * Returns an array of service types (or {@see SubscribedService} objects) required + * by such instances, optionally keyed by the service names used internally. * * For mandatory dependencies: * @@ -47,7 +50,13 @@ interface ServiceSubscriberInterface * * ['?Psr\Log\LoggerInterface'] is a shortcut for * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] * - * @return string[] The required service types, optionally keyed by service names + * additionally, an array of {@see SubscribedService}'s can be returned: + * + * * [new SubscribedService('logger', Psr\Log\LoggerInterface::class)] + * * [new SubscribedService(type: Psr\Log\LoggerInterface::class, nullable: true)] + * * [new SubscribedService('http_client', HttpClientInterface::class, attributes: new Target('githubApi'))] + * + * @return string[]|SubscribedService[] The required service types, optionally keyed by service names */ public static function getSubscribedServices(): array; } diff --git a/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php b/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php index e8c9b17042bdb..53012986e5133 100644 --- a/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php +++ b/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php @@ -50,13 +50,17 @@ public static function getSubscribedServices(): array throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class)); } - $serviceId = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; - - if ($returnType->allowsNull()) { - $serviceId = '?'.$serviceId; + /* @var SubscribedService $attribute */ + $attribute = $attribute->newInstance(); + $attribute->key ??= self::class.'::'.$method->name; + $attribute->type ??= $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; + $attribute->nullable = $returnType->allowsNull(); + + if ($attribute->attributes) { + $services[] = $attribute; + } else { + $services[$attribute->key] = ($attribute->nullable ? '?' : '').$attribute->type; } - - $services[$attribute->newInstance()->key ?? self::class.'::'.$method->name] = $serviceId; } return $services; diff --git a/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php b/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php index 296e9464f50f1..a4b2eccd899e9 100644 --- a/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php +++ b/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php @@ -15,6 +15,7 @@ use Psr\Container\ContainerInterface; use Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir1\Service1; use Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir2\Service2; +use Symfony\Contracts\Service\Attribute\Required; use Symfony\Contracts\Service\Attribute\SubscribedService; use Symfony\Contracts\Service\ServiceLocatorTrait; use Symfony\Contracts\Service\ServiceSubscriberInterface; @@ -27,6 +28,7 @@ public function testMethodsOnParentsAndChildrenAreIgnoredInGetSubscribedServices $expected = [ TestService::class.'::aService' => Service2::class, TestService::class.'::nullableService' => '?'.Service2::class, + new SubscribedService(TestService::class.'::withAttribute', Service2::class, true, new Required()), ]; $this->assertEquals($expected, ChildTestService::getSubscribedServices()); @@ -93,6 +95,11 @@ public function aService(): Service2 public function nullableService(): ?Service2 { } + + #[SubscribedService(attributes: new Required())] + public function withAttribute(): ?Service2 + { + } } class ChildTestService extends TestService From 4eaa05961d85618fb51e5a453d0f67570f8c7033 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 19 Aug 2022 16:43:27 +0200 Subject: [PATCH 0015/1170] [DoctrineBridge] Make EntityValueResolver::supports() more specific --- .../ArgumentResolver/EntityValueResolver.php | 84 +++++++++------- .../EntityValueResolverTest.php | 98 +++++++++++-------- 2 files changed, 104 insertions(+), 78 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php index cb0c2034982a6..e5f45039eef22 100644 --- a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php +++ b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php @@ -47,17 +47,25 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return false; } - $options = $this->getOptions($argument); + $options = $this->getMapEntityAttribute($argument); if (!$options->class || $options->disabled) { return false; } + if (null === $options->expr && !($options->mapping || $options->exclude) && null === $this->getIdentifier($request, $options, $argument->getName())) { + return false; + } + // Doctrine Entity? if (!$objectManager = $this->getManager($options->objectManager, $options->class)) { return false; } - return !$objectManager->getMetadataFactory()->isTransient($options->class); + if ($objectManager->getMetadataFactory()->isTransient($options->class)) { + return false; + } + + return null !== $options->expr || $this->getCriteria($request, $options, $objectManager); } /** @@ -65,19 +73,19 @@ public function supports(Request $request, ArgumentMetadata $argument): bool */ public function resolve(Request $request, ArgumentMetadata $argument): iterable { - $options = $this->getOptions($argument); + $options = $this->getMapEntityAttribute($argument); $name = $argument->getName(); - $class = $options->class; + $objectManager = $this->getManager($options->objectManager, $options->class); $errorMessage = null; if (null !== $options->expr) { - if (null === $object = $this->findViaExpression($class, $request, $options->expr, $options)) { + if (null === $object = $this->findViaExpression($objectManager, $request, $options)) { $errorMessage = sprintf('The expression "%s" returned null', $options->expr); } // find by identifier? - } elseif (false === $object = $this->find($class, $request, $options, $name)) { + } elseif (false === $object = $this->find($objectManager, $request, $options, $name)) { // find by criteria - if (false === $object = $this->findOneBy($class, $request, $options)) { + if (false === $object = $this->findOneBy($objectManager, $request, $options)) { if (!$argument->isNullable()) { throw new \LogicException(sprintf('Unable to guess how to get a Doctrine instance from the request information for parameter "%s".', $name)); } @@ -87,7 +95,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable } if (null === $object && !$argument->isNullable()) { - $message = sprintf('"%s" object not found by the "%s" Argument Resolver.', $class, self::class); + $message = sprintf('"%s" object not found by the "%s" Argument Resolver.', $options->class, self::class); if ($errorMessage) { $message .= ' '.$errorMessage; } @@ -115,7 +123,7 @@ private function getManager(?string $name, string $class): ?ObjectManager } } - private function find(string $class, Request $request, MapEntity $options, string $name): false|object|null + private function find(ObjectManager $objectManager, Request $request, MapEntity $options, string $name): false|object|null { if ($options->mapping || $options->exclude) { return false; @@ -126,16 +134,15 @@ private function find(string $class, Request $request, MapEntity $options, strin return $id; } - $objectManager = $this->getManager($options->objectManager, $class); if ($options->evictCache && $objectManager instanceof EntityManagerInterface) { $cacheProvider = $objectManager->getCache(); - if ($cacheProvider && $cacheProvider->containsEntity($class, $id)) { - $cacheProvider->evictEntity($class, $id); + if ($cacheProvider && $cacheProvider->containsEntity($options->class, $id)) { + $cacheProvider->evictEntity($options->class, $id); } } try { - return $objectManager->getRepository($class)->find($id); + return $objectManager->getRepository($options->class)->find($id); } catch (NoResultException|ConversionException) { return null; } @@ -162,21 +169,37 @@ private function getIdentifier(Request $request, MapEntity $options, string $nam } if ($request->attributes->has($name)) { - return $request->attributes->get($name); + return $request->attributes->get($name) ?? ($options->stripNull ? false : null); } if (!$options->id && $request->attributes->has('id')) { - return $request->attributes->get('id'); + return $request->attributes->get('id') ?? ($options->stripNull ? false : null); } return false; } - private function findOneBy(string $class, Request $request, MapEntity $options): false|object|null + private function findOneBy(ObjectManager $objectManager, Request $request, MapEntity $options): false|object|null + { + if (!$criteria = $this->getCriteria($request, $options, $objectManager)) { + return false; + } + + try { + return $objectManager->getRepository($options->class)->findOneBy($criteria); + } catch (NoResultException|ConversionException) { + return null; + } + } + + private function getCriteria(Request $request, MapEntity $options, ObjectManager $objectManager): array { if (null === $mapping = $options->mapping) { - $keys = $request->attributes->keys(); - $mapping = $keys ? array_combine($keys, $keys) : []; + $mapping = $request->attributes->keys(); + } + + if ($mapping && \is_array($mapping) && array_is_list($mapping)) { + $mapping = array_combine($mapping, $mapping); } foreach ($options->exclude as $exclude) { @@ -184,18 +207,17 @@ private function findOneBy(string $class, Request $request, MapEntity $options): } if (!$mapping) { - return false; + return []; } // if a specific id has been defined in the options and there is no corresponding attribute // return false in order to avoid a fallback to the id which might be of another object if (\is_string($options->id) && null === $request->attributes->get($options->id)) { - return false; + return []; } $criteria = []; - $objectManager = $this->getManager($options->objectManager, $class); - $metadata = $objectManager->getClassMetadata($class); + $metadata = $objectManager->getClassMetadata($options->class); foreach ($mapping as $attribute => $field) { if (!$metadata->hasField($field) && (!$metadata->hasAssociation($field) || !$metadata->isSingleValuedAssociation($field))) { @@ -209,34 +231,26 @@ private function findOneBy(string $class, Request $request, MapEntity $options): $criteria = array_filter($criteria, static fn ($value) => null !== $value); } - if (!$criteria) { - return false; - } - - try { - return $objectManager->getRepository($class)->findOneBy($criteria); - } catch (NoResultException|ConversionException) { - return null; - } + return $criteria; } - private function findViaExpression(string $class, Request $request, string $expression, MapEntity $options): ?object + private function findViaExpression(ObjectManager $objectManager, Request $request, MapEntity $options): ?object { if (!$this->expressionLanguage) { throw new \LogicException(sprintf('You cannot use the "%s" if the ExpressionLanguage component is not available. Try running "composer require symfony/expression-language".', __CLASS__)); } - $repository = $this->getManager($options->objectManager, $class)->getRepository($class); + $repository = $objectManager->getRepository($options->class); $variables = array_merge($request->attributes->all(), ['repository' => $repository]); try { - return $this->expressionLanguage->evaluate($expression, $variables); + return $this->expressionLanguage->evaluate($options->expr, $variables); } catch (NoResultException|ConversionException) { return null; } } - private function getOptions(ArgumentMetadata $argument): MapEntity + private function getMapEntityAttribute(ArgumentMetadata $argument): MapEntity { /** @var MapEntity $options */ $options = $argument->getAttributes(MapEntity::class, ArgumentMetadata::IS_INSTANCEOF)[0] ?? $this->defaults; diff --git a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php index cfb010a00db05..4f9e0f7ae674d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php @@ -28,11 +28,12 @@ class EntityValueResolverTest extends TestCase { - public function testSupport() + public function testSupports() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); $metadataFactory = $this->getMockBuilder(ClassMetadataFactory::class)->getMock(); + $classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); $converter = new EntityValueResolver($registry); $registry->expects($this->once()) @@ -52,8 +53,17 @@ public function testSupport() ->method('isTransient') ->with('stdClass') ->willReturn(false); + $classMetadata->expects($this->once()) + ->method('hasField') + ->with('foo') + ->willReturn(true); + $manager->expects($this->once()) + ->method('getClassMetadata') + ->with('stdClass') + ->willReturn($classMetadata); $request = new Request(); + $request->attributes->set('foo', 'bar'); $argument = $this->createArgument(); $this->assertTrue($converter->supports($request, $argument)); @@ -131,6 +141,10 @@ public function testSupportWithoutManager() public function testApplyWithNoIdAndData() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $registry->expects($this->once()) + ->method('getManagerForClass') + ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); + $converter = new EntityValueResolver($registry); $this->expectException(\LogicException::class); @@ -144,6 +158,10 @@ public function testApplyWithNoIdAndData() public function testApplyWithNoIdAndDataOptional() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $registry->expects($this->once()) + ->method('getManagerForClass') + ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); + $converter = new EntityValueResolver($registry); $request = new Request(); @@ -180,7 +198,7 @@ public function testApplyWithStripNulls() $classMetadata->expects($this->once()) ->method('hasField') - ->with($this->equalTo('arg')) + ->with('arg') ->willReturn(true); $ret = $converter->resolve($request, $argument); @@ -215,7 +233,7 @@ public function testApplyWithId(string|int $id) $objectRepository->expects($this->once()) ->method('find') - ->with($this->equalTo($id)) + ->with($id) ->willReturn($object = new \stdClass()); $ret = $converter->resolve($request, $argument); @@ -226,6 +244,10 @@ public function testApplyWithId(string|int $id) public function testApplyWithNullId() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $registry->expects($this->once()) + ->method('getManagerForClass') + ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); + $converter = new EntityValueResolver($registry); $request = new Request(); @@ -262,8 +284,8 @@ public function testApplyWithConversionFailedException() $objectRepository->expects($this->once()) ->method('find') - ->with($this->equalTo('test')) - ->will($this->throwException(new ConversionException())); + ->with('test') + ->will($this->throwException(new ConversionException())); $this->expectException(NotFoundHttpException::class); @@ -273,6 +295,10 @@ public function testApplyWithConversionFailedException() public function testUsedProperIdentifier() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $registry->expects($this->once()) + ->method('getManagerForClass') + ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); + $converter = new EntityValueResolver($registry); $request = new Request(); @@ -361,12 +387,12 @@ public function testApplyWithMappingAndExclude() $metadata->expects($this->once()) ->method('hasField') - ->with($this->equalTo('Foo')) + ->with('Foo') ->willReturn(true); $repository->expects($this->once()) ->method('findOneBy') - ->with($this->equalTo(['Foo' => 1])) + ->with(['Foo' => 1]) ->willReturn($object = new \stdClass()); $ret = $converter->resolve($request, $argument); @@ -377,6 +403,10 @@ public function testApplyWithMappingAndExclude() public function testIgnoreMappingWhenAutoMappingDisabled() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $registry->expects($this->once()) + ->method('getManagerForClass') + ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); + $converter = new EntityValueResolver($registry, null, new MapEntity(mapping: [])); $request = new Request(); @@ -389,9 +419,6 @@ public function testIgnoreMappingWhenAutoMappingDisabled() $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); - $registry->expects($this->never()) - ->method('getManagerForClass'); - $metadata->expects($this->never()) ->method('hasField'); @@ -402,37 +429,6 @@ public function testIgnoreMappingWhenAutoMappingDisabled() $this->assertYieldEquals([], $ret); } - public function testSupports() - { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); - - $argument = $this->createArgument('stdClass', new MapEntity()); - $metadataFactory = $this->getMockBuilder(ClassMetadataFactory::class)->getMock(); - $metadataFactory->expects($this->once()) - ->method('isTransient') - ->with($this->equalTo('stdClass')) - ->willReturn(false); - - $objectManager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectManager->expects($this->once()) - ->method('getMetadataFactory') - ->willReturn($metadataFactory); - - $registry->expects($this->any()) - ->method('getManagerNames') - ->willReturn(['default' => 'default']); - - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn($objectManager); - - $ret = $converter->supports(new Request(), $argument); - - $this->assertTrue($ret, 'Should be supported'); - } - public function testSupportsWithConfiguredObjectManager() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); @@ -442,7 +438,7 @@ public function testSupportsWithConfiguredObjectManager() $metadataFactory = $this->getMockBuilder(ClassMetadataFactory::class)->getMock(); $metadataFactory->expects($this->once()) ->method('isTransient') - ->with($this->equalTo('stdClass')) + ->with('stdClass') ->willReturn(false); $objectManager = $this->getMockBuilder(ObjectManager::class)->getMock(); @@ -454,12 +450,24 @@ public function testSupportsWithConfiguredObjectManager() ->method('getManagerNames') ->willReturn(['foo' => 'foo']); + $classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); + $classMetadata->expects($this->once()) + ->method('hasField') + ->with('foo') + ->willReturn(true); + $objectManager->expects($this->once()) + ->method('getClassMetadata') + ->with('stdClass') + ->willReturn($classMetadata); + $registry->expects($this->once()) ->method('getManager') ->with('foo') ->willReturn($objectManager); - $ret = $converter->supports(new Request(), $argument); + $request = new Request(); + $request->attributes->set('foo', 'bar'); + $ret = $converter->supports($request, $argument); $this->assertTrue($ret, 'Should be supported'); } @@ -490,6 +498,10 @@ public function testSupportsWithDifferentConfiguration() public function testExceptionWithExpressionIfNoLanguageAvailable() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $registry->expects($this->once()) + ->method('getManagerForClass') + ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); + $converter = new EntityValueResolver($registry); $this->expectException(\LogicException::class); From e35d6bab3e1a634ce0bd73a2c678d5510a8a76cd Mon Sep 17 00:00:00 2001 From: Warxcell Date: Mon, 22 Aug 2022 18:00:58 +0300 Subject: [PATCH 0016/1170] Fix RequestStack state if throwable is thrown --- .../Component/HttpKernel/HttpKernel.php | 6 +-- .../HttpKernel/Tests/HttpKernelTest.php | 39 +++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index 0ed82d777b1c4..d53b80665b467 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -76,6 +76,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ { $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); + $this->requestStack->push($request); try { return $this->handleRaw($request, $type); } catch (\Exception $e) { @@ -89,6 +90,8 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ } return $this->handleThrowable($e, $request, $type); + } finally { + $this->requestStack->pop(); } } @@ -127,8 +130,6 @@ public function terminateWithException(\Throwable $exception, Request $request = */ private function handleRaw(Request $request, int $type = self::MASTER_REQUEST): Response { - $this->requestStack->push($request); - // request $event = new RequestEvent($this, $request, $type); $this->dispatcher->dispatch($event, KernelEvents::REQUEST); @@ -205,7 +206,6 @@ private function filterResponse(Response $response, Request $request, int $type) private function finishRequest(Request $request, int $type) { $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST); - $this->requestStack->pop(); } /** diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php index 014dc752c32ae..53e5f547d249f 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -39,6 +39,45 @@ public function testHandleWhenControllerThrowsAnExceptionAndCatchIsTrue() $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true); } + public function testRequestStackIsNotBrokenWhenControllerThrowsAnExceptionAndCatchIsTrue() + { + $requestStack = new RequestStack(); + $kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); }, $requestStack); + + try { + $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true); + } catch (\Throwable $exception) { + } + + self::assertNull($requestStack->getCurrentRequest()); + } + + public function testRequestStackIsNotBrokenWhenControllerThrowsAnExceptionAndCatchIsFalse() + { + $requestStack = new RequestStack(); + $kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); }, $requestStack); + + try { + $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, false); + } catch (\Throwable $exception) { + } + + self::assertNull($requestStack->getCurrentRequest()); + } + + public function testRequestStackIsNotBrokenWhenControllerThrowsAnThrowable() + { + $requestStack = new RequestStack(); + $kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \Error(); }, $requestStack); + + try { + $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true); + } catch (\Throwable $exception) { + } + + self::assertNull($requestStack->getCurrentRequest()); + } + public function testHandleWhenControllerThrowsAnExceptionAndCatchIsFalseAndNoListenerIsRegistered() { $this->expectException(\RuntimeException::class); From b6382807912e0d67c092d7aae062d972003096ff Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 23 Aug 2022 09:22:37 +0200 Subject: [PATCH 0017/1170] [DoctrineBridge] Improve EntityValueResolverTest a bit --- .../EntityValueResolverTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php index 4f9e0f7ae674d..8856f0b9121a8 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php @@ -138,7 +138,7 @@ public function testSupportWithoutManager() $this->assertFalse($converter->supports($request, $argument)); } - public function testApplyWithNoIdAndData() + public function testResolveWithNoIdAndData() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $registry->expects($this->once()) @@ -155,7 +155,7 @@ public function testApplyWithNoIdAndData() $converter->resolve($request, $argument); } - public function testApplyWithNoIdAndDataOptional() + public function testResolveWithNoIdAndDataOptional() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $registry->expects($this->once()) @@ -172,14 +172,14 @@ public function testApplyWithNoIdAndDataOptional() $this->assertYieldEquals([null], $ret); } - public function testApplyWithStripNulls() + public function testResolveWithStripNulls() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $converter = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('arg', null); - $argument = $this->createArgument('stdClass', new MapEntity(mapping: ['arg' => 'arg'], stripNull: true), 'arg', true); + $argument = $this->createArgument('stdClass', new MapEntity(stripNull: true), 'arg', true); $classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); @@ -209,7 +209,7 @@ public function testApplyWithStripNulls() /** * @dataProvider idsProvider */ - public function testApplyWithId(string|int $id) + public function testResolveWithId(string|int $id) { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $converter = new EntityValueResolver($registry); @@ -241,7 +241,7 @@ public function testApplyWithId(string|int $id) $this->assertYieldEquals([$object], $ret); } - public function testApplyWithNullId() + public function testResolveWithNullId() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $registry->expects($this->once()) @@ -260,7 +260,7 @@ public function testApplyWithNullId() $this->assertYieldEquals([null], $ret); } - public function testApplyWithConversionFailedException() + public function testResolveWithConversionFailedException() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $converter = new EntityValueResolver($registry); @@ -320,7 +320,7 @@ public function idsProvider(): iterable yield ['foo']; } - public function testApplyGuessOptional() + public function testResolveGuessOptional() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $converter = new EntityValueResolver($registry); @@ -353,7 +353,7 @@ public function testApplyGuessOptional() $this->assertYieldEquals([null], $ret); } - public function testApplyWithMappingAndExclude() + public function testResolveWithMappingAndExclude() { $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $converter = new EntityValueResolver($registry); From 90562e466cc95f536ef495f9c18cccdbf58738be Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Tue, 23 Aug 2022 12:55:18 +0200 Subject: [PATCH 0018/1170] Count cookie parts before accessing the second --- .../Security/Http/RememberMe/RememberMeDetails.php | 6 +++--- .../Tests/Authenticator/RememberMeAuthenticatorTest.php | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Security/Http/RememberMe/RememberMeDetails.php b/src/Symfony/Component/Security/Http/RememberMe/RememberMeDetails.php index ba9b118a34af7..3126ca5d5e259 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/RememberMeDetails.php +++ b/src/Symfony/Component/Security/Http/RememberMe/RememberMeDetails.php @@ -37,12 +37,12 @@ public function __construct(string $userFqcn, string $userIdentifier, int $expir public static function fromRawCookie(string $rawCookie): self { $cookieParts = explode(self::COOKIE_DELIMITER, base64_decode($rawCookie), 4); - if (false === $cookieParts[1] = base64_decode($cookieParts[1], true)) { - throw new AuthenticationException('The user identifier contains a character from outside the base64 alphabet.'); - } if (4 !== \count($cookieParts)) { throw new AuthenticationException('The cookie contains invalid data.'); } + if (false === $cookieParts[1] = base64_decode($cookieParts[1], true)) { + throw new AuthenticationException('The user identifier contains a character from outside the base64 alphabet.'); + } return new static(...$cookieParts); } diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php index 406d48c164add..c7492a95a464f 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php @@ -89,4 +89,12 @@ public function testAuthenticateWithoutOldToken() $request = Request::create('/', 'GET', [], ['_remember_me_cookie' => base64_encode('foo:bar')]); $this->authenticator->authenticate($request); } + + public function testAuthenticateWithTokenWithoutDelimiter() + { + $this->expectException(AuthenticationException::class); + + $request = Request::create('/', 'GET', [], ['_remember_me_cookie' => 'invalid']); + $this->authenticator->authenticate($request); + } } From e9663cca6bca3b38dbfdcac0f0d9fabb1f0d10bb Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 23 Aug 2022 10:46:45 +0200 Subject: [PATCH 0019/1170] [HttpKernel] Replace ArgumentValueResolverInterface by ValueResolverInterface --- UPGRADE-6.2.md | 5 + .../ArgumentResolver/EntityValueResolver.php | 101 +--- .../EntityValueResolverTest.php | 504 +++++------------- .../Tests/Fixtures/Attribute/UuidIdEntity.php | 2 +- .../Doctrine/Tests/Fixtures/BaseUser.php | 9 + .../CompositeObjectNoToStringIdEntity.php | 9 + .../SingleIntIdStringWrapperNameEntity.php | 1 - .../PropertyInfo/Fixtures/DoctrineEnum.php | 2 +- .../Fixtures/DoctrineRelation.php | 2 +- src/Symfony/Bridge/Doctrine/composer.json | 4 +- .../FrameworkExtension.php | 3 + src/Symfony/Component/HttpKernel/CHANGELOG.md | 1 + .../Controller/ArgumentResolver.php | 29 +- .../BackedEnumValueResolver.php | 42 +- .../DateTimeValueResolver.php | 23 +- .../ArgumentResolver/DefaultValueResolver.php | 19 +- .../NotTaggedControllerValueResolver.php | 22 +- .../RequestAttributeValueResolver.php | 11 +- .../ArgumentResolver/RequestValueResolver.php | 11 +- .../ArgumentResolver/ServiceValueResolver.php | 24 +- .../ArgumentResolver/SessionValueResolver.php | 20 +- .../TraceableValueResolver.php | 13 +- .../ArgumentResolver/UidValueResolver.php | 21 +- .../VariadicValueResolver.php | 15 +- .../ArgumentValueResolverInterface.php | 2 + .../Controller/ValueResolverInterface.php | 28 + .../BackedEnumValueResolverTest.php | 18 +- .../DateTimeValueResolverTest.php | 30 +- .../NotTaggedControllerValueResolverTest.php | 20 +- .../ServiceValueResolverTest.php | 28 +- .../TraceableValueResolverTest.php | 3 + .../ArgumentResolver/UidValueResolverTest.php | 7 + .../Tests/Controller/ArgumentResolverTest.php | 3 + .../Component/HttpKernel/composer.json | 1 + .../AccessToken/QueryAccessTokenExtractor.php | 3 +- .../Http/Controller/UserValueResolver.php | 32 +- .../Http/Firewall/SwitchUserListener.php | 2 +- .../LoginLink/LoginLinkHandlerInterface.php | 2 +- .../JsonLoginAuthenticatorTest.php | 1 - .../Controller/UserValueResolverTest.php | 36 +- .../Component/Security/Http/composer.json | 1 + 41 files changed, 500 insertions(+), 610 deletions(-) create mode 100644 src/Symfony/Component/HttpKernel/Controller/ValueResolverInterface.php diff --git a/UPGRADE-6.2.md b/UPGRADE-6.2.md index 8271d0843738a..682ad84ff89dc 100644 --- a/UPGRADE-6.2.md +++ b/UPGRADE-6.2.md @@ -14,6 +14,11 @@ HttpFoundation * Deprecate `Request::getContentType()`, use `Request::getContentTypeFormat()` instead +HttpKernel +---------- + + * Deprecate `ArgumentValueResolverInterface`, use `ValueResolverInterface` instead + Ldap ---- diff --git a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php index e5f45039eef22..77649065f6f0b 100644 --- a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php +++ b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php @@ -19,7 +19,7 @@ use Symfony\Bridge\Doctrine\Attribute\MapEntity; use Symfony\Component\ExpressionLanguage\ExpressionLanguage; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -29,7 +29,7 @@ * @author Fabien Potencier * @author Jérémy Derussé */ -final class EntityValueResolver implements ArgumentValueResolverInterface +final class EntityValueResolver implements ValueResolverInterface { public function __construct( private ManagerRegistry $registry, @@ -41,66 +41,36 @@ public function __construct( /** * {@inheritdoc} */ - public function supports(Request $request, ArgumentMetadata $argument): bool + public function resolve(Request $request, ArgumentMetadata $argument): array { - if (!$this->registry->getManagerNames()) { - return false; - } - $options = $this->getMapEntityAttribute($argument); if (!$options->class || $options->disabled) { - return false; - } - - if (null === $options->expr && !($options->mapping || $options->exclude) && null === $this->getIdentifier($request, $options, $argument->getName())) { - return false; - } - - // Doctrine Entity? - if (!$objectManager = $this->getManager($options->objectManager, $options->class)) { - return false; + return []; } - - if ($objectManager->getMetadataFactory()->isTransient($options->class)) { - return false; + if (!$manager = $this->getManager($options->objectManager, $options->class)) { + return []; } - return null !== $options->expr || $this->getCriteria($request, $options, $objectManager); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - $options = $this->getMapEntityAttribute($argument); - $name = $argument->getName(); - $objectManager = $this->getManager($options->objectManager, $options->class); - - $errorMessage = null; + $message = ''; if (null !== $options->expr) { - if (null === $object = $this->findViaExpression($objectManager, $request, $options)) { - $errorMessage = sprintf('The expression "%s" returned null', $options->expr); + if (null === $object = $this->findViaExpression($manager, $request, $options)) { + $message = sprintf(' The expression "%s" returned null.', $options->expr); } // find by identifier? - } elseif (false === $object = $this->find($objectManager, $request, $options, $name)) { + } elseif (false === $object = $this->find($manager, $request, $options, $argument->getName())) { // find by criteria - if (false === $object = $this->findOneBy($objectManager, $request, $options)) { - if (!$argument->isNullable()) { - throw new \LogicException(sprintf('Unable to guess how to get a Doctrine instance from the request information for parameter "%s".', $name)); - } - + if (!$criteria = $this->getCriteria($request, $options, $manager)) { + return []; + } + try { + $object = $manager->getRepository($options->class)->findOneBy($criteria); + } catch (NoResultException|ConversionException) { $object = null; } } if (null === $object && !$argument->isNullable()) { - $message = sprintf('"%s" object not found by the "%s" Argument Resolver.', $options->class, self::class); - if ($errorMessage) { - $message .= ' '.$errorMessage; - } - - throw new NotFoundHttpException($message); + throw new NotFoundHttpException(sprintf('"%s" object not found by "%s".', $options->class, self::class).$message); } return [$object]; @@ -112,18 +82,16 @@ private function getManager(?string $name, string $class): ?ObjectManager return $this->registry->getManagerForClass($class); } - if (!isset($this->registry->getManagerNames()[$name])) { - return null; - } - try { - return $this->registry->getManager($name); + $manager = $this->registry->getManager($name); } catch (\InvalidArgumentException) { return null; } + + return $manager->getMetadataFactory()->isTransient($class) ? null : $manager; } - private function find(ObjectManager $objectManager, Request $request, MapEntity $options, string $name): false|object|null + private function find(ObjectManager $manager, Request $request, MapEntity $options, string $name): false|object|null { if ($options->mapping || $options->exclude) { return false; @@ -134,15 +102,15 @@ private function find(ObjectManager $objectManager, Request $request, MapEntity return $id; } - if ($options->evictCache && $objectManager instanceof EntityManagerInterface) { - $cacheProvider = $objectManager->getCache(); + if ($options->evictCache && $manager instanceof EntityManagerInterface) { + $cacheProvider = $manager->getCache(); if ($cacheProvider && $cacheProvider->containsEntity($options->class, $id)) { $cacheProvider->evictEntity($options->class, $id); } } try { - return $objectManager->getRepository($options->class)->find($id); + return $manager->getRepository($options->class)->find($id); } catch (NoResultException|ConversionException) { return null; } @@ -179,20 +147,7 @@ private function getIdentifier(Request $request, MapEntity $options, string $nam return false; } - private function findOneBy(ObjectManager $objectManager, Request $request, MapEntity $options): false|object|null - { - if (!$criteria = $this->getCriteria($request, $options, $objectManager)) { - return false; - } - - try { - return $objectManager->getRepository($options->class)->findOneBy($criteria); - } catch (NoResultException|ConversionException) { - return null; - } - } - - private function getCriteria(Request $request, MapEntity $options, ObjectManager $objectManager): array + private function getCriteria(Request $request, MapEntity $options, ObjectManager $manager): array { if (null === $mapping = $options->mapping) { $mapping = $request->attributes->keys(); @@ -217,7 +172,7 @@ private function getCriteria(Request $request, MapEntity $options, ObjectManager } $criteria = []; - $metadata = $objectManager->getClassMetadata($options->class); + $metadata = $manager->getClassMetadata($options->class); foreach ($mapping as $attribute => $field) { if (!$metadata->hasField($field) && (!$metadata->hasAssociation($field) || !$metadata->isSingleValuedAssociation($field))) { @@ -234,13 +189,13 @@ private function getCriteria(Request $request, MapEntity $options, ObjectManager return $criteria; } - private function findViaExpression(ObjectManager $objectManager, Request $request, MapEntity $options): ?object + private function findViaExpression(ObjectManager $manager, Request $request, MapEntity $options): ?object { if (!$this->expressionLanguage) { throw new \LogicException(sprintf('You cannot use the "%s" if the ExpressionLanguage component is not available. Try running "composer require symfony/expression-language".', __CLASS__)); } - $repository = $objectManager->getRepository($options->class); + $repository = $manager->getRepository($options->class); $variables = array_merge($request->attributes->all(), ['repository' => $repository]); try { diff --git a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php index 8856f0b9121a8..629a37256c0f2 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php @@ -14,9 +14,9 @@ use Doctrine\DBAL\Types\ConversionException; use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\Mapping\ClassMetadata; -use Doctrine\Persistence\Mapping\ClassMetadataFactory; use Doctrine\Persistence\ObjectManager; use Doctrine\Persistence\ObjectRepository; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver; use Symfony\Bridge\Doctrine\Attribute\MapEntity; @@ -28,182 +28,78 @@ class EntityValueResolverTest extends TestCase { - public function testSupports() + public function testResolveWithoutClass() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $metadataFactory = $this->getMockBuilder(ClassMetadataFactory::class)->getMock(); - $classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); - $converter = new EntityValueResolver($registry); - - $registry->expects($this->once()) - ->method('getManagerNames') - ->with() - ->willReturn(['default' => 'default']); - - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn($manager); - $manager->expects($this->once()) - ->method('getMetadataFactory') - ->with() - ->willReturn($metadataFactory); - $metadataFactory->expects($this->once()) - ->method('isTransient') - ->with('stdClass') - ->willReturn(false); - $classMetadata->expects($this->once()) - ->method('hasField') - ->with('foo') - ->willReturn(true); - $manager->expects($this->once()) - ->method('getClassMetadata') - ->with('stdClass') - ->willReturn($classMetadata); - - $request = new Request(); - $request->attributes->set('foo', 'bar'); - $argument = $this->createArgument(); - - $this->assertTrue($converter->supports($request, $argument)); - } - - public function testSupportWithoutRegistry() - { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); - - $registry->expects($this->once()) - ->method('getManagerNames') - ->with() - ->willReturn([]); - - $request = new Request(); - $argument = $this->createArgument(); - - $this->assertFalse($converter->supports($request, $argument)); - } - - public function testSupportWithoutClass() - { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); - - $registry->expects($this->once()) - ->method('getManagerNames') - ->with() - ->willReturn(['default' => 'default']); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $argument = new ArgumentMetadata('arg', null, false, false, null); - $this->assertFalse($converter->supports($request, $argument)); + $this->assertSame([], $resolver->resolve($request, $argument)); } - public function testSupportWithoutAttribute() + public function testResolveWithoutAttribute() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry, null, new MapEntity(disabled: true)); - - $registry->expects($this->once()) - ->method('getManagerNames') - ->with() - ->willReturn(['default' => 'default']); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry, null, new MapEntity(disabled: true)); $request = new Request(); $argument = $this->createArgument(); - $this->assertFalse($converter->supports($request, $argument)); + $this->assertSame([], $resolver->resolve($request, $argument)); } - public function testSupportWithoutManager() + public function testResolveWithoutManager() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); - - $registry->expects($this->once()) - ->method('getManagerNames') - ->with() - ->willReturn(['default' => 'default']); - - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn(null); + $registry = $this->createRegistry(null); + $resolver = new EntityValueResolver($registry); $request = new Request(); $argument = $this->createArgument(); - $this->assertFalse($converter->supports($request, $argument)); - } - - public function testResolveWithNoIdAndData() - { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); - - $converter = new EntityValueResolver($registry); - - $this->expectException(\LogicException::class); - - $request = new Request(); - $argument = $this->createArgument(null, new MapEntity()); - - $converter->resolve($request, $argument); + $this->assertSame([], $resolver->resolve($request, $argument)); } public function testResolveWithNoIdAndDataOptional() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); - - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $argument = $this->createArgument(null, new MapEntity(), 'arg', true); - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([null], $ret); + $this->assertSame([], $resolver->resolve($request, $argument)); } public function testResolveWithStripNulls() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('arg', null); $argument = $this->createArgument('stdClass', new MapEntity(stripNull: true), 'arg', true); - $classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); - $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); + $metadata->expects($this->once()) + ->method('hasField') + ->with('arg') + ->willReturn(true); + $manager->expects($this->once()) ->method('getClassMetadata') ->with('stdClass') - ->willReturn($classMetadata); + ->willReturn($metadata); $manager->expects($this->never()) ->method('getRepository'); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn($manager); - - $classMetadata->expects($this->once()) - ->method('hasField') - ->with('arg') - ->willReturn(true); - - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([null], $ret); + $this->assertSame([], $resolver->resolve($request, $argument)); } /** @@ -211,95 +107,75 @@ public function testResolveWithStripNulls() */ public function testResolveWithId(string|int $id) { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('id', $id); $argument = $this->createArgument('stdClass', new MapEntity(id: 'id')); - $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectRepository = $this->getMockBuilder(ObjectRepository::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn($manager); - - $manager->expects($this->once()) - ->method('getRepository') - ->with('stdClass') - ->willReturn($objectRepository); - - $objectRepository->expects($this->once()) + $repository = $this->getMockBuilder(ObjectRepository::class)->getMock(); + $repository->expects($this->once()) ->method('find') ->with($id) ->willReturn($object = new \stdClass()); - $ret = $converter->resolve($request, $argument); + $manager->expects($this->once()) + ->method('getRepository') + ->with('stdClass') + ->willReturn($repository); - $this->assertYieldEquals([$object], $ret); + $this->assertSame([$object], $resolver->resolve($request, $argument)); } public function testResolveWithNullId() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); - - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('id', null); $argument = $this->createArgument(isNullable: true); - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([null], $ret); + $this->assertSame([null], $resolver->resolve($request, $argument)); } public function testResolveWithConversionFailedException() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('id', 'test'); $argument = $this->createArgument('stdClass', new MapEntity(id: 'id')); - $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectRepository = $this->getMockBuilder(ObjectRepository::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn($manager); + $repository = $this->getMockBuilder(ObjectRepository::class)->getMock(); + $repository->expects($this->once()) + ->method('find') + ->with('test') + ->will($this->throwException(new ConversionException())); $manager->expects($this->once()) ->method('getRepository') ->with('stdClass') - ->willReturn($objectRepository); - - $objectRepository->expects($this->once()) - ->method('find') - ->with('test') - ->will($this->throwException(new ConversionException())); + ->willReturn($repository); $this->expectException(NotFoundHttpException::class); - $converter->resolve($request, $argument); + $resolver->resolve($request, $argument); } public function testUsedProperIdentifier() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); - - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('id', 1); @@ -308,9 +184,7 @@ public function testUsedProperIdentifier() $argument = $this->createArgument('stdClass', new MapEntity(id: 'entity_id'), 'arg', true); - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([null], $ret); + $this->assertSame([null], $resolver->resolve($request, $argument)); } public function idsProvider(): iterable @@ -322,41 +196,31 @@ public function idsProvider(): iterable public function testResolveGuessOptional() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('guess', null); $argument = $this->createArgument('stdClass', new MapEntity(), 'arg', true); - $classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); - $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); $manager->expects($this->once()) ->method('getClassMetadata') ->with('stdClass') - ->willReturn($classMetadata); - - $objectRepository = $this->getMockBuilder(ObjectRepository::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn($manager); + ->willReturn($metadata); $manager->expects($this->never())->method('getRepository'); - $objectRepository->expects($this->never())->method('find'); - $objectRepository->expects($this->never())->method('findOneBy'); - - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([null], $ret); + $this->assertSame([], $resolver->resolve($request, $argument)); } public function testResolveWithMappingAndExclude() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $request->attributes->set('foo', 1); @@ -367,144 +231,36 @@ public function testResolveWithMappingAndExclude() new MapEntity(mapping: ['foo' => 'Foo'], exclude: ['bar']) ); - $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); - $repository = $this->getMockBuilder(ObjectRepository::class)->getMock(); - - $registry->expects($this->once()) - ->method('getManagerForClass') - ->with('stdClass') - ->willReturn($manager); + $metadata->expects($this->once()) + ->method('hasField') + ->with('Foo') + ->willReturn(true); $manager->expects($this->once()) ->method('getClassMetadata') - ->with('stdClass') - ->willReturn($metadata); - $manager->expects($this->once()) - ->method('getRepository') - ->with('stdClass') - ->willReturn($repository); - - $metadata->expects($this->once()) - ->method('hasField') - ->with('Foo') - ->willReturn(true); + ->with('stdClass') + ->willReturn($metadata); + $repository = $this->getMockBuilder(ObjectRepository::class)->getMock(); $repository->expects($this->once()) ->method('findOneBy') ->with(['Foo' => 1]) ->willReturn($object = new \stdClass()); - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([$object], $ret); - } - - public function testIgnoreMappingWhenAutoMappingDisabled() - { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); - - $converter = new EntityValueResolver($registry, null, new MapEntity(mapping: [])); - - $request = new Request(); - $request->attributes->set('foo', 1); - - $argument = $this->createArgument( - 'stdClass', - new MapEntity() - ); - - $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); - - $metadata->expects($this->never()) - ->method('hasField'); - - $this->expectException(\LogicException::class); - - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([], $ret); - } - - public function testSupportsWithConfiguredObjectManager() - { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); - - $argument = $this->createArgument('stdClass', new MapEntity(objectManager: 'foo')); - $metadataFactory = $this->getMockBuilder(ClassMetadataFactory::class)->getMock(); - $metadataFactory->expects($this->once()) - ->method('isTransient') - ->with('stdClass') - ->willReturn(false); - - $objectManager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectManager->expects($this->once()) - ->method('getMetadataFactory') - ->willReturn($metadataFactory); - - $registry->expects($this->exactly(2)) - ->method('getManagerNames') - ->willReturn(['foo' => 'foo']); - - $classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock(); - $classMetadata->expects($this->once()) - ->method('hasField') - ->with('foo') - ->willReturn(true); - $objectManager->expects($this->once()) - ->method('getClassMetadata') + $manager->expects($this->once()) + ->method('getRepository') ->with('stdClass') - ->willReturn($classMetadata); + ->willReturn($repository); - $registry->expects($this->once()) - ->method('getManager') - ->with('foo') - ->willReturn($objectManager); - - $request = new Request(); - $request->attributes->set('foo', 'bar'); - $ret = $converter->supports($request, $argument); - - $this->assertTrue($ret, 'Should be supported'); - } - - public function testSupportsWithDifferentConfiguration() - { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $converter = new EntityValueResolver($registry); - - $argument = $this->createArgument('DateTime'); - - $objectManager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectManager->expects($this->never()) - ->method('getMetadataFactory'); - - $registry->expects($this->any()) - ->method('getManagerNames') - ->willReturn(['default' => 'default']); - - $registry->expects($this->never()) - ->method('getManager'); - - $ret = $converter->supports(new Request(), $argument); - - $this->assertFalse($ret, 'Should not be supported'); + $this->assertSame([$object], $resolver->resolve($request, $argument)); } public function testExceptionWithExpressionIfNoLanguageAvailable() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($this->getMockBuilder(ObjectManager::class)->getMock()); - - $converter = new EntityValueResolver($registry); - - $this->expectException(\LogicException::class); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); + $resolver = new EntityValueResolver($registry); $request = new Request(); $argument = $this->createArgument( @@ -513,14 +269,17 @@ public function testExceptionWithExpressionIfNoLanguageAvailable() 'arg1' ); - $converter->resolve($request, $argument); + $this->expectException(\LogicException::class); + + $resolver->resolve($request, $argument); } public function testExpressionFailureReturns404() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); $language = $this->getMockBuilder(ExpressionLanguage::class)->getMock(); - $converter = new EntityValueResolver($registry, $language); + $resolver = new EntityValueResolver($registry, $language); $this->expectException(NotFoundHttpException::class); @@ -531,33 +290,28 @@ public function testExpressionFailureReturns404() 'arg1' ); - $objectManager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectRepository = $this->getMockBuilder(ObjectRepository::class)->getMock(); - - $objectManager->expects($this->once()) - ->method('getRepository') - ->willReturn($objectRepository); - + $repository = $this->getMockBuilder(ObjectRepository::class)->getMock(); // find should not be attempted on this repository as a fallback - $objectRepository->expects($this->never()) + $repository->expects($this->never()) ->method('find'); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($objectManager); + $manager->expects($this->once()) + ->method('getRepository') + ->willReturn($repository); $language->expects($this->once()) ->method('evaluate') ->willReturn(null); - $converter->resolve($request, $argument); + $resolver->resolve($request, $argument); } public function testExpressionMapsToArgument() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); $language = $this->getMockBuilder(ExpressionLanguage::class)->getMock(); - $converter = new EntityValueResolver($registry, $language); + $resolver = new EntityValueResolver($registry, $language); $request = new Request(); $request->attributes->set('id', 5); @@ -567,41 +321,32 @@ public function testExpressionMapsToArgument() 'arg1' ); - $objectManager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectRepository = $this->getMockBuilder(ObjectRepository::class)->getMock(); - - $objectManager->expects($this->once()) - ->method('getRepository') - ->willReturn($objectRepository); - + $repository = $this->getMockBuilder(ObjectRepository::class)->getMock(); // find should not be attempted on this repository as a fallback - $objectRepository->expects($this->never()) + $repository->expects($this->never()) ->method('find'); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($objectManager); + $manager->expects($this->once()) + ->method('getRepository') + ->willReturn($repository); $language->expects($this->once()) ->method('evaluate') ->with('repository.findOneByCustomMethod(id)', [ - 'repository' => $objectRepository, + 'repository' => $repository, 'id' => 5, ]) ->willReturn($object = new \stdClass()); - $ret = $converter->resolve($request, $argument); - $this->assertYieldEquals([$object], $ret); + $this->assertSame([$object], $resolver->resolve($request, $argument)); } public function testExpressionSyntaxErrorThrowsException() { - $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + $manager = $this->getMockBuilder(ObjectManager::class)->getMock(); + $registry = $this->createRegistry($manager); $language = $this->getMockBuilder(ExpressionLanguage::class)->getMock(); - $converter = new EntityValueResolver($registry, $language); - - $this->expectException(\LogicException::class); - $this->expectExceptionMessage('syntax error message around position 10'); + $resolver = new EntityValueResolver($registry, $language); $request = new Request(); $argument = $this->createArgument( @@ -610,28 +355,22 @@ public function testExpressionSyntaxErrorThrowsException() 'arg1' ); - $objectManager = $this->getMockBuilder(ObjectManager::class)->getMock(); - $objectRepository = $this->getMockBuilder(ObjectRepository::class)->getMock(); - - $objectManager->expects($this->once()) - ->method('getRepository') - ->willReturn($objectRepository); - + $repository = $this->getMockBuilder(ObjectRepository::class)->getMock(); // find should not be attempted on this repository as a fallback - $objectRepository->expects($this->never()) + $repository->expects($this->never()) ->method('find'); - $registry->expects($this->once()) - ->method('getManagerForClass') - ->willReturn($objectManager); + $manager->expects($this->once()) + ->method('getRepository') + ->willReturn($repository); $language->expects($this->once()) ->method('evaluate') ->will($this->throwException(new SyntaxError('syntax error message', 10))); - $ret = $converter->resolve($request, $argument); - - $this->assertYieldEquals([null], $ret); + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('syntax error message around position 10'); + $resolver->resolve($request, $argument); } private function createArgument(string $class = null, MapEntity $entity = null, string $name = 'arg', bool $isNullable = false): ArgumentMetadata @@ -639,13 +378,18 @@ private function createArgument(string $class = null, MapEntity $entity = null, return new ArgumentMetadata($name, $class ?? \stdClass::class, false, false, null, $isNullable, $entity ? [$entity] : []); } - private function assertYieldEquals(array $expected, iterable $generator) + private function createRegistry(ObjectManager $manager = null): ManagerRegistry&MockObject { - $args = []; - foreach ($generator as $arg) { - $args[] = $arg; - } + $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock(); + + $registry->expects($this->any()) + ->method('getManagerForClass') + ->willReturn($manager); + + $registry->expects($this->any()) + ->method('getManager') + ->willReturn($manager); - $this->assertEquals($expected, $args); + return $registry; } } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Attribute/UuidIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Attribute/UuidIdEntity.php index 3d28d4469c1fb..6d16ee75e54ae 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Attribute/UuidIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Attribute/UuidIdEntity.php @@ -19,7 +19,7 @@ class UuidIdEntity { #[Id] - #[Column("uuid")] + #[Column('uuid')] protected $id; public function __construct($id) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/BaseUser.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/BaseUser.php index f03157637b256..c8be89cc760e0 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/BaseUser.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/BaseUser.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Bridge\Doctrine\Tests\Fixtures; /** diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php index 82811b89ed8c0..73a6419e2f0c0 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Bridge\Doctrine\Tests\Fixtures; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php index a06f4432a761a..8f4c3663d2148 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php @@ -14,7 +14,6 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper; /** @Entity */ class SingleIntIdStringWrapperNameEntity diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php index fd5271fc47730..8a63a4e8db248 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php @@ -11,9 +11,9 @@ namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures; -use Doctrine\ORM\Mapping\Id; use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Entity; +use Doctrine\ORM\Mapping\Id; /** * @Entity diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php index 61a658096add0..91115abb719ec 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php @@ -14,8 +14,8 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -use Doctrine\ORM\Mapping\ManyToOne; use Doctrine\ORM\Mapping\JoinColumn; +use Doctrine\ORM\Mapping\ManyToOne; /** * @Entity diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 8de4371499e8d..c68fe94ba5ac8 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -30,7 +30,7 @@ "symfony/config": "^5.4|^6.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/form": "^5.4.9|^6.0.9", - "symfony/http-kernel": "^5.4|^6.0", + "symfony/http-kernel": "^6.2", "symfony/messenger": "^5.4|^6.0", "symfony/doctrine-messenger": "^5.4|^6.0", "symfony/property-access": "^5.4|^6.0", @@ -57,7 +57,7 @@ "symfony/cache": "<5.4", "symfony/dependency-injection": "<5.4", "symfony/form": "<5.4", - "symfony/http-kernel": "<5.4", + "symfony/http-kernel": "<6.2", "symfony/messenger": "<5.4", "symfony/property-info": "<5.4", "symfony/security-bundle": "<5.4", diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index ea76107b01440..bfd53358618d9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -87,6 +87,7 @@ use Symfony\Component\HttpKernel\Controller\ArgumentResolver\BackedEnumValueResolver; use Symfony\Component\HttpKernel\Controller\ArgumentResolver\UidValueResolver; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\Lock\LockFactory; @@ -590,6 +591,8 @@ public function load(array $configs, ContainerBuilder $container) ->addTag('container.service_subscriber'); $container->registerForAutoconfiguration(ArgumentValueResolverInterface::class) ->addTag('controller.argument_value_resolver'); + $container->registerForAutoconfiguration(ValueResolverInterface::class) + ->addTag('controller.argument_value_resolver'); $container->registerForAutoconfiguration(AbstractController::class) ->addTag('controller.service_arguments'); $container->registerForAutoconfiguration(DataCollectorInterface::class) diff --git a/src/Symfony/Component/HttpKernel/CHANGELOG.md b/src/Symfony/Component/HttpKernel/CHANGELOG.md index 1ed8f3a7108d1..991f9c217334a 100644 --- a/src/Symfony/Component/HttpKernel/CHANGELOG.md +++ b/src/Symfony/Component/HttpKernel/CHANGELOG.md @@ -8,6 +8,7 @@ CHANGELOG * Add `ControllerEvent::getAttributes()` to handle attributes on controllers * Add `#[Cache]` to describe the default HTTP cache headers on controllers * Add `absolute_uri` option to surrogate fragment renderers + * Add `ValueResolverInterface` and deprecate `ArgumentValueResolverInterface` 6.1 --- diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php index 6359611e5c0cd..6d961318ddb98 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php @@ -16,6 +16,7 @@ use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver; use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver; use Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver; use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface; @@ -31,7 +32,7 @@ final class ArgumentResolver implements ArgumentResolverInterface private iterable $argumentValueResolvers; /** - * @param iterable $argumentValueResolvers + * @param iterable $argumentValueResolvers */ public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = []) { @@ -49,24 +50,28 @@ public function getArguments(Request $request, callable $controller): array foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller, ...$reflectors) as $metadata) { foreach ($this->argumentValueResolvers as $resolver) { - if (!$resolver->supports($request, $metadata)) { + if ((!$resolver instanceof ValueResolverInterface || $resolver instanceof TraceableValueResolver) && !$resolver->supports($request, $metadata)) { continue; } - $resolved = $resolver->resolve($request, $metadata); + $count = 0; + foreach ($resolver->resolve($request, $metadata) as $argument) { + ++$count; + $arguments[] = $argument; + } - $atLeastOne = false; - foreach ($resolved as $append) { - $atLeastOne = true; - $arguments[] = $append; + if (1 < $count && !$metadata->isVariadic()) { + throw new \InvalidArgumentException(sprintf('"%s::resolve()" must yield at most one value for non-variadic arguments.', get_debug_type($resolver))); } - if (!$atLeastOne) { - throw new \InvalidArgumentException(sprintf('"%s::resolve()" must yield at least one value.', get_debug_type($resolver))); + if ($count) { + // continue to the next controller argument + continue 2; } - // continue to the next controller argument - continue 2; + if (!$resolver instanceof ValueResolverInterface) { + throw new \InvalidArgumentException(sprintf('"%s::resolve()" must yield at least one value.', get_debug_type($resolver))); + } } $representative = $controller; @@ -74,7 +79,7 @@ public function getArguments(Request $request, callable $controller): array if (\is_array($representative)) { $representative = sprintf('%s::%s()', \get_class($representative[0]), $representative[1]); } elseif (\is_object($representative)) { - $representative = \get_class($representative); + $representative = get_debug_type($representative); } throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.', $representative, $metadata->getName())); diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/BackedEnumValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/BackedEnumValueResolver.php index 8a84ac130bdca..4f0ca76d30226 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/BackedEnumValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/BackedEnumValueResolver.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -21,11 +22,18 @@ * leading to a 404 Not Found if the attribute value isn't a valid backing value for the enum type. * * @author Maxime Steinhausser + * + * @final since Symfony 6.2 */ -class BackedEnumValueResolver implements ArgumentValueResolverInterface +class BackedEnumValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { + /** + * @deprecated since Symfony 6.2, use resolve() instead + */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + if (!is_subclass_of($argument->getType(), \BackedEnum::class)) { return false; } @@ -43,31 +51,43 @@ public function supports(Request $request, ArgumentMetadata $argument): bool public function resolve(Request $request, ArgumentMetadata $argument): iterable { + if (!is_subclass_of($argument->getType(), \BackedEnum::class)) { + return []; + } + + if ($argument->isVariadic()) { + // only target route path parameters, which cannot be variadic. + return []; + } + + // do not support if no value can be resolved at all + // letting the \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver be used + // or \Symfony\Component\HttpKernel\Controller\ArgumentResolver fail with a meaningful error. + if (!$request->attributes->has($argument->getName())) { + return []; + } + $value = $request->attributes->get($argument->getName()); if (null === $value) { - yield null; - - return; + return [null]; } if ($value instanceof \BackedEnum) { - yield $value; - - return; + return [$value]; } if (!\is_int($value) && !\is_string($value)) { - throw new \LogicException(sprintf('Could not resolve the "%s $%s" controller argument: expecting an int or string, got %s.', $argument->getType(), $argument->getName(), get_debug_type($value))); + throw new \LogicException(sprintf('Could not resolve the "%s $%s" controller argument: expecting an int or string, got "%s".', $argument->getType(), $argument->getName(), get_debug_type($value))); } /** @var class-string<\BackedEnum> $enumType */ $enumType = $argument->getType(); try { - yield $enumType::from($value); - } catch (\ValueError $error) { - throw new NotFoundHttpException(sprintf('Could not resolve the "%s $%s" controller argument: %s', $argument->getType(), $argument->getName(), $error->getMessage()), $error); + return [$enumType::from($value)]; + } catch (\ValueError $e) { + throw new NotFoundHttpException(sprintf('Could not resolve the "%s $%s" controller argument: ', $argument->getType(), $argument->getName()).$e->getMessage(), $e); } } } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php index 55007bef7bc87..d310fee19aaa5 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php @@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Attribute\MapDateTime; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -23,33 +24,35 @@ * @author Benjamin Eberlei * @author Tim Goudriaan */ -final class DateTimeValueResolver implements ArgumentValueResolverInterface +final class DateTimeValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + return is_a($argument->getType(), \DateTimeInterface::class, true) && $request->attributes->has($argument->getName()); } /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { + if (!is_a($argument->getType(), \DateTimeInterface::class, true) || !$request->attributes->has($argument->getName())) { + return []; + } + $value = $request->attributes->get($argument->getName()); if ($value instanceof \DateTimeInterface) { - yield $value; - - return; + return [$value]; } if ($argument->isNullable() && !$value) { - yield null; - - return; + return [null]; } $class = \DateTimeInterface::class === $argument->getType() ? \DateTimeImmutable::class : $argument->getType(); @@ -83,6 +86,6 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable throw new NotFoundHttpException(sprintf('Invalid date given for parameter "%s".', $argument->getName())); } - yield $date; + return [$date]; } } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php index 32a0e071d6884..01d8cf9255290 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -20,21 +21,31 @@ * * @author Iltar van der Berg */ -final class DefaultValueResolver implements ArgumentValueResolverInterface +final class DefaultValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + return $argument->hasDefaultValue() || (null !== $argument->getType() && $argument->isNullable() && !$argument->isVariadic()); } /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { - yield $argument->hasDefaultValue() ? $argument->getDefaultValue() : null; + if ($argument->hasDefaultValue()) { + return [$argument->getDefaultValue()]; + } + + if (null !== $argument->getType() && $argument->isNullable() && !$argument->isVariadic()) { + return [null]; + } + + return []; } } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php index 22a4d2ae74498..7b8293ab4ff4b 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php @@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -22,7 +23,7 @@ * * @author Simeon Kolev */ -final class NotTaggedControllerValueResolver implements ArgumentValueResolverInterface +final class NotTaggedControllerValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { private ContainerInterface $container; @@ -32,10 +33,12 @@ public function __construct(ContainerInterface $container) } /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + $controller = $request->attributes->get('_controller'); if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { @@ -58,21 +61,28 @@ public function supports(Request $request, ArgumentMetadata $argument): bool /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { - if (\is_array($controller = $request->attributes->get('_controller'))) { + $controller = $request->attributes->get('_controller'); + + if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { $controller = $controller[0].'::'.$controller[1]; + } elseif (!\is_string($controller) || '' === $controller) { + return []; } if ('\\' === $controller[0]) { $controller = ltrim($controller, '\\'); } - if (!$this->container->has($controller)) { - $i = strrpos($controller, ':'); + if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) { $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); } + if ($this->container->has($controller)) { + return []; + } + $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); $message = sprintf('Could not resolve %s, maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?', $what); diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php index c62d327b65a2c..2362e0b8c9110 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -20,21 +21,23 @@ * * @author Iltar van der Berg */ -final class RequestAttributeValueResolver implements ArgumentValueResolverInterface +final class RequestAttributeValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + return !$argument->isVariadic() && $request->attributes->has($argument->getName()); } /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { - yield $request->attributes->get($argument->getName()); + return !$argument->isVariadic() && $request->attributes->has($argument->getName()) ? [$request->attributes->get($argument->getName())] : []; } } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php index 75cbd97edbbfa..01781430b69d9 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -20,21 +21,23 @@ * * @author Iltar van der Berg */ -final class RequestValueResolver implements ArgumentValueResolverInterface +final class RequestValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + return Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class); } /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { - yield $request; + return Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class) ? [$request] : []; } } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php index 7122a6204581f..a540f160f7554 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php @@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -22,7 +23,7 @@ * * @author Nicolas Grekas */ -final class ServiceValueResolver implements ArgumentValueResolverInterface +final class ServiceValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { private ContainerInterface $container; @@ -32,10 +33,12 @@ public function __construct(ContainerInterface $container) } /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + $controller = $request->attributes->get('_controller'); if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { @@ -58,23 +61,30 @@ public function supports(Request $request, ArgumentMetadata $argument): bool /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { - if (\is_array($controller = $request->attributes->get('_controller'))) { + $controller = $request->attributes->get('_controller'); + + if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { $controller = $controller[0].'::'.$controller[1]; + } elseif (!\is_string($controller) || '' === $controller) { + return []; } if ('\\' === $controller[0]) { $controller = ltrim($controller, '\\'); } - if (!$this->container->has($controller)) { - $i = strrpos($controller, ':'); + if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) { $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); } + if (!$this->container->has($controller) || !$this->container->get($controller)->has($argument->getName())) { + return []; + } + try { - yield $this->container->get($controller)->get($argument->getName()); + return [$this->container->get($controller)->get($argument->getName())]; } catch (RuntimeException $e) { $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); $message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage()); diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php index a1e6b431595c3..d8b4fb5c00daa 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php @@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -21,13 +22,15 @@ * * @author Iltar van der Berg */ -final class SessionValueResolver implements ArgumentValueResolverInterface +final class SessionValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + if (!$request->hasSession()) { return false; } @@ -43,8 +46,17 @@ public function supports(Request $request, ArgumentMetadata $argument): bool /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { - yield $request->getSession(); + if (!$request->hasSession()) { + return []; + } + + $type = $argument->getType(); + if (SessionInterface::class !== $type && !is_subclass_of($type, SessionInterface::class)) { + return []; + } + + return $request->getSession() instanceof $type ? [$request->getSession()] : []; } } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php index a84513223b347..b16f8efa5bb4a 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; use Symfony\Component\Stopwatch\Stopwatch; @@ -21,22 +22,28 @@ * * @author Iltar van der Berg */ -final class TraceableValueResolver implements ArgumentValueResolverInterface +final class TraceableValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { private ArgumentValueResolverInterface $inner; private Stopwatch $stopwatch; - public function __construct(ArgumentValueResolverInterface $inner, Stopwatch $stopwatch) + public function __construct(ArgumentValueResolverInterface|ValueResolverInterface $inner, Stopwatch $stopwatch) { $this->inner = $inner; $this->stopwatch = $stopwatch; } /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + if ($this->inner instanceof ValueResolverInterface) { + return true; + } + + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + $method = \get_class($this->inner).'::'.__FUNCTION__; $this->stopwatch->start($method, 'controller.argument_value_resolver'); diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php index feafa56f2f65a..c7b1f8a43d266 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php @@ -13,17 +13,20 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Uid\AbstractUid; -final class UidValueResolver implements ArgumentValueResolverInterface +final class UidValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + return !$argument->isVariadic() && \is_string($request->attributes->get($argument->getName())) && null !== $argument->getType() @@ -33,13 +36,19 @@ public function supports(Request $request, ArgumentMetadata $argument): bool /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { - /** @var class-string $uidClass */ - $uidClass = $argument->getType(); + if ($argument->isVariadic() + || !\is_string($value = $request->attributes->get($argument->getName())) + || null === ($uidClass = $argument->getType()) + || !is_subclass_of($argument->getType(), AbstractUid::class, true) + ) { + return []; + } + /* @var class-string $uidClass */ try { - return [$uidClass::fromString($request->attributes->get($argument->getName()))]; + return [$uidClass::fromString($value)]; } catch (\InvalidArgumentException $e) { throw new NotFoundHttpException(sprintf('The uid for the "%s" parameter is invalid.', $argument->getName()), $e); } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php index a8f7e0f44014e..cf89d4feaf00d 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -20,27 +21,33 @@ * * @author Iltar van der Berg */ -final class VariadicValueResolver implements ArgumentValueResolverInterface +final class VariadicValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { /** - * {@inheritdoc} + * @deprecated since Symfony 6.2, use resolve() instead */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + return $argument->isVariadic() && $request->attributes->has($argument->getName()); } /** * {@inheritdoc} */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { + if (!$argument->isVariadic() || !$request->attributes->has($argument->getName())) { + return []; + } + $values = $request->attributes->get($argument->getName()); if (!\is_array($values)) { throw new \InvalidArgumentException(sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), get_debug_type($values))); } - yield from $values; + return $values; } } diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.php index 3570bebf3912e..9c3b1a016218a 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.php @@ -18,6 +18,8 @@ * Responsible for resolving the value of an argument based on its metadata. * * @author Iltar van der Berg + * + * @deprecated since Symfony 6.2, implement ValueResolverInterface instead */ interface ArgumentValueResolverInterface { diff --git a/src/Symfony/Component/HttpKernel/Controller/ValueResolverInterface.php b/src/Symfony/Component/HttpKernel/Controller/ValueResolverInterface.php new file mode 100644 index 0000000000000..a861705cb7bb6 --- /dev/null +++ b/src/Symfony/Component/HttpKernel/Controller/ValueResolverInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +/** + * Responsible for resolving the value of an argument based on its metadata. + * + * @author Nicolas Grekas + */ +interface ValueResolverInterface +{ + /** + * Returns the possible value(s). + */ + public function resolve(Request $request, ArgumentMetadata $argument): iterable; +} diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php index 03fbe6b7678ea..dc0645440826c 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php @@ -21,12 +21,18 @@ class BackedEnumValueResolverTest extends TestCase { /** + * In Symfony 7, keep this test case but remove the call to supports(). + * + * @group legacy * @dataProvider provideTestSupportsData */ public function testSupports(Request $request, ArgumentMetadata $metadata, bool $expectedSupport) { $resolver = new BackedEnumValueResolver(); + if (!$expectedSupport) { + $this->assertSame([], $resolver->resolve($request, $metadata)); + } self::assertSame($expectedSupport, $resolver->supports($request, $metadata)); } @@ -76,7 +82,7 @@ public function testResolve(Request $request, ArgumentMetadata $metadata, $expec /** @var \Generator $results */ $results = $resolver->resolve($request, $metadata); - self::assertSame($expected, iterator_to_array($results)); + self::assertSame($expected, $results); } public function provideTestResolveData(): iterable @@ -112,9 +118,7 @@ public function testResolveThrowsNotFoundOnInvalidValue() $this->expectException(NotFoundHttpException::class); $this->expectExceptionMessage('Could not resolve the "Symfony\Component\HttpKernel\Tests\Fixtures\Suit $suit" controller argument: "foo" is not a valid backing value for enum'); - /** @var \Generator $results */ - $results = $resolver->resolve($request, $metadata); - iterator_to_array($results); + $resolver->resolve($request, $metadata); } public function testResolveThrowsOnUnexpectedType() @@ -124,11 +128,9 @@ public function testResolveThrowsOnUnexpectedType() $metadata = self::createArgumentMetadata('suit', Suit::class); $this->expectException(\LogicException::class); - $this->expectExceptionMessage('Could not resolve the "Symfony\Component\HttpKernel\Tests\Fixtures\Suit $suit" controller argument: expecting an int or string, got bool.'); + $this->expectExceptionMessage('Could not resolve the "Symfony\Component\HttpKernel\Tests\Fixtures\Suit $suit" controller argument: expecting an int or string, got "bool".'); - /** @var \Generator $results */ - $results = $resolver->resolve($request, $metadata); - iterator_to_array($results); + $resolver->resolve($request, $metadata); } private static function createRequest(array $attributes = []): Request diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php index e1c3d662c6ece..4d53ec6aff24f 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php @@ -39,6 +39,9 @@ public function getTimeZones() yield ['Etc/GMT-14']; } + /** + * @group legacy + */ public function testSupports() { $resolver = new DateTimeValueResolver(); @@ -56,6 +59,15 @@ public function testSupports() $this->assertFalse($resolver->supports($request, $argument)); } + public function testUnsupportedArgument() + { + $resolver = new DateTimeValueResolver(); + + $argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null); + $request = self::requestWithAttributes(['dummy' => 'now']); + $this->assertSame([], $resolver->resolve($request, $argument)); + } + /** * @dataProvider getTimeZones */ @@ -67,9 +79,7 @@ public function testFullDate(string $timezone) $argument = new ArgumentMetadata('dummy', \DateTime::class, false, false, null); $request = self::requestWithAttributes(['dummy' => '2012-07-21 00:00:00']); - /** @var \Generator $results */ $results = $resolver->resolve($request, $argument); - $results = iterator_to_array($results); $this->assertCount(1, $results); $this->assertInstanceOf(\DateTime::class, $results[0]); @@ -88,9 +98,7 @@ public function testUnixTimestamp(string $timezone) $argument = new ArgumentMetadata('dummy', \DateTime::class, false, false, null); $request = self::requestWithAttributes(['dummy' => '989541720']); - /** @var \Generator $results */ $results = $resolver->resolve($request, $argument); - $results = iterator_to_array($results); $this->assertCount(1, $results); $this->assertInstanceOf(\DateTime::class, $results[0]); @@ -105,9 +113,7 @@ public function testNullableWithEmptyAttribute() $argument = new ArgumentMetadata('dummy', \DateTime::class, false, false, null, true); $request = self::requestWithAttributes(['dummy' => '']); - /** @var \Generator $results */ $results = $resolver->resolve($request, $argument); - $results = iterator_to_array($results); $this->assertCount(1, $results); $this->assertNull($results[0]); @@ -120,9 +126,7 @@ public function testPreviouslyConvertedAttribute() $argument = new ArgumentMetadata('dummy', \DateTime::class, false, false, null, true); $request = self::requestWithAttributes(['dummy' => $datetime = new \DateTime()]); - /** @var \Generator $results */ $results = $resolver->resolve($request, $argument); - $results = iterator_to_array($results); $this->assertCount(1, $results); $this->assertSame($datetime, $results[0]); @@ -136,9 +140,7 @@ public function testCustomClass() $argument = new ArgumentMetadata('dummy', FooDateTime::class, false, false, null); $request = self::requestWithAttributes(['dummy' => '2016-09-08 00:00:00']); - /** @var \Generator $results */ $results = $resolver->resolve($request, $argument); - $results = iterator_to_array($results); $this->assertCount(1, $results); $this->assertInstanceOf(FooDateTime::class, $results[0]); @@ -156,9 +158,7 @@ public function testDateTimeImmutable(string $timezone) $argument = new ArgumentMetadata('dummy', \DateTimeImmutable::class, false, false, null); $request = self::requestWithAttributes(['dummy' => '2016-09-08 00:00:00 +05:00']); - /** @var \Generator $results */ $results = $resolver->resolve($request, $argument); - $results = iterator_to_array($results); $this->assertCount(1, $results); $this->assertInstanceOf(\DateTimeImmutable::class, $results[0]); @@ -179,9 +179,7 @@ public function testWithFormat(string $timezone) ]); $request = self::requestWithAttributes(['dummy' => '09-08-16 12:34:56']); - /** @var \Generator $results */ $results = $resolver->resolve($request, $argument); - $results = iterator_to_array($results); $this->assertCount(1, $results); $this->assertInstanceOf(\DateTimeImmutable::class, $results[0]); @@ -217,9 +215,7 @@ public function test404Exception(ArgumentMetadata $argument, Request $request) $this->expectException(NotFoundHttpException::class); $this->expectExceptionMessage('Invalid date given for parameter "dummy".'); - /** @var \Generator $results */ - $results = $resolver->resolve($request, $argument); - iterator_to_array($results); + $resolver->resolve($request, $argument); } private static function requestWithAttributes(array $attributes): Request diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php index 3cf2f0f18562e..25214afdfa48a 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php @@ -20,6 +20,9 @@ class NotTaggedControllerValueResolverTest extends TestCase { + /** + * @group legacy + */ public function testDoSupportWhenControllerDoNotExists() { $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([])); @@ -29,6 +32,11 @@ public function testDoSupportWhenControllerDoNotExists() $this->assertTrue($resolver->supports($request, $argument)); } + /** + * In Symfony 7, keep this test case but remove the call to supports(). + * + * @group legacy + */ public function testDoNotSupportWhenControllerExists() { $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([ @@ -42,15 +50,21 @@ public function testDoNotSupportWhenControllerExists() ])); $argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null); $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::method']); - + $this->assertSame([], $resolver->resolve($request, $argument)); $this->assertFalse($resolver->supports($request, $argument)); } + /** + * In Symfony 7, keep this test case but remove the call to supports(). + * + * @group legacy + */ public function testDoNotSupportEmptyController() { $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([])); $argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null); $request = $this->requestWithAttributes(['_controller' => '']); + $this->assertSame([], $resolver->resolve($request, $argument)); $this->assertFalse($resolver->supports($request, $argument)); } @@ -61,7 +75,6 @@ public function testController() $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([])); $argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null); $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::method']); - $this->assertTrue($resolver->supports($request, $argument)); $resolver->resolve($request, $argument); } @@ -72,7 +85,6 @@ public function testControllerWithATrailingBackSlash() $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([])); $argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null); $request = $this->requestWithAttributes(['_controller' => '\\App\\Controller\\Mine::method']); - $this->assertTrue($resolver->supports($request, $argument)); $resolver->resolve($request, $argument); } @@ -83,7 +95,6 @@ public function testControllerWithMethodNameStartUppercase() $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([])); $argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null); $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::Method']); - $this->assertTrue($resolver->supports($request, $argument)); $resolver->resolve($request, $argument); } @@ -94,7 +105,6 @@ public function testControllerNameIsAnArray() $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([])); $argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null); $request = $this->requestWithAttributes(['_controller' => ['App\\Controller\\Mine', 'method']]); - $this->assertTrue($resolver->supports($request, $argument)); $resolver->resolve($request, $argument); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php index 69b9511c05230..7bc4259439e97 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php @@ -22,12 +22,18 @@ class ServiceValueResolverTest extends TestCase { + /** + * In Symfony 7, keep this test case but remove the call to supports(). + * + * @group legacy + */ public function testDoNotSupportWhenControllerDoNotExists() { $resolver = new ServiceValueResolver(new ServiceLocator([])); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); $request = $this->requestWithAttributes(['_controller' => 'my_controller']); + $this->assertSame([], $resolver->resolve($request, $argument)); $this->assertFalse($resolver->supports($request, $argument)); } @@ -46,8 +52,7 @@ public function testExistingController() $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::method']); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); - $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); + $this->assertEquals([new DummyService()], $resolver->resolve($request, $argument)); } public function testExistingControllerWithATrailingBackSlash() @@ -65,8 +70,7 @@ public function testExistingControllerWithATrailingBackSlash() $request = $this->requestWithAttributes(['_controller' => '\\App\\Controller\\Mine::method']); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); - $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); + $this->assertEquals([new DummyService()], $resolver->resolve($request, $argument)); } public function testExistingControllerWithMethodNameStartUppercase() @@ -83,8 +87,7 @@ public function testExistingControllerWithMethodNameStartUppercase() $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::Method']); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); - $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); + $this->assertEquals([new DummyService()], $resolver->resolve($request, $argument)); } public function testControllerNameIsAnArray() @@ -102,8 +105,7 @@ public function testControllerNameIsAnArray() $request = $this->requestWithAttributes(['_controller' => ['App\\Controller\\Mine', 'method']]); $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null); - $this->assertTrue($resolver->supports($request, $argument)); - $this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument)); + $this->assertEquals([new DummyService()], $resolver->resolve($request, $argument)); } public function testErrorIsTruncated() @@ -133,16 +135,6 @@ private function requestWithAttributes(array $attributes) return $request; } - - private function assertYieldEquals(array $expected, \Generator $generator) - { - $args = []; - foreach ($generator as $arg) { - $args[] = $arg; - } - - $this->assertEquals($expected, $args); - } } class DummyService diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php index 91446c45ab73e..bf5c42f8c2cfa 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php @@ -20,6 +20,9 @@ class TraceableValueResolverTest extends TestCase { + /** + * @group legacy + */ public function testTimingsInSupports() { $stopwatch = new Stopwatch(); diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php index 64065699c17bc..766c028873fd1 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php @@ -25,10 +25,17 @@ class UidValueResolverTest extends TestCase { /** + * In Symfony 7, keep this test case but remove the call to supports() + * + * @group legacy * @dataProvider provideSupports */ public function testSupports(bool $expected, Request $request, ArgumentMetadata $argument) { + if (!$expected) { + $this->assertSame([], (new UidValueResolver())->resolve($request, $argument)); + } + $this->assertSame($expected, (new UidValueResolver())->supports($request, $argument)); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php index 1f8b0d68076b5..65ff564f1a90b 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php @@ -173,6 +173,9 @@ public function testGetVariadicArgumentsWithoutArrayInRequest() self::$resolver->getArguments($request, $controller); } + /** + * @group legacy + */ public function testGetArgumentWithoutArray() { $this->expectException(\InvalidArgumentException::class); diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index 30bc75c4e05f8..2c92557cbb6fb 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/error-handler": "^6.1", "symfony/event-dispatcher": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", diff --git a/src/Symfony/Component/Security/Http/AccessToken/QueryAccessTokenExtractor.php b/src/Symfony/Component/Security/Http/AccessToken/QueryAccessTokenExtractor.php index 4e5b14aa735b7..ff558904dc2f0 100644 --- a/src/Symfony/Component/Security/Http/AccessToken/QueryAccessTokenExtractor.php +++ b/src/Symfony/Component/Security/Http/AccessToken/QueryAccessTokenExtractor.php @@ -32,8 +32,7 @@ final class QueryAccessTokenExtractor implements AccessTokenExtractorInterface public function __construct( private readonly string $parameter = self::PARAMETER, - ) - { + ) { } public function extractAccessToken(Request $request): ?string diff --git a/src/Symfony/Component/Security/Http/Controller/UserValueResolver.php b/src/Symfony/Component/Security/Http/Controller/UserValueResolver.php index 9b875f1d07b9b..a4c21f7719854 100644 --- a/src/Symfony/Component/Security/Http/Controller/UserValueResolver.php +++ b/src/Symfony/Component/Security/Http/Controller/UserValueResolver.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; @@ -24,7 +25,7 @@ * * @author Iltar van der Berg */ -final class UserValueResolver implements ArgumentValueResolverInterface +final class UserValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { private TokenStorageInterface $tokenStorage; @@ -33,8 +34,13 @@ public function __construct(TokenStorageInterface $tokenStorage) $this->tokenStorage = $tokenStorage; } + /** + * @deprecated since Symfony 6.2, use resolve() instead + */ public function supports(Request $request, ArgumentMetadata $argument): bool { + @trigger_deprecation('symfony/http-kernel', '6.2', 'The "%s()" method is deprecated, use "resolve()" instead.', __METHOD__); + // with the attribute, the type can be any UserInterface implementation // otherwise, the type must be UserInterface if (UserInterface::class !== $argument->getType() && !$argument->getAttributesOfType(CurrentUser::class, ArgumentMetadata::IS_INSTANCEOF)) { @@ -49,19 +55,31 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return true; } - public function resolve(Request $request, ArgumentMetadata $argument): iterable + public function resolve(Request $request, ArgumentMetadata $argument): array { + // with the attribute, the type can be any UserInterface implementation + // otherwise, the type must be UserInterface + if (UserInterface::class !== $argument->getType() && !$argument->getAttributesOfType(CurrentUser::class, ArgumentMetadata::IS_INSTANCEOF)) { + return []; + } $user = $this->tokenStorage->getToken()?->getUser(); + // if no user is present but a default value exists we delegate to DefaultValueResolver + if ($argument->hasDefaultValue() && null === $user) { + return []; + } + if (null === $user) { if (!$argument->isNullable()) { throw new AccessDeniedException(sprintf('There is no logged-in user to pass to $%s, make the argument nullable if you want to allow anonymous access to the action.', $argument->getName())); } - yield null; - } elseif (null === $argument->getType() || $user instanceof ($argument->getType())) { - yield $user; - } else { - throw new AccessDeniedException(sprintf('The logged-in user is an instance of "%s" but a user of type "%s" is expected.', $user::class, $argument->getType())); + + return [null]; } + if (null === $argument->getType() || $user instanceof ($argument->getType())) { + return [$user]; + } + + throw new AccessDeniedException(sprintf('The logged-in user is an instance of "%s" but a user of type "%s" is expected.', $user::class, $argument->getType())); } } diff --git a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index 07f684f467d99..1ce9276d43bc7 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -53,7 +53,7 @@ class SwitchUserListener extends AbstractListener private bool $stateless; private ?string $targetUrl; - public function __construct(TokenStorageInterface $tokenStorage, UserProviderInterface $provider, UserCheckerInterface $userChecker, string $firewallName, AccessDecisionManagerInterface $accessDecisionManager, LoggerInterface $logger = null, string $usernameParameter = '_switch_user', string $role = 'ROLE_ALLOWED_TO_SWITCH', EventDispatcherInterface $dispatcher = null, bool $stateless = false, ?string $targetUrl = null) + public function __construct(TokenStorageInterface $tokenStorage, UserProviderInterface $provider, UserCheckerInterface $userChecker, string $firewallName, AccessDecisionManagerInterface $accessDecisionManager, LoggerInterface $logger = null, string $usernameParameter = '_switch_user', string $role = 'ROLE_ALLOWED_TO_SWITCH', EventDispatcherInterface $dispatcher = null, bool $stateless = false, string $targetUrl = null) { if ('' === $firewallName) { throw new \InvalidArgumentException('$firewallName must not be empty.'); diff --git a/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandlerInterface.php b/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandlerInterface.php index 16af51964842c..5edc9b6130b3f 100644 --- a/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandlerInterface.php @@ -26,7 +26,7 @@ interface LoginLinkHandlerInterface * * @param int|null $lifetime When not null, the argument overrides any default lifetime previously set */ - public function createLoginLink(UserInterface $user, Request $request = null /*, int $lifetime = null */): LoginLinkDetails; + public function createLoginLink(UserInterface $user, Request $request = null /* , int $lifetime = null */): LoginLinkDetails; /** * Validates if this request contains a login link and returns the associated User. diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php index 150f54a8581ae..ad3f75353731a 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php @@ -146,7 +146,6 @@ public function provideEmptyAuthenticateData() { $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "", "password": "notempty"}'); yield [$request]; - } public function testAuthenticationFailureWithoutTranslator() diff --git a/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php b/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php index 09bbe637322fd..4ee4c0a07d46e 100644 --- a/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php @@ -27,21 +27,33 @@ class UserValueResolverTest extends TestCase { + /** + * In Symfony 7, keep this test case but remove the call to supports() + * + * @group legacy + */ public function testSupportsFailsWithNoType() { $tokenStorage = new TokenStorage(); $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', null, false, false, null); + $this->assertSame([], $resolver->resolve(Request::create('/'), $metadata)); $this->assertFalse($resolver->supports(Request::create('/'), $metadata)); } + /** + * In Symfony 7, keep this test case but remove the call to supports() + * + * @group legacy + */ public function testSupportsFailsWhenDefaultValAndNoUser() { $tokenStorage = new TokenStorage(); $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', UserInterface::class, false, true, new InMemoryUser('username', 'password')); + $this->assertSame([], $resolver->resolve(Request::create('/'), $metadata)); $this->assertFalse($resolver->supports(Request::create('/'), $metadata)); } @@ -55,8 +67,7 @@ public function testResolveSucceedsWithUserInterface() $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', UserInterface::class, false, false, null); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); - $this->assertSame([$user], iterator_to_array($resolver->resolve(Request::create('/'), $metadata))); + $this->assertSame([$user], $resolver->resolve(Request::create('/'), $metadata)); } public function testResolveSucceedsWithSubclassType() @@ -69,8 +80,7 @@ public function testResolveSucceedsWithSubclassType() $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', InMemoryUser::class, false, false, null, false, [new CurrentUser()]); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); - $this->assertSame([$user], iterator_to_array($resolver->resolve(Request::create('/'), $metadata))); + $this->assertSame([$user], $resolver->resolve(Request::create('/'), $metadata)); } public function testResolveSucceedsWithNullableParamAndNoUser() @@ -82,8 +92,7 @@ public function testResolveSucceedsWithNullableParamAndNoUser() $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', InMemoryUser::class, false, false, null, true, [new CurrentUser()]); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); - $this->assertSame([null], iterator_to_array($resolver->resolve(Request::create('/'), $metadata))); + $this->assertSame([null], $resolver->resolve(Request::create('/'), $metadata)); } public function testResolveSucceedsWithNullableAttribute() @@ -97,8 +106,7 @@ public function testResolveSucceedsWithNullableAttribute() $metadata = $this->createMock(ArgumentMetadata::class); $metadata = new ArgumentMetadata('foo', null, false, false, null, false, [new CurrentUser()]); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); - $this->assertSame([$user], iterator_to_array($resolver->resolve(Request::create('/'), $metadata))); + $this->assertSame([$user], $resolver->resolve(Request::create('/'), $metadata)); } public function testResolveSucceedsWithTypedAttribute() @@ -112,8 +120,7 @@ public function testResolveSucceedsWithTypedAttribute() $metadata = $this->createMock(ArgumentMetadata::class); $metadata = new ArgumentMetadata('foo', InMemoryUser::class, false, false, null, false, [new CurrentUser()]); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); - $this->assertSame([$user], iterator_to_array($resolver->resolve(Request::create('/'), $metadata))); + $this->assertSame([$user], $resolver->resolve(Request::create('/'), $metadata)); } public function testResolveThrowsAccessDeniedWithWrongUserClass() @@ -126,10 +133,9 @@ public function testResolveThrowsAccessDeniedWithWrongUserClass() $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', InMemoryUser::class, false, false, null, false, [new CurrentUser()]); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); $this->expectException(AccessDeniedException::class); $this->expectExceptionMessageMatches('/^The logged-in user is an instance of "Mock_UserInterface[^"]+" but a user of type "Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\InMemoryUser" is expected.$/'); - iterator_to_array($resolver->resolve(Request::create('/'), $metadata)); + $resolver->resolve(Request::create('/'), $metadata); } public function testResolveThrowsAccessDeniedWithAttributeAndNoUser() @@ -139,10 +145,9 @@ public function testResolveThrowsAccessDeniedWithAttributeAndNoUser() $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', UserInterface::class, false, false, null, false, [new CurrentUser()]); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); $this->expectException(AccessDeniedException::class); $this->expectExceptionMessage('There is no logged-in user to pass to $foo, make the argument nullable if you want to allow anonymous access to the action.'); - iterator_to_array($resolver->resolve(Request::create('/'), $metadata)); + $resolver->resolve(Request::create('/'), $metadata); } public function testResolveThrowsAcessDeniedWithNoToken() @@ -151,9 +156,8 @@ public function testResolveThrowsAcessDeniedWithNoToken() $resolver = new UserValueResolver($tokenStorage); $metadata = new ArgumentMetadata('foo', UserInterface::class, false, false, null); - $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); $this->expectException(AccessDeniedException::class); - iterator_to_array($resolver->resolve(Request::create('/'), $metadata)); + $resolver->resolve(Request::create('/'), $metadata); } public function testIntegration() diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json index 4d7a35f724947..66876a3e38e4b 100644 --- a/src/Symfony/Component/Security/Http/composer.json +++ b/src/Symfony/Component/Security/Http/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/security-core": "^6.0", "symfony/http-foundation": "^5.4|^6.0", "symfony/http-kernel": "^6.2", From 7787c1558c26c935d0b56cb907e4f8f857ed16fe Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Tue, 23 Aug 2022 22:52:30 +0200 Subject: [PATCH 0020/1170] [Console] Fix OutputFormatterStyleStack::getCurrent return type --- .../Component/Console/Formatter/OutputFormatterStyleStack.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php index b425449ef389f..66f86a5f75ea1 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php @@ -77,7 +77,7 @@ public function pop(OutputFormatterStyleInterface $style = null): OutputFormatte /** * Computes current style with stacks top codes. */ - public function getCurrent(): OutputFormatterStyle + public function getCurrent(): OutputFormatterStyleInterface { if (empty($this->styles)) { return $this->emptyStyle; From 72afc77ed6e33729a269dbee76342ccee556056c Mon Sep 17 00:00:00 2001 From: Houssem Date: Wed, 24 Aug 2022 12:19:08 +0200 Subject: [PATCH 0021/1170] fix bad help message in cache warmup command --- .../Bundle/FrameworkBundle/Command/CacheWarmupCommand.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php index 33a214ea01aa5..50b51f90734c1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php @@ -53,11 +53,6 @@ protected function configure() Before running this command, the cache must be empty. -This command does not generate the classes cache (as when executing this -command, too many classes that should be part of the cache are already loaded -in memory). Use curl or any other similar tool to warm up -the classes cache if you want. - EOF ) ; From 015d5015e353ee5448bf7c350de0db4a03f8e13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Thu, 25 Aug 2022 16:59:21 +0200 Subject: [PATCH 0022/1170] [CS] Remove @inheritdoc PHPDoc --- .php-cs-fixer.dist.php | 1 + .../ArgumentResolver/EntityValueResolver.php | 3 - .../Doctrine/CacheWarmer/ProxyCacheWarmer.php | 2 - .../Doctrine/ContainerAwareEventManager.php | 14 -- .../DataCollector/DoctrineDataCollector.php | 9 - .../DataFixtures/ContainerAwareLoader.php | 3 - .../CompilerPass/DoctrineValidationPass.php | 3 - ...gisterEventListenersAndSubscribersPass.php | 3 - .../CompilerPass/RegisterUidTypePass.php | 3 - .../Form/ChoiceList/DoctrineChoiceLoader.php | 3 - .../Form/ChoiceList/ORMQueryBuilderLoader.php | 6 - .../Doctrine/Form/DoctrineOrmTypeGuesser.php | 12 -- .../Bridge/Doctrine/Form/Type/EntityType.php | 3 - .../Bridge/Doctrine/Logger/DbalLogger.php | 6 - .../Bridge/Doctrine/ManagerRegistry.php | 6 - .../PropertyInfo/DoctrineExtractor.php | 12 -- .../RememberMe/DoctrineTokenProvider.php | 18 -- .../Security/User/EntityUserProvider.php | 8 - .../Tests/Fixtures/Type/StringWrapperType.php | 9 - .../PropertyInfo/Fixtures/DoctrineFooType.php | 15 -- .../Doctrine/Tests/TestRepositoryFactory.php | 3 - .../Bridge/Doctrine/Types/AbstractUidType.php | 10 - .../Validator/Constraints/UniqueEntity.php | 5 - .../Doctrine/Validator/DoctrineLoader.php | 3 - .../Formatter/CompatibilityFormatter.php | 6 - .../Monolog/Formatter/ConsoleFormatter.php | 3 - .../Monolog/Formatter/VarDumperFormatter.php | 3 - .../Monolog/Handler/ChromePhpHandler.php | 3 - .../Monolog/Handler/CompatibilityHandler.php | 6 - .../CompatibilityProcessingHandler.php | 6 - .../Bridge/Monolog/Handler/ConsoleHandler.php | 18 -- .../Bridge/Monolog/Handler/FirePHPHandler.php | 3 - .../Bridge/Monolog/Handler/MailerHandler.php | 6 - .../Monolog/Handler/ServerLogHandler.php | 9 - src/Symfony/Bridge/Monolog/Logger.php | 12 -- .../Monolog/Processor/DebugProcessor.php | 12 -- .../Processor/SwitchUserTokenProcessor.php | 6 - .../Monolog/Processor/TokenProcessor.php | 6 - .../Bridge/PhpUnit/Legacy/CommandForV7.php | 5 - .../Bridge/PhpUnit/Legacy/CommandForV9.php | 5 - .../ProxyManager/Internal/ProxyGenerator.php | 3 - .../Instantiator/RuntimeInstantiator.php | 3 - .../LazyProxy/PhpDumper/ProxyDumper.php | 9 - .../Instantiator/RuntimeInstantiatorTest.php | 3 - .../LazyProxy/PhpDumper/ProxyDumperTest.php | 3 - .../Twig/DataCollector/TwigDataCollector.php | 12 -- .../Twig/ErrorRenderer/TwigErrorRenderer.php | 3 - .../Bridge/Twig/Extension/AssetExtension.php | 3 - .../Bridge/Twig/Extension/CodeExtension.php | 3 - .../Bridge/Twig/Extension/CsrfExtension.php | 3 - .../Bridge/Twig/Extension/DumpExtension.php | 6 - .../Twig/Extension/ExpressionExtension.php | 3 - .../Bridge/Twig/Extension/FormExtension.php | 12 -- .../Extension/HttpFoundationExtension.php | 3 - .../Twig/Extension/HttpKernelExtension.php | 3 - .../Twig/Extension/LogoutUrlExtension.php | 3 - .../Twig/Extension/RoutingExtension.php | 3 - .../Twig/Extension/SecurityExtension.php | 3 - .../Twig/Extension/TranslationExtension.php | 12 -- .../Twig/Extension/WebLinkExtension.php | 3 - .../Twig/Extension/WorkflowExtension.php | 3 - .../Bridge/Twig/Extension/YamlExtension.php | 3 - .../Bridge/Twig/Form/TwigRendererEngine.php | 3 - .../TranslationDefaultDomainNodeVisitor.php | 9 - .../NodeVisitor/TranslationNodeVisitor.php | 9 - .../Twig/TokenParser/DumpTokenParser.php | 6 - .../Twig/TokenParser/FormThemeTokenParser.php | 6 - .../TransDefaultDomainTokenParser.php | 6 - .../Twig/TokenParser/TransTokenParser.php | 6 - .../Bridge/Twig/Translation/TwigExtractor.php | 9 - .../Bundle/DebugBundle/DebugBundle.php | 3 - .../Compiler/DumpDataCollectorPass.php | 3 - .../DependencyInjection/Configuration.php | 3 - .../DependencyInjection/DebugExtension.php | 9 - .../AbstractPhpFileCacheWarmer.php | 5 - .../CacheWarmer/AnnotationsCacheWarmer.php | 3 - .../CachePoolClearerCacheWarmer.php | 5 - .../CacheWarmer/ConfigBuilderCacheWarmer.php | 5 - .../CacheWarmer/RouterCacheWarmer.php | 9 - .../CacheWarmer/SerializerCacheWarmer.php | 3 - .../CacheWarmer/TranslationsCacheWarmer.php | 8 - .../CacheWarmer/ValidatorCacheWarmer.php | 3 - .../FrameworkBundle/Command/AboutCommand.php | 6 - .../Command/AssetsInstallCommand.php | 6 - .../Command/CacheClearCommand.php | 6 - .../Command/CachePoolClearCommand.php | 6 - .../Command/CachePoolDeleteCommand.php | 6 - .../CachePoolInvalidateTagsCommand.php | 6 - .../Command/CachePoolListCommand.php | 6 - .../Command/CachePoolPruneCommand.php | 6 - .../Command/CacheWarmupCommand.php | 6 - .../Command/ConfigDebugCommand.php | 6 - .../Command/ConfigDumpReferenceCommand.php | 5 - .../Command/ContainerDebugCommand.php | 6 - .../Command/ContainerLintCommand.php | 6 - .../Command/DebugAutowiringCommand.php | 6 - .../Command/EventDispatcherDebugCommand.php | 5 - .../Command/RouterDebugCommand.php | 5 - .../Command/RouterMatchCommand.php | 6 - .../Command/TranslationDebugCommand.php | 6 - .../Command/TranslationUpdateCommand.php | 6 - .../Command/WorkflowDumpCommand.php | 6 - .../Command/XliffLintCommand.php | 3 - .../Command/YamlLintCommand.php | 3 - .../FrameworkBundle/Console/Application.php | 18 -- .../Console/Descriptor/Descriptor.php | 3 - .../Controller/ControllerResolver.php | 3 - .../AddAnnotationsCachedReaderPass.php | 3 - .../AddExpressionLanguageProvidersPass.php | 3 - .../Compiler/WorkflowGuardListenerPass.php | 3 - .../FrameworkExtension.php | 6 - .../FrameworkBundle/HttpCache/HttpCache.php | 3 - .../Kernel/MicroKernelTrait.php | 12 -- .../Bundle/FrameworkBundle/KernelBrowser.php | 7 - .../Routing/DelegatingLoader.php | 3 - .../RedirectableCompiledUrlMatcher.php | 3 - .../Bundle/FrameworkBundle/Routing/Router.php | 8 - .../FrameworkBundle/Test/TestContainer.php | 39 ---- .../Controller/SecurityController.php | 3 - .../DependencyInjection/TestExtension.php | 9 - .../Tests/Kernel/ConcreteMicroKernel.php | 3 - .../Tests/Translation/TranslatorTest.php | 3 - .../Translation/Translator.php | 5 - .../DataCollector/SecurityDataCollector.php | 9 - .../Debug/WrappedLazyListener.php | 3 - .../AddExpressionLanguageProvidersPass.php | 3 - .../Compiler/AddSecurityVotersPass.php | 3 - .../AddSessionDomainConstraintPass.php | 3 - .../Compiler/CleanRememberMeVerifierPass.php | 3 - ...gisterGlobalSecurityEventListenersPass.php | 3 - .../RegisterTokenUsageTrackingPass.php | 3 - .../ReplaceDecoratedRememberMeHandlerPass.php | 3 - .../Security/Factory/AccessTokenFactory.php | 3 - .../Security/Factory/JsonLoginFactory.php | 3 - .../Security/Factory/RememberMeFactory.php | 3 - .../DependencyInjection/SecurityExtension.php | 3 - .../EventListener/FirewallListener.php | 3 - .../RememberMe/DecoratedRememberMeHandler.php | 9 - .../Security/UserAuthenticator.php | 3 - .../Controller/LoginController.php | 3 - .../Form/UserLoginType.php | 6 - .../Controller/LocalizedController.php | 3 - .../Controller/LoginController.php | 3 - .../FormLoginBundle/FormLoginBundle.php | 3 - .../Tests/Functional/SecurityTest.php | 27 --- .../Tests/Functional/app/AppKernel.php | 3 - .../CacheWarmer/TemplateCacheWarmer.php | 8 - .../Bundle/TwigBundle/Command/LintCommand.php | 3 - .../DependencyInjection/TwigExtension.php | 3 - .../WebProfilerExtension.php | 3 - .../Twig/WebProfilerExtension.php | 6 - .../Component/Asset/Context/NullContext.php | 6 - .../Asset/Context/RequestStackContext.php | 6 - src/Symfony/Component/Asset/Package.php | 6 - src/Symfony/Component/Asset/PathPackage.php | 3 - src/Symfony/Component/Asset/UrlPackage.php | 3 - .../VersionStrategy/EmptyVersionStrategy.php | 6 - .../VersionStrategy/StaticVersionStrategy.php | 6 - .../Constraint/BrowserCookieValueSame.php | 7 - .../Test/Constraint/BrowserHasCookie.php | 7 - .../Cache/Adapter/AbstractAdapter.php | 3 - .../Cache/Adapter/AbstractTagAwareAdapter.php | 9 - .../Cache/Adapter/AdapterInterface.php | 8 - .../Component/Cache/Adapter/ApcuAdapter.php | 15 -- .../Component/Cache/Adapter/ArrayAdapter.php | 36 ---- .../Component/Cache/Adapter/ChainAdapter.php | 36 ---- .../Cache/Adapter/CouchbaseBucketAdapter.php | 15 -- .../Adapter/CouchbaseCollectionAdapter.php | 15 -- .../Cache/Adapter/DoctrineDbalAdapter.php | 21 --- .../Adapter/FilesystemTagAwareAdapter.php | 15 -- .../Cache/Adapter/MemcachedAdapter.php | 15 -- .../Component/Cache/Adapter/NullAdapter.php | 33 ---- .../Component/Cache/Adapter/PdoAdapter.php | 18 -- .../Cache/Adapter/PhpArrayAdapter.php | 30 --- .../Cache/Adapter/PhpFilesAdapter.php | 15 -- .../Component/Cache/Adapter/ProxyAdapter.php | 30 --- .../Component/Cache/Adapter/Psr16Adapter.php | 15 -- .../Cache/Adapter/RedisTagAwareAdapter.php | 12 -- .../Cache/Adapter/TagAwareAdapter.php | 36 ---- .../Cache/Adapter/TraceableAdapter.php | 39 ---- .../Adapter/TraceableTagAwareAdapter.php | 3 - src/Symfony/Component/Cache/CacheItem.php | 21 --- .../DataCollector/CacheDataCollector.php | 6 - .../CacheCollectorPass.php | 3 - .../CachePoolClearerPass.php | 3 - .../DependencyInjection/CachePoolPass.php | 3 - .../CachePoolPrunerPass.php | 3 - .../Cache/Marshaller/DefaultMarshaller.php | 6 - .../Cache/Marshaller/DeflateMarshaller.php | 6 - .../Cache/Marshaller/SodiumMarshaller.php | 6 - .../Cache/Marshaller/TagAwareMarshaller.php | 6 - src/Symfony/Component/Cache/Psr16Cache.php | 24 --- .../Adapter/CouchbaseBucketAdapterTest.php | 3 - .../CouchbaseCollectionAdapterTest.php | 3 - .../Cache/Traits/AbstractAdapterTrait.php | 27 --- .../Cache/Traits/FilesystemCommonTrait.php | 6 - .../Cache/Traits/FilesystemTrait.php | 9 - .../Component/Cache/Traits/ProxyTrait.php | 6 - .../Component/Cache/Traits/RedisTrait.php | 15 -- .../Component/Config/ConfigCacheFactory.php | 3 - .../Component/Config/Definition/ArrayNode.php | 23 --- .../Component/Config/Definition/BaseNode.php | 18 -- .../Config/Definition/BooleanNode.php | 9 - .../Builder/ArrayNodeDefinition.php | 15 -- .../Builder/BooleanNodeDefinition.php | 5 - .../Builder/NumericNodeDefinition.php | 2 - .../Builder/VariableNodeDefinition.php | 3 - .../Component/Config/Definition/EnumNode.php | 3 - .../Component/Config/Definition/FloatNode.php | 6 - .../Config/Definition/IntegerNode.php | 6 - .../Loader/DefinitionFileLoader.php | 6 - .../Config/Definition/NumericNode.php | 6 - .../Config/Definition/PrototypedArrayNode.php | 13 -- .../Config/Definition/ScalarNode.php | 9 - .../Config/Definition/VariableNode.php | 21 --- src/Symfony/Component/Config/FileLocator.php | 3 - .../Config/Loader/DelegatingLoader.php | 6 - .../Config/Loader/GlobFileLoader.php | 6 - .../Component/Config/Loader/Loader.php | 6 - .../Config/Loader/LoaderResolver.php | 3 - .../Resource/ClassExistenceResource.php | 2 - .../Config/Resource/ComposerResource.php | 3 - .../Config/Resource/DirectoryResource.php | 3 - .../Config/Resource/FileExistenceResource.php | 3 - .../Config/Resource/FileResource.php | 3 - .../Config/Resource/GlobResource.php | 3 - .../Resource/ReflectionClassResource.php | 3 - .../Config/ResourceCheckerConfigCache.php | 3 - .../ResourceCheckerConfigCacheFactory.php | 3 - src/Symfony/Component/Console/Application.php | 3 - .../Component/Console/Command/HelpCommand.php | 6 - .../Component/Console/Command/LazyCommand.php | 4 - .../Component/Console/Command/ListCommand.php | 6 - .../CommandLoader/ContainerCommandLoader.php | 9 - .../CommandLoader/FactoryCommandLoader.php | 9 - .../Console/Completion/CompletionInput.php | 3 - .../Console/Descriptor/Descriptor.php | 3 - .../Console/Descriptor/JsonDescriptor.php | 15 -- .../Console/Descriptor/MarkdownDescriptor.php | 21 --- .../Console/Descriptor/TextDescriptor.php | 18 -- .../Console/Descriptor/XmlDescriptor.php | 15 -- .../Console/Formatter/NullOutputFormatter.php | 18 -- .../Formatter/NullOutputFormatterStyle.php | 18 -- .../Console/Formatter/OutputFormatter.php | 21 --- .../Formatter/OutputFormatterStyle.php | 18 -- .../Console/Helper/DebugFormatterHelper.php | 3 - .../Console/Helper/DescriptorHelper.php | 3 - .../Console/Helper/FormatterHelper.php | 3 - .../Component/Console/Helper/Helper.php | 6 - .../Console/Helper/InputAwareHelper.php | 3 - .../Console/Helper/ProcessHelper.php | 3 - .../Console/Helper/QuestionHelper.php | 3 - .../Console/Helper/SymfonyQuestionHelper.php | 6 - .../Component/Console/Input/ArgvInput.php | 12 -- .../Component/Console/Input/ArrayInput.php | 12 -- src/Symfony/Component/Console/Input/Input.php | 42 ----- .../Console/Logger/ConsoleLogger.php | 3 - .../Console/Output/BufferedOutput.php | 3 - .../Console/Output/ConsoleOutput.php | 15 -- .../Console/Output/ConsoleSectionOutput.php | 3 - .../Component/Console/Output/NullOutput.php | 36 ---- .../Component/Console/Output/Output.php | 36 ---- .../Component/Console/Output/StreamOutput.php | 3 - .../Console/Output/TrimmedBufferOutput.php | 3 - .../Component/Console/Style/OutputStyle.php | 39 ---- .../Component/Console/Style/SymfonyStyle.php | 63 ------- .../Tester/Constraint/CommandIsSuccessful.php | 12 -- .../Descriptor/ApplicationDescriptionTest.php | 3 - .../CssSelector/Node/AttributeNode.php | 3 - .../Component/CssSelector/Node/ClassNode.php | 3 - .../CssSelector/Node/CombinedSelectorNode.php | 3 - .../CssSelector/Node/ElementNode.php | 3 - .../CssSelector/Node/FunctionNode.php | 3 - .../Component/CssSelector/Node/HashNode.php | 3 - .../CssSelector/Node/NegationNode.php | 3 - .../Component/CssSelector/Node/PseudoNode.php | 3 - .../CssSelector/Node/SelectorNode.php | 3 - .../Parser/Handler/CommentHandler.php | 3 - .../Parser/Handler/HashHandler.php | 3 - .../Parser/Handler/IdentifierHandler.php | 3 - .../Parser/Handler/NumberHandler.php | 3 - .../Parser/Handler/StringHandler.php | 3 - .../Parser/Handler/WhitespaceHandler.php | 3 - .../Component/CssSelector/Parser/Parser.php | 3 - .../Parser/Shortcut/ClassParser.php | 3 - .../Parser/Shortcut/ElementParser.php | 3 - .../Parser/Shortcut/EmptyStringParser.php | 3 - .../Parser/Shortcut/HashParser.php | 3 - .../XPath/Extension/AbstractExtension.php | 15 -- .../Extension/AttributeMatchingExtension.php | 6 - .../XPath/Extension/CombinationExtension.php | 6 - .../XPath/Extension/FunctionExtension.php | 6 - .../XPath/Extension/HtmlExtension.php | 9 - .../XPath/Extension/NodeExtension.php | 6 - .../XPath/Extension/PseudoClassExtension.php | 6 - .../CssSelector/XPath/Translator.php | 6 - .../Argument/BoundArgument.php | 6 - .../Argument/ServiceClosureArgument.php | 6 - .../Argument/ServiceLocator.php | 6 - .../Compiler/AbstractRecursivePass.php | 3 - .../AliasDeprecatedPublicServicesPass.php | 6 - .../Compiler/AutoAliasServicePass.php | 3 - .../Compiler/AutowireAsDecoratorPass.php | 3 - .../Compiler/AutowirePass.php | 6 - .../Compiler/AutowireRequiredMethodsPass.php | 3 - .../AutowireRequiredPropertiesPass.php | 3 - .../Compiler/CheckArgumentsValidityPass.php | 3 - ...xceptionOnInvalidReferenceBehaviorPass.php | 3 - .../Compiler/CheckTypeDeclarationsPass.php | 3 - .../Compiler/DefinitionErrorExceptionPass.php | 3 - .../Compiler/ExtensionCompilerPass.php | 3 - .../Compiler/InlineServiceDefinitionsPass.php | 3 - .../MergeExtensionConfigurationPass.php | 18 -- .../RegisterAutoconfigureAttributesPass.php | 3 - .../Compiler/RemoveUnusedDefinitionsPass.php | 3 - .../ReplaceAliasByActualDefinitionPass.php | 3 - .../Compiler/ResolveBindingsPass.php | 6 - .../Compiler/ResolveClassPass.php | 3 - .../Compiler/ResolveFactoryClassPass.php | 3 - .../Compiler/ResolveHotPathPass.php | 6 - .../ResolveInstanceofConditionalsPass.php | 3 - .../Compiler/ResolveNamedArgumentsPass.php | 3 - .../Compiler/ResolveNoPreloadPass.php | 6 - .../ResolveParameterPlaceHoldersPass.php | 2 - .../ResolveReferencesToAliasesPass.php | 6 - .../ResolveTaggedIteratorArgumentPass.php | 3 - .../Compiler/ValidateEnvPlaceholdersPass.php | 3 - .../ContainerParametersResourceChecker.php | 6 - .../DependencyInjection/Container.php | 3 - .../DependencyInjection/ContainerBuilder.php | 6 - .../DependencyInjection/Dumper/PhpDumper.php | 3 - .../DependencyInjection/EnvVarProcessor.php | 6 - .../ExpressionLanguage.php | 3 - .../Extension/Extension.php | 9 - .../Instantiator/LazyServiceInstantiator.php | 3 - .../Instantiator/RealServiceInstantiator.php | 5 - .../LazyProxy/PhpDumper/LazyServiceDumper.php | 9 - .../LazyProxy/PhpDumper/NullDumper.php | 9 - .../Loader/ClosureLoader.php | 6 - .../Loader/DirectoryLoader.php | 6 - .../DependencyInjection/Loader/FileLoader.php | 2 - .../Loader/GlobFileLoader.php | 6 - .../Loader/IniFileLoader.php | 6 - .../Loader/PhpFileLoader.php | 6 - .../Loader/XmlFileLoader.php | 6 - .../Loader/YamlFileLoader.php | 6 - .../ParameterBag/ContainerBag.php | 9 - .../EnvPlaceholderParameterBag.php | 6 - .../ParameterBag/FrozenParameterBag.php | 12 -- .../ParameterBag/ParameterBag.php | 30 --- .../DependencyInjection/ServiceLocator.php | 3 - .../Tests/Dumper/PhpDumperTest.php | 3 - .../CrawlerSelectorAttributeValueSame.php | 7 - .../Test/Constraint/CrawlerSelectorExists.php | 7 - .../CrawlerSelectorTextContains.php | 7 - .../Constraint/CrawlerSelectorTextSame.php | 7 - .../Dotenv/Command/DotenvDumpCommand.php | 6 - .../ErrorHandler/Error/ClassNotFoundError.php | 3 - .../ErrorHandler/Error/FatalError.php | 5 - .../Error/UndefinedFunctionError.php | 3 - .../Error/UndefinedMethodError.php | 3 - .../ClassNotFoundErrorEnhancer.php | 3 - .../UndefinedFunctionErrorEnhancer.php | 3 - .../UndefinedMethodErrorEnhancer.php | 3 - .../ErrorRenderer/CliErrorRenderer.php | 3 - .../ErrorRenderer/HtmlErrorRenderer.php | 3 - .../ErrorRenderer/SerializerErrorRenderer.php | 3 - .../Tests/Fixtures/ExtendedFinalMethod.php | 3 - .../Debug/TraceableEventDispatcher.php | 24 --- .../EventDispatcher/EventDispatcher.php | 24 --- .../ImmutableEventDispatcher.php | 24 --- .../Filesystem/Exception/IOException.php | 3 - .../Component/Form/AbstractExtension.php | 15 -- .../Component/Form/AbstractRendererEngine.php | 12 -- src/Symfony/Component/Form/AbstractType.php | 18 -- .../Component/Form/AbstractTypeExtension.php | 12 -- src/Symfony/Component/Form/Button.php | 24 --- src/Symfony/Component/Form/ButtonBuilder.php | 9 - .../Component/Form/CallbackTransformer.php | 6 - .../Form/ChoiceList/ArrayChoiceList.php | 18 -- .../ChoiceList/Factory/Cache/ChoiceLoader.php | 9 - .../Factory/CachingFactoryDecorator.php | 9 - .../Factory/DefaultChoiceListFactory.php | 9 - .../Factory/PropertyAccessDecorator.php | 9 - .../Form/ChoiceList/LazyChoiceList.php | 18 -- .../Loader/AbstractChoiceLoader.php | 8 - .../Loader/FilterChoiceLoaderDecorator.php | 6 - .../Loader/IntlCallbackChoiceLoader.php | 6 - .../Form/ChoiceList/View/ChoiceGroupView.php | 2 - .../Component/Form/Command/DebugCommand.php | 6 - .../Form/Console/Descriptor/Descriptor.php | 3 - .../Core/DataAccessor/CallbackAccessor.php | 12 -- .../Core/DataAccessor/ChainAccessor.php | 12 -- .../DataAccessor/PropertyPathAccessor.php | 12 -- .../Core/DataMapper/CheckboxListMapper.php | 6 - .../Extension/Core/DataMapper/DataMapper.php | 6 - .../Core/DataMapper/RadioListMapper.php | 6 - .../DateTimeZoneToStringTransformer.php | 6 - .../IntegerToLocalizedStringTransformer.php | 3 - .../IntlTimeZoneToStringTransformer.php | 6 - .../Form/Extension/Core/Type/BaseType.php | 9 - .../Form/Extension/Core/Type/BirthdayType.php | 9 - .../Form/Extension/Core/Type/ButtonType.php | 9 - .../Form/Extension/Core/Type/CheckboxType.php | 12 -- .../Form/Extension/Core/Type/ChoiceType.php | 15 -- .../Extension/Core/Type/CollectionType.php | 15 -- .../Form/Extension/Core/Type/ColorType.php | 12 -- .../Form/Extension/Core/Type/CountryType.php | 9 - .../Form/Extension/Core/Type/CurrencyType.php | 9 - .../Extension/Core/Type/DateIntervalType.php | 12 -- .../Form/Extension/Core/Type/DateTimeType.php | 12 -- .../Form/Extension/Core/Type/DateType.php | 12 -- .../Form/Extension/Core/Type/EmailType.php | 9 - .../Form/Extension/Core/Type/FileType.php | 15 -- .../Form/Extension/Core/Type/FormType.php | 18 -- .../Form/Extension/Core/Type/HiddenType.php | 6 - .../Form/Extension/Core/Type/IntegerType.php | 12 -- .../Form/Extension/Core/Type/LanguageType.php | 9 - .../Form/Extension/Core/Type/LocaleType.php | 9 - .../Form/Extension/Core/Type/MoneyType.php | 12 -- .../Form/Extension/Core/Type/NumberType.php | 12 -- .../Form/Extension/Core/Type/PasswordType.php | 12 -- .../Form/Extension/Core/Type/PercentType.php | 12 -- .../Form/Extension/Core/Type/RadioType.php | 9 - .../Form/Extension/Core/Type/RangeType.php | 9 - .../Form/Extension/Core/Type/RepeatedType.php | 9 - .../Form/Extension/Core/Type/ResetType.php | 6 - .../Form/Extension/Core/Type/SearchType.php | 9 - .../Form/Extension/Core/Type/SubmitType.php | 9 - .../Form/Extension/Core/Type/TelType.php | 9 - .../Form/Extension/Core/Type/TextType.php | 12 -- .../Form/Extension/Core/Type/TextareaType.php | 9 - .../Form/Extension/Core/Type/TimeType.php | 12 -- .../Form/Extension/Core/Type/TimezoneType.php | 12 -- .../Type/TransformationFailureExtension.php | 3 - .../Form/Extension/Core/Type/UlidType.php | 6 - .../Form/Extension/Core/Type/UrlType.php | 15 -- .../Form/Extension/Core/Type/UuidType.php | 6 - .../Form/Extension/Core/Type/WeekType.php | 12 -- .../Form/Extension/Csrf/CsrfExtension.php | 3 - .../Csrf/Type/FormTypeCsrfExtension.php | 6 - .../DataCollector/DataCollectorExtension.php | 3 - .../EventListener/DataCollectorListener.php | 3 - .../DataCollector/FormDataCollector.php | 30 --- .../DataCollector/FormDataExtractor.php | 12 -- .../Proxy/ResolvedTypeDataCollectorProxy.php | 30 --- .../ResolvedTypeFactoryDataCollectorProxy.php | 3 - .../Type/DataCollectorTypeExtension.php | 6 - .../DependencyInjectionExtension.php | 15 -- .../HttpFoundationRequestHandler.php | 6 - .../Type/FormTypeHttpFoundationExtension.php | 6 - .../Extension/Validator/Constraints/Form.php | 3 - .../Validator/Constraints/FormValidator.php | 3 - .../EventListener/ValidationListener.php | 3 - .../Validator/Type/BaseValidatorExtension.php | 3 - .../Type/FormTypeValidatorExtension.php | 9 - .../Type/RepeatedTypeValidatorExtension.php | 6 - .../Type/SubmitTypeValidatorExtension.php | 3 - .../Type/UploadValidatorExtension.php | 6 - .../Validator/ValidatorTypeGuesser.php | 12 -- .../ViolationMapper/ViolationMapper.php | 3 - .../ViolationMapper/ViolationPath.php | 18 -- src/Symfony/Component/Form/Form.php | 93 ---------- src/Symfony/Component/Form/FormBuilder.php | 26 --- .../Component/Form/FormConfigBuilder.php | 174 ------------------ src/Symfony/Component/Form/FormFactory.php | 18 -- .../Component/Form/FormFactoryBuilder.php | 30 --- src/Symfony/Component/Form/FormRegistry.php | 12 -- src/Symfony/Component/Form/FormRenderer.php | 18 -- .../Component/Form/FormTypeGuesserChain.php | 12 -- .../Component/Form/NativeRequestHandler.php | 5 - .../Component/Form/PreloadedExtension.php | 15 -- .../Component/Form/ResolvedFormType.php | 30 --- .../Form/ResolvedFormTypeFactory.php | 3 - .../Component/Form/ReversedTransformer.php | 6 - src/Symfony/Component/Form/SubmitButton.php | 3 - .../Form/Test/FormPerformanceTestCase.php | 3 - .../Form/Tests/Fixtures/ChoiceSubType.php | 6 - .../Tests/Fixtures/ChoiceTypeExtension.php | 6 - .../Fixtures/LazyChoiceTypeExtension.php | 6 - .../Form/Util/OrderedHashMapIterator.php | 15 -- .../Component/HttpClient/AmpHttpClient.php | 5 - .../HttpClient/AsyncDecoratorTrait.php | 5 - .../HttpClient/CachingHttpClient.php | 6 - .../Component/HttpClient/Chunk/DataChunk.php | 21 --- .../Component/HttpClient/Chunk/ErrorChunk.php | 21 --- .../Component/HttpClient/Chunk/FirstChunk.php | 3 - .../HttpClient/Chunk/InformationalChunk.php | 3 - .../Component/HttpClient/Chunk/LastChunk.php | 3 - .../Component/HttpClient/CurlHttpClient.php | 5 - .../DataCollector/HttpClientDataCollector.php | 6 - .../Component/HttpClient/DecoratorTrait.php | 9 - .../DependencyInjection/HttpClientPass.php | 3 - .../Component/HttpClient/HttpClientTrait.php | 3 - .../Component/HttpClient/HttplugClient.php | 15 -- .../Component/HttpClient/MockHttpClient.php | 9 - .../Component/HttpClient/NativeHttpClient.php | 5 - .../HttpClient/NoPrivateNetworkHttpClient.php | 12 -- .../Component/HttpClient/Psr18Client.php | 18 -- .../HttpClient/Response/AmpResponse.php | 10 - .../HttpClient/Response/AsyncResponse.php | 6 - .../Response/CommonResponseTrait.php | 9 - .../HttpClient/Response/CurlResponse.php | 13 -- .../HttpClient/Response/HttplugPromise.php | 5 - .../HttpClient/Response/MockResponse.php | 18 -- .../HttpClient/Response/NativeResponse.php | 13 -- .../Response/TransportResponseTrait.php | 9 - .../HttpClient/ScopingHttpClient.php | 12 -- .../HttpClient/TraceableHttpClient.php | 12 -- .../HttpFoundation/BinaryFileResponse.php | 11 -- .../Component/HttpFoundation/FileBag.php | 9 - .../Component/HttpFoundation/InputBag.php | 3 - .../HttpFoundation/RequestMatcher.php | 3 - .../HttpFoundation/ResponseHeaderBag.php | 18 -- .../Session/Attribute/AttributeBag.php | 30 --- .../Session/Flash/AutoExpireFlashBag.php | 39 ---- .../HttpFoundation/Session/Flash/FlashBag.php | 39 ---- .../HttpFoundation/Session/Session.php | 57 ------ .../Session/SessionBagProxy.php | 12 -- .../Storage/Handler/IdentityMarshaller.php | 6 - .../Handler/MemcachedSessionHandler.php | 9 - .../Storage/Handler/MongoDbSessionHandler.php | 9 - .../Storage/Handler/NullSessionHandler.php | 9 - .../Storage/Handler/PdoSessionHandler.php | 6 - .../Storage/Handler/RedisSessionHandler.php | 12 -- .../Storage/Handler/StrictSessionHandler.php | 9 - .../Session/Storage/MetadataBag.php | 12 -- .../Storage/MockArraySessionStorage.php | 33 ---- .../Storage/MockFileSessionStorage.php | 9 - .../Session/Storage/NativeSessionStorage.php | 33 ---- .../Storage/PhpBridgeSessionStorage.php | 6 - .../HttpFoundation/StreamedResponse.php | 9 - .../Constraint/RequestAttributeValueSame.php | 7 - .../Constraint/ResponseCookieValueSame.php | 7 - .../Test/Constraint/ResponseFormatSame.php | 9 - .../Test/Constraint/ResponseHasCookie.php | 7 - .../Test/Constraint/ResponseHasHeader.php | 7 - .../Test/Constraint/ResponseHeaderSame.php | 7 - .../Test/Constraint/ResponseIsRedirected.php | 9 - .../Test/Constraint/ResponseIsSuccessful.php | 9 - .../Constraint/ResponseIsUnprocessable.php | 9 - .../Constraint/ResponseStatusCodeSame.php | 9 - .../Storage/Handler/Fixtures/common.inc | 12 -- .../HttpKernel/Bundle/AbstractBundle.php | 3 - .../Component/HttpKernel/Bundle/Bundle.php | 14 -- .../CacheClearer/ChainCacheClearer.php | 3 - .../CacheClearer/Psr6CacheClearer.php | 3 - .../CacheWarmer/CacheWarmerAggregate.php | 6 - .../HttpKernel/Config/FileLocator.php | 3 - .../Controller/ArgumentResolver.php | 3 - .../DateTimeValueResolver.php | 3 - .../ArgumentResolver/DefaultValueResolver.php | 3 - .../NotTaggedControllerValueResolver.php | 3 - .../RequestAttributeValueResolver.php | 3 - .../ArgumentResolver/RequestValueResolver.php | 3 - .../ArgumentResolver/ServiceValueResolver.php | 3 - .../ArgumentResolver/SessionValueResolver.php | 3 - .../TraceableValueResolver.php | 3 - .../ArgumentResolver/UidValueResolver.php | 3 - .../VariadicValueResolver.php | 3 - .../ContainerControllerResolver.php | 3 - .../Controller/ControllerResolver.php | 3 - .../Controller/TraceableArgumentResolver.php | 3 - .../TraceableControllerResolver.php | 3 - .../ArgumentMetadataFactory.php | 3 - .../DataCollector/ConfigDataCollector.php | 9 - .../DataCollector/EventDataCollector.php | 6 - .../DataCollector/ExceptionDataCollector.php | 9 - .../DataCollector/LoggerDataCollector.php | 12 -- .../DataCollector/MemoryDataCollector.php | 12 -- .../DataCollector/RequestDataCollector.php | 6 - .../DataCollector/RouterDataCollector.php | 5 - .../DataCollector/TimeDataCollector.php | 12 -- .../Debug/TraceableEventDispatcher.php | 6 - .../AddAnnotatedClassesToCachePass.php | 3 - .../ConfigurableExtension.php | 3 - .../LazyLoadingFragmentHandler.php | 3 - .../DependencyInjection/LoggerPass.php | 3 - .../ResettableServicePass.php | 3 - .../AddRequestFormatsListener.php | 3 - .../DisallowRobotsIndexingListener.php | 3 - .../EventListener/ValidateRequestListener.php | 3 - .../AbstractSurrogateFragmentRenderer.php | 2 - .../Fragment/EsiFragmentRenderer.php | 3 - .../Fragment/FragmentUriGenerator.php | 3 - .../Fragment/HIncludeFragmentRenderer.php | 5 - .../Fragment/InlineFragmentRenderer.php | 5 - .../Fragment/SsiFragmentRenderer.php | 3 - .../HttpCache/AbstractSurrogate.php | 12 -- .../Component/HttpKernel/HttpCache/Esi.php | 9 - .../HttpKernel/HttpCache/HttpCache.php | 6 - .../HttpCache/ResponseCacheStrategy.php | 6 - .../Component/HttpKernel/HttpCache/Ssi.php | 12 -- .../Component/HttpKernel/HttpKernel.php | 6 - .../HttpKernel/HttpKernelBrowser.php | 9 - src/Symfony/Component/HttpKernel/Kernel.php | 48 ----- .../Component/HttpKernel/Log/Logger.php | 3 - .../Profiler/FileProfilerStorage.php | 11 -- .../Data/Bundle/Compiler/GenrbCompiler.php | 3 - .../Bundle/Reader/BufferedBundleReader.php | 3 - .../Data/Bundle/Reader/BundleEntryReader.php | 6 - .../Data/Bundle/Reader/IntlBundleReader.php | 3 - .../Data/Bundle/Reader/JsonBundleReader.php | 3 - .../Data/Bundle/Reader/PhpBundleReader.php | 3 - .../Data/Bundle/Writer/JsonBundleWriter.php | 3 - .../Data/Bundle/Writer/PhpBundleWriter.php | 3 - .../Data/Bundle/Writer/TextBundleWriter.php | 3 - .../Data/Generator/CurrencyDataGenerator.php | 18 -- .../Data/Generator/LanguageDataGenerator.php | 18 -- .../Data/Generator/LocaleDataGenerator.php | 18 -- .../Data/Generator/RegionDataGenerator.php | 18 -- .../Data/Generator/ScriptDataGenerator.php | 18 -- .../Data/Generator/TimezoneDataGenerator.php | 18 -- .../Component/Intl/Data/Util/RingBuffer.php | 12 -- .../Ldap/Adapter/ExtLdap/Adapter.php | 12 -- .../Ldap/Adapter/ExtLdap/Collection.php | 3 - .../Ldap/Adapter/ExtLdap/Connection.php | 5 - .../Ldap/Adapter/ExtLdap/EntryManager.php | 12 -- .../Component/Ldap/Adapter/ExtLdap/Query.php | 3 - src/Symfony/Component/Ldap/Ldap.php | 12 -- .../Component/Ldap/Security/LdapUser.php | 15 -- .../Ldap/Security/LdapUserProvider.php | 8 - src/Symfony/Component/Lock/Lock.php | 21 --- .../Component/Lock/Store/CombinedStore.php | 12 -- .../Lock/Store/DoctrineDbalStore.php | 12 -- .../Component/Lock/Store/FlockStore.php | 21 --- .../Component/Lock/Store/MemcachedStore.php | 12 -- .../Component/Lock/Store/MongoDbStore.php | 10 - src/Symfony/Component/Lock/Store/PdoStore.php | 12 -- .../Component/Lock/Store/RedisStore.php | 15 -- .../Component/Lock/Store/SemaphoreStore.php | 15 -- .../Component/Lock/Store/ZookeeperStore.php | 12 -- .../Lock/Strategy/ConsensusStrategy.php | 6 - .../Lock/Strategy/UnanimousStrategy.php | 6 - .../Tests/Store/AbstractRedisStoreTest.php | 6 - .../Lock/Tests/Store/CombinedStoreTest.php | 6 - .../Store/DoctrineDbalPostgreSqlStoreTest.php | 3 - .../Tests/Store/DoctrineDbalStoreTest.php | 6 - .../Lock/Tests/Store/FlockStoreTest.php | 3 - .../Lock/Tests/Store/InMemoryStoreTest.php | 3 - .../Lock/Tests/Store/MemcachedStoreTest.php | 6 - .../Lock/Tests/Store/MongoDbStoreTest.php | 3 - .../Lock/Tests/Store/PdoStoreTest.php | 6 - .../Lock/Tests/Store/PostgreSqlStoreTest.php | 3 - .../Lock/Tests/Store/SemaphoreStoreTest.php | 3 - .../DataCollector/MessageDataCollector.php | 9 - .../EventListener/MessageLoggerListener.php | 3 - .../Mailer/Test/Constraint/EmailCount.php | 7 - .../Mailer/Test/Constraint/EmailIsQueued.php | 7 - .../Smtp/Auth/CramMd5Authenticator.php | 2 - .../Smtp/Auth/LoginAuthenticator.php | 2 - .../Smtp/Auth/PlainAuthenticator.php | 2 - .../Smtp/Auth/XOAuth2Authenticator.php | 2 - .../AmazonSqs/Transport/AmazonSqsReceiver.php | 12 -- .../AmazonSqs/Transport/AmazonSqsSender.php | 3 - .../Transport/AmazonSqsTransport.php | 18 -- .../Bridge/Amqp/Transport/AmqpReceiver.php | 15 -- .../Bridge/Amqp/Transport/AmqpSender.php | 3 - .../Bridge/Amqp/Transport/AmqpTransport.php | 21 --- .../Transport/BeanstalkdReceiver.php | 12 -- .../Beanstalkd/Transport/BeanstalkdSender.php | 3 - .../Transport/BeanstalkdTransport.php | 15 -- .../Doctrine/Transport/DoctrineReceiver.php | 18 -- .../Doctrine/Transport/DoctrineSender.php | 3 - .../Doctrine/Transport/DoctrineTransport.php | 24 --- .../Bridge/Redis/Transport/RedisReceiver.php | 12 -- .../Bridge/Redis/Transport/RedisSender.php | 3 - .../Bridge/Redis/Transport/RedisTransport.php | 18 -- .../Command/ConsumeMessagesCommand.php | 9 - .../Messenger/Command/DebugCommand.php | 6 - .../Command/FailedMessagesRemoveCommand.php | 6 - .../Command/FailedMessagesRetryCommand.php | 6 - .../Command/FailedMessagesShowCommand.php | 6 - .../Messenger/Command/StatsCommand.php | 6 - .../Messenger/Command/StopWorkersCommand.php | 6 - .../DataCollector/MessengerDataCollector.php | 15 -- .../DependencyInjection/MessengerPass.php | 3 - .../Messenger/Handler/BatchHandlerTrait.php | 3 - .../Messenger/Handler/HandlersLocator.php | 3 - .../Component/Messenger/MessageBus.php | 3 - .../Middleware/ActivationMiddleware.php | 3 - .../Middleware/HandleMessageMiddleware.php | 2 - .../Middleware/SendMessageMiddleware.php | 3 - .../Middleware/TraceableMiddleware.php | 6 - .../Middleware/ValidationMiddleware.php | 3 - .../Messenger/TraceableMessageBus.php | 3 - .../Messenger/Transport/InMemoryTransport.php | 12 -- .../Transport/Sender/SendersLocator.php | 3 - .../Normalizer/FlattenExceptionNormalizer.php | 12 -- .../Transport/Serialization/PhpSerializer.php | 6 - .../Transport/Serialization/Serializer.php | 6 - .../AddMimeTypeGuesserPass.php | 3 - .../Component/Mime/Encoder/QpEncoder.php | 2 - .../Mime/FileBinaryMimeTypeGuesser.php | 6 - .../Mime/FileinfoMimeTypeGuesser.php | 6 - src/Symfony/Component/Mime/MimeTypes.php | 11 -- .../Test/Constraint/EmailAddressContains.php | 7 - .../Test/Constraint/EmailAttachmentCount.php | 7 - .../Mime/Test/Constraint/EmailHasHeader.php | 7 - .../Mime/Test/Constraint/EmailHeaderSame.php | 7 - .../Test/Constraint/EmailHtmlBodyContains.php | 7 - .../Test/Constraint/EmailTextBodyContains.php | 7 - .../KazInfoTeh/KazInfoTehTransportFactory.php | 6 - .../Tests/KazInfoTehTransportTest.php | 9 - .../NotificationDataCollector.php | 9 - .../NotificationLoggerListener.php | 3 - .../Test/Constraint/NotificationCount.php | 7 - .../Test/Constraint/NotificationIsQueued.php | 7 - .../NotificationSubjectContains.php | 7 - .../NotificationTransportIsEqual.php | 7 - .../Command/UserPasswordHashCommand.php | 6 - .../Hasher/NativePasswordHasher.php | 3 - .../Hasher/PasswordHasherFactory.php | 3 - .../Hasher/PlaintextPasswordHasher.php | 3 - src/Symfony/Component/Process/PhpProcess.php | 6 - .../Component/Process/Pipes/AbstractPipes.php | 3 - .../Component/Process/Pipes/UnixPipes.php | 15 -- .../Component/Process/Pipes/WindowsPipes.php | 18 -- .../PropertyAccess/PropertyAccessor.php | 12 -- .../Component/PropertyAccess/PropertyPath.php | 18 -- .../PropertyAccess/PropertyPathIterator.php | 6 - .../PropertyInfoConstructorPass.php | 3 - .../DependencyInjection/PropertyInfoPass.php | 3 - .../Extractor/ConstructorExtractor.php | 3 - .../Extractor/PhpDocExtractor.php | 12 -- .../Extractor/ReflectionExtractor.php | 24 --- .../Extractor/SerializerExtractor.php | 3 - .../PropertyInfoCacheExtractor.php | 21 --- .../PropertyInfo/PropertyInfoExtractor.php | 21 --- .../Tests/Fixtures/DummyExtractor.php | 24 --- .../Tests/Fixtures/NullExtractor.php | 21 --- .../RateLimiter/Policy/FixedWindowLimiter.php | 3 - .../RateLimiter/Policy/ResetLimiterTrait.php | 3 - .../Policy/SlidingWindowLimiter.php | 3 - .../RateLimiter/Policy/TokenBucketLimiter.php | 3 - .../Dumper/CompiledUrlGeneratorDumper.php | 3 - .../Generator/Dumper/GeneratorDumper.php | 3 - .../Routing/Generator/UrlGenerator.php | 15 -- .../Routing/Loader/AnnotationClassLoader.php | 9 - .../Loader/AnnotationDirectoryLoader.php | 3 - .../Routing/Loader/AnnotationFileLoader.php | 3 - .../Routing/Loader/ClosureLoader.php | 3 - .../Routing/Loader/ContainerLoader.php | 6 - .../Routing/Loader/DirectoryLoader.php | 6 - .../Routing/Loader/GlobFileLoader.php | 6 - .../Routing/Loader/PhpFileLoader.php | 3 - .../Routing/Loader/XmlFileLoader.php | 3 - .../Routing/Loader/YamlFileLoader.php | 3 - .../Dumper/CompiledUrlMatcherDumper.php | 3 - .../Routing/Matcher/Dumper/MatcherDumper.php | 3 - .../Matcher/ExpressionLanguageProvider.php | 3 - .../Matcher/RedirectableUrlMatcher.php | 3 - .../Component/Routing/Matcher/UrlMatcher.php | 12 -- .../Component/Routing/RouteCompiler.php | 2 - src/Symfony/Component/Routing/Router.php | 18 -- .../Tests/Fixtures/CustomRouteCompiler.php | 3 - .../Component/Runtime/GenericRuntime.php | 6 - .../Runtime/Resolver/ClosureResolver.php | 3 - .../Runtime/Resolver/DebugClosureResolver.php | 3 - .../AuthenticationTrustResolver.php | 6 - .../RememberMe/CacheTokenVerifier.php | 6 - .../RememberMe/InMemoryTokenProvider.php | 12 -- .../RememberMe/PersistentToken.php | 12 -- .../Authentication/Token/AbstractToken.php | 27 --- .../Token/PreAuthenticatedToken.php | 6 - .../Authentication/Token/RememberMeToken.php | 6 - .../Token/Storage/TokenStorage.php | 6 - .../Storage/UsageTrackingTokenStorage.php | 6 - .../Authentication/Token/SwitchUserToken.php | 6 - .../Token/UsernamePasswordToken.php | 6 - .../Authorization/AccessDecisionManager.php | 2 - .../Authorization/AuthorizationChecker.php | 3 - .../Core/Authorization/ExpressionLanguage.php | 3 - .../Strategy/AffirmativeStrategy.php | 3 - .../Strategy/PriorityStrategy.php | 3 - .../Strategy/UnanimousStrategy.php | 3 - .../TraceableAccessDecisionManager.php | 3 - .../Voter/AuthenticatedVoter.php | 3 - .../Authorization/Voter/ExpressionVoter.php | 3 - .../Voter/RoleHierarchyVoter.php | 3 - .../Core/Authorization/Voter/RoleVoter.php | 3 - .../Core/Authorization/Voter/Voter.php | 3 - .../Exception/AccountExpiredException.php | 3 - .../Core/Exception/AccountStatusException.php | 6 - ...enticationCredentialsNotFoundException.php | 3 - .../AuthenticationExpiredException.php | 3 - .../AuthenticationServiceException.php | 3 - .../Exception/BadCredentialsException.php | 3 - .../Core/Exception/CookieTheftException.php | 3 - .../Exception/CredentialsExpiredException.php | 3 - ...ustomUserMessageAccountStatusException.php | 6 - ...stomUserMessageAuthenticationException.php | 6 - .../Core/Exception/DisabledException.php | 3 - .../InsufficientAuthenticationException.php | 3 - .../Exception/InvalidCsrfTokenException.php | 3 - .../Core/Exception/LockedException.php | 3 - .../Exception/ProviderNotFoundException.php | 3 - .../Exception/SessionUnavailableException.php | 3 - .../Core/Exception/TokenNotFoundException.php | 3 - ...nyLoginAttemptsAuthenticationException.php | 12 -- .../Core/Exception/UserNotFoundException.php | 12 -- .../Security/Core/Role/RoleHierarchy.php | 3 - .../Security/Core/User/ChainUserProvider.php | 9 - .../Security/Core/User/InMemoryUser.php | 12 -- .../Core/User/InMemoryUserProvider.php | 6 - .../Core/User/MissingUserProvider.php | 9 - .../Validator/Constraints/UserPassword.php | 3 - .../Constraints/UserPasswordValidator.php | 3 - .../Security/Csrf/CsrfTokenManager.php | 12 -- .../TokenGenerator/UriSafeTokenGenerator.php | 3 - .../NativeSessionTokenStorage.php | 15 -- .../Csrf/TokenStorage/SessionTokenStorage.php | 15 -- .../Component/Security/Http/AccessMap.php | 3 - .../CustomAuthenticationFailureHandler.php | 3 - .../CustomAuthenticationSuccessHandler.php | 3 - .../DefaultAuthenticationFailureHandler.php | 3 - .../DefaultAuthenticationSuccessHandler.php | 3 - .../AbstractLoginFormAuthenticator.php | 2 - .../Token/PostAuthenticationToken.php | 8 - .../Security/Http/Event/LazyResponseEvent.php | 15 -- .../Component/Security/Http/Firewall.php | 3 - .../Security/Http/Firewall/AccessListener.php | 3 - .../Http/Firewall/ContextListener.php | 3 - .../Security/Http/Firewall/LogoutListener.php | 3 - .../Http/Firewall/SwitchUserListener.php | 3 - .../Component/Security/Http/FirewallMap.php | 3 - ...nvalidLoginLinkAuthenticationException.php | 3 - .../RememberMe/AbstractRememberMeHandler.php | 6 - .../PersistentRememberMeHandler.php | 9 - .../Http/RememberMe/ResponseListener.php | 3 - .../RememberMe/SignatureRememberMeHandler.php | 6 - .../Session/SessionAuthenticationStrategy.php | 3 - src/Symfony/Component/Semaphore/Semaphore.php | 18 -- .../Component/Semaphore/Store/RedisStore.php | 12 -- .../Tests/Store/AbstractRedisStoreTest.php | 3 - .../CompiledClassMetadataCacheWarmer.php | 6 - .../DataCollector/SerializerDataCollector.php | 9 - .../Serializer/Debug/TraceableEncoder.php | 15 -- .../Serializer/Debug/TraceableNormalizer.php | 24 --- .../Serializer/Debug/TraceableSerializer.php | 30 --- .../Serializer/Encoder/ChainDecoder.php | 6 - .../Serializer/Encoder/ChainEncoder.php | 6 - .../Encoder/ContextAwareDecoderInterface.php | 2 - .../Encoder/ContextAwareEncoderInterface.php | 2 - .../Serializer/Encoder/CsvEncoder.php | 10 - .../Serializer/Encoder/JsonDecode.php | 2 - .../Serializer/Encoder/JsonEncode.php | 5 - .../Serializer/Encoder/JsonEncoder.php | 10 - .../Serializer/Encoder/XmlEncoder.php | 10 - .../Serializer/Encoder/YamlEncoder.php | 10 - .../Extractor/ObjectPropertyListExtractor.php | 3 - .../Serializer/Mapping/AttributeMetadata.php | 50 ----- .../ClassDiscriminatorFromClassMetadata.php | 9 - .../Serializer/Mapping/ClassMetadata.php | 23 --- .../Factory/CacheClassMetadataFactory.php | 6 - .../Mapping/Factory/ClassMetadataFactory.php | 6 - .../Factory/CompiledClassMetadataFactory.php | 6 - .../Mapping/Loader/AnnotationLoader.php | 3 - .../Serializer/Mapping/Loader/LoaderChain.php | 3 - .../Mapping/Loader/XmlFileLoader.php | 3 - .../Mapping/Loader/YamlFileLoader.php | 3 - .../AdvancedNameConverterInterface.php | 6 - .../CamelCaseToSnakeCaseNameConverter.php | 6 - .../MetadataAwareNameConverter.php | 6 - .../Normalizer/AbstractNormalizer.php | 3 - .../Normalizer/AbstractObjectNormalizer.php | 15 -- .../Normalizer/ArrayDenormalizer.php | 8 - .../Normalizer/BackedEnumNormalizer.php | 14 -- .../ConstraintViolationListNormalizer.php | 8 - .../ContextAwareDenormalizerInterface.php | 2 - .../ContextAwareNormalizerInterface.php | 2 - .../Normalizer/CustomNormalizer.php | 9 - .../Normalizer/DataUriNormalizer.php | 12 -- .../Normalizer/DateIntervalNormalizer.php | 11 -- .../Normalizer/DateTimeNormalizer.php | 11 -- .../Normalizer/DateTimeZoneNormalizer.php | 11 -- .../Normalizer/FormErrorNormalizer.php | 9 - .../Normalizer/GetSetMethodNormalizer.php | 16 -- .../Normalizer/JsonSerializableNormalizer.php | 13 -- .../Normalizer/MimeMessageNormalizer.php | 15 -- .../Normalizer/ObjectNormalizer.php | 15 -- .../Normalizer/ProblemNormalizer.php | 8 - .../Normalizer/PropertyNormalizer.php | 19 -- .../Serializer/Normalizer/UidNormalizer.php | 14 -- .../Normalizer/UnwrappingDenormalizer.php | 9 - .../Component/Serializer/Serializer.php | 29 --- .../Fixtures/AbstractNormalizerDummy.php | 15 -- .../Fixtures/StaticConstructorNormalizer.php | 3 - .../AbstractObjectNormalizerTest.php | 8 - .../Tests/Normalizer/TestDenormalizer.php | 6 - .../Tests/Normalizer/TestNormalizer.php | 6 - .../String/Inflector/EnglishInflector.php | 6 - .../String/Inflector/FrenchInflector.php | 6 - .../Component/String/Slugger/AsciiSlugger.php | 9 - .../Component/Templating/DelegatingEngine.php | 12 -- .../Templating/Loader/CacheLoader.php | 6 - .../Templating/Loader/ChainLoader.php | 6 - .../Templating/Loader/FilesystemLoader.php | 6 - .../Component/Templating/PhpEngine.php | 8 - .../Templating/TemplateNameParser.php | 3 - .../Templating/TemplateReference.php | 15 -- .../Bridge/Crowdin/CrowdinProvider.php | 3 - .../Bridge/Lokalise/LokaliseProvider.php | 2 - .../Catalogue/AbstractOperation.php | 15 -- .../Translation/Catalogue/MergeOperation.php | 3 - .../Translation/Catalogue/TargetOperation.php | 3 - .../Command/TranslationPullCommand.php | 6 - .../Command/TranslationPushCommand.php | 6 - .../Translation/Command/XliffLintCommand.php | 3 - .../TranslationDataCollector.php | 12 -- .../Translation/DataCollectorTranslator.php | 17 -- .../Translation/Dumper/CsvFileDumper.php | 6 - .../Translation/Dumper/FileDumper.php | 3 - .../Translation/Dumper/IcuResFileDumper.php | 9 - .../Translation/Dumper/IniFileDumper.php | 6 - .../Translation/Dumper/JsonFileDumper.php | 6 - .../Translation/Dumper/MoFileDumper.php | 6 - .../Translation/Dumper/PhpFileDumper.php | 6 - .../Translation/Dumper/PoFileDumper.php | 6 - .../Translation/Dumper/QtFileDumper.php | 6 - .../Translation/Dumper/XliffFileDumper.php | 6 - .../Translation/Dumper/YamlFileDumper.php | 6 - .../Translation/Extractor/ChainExtractor.php | 6 - .../Translation/Extractor/PhpExtractor.php | 9 - .../Translation/Formatter/IntlFormatter.php | 3 - .../Formatter/MessageFormatter.php | 6 - .../Translation/Loader/ArrayLoader.php | 3 - .../Translation/Loader/CsvFileLoader.php | 3 - .../Translation/Loader/FileLoader.php | 3 - .../Translation/Loader/IcuDatFileLoader.php | 3 - .../Translation/Loader/IcuResFileLoader.php | 3 - .../Translation/Loader/IniFileLoader.php | 3 - .../Translation/Loader/JsonFileLoader.php | 3 - .../Translation/Loader/MoFileLoader.php | 2 - .../Translation/Loader/PhpFileLoader.php | 3 - .../Translation/Loader/PoFileLoader.php | 2 - .../Translation/Loader/QtFileLoader.php | 3 - .../Translation/Loader/XliffFileLoader.php | 3 - .../Translation/Loader/YamlFileLoader.php | 3 - .../Translation/LoggingTranslator.php | 15 -- .../Translation/MessageCatalogue.php | 60 ------ .../Provider/FilteringProvider.php | 3 - .../PseudoLocalizationTranslator.php | 3 - .../Translation/Reader/TranslationReader.php | 3 - .../Component/Translation/Translator.php | 15 -- .../Component/Translation/TranslatorBag.php | 6 - .../Uid/Command/GenerateUlidCommand.php | 6 - .../Uid/Command/GenerateUuidCommand.php | 6 - .../Uid/Command/InspectUlidCommand.php | 6 - .../Uid/Command/InspectUuidCommand.php | 6 - src/Symfony/Component/Uid/Ulid.php | 3 - .../Validator/ConstraintValidator.php | 3 - .../Validator/ConstraintValidatorFactory.php | 3 - .../Validator/ConstraintViolation.php | 27 --- .../Validator/ConstraintViolationList.php | 23 --- .../Constraints/AbstractComparison.php | 3 - .../AbstractComparisonValidator.php | 3 - .../Validator/Constraints/AllValidator.php | 3 - .../Constraints/AtLeastOneOfValidator.php | 3 - .../Component/Validator/Constraints/Bic.php | 3 - .../Validator/Constraints/BicValidator.php | 3 - .../Validator/Constraints/BlankValidator.php | 3 - .../Validator/Constraints/Callback.php | 6 - .../Constraints/CallbackValidator.php | 3 - .../Validator/Constraints/Cascade.php | 3 - .../Validator/Constraints/Choice.php | 3 - .../Validator/Constraints/ChoiceValidator.php | 3 - .../Validator/Constraints/Collection.php | 6 - .../Constraints/CollectionValidator.php | 3 - .../Validator/Constraints/Composite.php | 4 - .../Validator/Constraints/CountValidator.php | 3 - .../Constraints/CountryValidator.php | 3 - .../Constraints/CssColorValidator.php | 3 - .../Constraints/CurrencyValidator.php | 3 - .../Constraints/DateTimeValidator.php | 3 - .../Validator/Constraints/DateValidator.php | 3 - .../Constraints/DisableAutoMapping.php | 3 - .../Constraints/DivisibleByValidator.php | 6 - .../Validator/Constraints/EmailValidator.php | 3 - .../Constraints/EnableAutoMapping.php | 3 - .../Constraints/EqualToValidator.php | 6 - .../Validator/Constraints/Expression.php | 12 -- .../Constraints/ExpressionLanguageSyntax.php | 3 - .../ExpressionLanguageSyntaxValidator.php | 3 - .../Constraints/ExpressionSyntax.php | 3 - .../Constraints/ExpressionSyntaxValidator.php | 3 - .../Constraints/ExpressionValidator.php | 3 - .../Validator/Constraints/FileValidator.php | 3 - .../GreaterThanOrEqualValidator.php | 6 - .../Constraints/GreaterThanValidator.php | 6 - .../Validator/Constraints/IbanValidator.php | 3 - .../Constraints/IdenticalToValidator.php | 6 - .../Component/Validator/Constraints/Image.php | 3 - .../Validator/Constraints/ImageValidator.php | 3 - .../Component/Validator/Constraints/Ip.php | 3 - .../Validator/Constraints/IpValidator.php | 3 - .../Constraints/IsFalseValidator.php | 3 - .../Validator/Constraints/IsNullValidator.php | 3 - .../Validator/Constraints/IsTrueValidator.php | 3 - .../Component/Validator/Constraints/Isbn.php | 3 - .../Validator/Constraints/IsbnValidator.php | 3 - .../Validator/Constraints/IsinValidator.php | 3 - .../Validator/Constraints/IssnValidator.php | 3 - .../Validator/Constraints/JsonValidator.php | 3 - .../Constraints/LanguageValidator.php | 3 - .../Validator/Constraints/LengthValidator.php | 3 - .../Constraints/LessThanOrEqualValidator.php | 6 - .../Constraints/LessThanValidator.php | 6 - .../Validator/Constraints/LocaleValidator.php | 3 - .../Validator/Constraints/LuhnValidator.php | 3 - .../Constraints/NotBlankValidator.php | 3 - .../NotCompromisedPasswordValidator.php | 2 - .../Constraints/NotEqualToValidator.php | 6 - .../Constraints/NotIdenticalToValidator.php | 6 - .../Constraints/NotNullValidator.php | 3 - .../Validator/Constraints/RangeValidator.php | 3 - .../Component/Validator/Constraints/Regex.php | 6 - .../Validator/Constraints/RegexValidator.php | 3 - .../Constraints/SequentiallyValidator.php | 3 - .../Validator/Constraints/TimeValidator.php | 3 - .../Validator/Constraints/Timezone.php | 3 - .../Constraints/TimezoneValidator.php | 3 - .../Validator/Constraints/Traverse.php | 6 - .../Component/Validator/Constraints/Type.php | 6 - .../Validator/Constraints/TypeValidator.php | 3 - .../Validator/Constraints/UlidValidator.php | 3 - .../Validator/Constraints/Unique.php | 2 - .../Validator/Constraints/UniqueValidator.php | 3 - .../Validator/Constraints/UrlValidator.php | 3 - .../Component/Validator/Constraints/Uuid.php | 2 - .../Validator/Constraints/UuidValidator.php | 3 - .../Component/Validator/Constraints/Valid.php | 3 - .../ContainerConstraintValidatorFactory.php | 2 - .../Validator/Context/ExecutionContext.php | 63 ------- .../Context/ExecutionContextFactory.php | 3 - .../DataCollector/ValidatorDataCollector.php | 9 - .../AddAutoMappingConfigurationPass.php | 3 - .../Validator/Mapping/ClassMetadata.php | 29 --- .../Factory/BlackHoleMetadataFactory.php | 6 - .../Factory/LazyLoadingMetadataFactory.php | 5 - .../Validator/Mapping/GenericMetadata.php | 11 -- .../Validator/Mapping/GetterMetadata.php | 6 - .../Mapping/Loader/AnnotationLoader.php | 3 - .../Validator/Mapping/Loader/LoaderChain.php | 3 - .../Mapping/Loader/PropertyInfoLoader.php | 3 - .../Mapping/Loader/StaticMethodLoader.php | 3 - .../Mapping/Loader/XmlFileLoader.php | 3 - .../Mapping/Loader/XmlFilesLoader.php | 3 - .../Mapping/Loader/YamlFileLoader.php | 3 - .../Mapping/Loader/YamlFilesLoader.php | 3 - .../Validator/Mapping/MemberMetadata.php | 12 -- .../Validator/Mapping/PropertyMetadata.php | 6 - .../Constraints/DivisibleByValidatorTest.php | 9 - .../Constraints/EqualToValidatorTest.php | 9 - .../GreaterThanOrEqualValidatorTest.php | 9 - ...idatorWithPositiveOrZeroConstraintTest.php | 6 - .../Constraints/GreaterThanValidatorTest.php | 9 - ...hanValidatorWithPositiveConstraintTest.php | 6 - .../Constraints/IdenticalToValidatorTest.php | 9 - .../LessThanOrEqualValidatorTest.php | 9 - ...idatorWithNegativeOrZeroConstraintTest.php | 6 - .../Constraints/LessThanValidatorTest.php | 9 - ...hanValidatorWithNegativeConstraintTest.php | 6 - .../Constraints/NotEqualToValidatorTest.php | 9 - .../NotIdenticalToValidatorTest.php | 9 - .../Validator/RecursiveValidatorTest.php | 3 - .../RecursiveContextualValidator.php | 15 -- .../Validator/RecursiveValidator.php | 21 --- .../Validator/TraceableValidator.php | 21 --- .../Violation/ConstraintViolationBuilder.php | 27 --- .../Component/VarDumper/Cloner/VarCloner.php | 3 - .../Component/VarDumper/Dumper/CliDumper.php | 18 -- .../Component/VarDumper/Dumper/HtmlDumper.php | 24 --- .../VarDumper/Dumper/ServerDumper.php | 3 - .../EventListener/AddLinkHeaderListener.php | 3 - .../Component/WebLink/GenericLinkProvider.php | 12 -- src/Symfony/Component/WebLink/Link.php | 27 --- .../Workflow/Dumper/GraphvizDumper.php | 2 - .../Dumper/StateMachineGraphvizDumper.php | 2 - .../Component/Workflow/Event/GuardEvent.php | 3 - .../MarkingStore/MethodMarkingStore.php | 6 - .../InstanceOfSupportStrategy.php | 3 - src/Symfony/Component/Workflow/Workflow.php | 27 --- .../Component/Yaml/Command/LintCommand.php | 3 - src/Symfony/Contracts/Cache/CacheTrait.php | 6 - .../Contracts/EventDispatcher/Event.php | 3 - .../Contracts/Service/ServiceLocatorTrait.php | 9 - .../Service/ServiceProviderInterface.php | 5 - .../Service/ServiceSubscriberTrait.php | 3 - .../Contracts/Translation/TranslatorTrait.php | 9 - 1090 files changed, 1 insertion(+), 8714 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 2bc2c558d7b9b..96b7d3020063c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -31,6 +31,7 @@ 'protected_to_private' => false, 'native_constant_invocation' => ['strict' => false], 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false], + 'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true], 'header_comment' => ['header' => $fileHeaderComment], 'modernize_strpos' => true, ]) diff --git a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php index 77649065f6f0b..5794d9814215d 100644 --- a/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php +++ b/src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php @@ -38,9 +38,6 @@ public function __construct( ) { } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { $options = $this->getMapEntityAttribute($argument); diff --git a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php index 91cc25026a8b6..fe371c3ebe47f 100644 --- a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php +++ b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php @@ -40,8 +40,6 @@ public function isOptional(): bool } /** - * {@inheritdoc} - * * @return string[] A list of files to preload on PHP 7.4+ */ public function warmUp(string $cacheDir): array diff --git a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php index d262c5e3591e4..6d4a4fa0c8324 100644 --- a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php +++ b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php @@ -44,9 +44,6 @@ public function __construct(ContainerInterface $container, array $subscriberIds $this->subscribers = $subscriberIds; } - /** - * {@inheritdoc} - */ public function dispatchEvent($eventName, EventArgs $eventArgs = null): void { if (!$this->initializedSubscribers) { @@ -68,8 +65,6 @@ public function dispatchEvent($eventName, EventArgs $eventArgs = null): void } /** - * {@inheritdoc} - * * @return object[][] */ public function getListeners($event = null): array @@ -94,9 +89,6 @@ public function getListeners($event = null): array return $this->listeners; } - /** - * {@inheritdoc} - */ public function hasListeners($event): bool { if (!$this->initializedSubscribers) { @@ -106,9 +98,6 @@ public function hasListeners($event): bool return isset($this->listeners[$event]) && $this->listeners[$event]; } - /** - * {@inheritdoc} - */ public function addEventListener($events, $listener): void { if (!$this->initializedSubscribers) { @@ -130,9 +119,6 @@ public function addEventListener($events, $listener): void } } - /** - * {@inheritdoc} - */ public function removeEventListener($events, $listener): void { if (!$this->initializedSubscribers) { diff --git a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php index c5318414dbf68..6cc881dc92091 100644 --- a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php +++ b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php @@ -53,9 +53,6 @@ public function addLogger(string $name, DebugStack $logger) $this->loggers[$name] = $logger; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->data = [ @@ -132,17 +129,11 @@ public function getTime() return $time; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'db'; } - /** - * {@inheritdoc} - */ protected function getCasters(): array { return parent::getCasters() + [ diff --git a/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php b/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php index 98acccda50ba9..95dc8825ed213 100644 --- a/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php +++ b/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php @@ -32,9 +32,6 @@ public function __construct(ContainerInterface $container) $this->container = $container; } - /** - * {@inheritdoc} - */ public function addFixture(FixtureInterface $fixture) { if ($fixture instanceof ContainerAwareInterface) { diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php index 92985d89ca4ca..aa76d7d2da8e5 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php @@ -28,9 +28,6 @@ public function __construct(string $managerType) $this->managerType = $managerType; } - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $this->updateValidatorMappingFiles($container, 'xml', 'xml'); diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php index 74a3d3200f05b..30d0fb37ced80 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php @@ -53,9 +53,6 @@ public function __construct(string $connectionsParameter, string $managerTemplat $this->tagPrefix = $tagPrefix; } - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasParameter($this->connectionsParameter)) { diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterUidTypePass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterUidTypePass.php index 95a74533ba0f5..1ea0470bf8d0b 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterUidTypePass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterUidTypePass.php @@ -19,9 +19,6 @@ final class RegisterUidTypePass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!class_exists(AbstractUid::class)) { diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php index e191bea3ca16d..30ea98880887d 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php @@ -50,9 +50,6 @@ public function __construct(ObjectManager $manager, string $class, IdReader $idR $this->objectLoader = $objectLoader; } - /** - * {@inheritdoc} - */ protected function loadChoices(): iterable { return $this->objectLoader diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php index 3364ffa4c4edb..7381a6a992679 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php @@ -38,17 +38,11 @@ public function __construct(QueryBuilder $queryBuilder) $this->queryBuilder = $queryBuilder; } - /** - * {@inheritdoc} - */ public function getEntities(): array { return $this->queryBuilder->getQuery()->execute(); } - /** - * {@inheritdoc} - */ public function getEntitiesByIds(string $identifier, array $values): array { if (null !== $this->queryBuilder->getMaxResults() || 0 < (int) $this->queryBuilder->getFirstResult()) { diff --git a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php index f2e65a7f0a8c0..1847e50eeef28 100644 --- a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php +++ b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php @@ -44,9 +44,6 @@ public function __construct(ManagerRegistry $registry) $this->registry = $registry; } - /** - * {@inheritdoc} - */ public function guessType(string $class, string $property): ?TypeGuess { if (!$ret = $this->getMetadata($class)) { @@ -87,9 +84,6 @@ public function guessType(string $class, string $property): ?TypeGuess }; } - /** - * {@inheritdoc} - */ public function guessRequired(string $class, string $property): ?ValueGuess { $classMetadatas = $this->getMetadata($class); @@ -127,9 +121,6 @@ public function guessRequired(string $class, string $property): ?ValueGuess return null; } - /** - * {@inheritdoc} - */ public function guessMaxLength(string $class, string $property): ?ValueGuess { $ret = $this->getMetadata($class); @@ -148,9 +139,6 @@ public function guessMaxLength(string $class, string $property): ?ValueGuess return null; } - /** - * {@inheritdoc} - */ public function guessPattern(string $class, string $property): ?ValueGuess { $ret = $this->getMetadata($class); diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php index d50ca5c339b95..fb45f99ac2657 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php @@ -57,9 +57,6 @@ public function getLoader(ObjectManager $manager, object $queryBuilder, string $ return new ORMQueryBuilderLoader($queryBuilder); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'entity'; diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php index b4cc571bb56fc..f715e782e3af7 100644 --- a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php +++ b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php @@ -32,9 +32,6 @@ public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch $this->stopwatch = $stopwatch; } - /** - * {@inheritdoc} - */ public function startQuery($sql, array $params = null, array $types = null): void { $this->stopwatch?->start('doctrine', 'doctrine'); @@ -44,9 +41,6 @@ public function startQuery($sql, array $params = null, array $types = null): voi } } - /** - * {@inheritdoc} - */ public function stopQuery(): void { $this->stopwatch?->stop('doctrine'); diff --git a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php index 97f96c1c9a683..52050c3a56d36 100644 --- a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php +++ b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php @@ -29,17 +29,11 @@ abstract class ManagerRegistry extends AbstractManagerRegistry */ protected $container; - /** - * {@inheritdoc} - */ protected function getService($name): object { return $this->container->get($name); } - /** - * {@inheritdoc} - */ protected function resetService($name): void { if (!$this->container->initialized($name)) { diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index 4f9c97186450c..75682577ed2fc 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -38,9 +38,6 @@ public function __construct(EntityManagerInterface $entityManager) $this->entityManager = $entityManager; } - /** - * {@inheritdoc} - */ public function getProperties(string $class, array $context = []): ?array { if (null === $metadata = $this->getMetadata($class)) { @@ -60,9 +57,6 @@ public function getProperties(string $class, array $context = []): ?array return $properties; } - /** - * {@inheritdoc} - */ public function getTypes(string $class, string $property, array $context = []): ?array { if (null === $metadata = $this->getMetadata($class)) { @@ -197,17 +191,11 @@ public function getTypes(string $class, string $property, array $context = []): return null; } - /** - * {@inheritdoc} - */ public function isReadable(string $class, string $property, array $context = []): ?bool { return null; } - /** - * {@inheritdoc} - */ public function isWritable(string $class, string $property, array $context = []): ?bool { if ( diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index 8880bea9fbdac..60f883a0e465f 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -50,9 +50,6 @@ public function __construct(Connection $conn) $this->conn = $conn; } - /** - * {@inheritdoc} - */ public function loadTokenBySeries(string $series): PersistentTokenInterface { // the alias for lastUsed works around case insensitivity in PostgreSQL @@ -69,9 +66,6 @@ public function loadTokenBySeries(string $series): PersistentTokenInterface throw new TokenNotFoundException('No token found.'); } - /** - * {@inheritdoc} - */ public function deleteTokenBySeries(string $series) { $sql = 'DELETE FROM rememberme_token WHERE series=:series'; @@ -84,9 +78,6 @@ public function deleteTokenBySeries(string $series) } } - /** - * {@inheritdoc} - */ public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTime $lastUsed) { $sql = 'UPDATE rememberme_token SET value=:value, lastUsed=:lastUsed WHERE series=:series'; @@ -110,9 +101,6 @@ public function updateToken(string $series, #[\SensitiveParameter] string $token } } - /** - * {@inheritdoc} - */ public function createNewToken(PersistentTokenInterface $token) { $sql = 'INSERT INTO rememberme_token (class, username, series, value, lastUsed) VALUES (:class, :username, :series, :value, :lastUsed)'; @@ -137,9 +125,6 @@ public function createNewToken(PersistentTokenInterface $token) } } - /** - * {@inheritdoc} - */ public function verifyToken(PersistentTokenInterface $token, #[\SensitiveParameter] string $tokenValue): bool { // Check if the token value matches the current persisted token @@ -174,9 +159,6 @@ public function verifyToken(PersistentTokenInterface $token, #[\SensitiveParamet return hash_equals($tmpToken->getTokenValue(), $tokenValue); } - /** - * {@inheritdoc} - */ public function updateExistingToken(PersistentTokenInterface $token, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed): void { if (!$token instanceof PersistentToken) { diff --git a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php index f7baf6ba69b9d..4c7d14f6894e1 100644 --- a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php @@ -69,9 +69,6 @@ public function loadUserByIdentifier(string $identifier): UserInterface return $user; } - /** - * {@inheritdoc} - */ public function refreshUser(UserInterface $user): UserInterface { $class = $this->getClass(); @@ -103,17 +100,12 @@ public function refreshUser(UserInterface $user): UserInterface return $refreshedUser; } - /** - * {@inheritdoc} - */ public function supportsClass(string $class): bool { return $class === $this->getClass() || is_subclass_of($class, $this->getClass()); } /** - * {@inheritdoc} - * * @final */ public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapperType.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapperType.php index 217f90374b276..89edafa67bc39 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapperType.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapperType.php @@ -16,25 +16,16 @@ class StringWrapperType extends StringType { - /** - * {@inheritdoc} - */ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed { return $value instanceof StringWrapper ? $value->getString() : null; } - /** - * {@inheritdoc} - */ public function convertToPHPValue($value, AbstractPlatform $platform): mixed { return new StringWrapper($value); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'string_wrapper'; diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php index 312e6c51b69bf..bebe51dbc711d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php @@ -22,25 +22,16 @@ class DoctrineFooType extends Type { private const NAME = 'foo'; - /** - * {@inheritdoc} - */ public function getName(): string { return self::NAME; } - /** - * {@inheritdoc} - */ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string { return $platform->getClobTypeDeclarationSQL([]); } - /** - * {@inheritdoc} - */ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed { if (null === $value) { @@ -53,9 +44,6 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe return $foo->bar; } - /** - * {@inheritdoc} - */ public function convertToPHPValue($value, AbstractPlatform $platform): mixed { if (null === $value) { @@ -71,9 +59,6 @@ public function convertToPHPValue($value, AbstractPlatform $platform): mixed return $foo; } - /** - * {@inheritdoc} - */ public function requiresSQLCommentHint(AbstractPlatform $platform): bool { return true; diff --git a/src/Symfony/Bridge/Doctrine/Tests/TestRepositoryFactory.php b/src/Symfony/Bridge/Doctrine/Tests/TestRepositoryFactory.php index 7b739a988a4e2..04021b7fd2ea0 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/TestRepositoryFactory.php +++ b/src/Symfony/Bridge/Doctrine/Tests/TestRepositoryFactory.php @@ -25,9 +25,6 @@ final class TestRepositoryFactory implements RepositoryFactory */ private array $repositoryList = []; - /** - * {@inheritdoc} - */ public function getRepository(EntityManagerInterface $entityManager, $entityName): ObjectRepository { $repositoryHash = $this->getRepositoryHash($entityManager, $entityName); diff --git a/src/Symfony/Bridge/Doctrine/Types/AbstractUidType.php b/src/Symfony/Bridge/Doctrine/Types/AbstractUidType.php index 48f69eee850a6..6d7aac1487704 100644 --- a/src/Symfony/Bridge/Doctrine/Types/AbstractUidType.php +++ b/src/Symfony/Bridge/Doctrine/Types/AbstractUidType.php @@ -23,9 +23,6 @@ abstract class AbstractUidType extends Type */ abstract protected function getUidClass(): string; - /** - * {@inheritdoc} - */ public function getSQLDeclaration(array $column, AbstractPlatform $platform): string { if ($this->hasNativeGuidType($platform)) { @@ -39,8 +36,6 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st } /** - * {@inheritdoc} - * * @throws ConversionException */ public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?AbstractUid @@ -61,8 +56,6 @@ public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?Ab } /** - * {@inheritdoc} - * * @throws ConversionException */ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string @@ -88,9 +81,6 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str } } - /** - * {@inheritdoc} - */ public function requiresSQLCommentHint(AbstractPlatform $platform): bool { return true; diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php index 7d65c898ccb47..5e9048808023d 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php @@ -45,8 +45,6 @@ class UniqueEntity extends Constraint protected static $errorNames = self::ERROR_NAMES; /** - * {@inheritdoc} - * * @param array|string $fields the combination of fields that must contain unique values or a set of options */ public function __construct( @@ -92,9 +90,6 @@ public function validatedBy(): string return $this->service; } - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return self::CLASS_CONSTRAINT; diff --git a/src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php b/src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php index 45758d74b8685..d0e976c2c8853 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php +++ b/src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php @@ -42,9 +42,6 @@ public function __construct(EntityManagerInterface $entityManager, string $class $this->classValidatorRegexp = $classValidatorRegexp; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadata $metadata): bool { $className = $metadata->getClassName(); diff --git a/src/Symfony/Bridge/Monolog/Formatter/CompatibilityFormatter.php b/src/Symfony/Bridge/Monolog/Formatter/CompatibilityFormatter.php index 08cd70983b3ba..aa374445b08c2 100644 --- a/src/Symfony/Bridge/Monolog/Formatter/CompatibilityFormatter.php +++ b/src/Symfony/Bridge/Monolog/Formatter/CompatibilityFormatter.php @@ -26,9 +26,6 @@ trait CompatibilityFormatter { abstract private function doFormat(array|LogRecord $record): mixed; - /** - * {@inheritdoc} - */ public function format(LogRecord $record): mixed { return $this->doFormat($record); @@ -46,9 +43,6 @@ trait CompatibilityFormatter { abstract private function doFormat(array|LogRecord $record): mixed; - /** - * {@inheritdoc} - */ public function format(array $record): mixed { return $this->doFormat($record); diff --git a/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php b/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php index b8ed640e9c4aa..31f2197b75afb 100644 --- a/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php +++ b/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php @@ -91,9 +91,6 @@ public function __construct(array $options = []) } } - /** - * {@inheritdoc} - */ public function formatBatch(array $records): mixed { foreach ($records as $key => $record) { diff --git a/src/Symfony/Bridge/Monolog/Formatter/VarDumperFormatter.php b/src/Symfony/Bridge/Monolog/Formatter/VarDumperFormatter.php index 92cf6c3e887b4..14b7da442b605 100644 --- a/src/Symfony/Bridge/Monolog/Formatter/VarDumperFormatter.php +++ b/src/Symfony/Bridge/Monolog/Formatter/VarDumperFormatter.php @@ -43,9 +43,6 @@ private function doFormat(array|LogRecord $record): mixed return $record; } - /** - * {@inheritdoc} - */ public function formatBatch(array $records): mixed { foreach ($records as $k => $record) { diff --git a/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php b/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php index 1fa698a9390b6..c84db4d897df8 100644 --- a/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php @@ -50,9 +50,6 @@ public function onKernelResponse(ResponseEvent $event) $this->headers = []; } - /** - * {@inheritdoc} - */ protected function sendHeader($header, $content): void { if (!self::$sendHeaders) { diff --git a/src/Symfony/Bridge/Monolog/Handler/CompatibilityHandler.php b/src/Symfony/Bridge/Monolog/Handler/CompatibilityHandler.php index dbeb59e4feb3b..051698f06515c 100644 --- a/src/Symfony/Bridge/Monolog/Handler/CompatibilityHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/CompatibilityHandler.php @@ -26,9 +26,6 @@ trait CompatibilityHandler { abstract private function doHandle(array|LogRecord $record): bool; - /** - * {@inheritdoc} - */ public function handle(LogRecord $record): bool { return $this->doHandle($record); @@ -46,9 +43,6 @@ trait CompatibilityHandler { abstract private function doHandle(array|LogRecord $record): bool; - /** - * {@inheritdoc} - */ public function handle(array $record): bool { return $this->doHandle($record); diff --git a/src/Symfony/Bridge/Monolog/Handler/CompatibilityProcessingHandler.php b/src/Symfony/Bridge/Monolog/Handler/CompatibilityProcessingHandler.php index c84c457859d52..e15a00286da83 100644 --- a/src/Symfony/Bridge/Monolog/Handler/CompatibilityProcessingHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/CompatibilityProcessingHandler.php @@ -26,9 +26,6 @@ trait CompatibilityProcessingHandler { abstract private function doWrite(array|LogRecord $record): void; - /** - * {@inheritdoc} - */ protected function write(LogRecord $record): void { $this->doWrite($record); @@ -46,9 +43,6 @@ trait CompatibilityProcessingHandler { abstract private function doWrite(array|LogRecord $record): void; - /** - * {@inheritdoc} - */ protected function write(array $record): void { $this->doWrite($record); diff --git a/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php b/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php index 88936ff2bfbd8..c3426bb51cb0f 100644 --- a/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php @@ -37,9 +37,6 @@ trait CompatibilityIsHandlingHandler { abstract private function doIsHandling(array|LogRecord $record): bool; - /** - * {@inheritdoc} - */ public function isHandling(LogRecord $record): bool { return $this->doIsHandling($record); @@ -57,9 +54,6 @@ trait CompatibilityIsHandlingHandler { abstract private function doIsHandling(array|LogRecord $record): bool; - /** - * {@inheritdoc} - */ public function isHandling(array $record): bool { return $this->doIsHandling($record); @@ -121,17 +115,11 @@ public function __construct(OutputInterface $output = null, bool $bubble = true, $this->consoleFormatterOptions = $consoleFormatterOptions; } - /** - * {@inheritdoc} - */ private function doIsHandling(array|LogRecord $record): bool { return $this->updateLevel() && parent::isHandling($record); } - /** - * {@inheritdoc} - */ private function doHandle(array|LogRecord $record): bool { // we have to update the logging level each time because the verbosity of the @@ -179,9 +167,6 @@ public function onTerminate(ConsoleTerminateEvent $event) $this->close(); } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ @@ -196,9 +181,6 @@ private function doWrite(array|LogRecord $record): void $this->output->write((string) $record['formatted'], false, $this->output->getVerbosity()); } - /** - * {@inheritdoc} - */ protected function getDefaultFormatter(): FormatterInterface { if (!class_exists(CliDumper::class)) { diff --git a/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php b/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php index d60b02a287558..3627f50551493 100644 --- a/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php @@ -52,9 +52,6 @@ public function onKernelResponse(ResponseEvent $event) $this->headers = []; } - /** - * {@inheritdoc} - */ protected function sendHeader($header, $content): void { if (!self::$sendHeaders) { diff --git a/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php b/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php index b75accae76a84..459b1fa5a6239 100644 --- a/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php @@ -41,9 +41,6 @@ public function __construct(MailerInterface $mailer, callable|Email $messageTemp $this->messageTemplate = $messageTemplate instanceof Email ? $messageTemplate : $messageTemplate(...); } - /** - * {@inheritdoc} - */ public function handleBatch(array $records): void { $messages = []; @@ -70,9 +67,6 @@ public function handleBatch(array $records): void } } - /** - * {@inheritdoc} - */ private function doWrite(array|LogRecord $record): void { $this->send((string) $record['formatted'], [$record]); diff --git a/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php b/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php index 3b2319fb5812a..4ba90f7efbea3 100644 --- a/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php @@ -29,9 +29,6 @@ class ServerLogHandler extends AbstractProcessingHandler use CompatibilityProcessingHandler; use ServerLogHandlerTrait; - /** - * {@inheritdoc} - */ protected function getDefaultFormatter(): FormatterInterface { return new VarDumperFormatter(); @@ -47,9 +44,6 @@ class ServerLogHandler extends AbstractProcessingHandler use CompatibilityProcessingHandler; use ServerLogHandlerTrait; - /** - * {@inheritdoc} - */ protected function getDefaultFormatter() { return new VarDumperFormatter(); @@ -127,9 +121,6 @@ private function doWrite(array|LogRecord $record): void } } - /** - * {@inheritdoc} - */ protected function getDefaultFormatter(): FormatterInterface { return new VarDumperFormatter(); diff --git a/src/Symfony/Bridge/Monolog/Logger.php b/src/Symfony/Bridge/Monolog/Logger.php index 2b5f312053048..4e2168a114866 100644 --- a/src/Symfony/Bridge/Monolog/Logger.php +++ b/src/Symfony/Bridge/Monolog/Logger.php @@ -22,9 +22,6 @@ */ class Logger extends BaseLogger implements DebugLoggerInterface, ResetInterface { - /** - * {@inheritdoc} - */ public function getLogs(Request $request = null): array { if ($logger = $this->getDebugLogger()) { @@ -34,9 +31,6 @@ public function getLogs(Request $request = null): array return []; } - /** - * {@inheritdoc} - */ public function countErrors(Request $request = null): int { if ($logger = $this->getDebugLogger()) { @@ -46,9 +40,6 @@ public function countErrors(Request $request = null): int return 0; } - /** - * {@inheritdoc} - */ public function clear() { if ($logger = $this->getDebugLogger()) { @@ -56,9 +47,6 @@ public function clear() } } - /** - * {@inheritdoc} - */ public function reset(): void { $this->clear(); diff --git a/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php b/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php index a033d73c3b187..f736642b00fac 100644 --- a/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php +++ b/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php @@ -68,9 +68,6 @@ private function doInvoke(array|LogRecord $record): array|LogRecord return $record; } - /** - * {@inheritdoc} - */ public function getLogs(Request $request = null): array { if (null !== $request) { @@ -84,9 +81,6 @@ public function getLogs(Request $request = null): array return array_merge(...array_values($this->records)); } - /** - * {@inheritdoc} - */ public function countErrors(Request $request = null): int { if (null !== $request) { @@ -96,18 +90,12 @@ public function countErrors(Request $request = null): int return array_sum($this->errorCount); } - /** - * {@inheritdoc} - */ public function clear() { $this->records = []; $this->errorCount = []; } - /** - * {@inheritdoc} - */ public function reset() { $this->clear(); diff --git a/src/Symfony/Bridge/Monolog/Processor/SwitchUserTokenProcessor.php b/src/Symfony/Bridge/Monolog/Processor/SwitchUserTokenProcessor.php index bb3f6ff73d0cd..22d86f0b3edb5 100644 --- a/src/Symfony/Bridge/Monolog/Processor/SwitchUserTokenProcessor.php +++ b/src/Symfony/Bridge/Monolog/Processor/SwitchUserTokenProcessor.php @@ -23,17 +23,11 @@ */ class SwitchUserTokenProcessor extends AbstractTokenProcessor { - /** - * {@inheritdoc} - */ protected function getKey(): string { return 'impersonator_token'; } - /** - * {@inheritdoc} - */ protected function getToken(): ?TokenInterface { $token = $this->tokenStorage->getToken(); diff --git a/src/Symfony/Bridge/Monolog/Processor/TokenProcessor.php b/src/Symfony/Bridge/Monolog/Processor/TokenProcessor.php index c824ea1761efd..0e0085718e439 100644 --- a/src/Symfony/Bridge/Monolog/Processor/TokenProcessor.php +++ b/src/Symfony/Bridge/Monolog/Processor/TokenProcessor.php @@ -23,17 +23,11 @@ */ class TokenProcessor extends AbstractTokenProcessor { - /** - * {@inheritdoc} - */ protected function getKey(): string { return 'token'; } - /** - * {@inheritdoc} - */ protected function getToken(): ?TokenInterface { return $this->tokenStorage->getToken(); diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV7.php b/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV7.php index fcf5c4505d3da..99a1e683525dd 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV7.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV7.php @@ -17,15 +17,10 @@ use Symfony\Bridge\PhpUnit\SymfonyTestsListener; /** - * {@inheritdoc} - * * @internal */ class CommandForV7 extends BaseCommand { - /** - * {@inheritdoc} - */ protected function createRunner(): BaseRunner { $this->arguments['listeners'] ?? $this->arguments['listeners'] = []; diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV9.php b/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV9.php index 351f02f2230ec..6dd2767361db3 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV9.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/CommandForV9.php @@ -20,15 +20,10 @@ use Symfony\Bridge\PhpUnit\SymfonyTestsListener; /** - * {@inheritdoc} - * * @internal */ class CommandForV9 extends BaseCommand { - /** - * {@inheritdoc} - */ protected function createRunner(): BaseRunner { $this->arguments['listeners'] ?? $this->arguments['listeners'] = []; diff --git a/src/Symfony/Bridge/ProxyManager/Internal/ProxyGenerator.php b/src/Symfony/Bridge/ProxyManager/Internal/ProxyGenerator.php index b5cc2160c4019..26c95448eb2bb 100644 --- a/src/Symfony/Bridge/ProxyManager/Internal/ProxyGenerator.php +++ b/src/Symfony/Bridge/ProxyManager/Internal/ProxyGenerator.php @@ -21,9 +21,6 @@ */ class ProxyGenerator implements ProxyGeneratorInterface { - /** - * {@inheritdoc} - */ public function generate(\ReflectionClass $originalClass, ClassGenerator $classGenerator, array $proxyOptions = []): void { (new LazyLoadingValueHolderGenerator())->generate($originalClass, $classGenerator, $proxyOptions); diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php index 1db05b44dee2b..59fcdc022efce 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php @@ -38,9 +38,6 @@ public function __construct() $this->generator = new ProxyGenerator(); } - /** - * {@inheritdoc} - */ public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object { $proxifiedClass = new \ReflectionClass($this->generator->getProxifiedClass($definition)); diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php index 308a9c7854b47..930b7d76b0606 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -37,9 +37,6 @@ public function __construct(string $salt = '') $this->classGenerator = new BaseGeneratorStrategy(); } - /** - * {@inheritdoc} - */ public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): bool { $asGhostObject = false; @@ -47,9 +44,6 @@ public function isProxyCandidate(Definition $definition, bool &$asGhostObject = return ($definition->isLazy() || $definition->hasTag('proxy')) && $this->proxyGenerator->getProxifiedClass($definition); } - /** - * {@inheritdoc} - */ public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string { $instantiation = 'return'; @@ -78,9 +72,6 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ EOF; } - /** - * {@inheritdoc} - */ public function getProxyCode(Definition $definition): string { $code = $this->classGenerator->generate($this->generateProxyClass($definition)); diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php index e202fad702655..fc04526ced826 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php @@ -30,9 +30,6 @@ class RuntimeInstantiatorTest extends TestCase */ protected $instantiator; - /** - * {@inheritdoc} - */ protected function setUp(): void { $this->instantiator = new RuntimeInstantiator(); diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php index e787da909bbb3..2d7428fac8d4d 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php @@ -28,9 +28,6 @@ class ProxyDumperTest extends TestCase */ protected $dumper; - /** - * {@inheritdoc} - */ protected function setUp(): void { $this->dumper = new ProxyDumper(); diff --git a/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php b/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php index a26a620cfddb0..a8da618bc0738 100644 --- a/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php +++ b/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php @@ -38,16 +38,10 @@ public function __construct(Profile $profile, Environment $twig = null) $this->twig = $twig; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { } - /** - * {@inheritdoc} - */ public function reset() { $this->profile->reset(); @@ -55,9 +49,6 @@ public function reset() $this->data = []; } - /** - * {@inheritdoc} - */ public function lateCollect() { $this->data['profile'] = serialize($this->profile); @@ -187,9 +178,6 @@ private function computeData(Profile $profile) return $data; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'twig'; diff --git a/src/Symfony/Bridge/Twig/ErrorRenderer/TwigErrorRenderer.php b/src/Symfony/Bridge/Twig/ErrorRenderer/TwigErrorRenderer.php index 4dde73f62c902..3155422e9cac3 100644 --- a/src/Symfony/Bridge/Twig/ErrorRenderer/TwigErrorRenderer.php +++ b/src/Symfony/Bridge/Twig/ErrorRenderer/TwigErrorRenderer.php @@ -39,9 +39,6 @@ public function __construct(Environment $twig, HtmlErrorRenderer $fallbackErrorR $this->debug = \is_bool($debug) ? $debug : $debug(...); } - /** - * {@inheritdoc} - */ public function render(\Throwable $exception): FlattenException { $exception = $this->fallbackErrorRenderer->render($exception); diff --git a/src/Symfony/Bridge/Twig/Extension/AssetExtension.php b/src/Symfony/Bridge/Twig/Extension/AssetExtension.php index 3e12371ba99c3..feb25ed5c2062 100644 --- a/src/Symfony/Bridge/Twig/Extension/AssetExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/AssetExtension.php @@ -29,9 +29,6 @@ public function __construct(Packages $packages) $this->packages = $packages; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php index af6ea706b280c..dd2e0682d2901 100644 --- a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php @@ -33,9 +33,6 @@ public function __construct(string|FileLinkFormatter $fileLinkFormat, string $pr $this->charset = $charset; } - /** - * {@inheritdoc} - */ public function getFilters(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/CsrfExtension.php b/src/Symfony/Bridge/Twig/Extension/CsrfExtension.php index 646a48798ba6d..951fc31d7e06b 100644 --- a/src/Symfony/Bridge/Twig/Extension/CsrfExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/CsrfExtension.php @@ -20,9 +20,6 @@ */ final class CsrfExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/DumpExtension.php b/src/Symfony/Bridge/Twig/Extension/DumpExtension.php index 910fece83b9bb..a4da29758bc39 100644 --- a/src/Symfony/Bridge/Twig/Extension/DumpExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/DumpExtension.php @@ -35,9 +35,6 @@ public function __construct(ClonerInterface $cloner, HtmlDumper $dumper = null) $this->dumper = $dumper; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ @@ -45,9 +42,6 @@ public function getFunctions(): array ]; } - /** - * {@inheritdoc} - */ public function getTokenParsers(): array { return [new DumpTokenParser()]; diff --git a/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php b/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php index a30499620ea0f..49e4c95cbbba2 100644 --- a/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php @@ -22,9 +22,6 @@ */ final class ExpressionExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/FormExtension.php b/src/Symfony/Bridge/Twig/Extension/FormExtension.php index c041a51f9c300..827145963a8e6 100644 --- a/src/Symfony/Bridge/Twig/Extension/FormExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/FormExtension.php @@ -40,9 +40,6 @@ public function __construct(TranslatorInterface $translator = null) $this->translator = $translator; } - /** - * {@inheritdoc} - */ public function getTokenParsers(): array { return [ @@ -51,9 +48,6 @@ public function getTokenParsers(): array ]; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ @@ -77,9 +71,6 @@ public function getFunctions(): array ]; } - /** - * {@inheritdoc} - */ public function getFilters(): array { return [ @@ -88,9 +79,6 @@ public function getFilters(): array ]; } - /** - * {@inheritdoc} - */ public function getTests(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php b/src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php index 104bd3231f773..938d3ddabf256 100644 --- a/src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php @@ -30,9 +30,6 @@ public function __construct(UrlHelper $urlHelper) $this->urlHelper = $urlHelper; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php index 1af9ddb23cf51..072d890deb476 100644 --- a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php @@ -22,9 +22,6 @@ */ final class HttpKernelExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php b/src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php index 3ac7582b8fbeb..abced287f999c 100644 --- a/src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php @@ -29,9 +29,6 @@ public function __construct(LogoutUrlGenerator $generator) $this->generator = $generator; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php b/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php index 3b3a2ac58e27b..a22ad14d50a74 100644 --- a/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php @@ -32,9 +32,6 @@ public function __construct(UrlGeneratorInterface $generator) $this->generator = $generator; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/SecurityExtension.php b/src/Symfony/Bridge/Twig/Extension/SecurityExtension.php index dd1c57fb3b36e..25d1cab2cfa9f 100644 --- a/src/Symfony/Bridge/Twig/Extension/SecurityExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/SecurityExtension.php @@ -69,9 +69,6 @@ public function getImpersonateExitPath(string $exitTo = null): string return $this->impersonateUrlGenerator->generateExitPath($exitTo); } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php b/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php index cbb7394e7d848..7891dab1e382b 100644 --- a/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php @@ -58,9 +58,6 @@ public function getTranslator(): TranslatorInterface return $this->translator; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ @@ -68,9 +65,6 @@ public function getFunctions(): array ]; } - /** - * {@inheritdoc} - */ public function getFilters(): array { return [ @@ -78,9 +72,6 @@ public function getFilters(): array ]; } - /** - * {@inheritdoc} - */ public function getTokenParsers(): array { return [ @@ -92,9 +83,6 @@ public function getTokenParsers(): array ]; } - /** - * {@inheritdoc} - */ public function getNodeVisitors(): array { return [$this->getTranslationNodeVisitor(), new TranslationDefaultDomainNodeVisitor()]; diff --git a/src/Symfony/Bridge/Twig/Extension/WebLinkExtension.php b/src/Symfony/Bridge/Twig/Extension/WebLinkExtension.php index fcc34ecb5aad6..11eca517c5d69 100644 --- a/src/Symfony/Bridge/Twig/Extension/WebLinkExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/WebLinkExtension.php @@ -31,9 +31,6 @@ public function __construct(RequestStack $requestStack) $this->requestStack = $requestStack; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php b/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php index 895faf457f648..71f556aead03e 100644 --- a/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php @@ -32,9 +32,6 @@ public function __construct(Registry $workflowRegistry) $this->workflowRegistry = $workflowRegistry; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Extension/YamlExtension.php b/src/Symfony/Bridge/Twig/Extension/YamlExtension.php index 2d0595b7e9bca..e265dbfa9e7e7 100644 --- a/src/Symfony/Bridge/Twig/Extension/YamlExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/YamlExtension.php @@ -22,9 +22,6 @@ */ final class YamlExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getFilters(): array { return [ diff --git a/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php b/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php index 6f408ebb584ad..7f733455e824a 100644 --- a/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php +++ b/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php @@ -30,9 +30,6 @@ public function __construct(array $defaultThemes, Environment $environment) $this->environment = $environment; } - /** - * {@inheritdoc} - */ public function renderBlock(FormView $view, mixed $resource, string $blockName, array $variables = []): string { $cacheKey = $view->vars[self::CACHE_KEY_VAR]; diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index 61c8b5ff52083..d0e3337a9239c 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -37,9 +37,6 @@ public function __construct() $this->scope = new Scope(); } - /** - * {@inheritdoc} - */ protected function doEnterNode(Node $node, Environment $env): Node { if ($node instanceof BlockNode || $node instanceof ModuleNode) { @@ -86,9 +83,6 @@ protected function doEnterNode(Node $node, Environment $env): Node return $node; } - /** - * {@inheritdoc} - */ protected function doLeaveNode(Node $node, Environment $env): ?Node { if ($node instanceof TransDefaultDomainNode) { @@ -102,9 +96,6 @@ protected function doLeaveNode(Node $node, Environment $env): ?Node return $node; } - /** - * {@inheritdoc} - */ public function getPriority(): int { return -10; diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php index c8bee150982df..29cb13d0b2e5b 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -49,9 +49,6 @@ public function getMessages(): array return $this->messages; } - /** - * {@inheritdoc} - */ protected function doEnterNode(Node $node, Environment $env): Node { if (!$this->enabled) { @@ -101,17 +98,11 @@ protected function doEnterNode(Node $node, Environment $env): Node return $node; } - /** - * {@inheritdoc} - */ protected function doLeaveNode(Node $node, Environment $env): ?Node { return $node; } - /** - * {@inheritdoc} - */ public function getPriority(): int { return 0; diff --git a/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php index 341dc41855ab0..d4996dbe91cd1 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php @@ -29,9 +29,6 @@ */ final class DumpTokenParser extends AbstractTokenParser { - /** - * {@inheritdoc} - */ public function parse(Token $token): Node { $values = null; @@ -43,9 +40,6 @@ public function parse(Token $token): Node return new DumpNode($this->parser->getVarName(), $values, $token->getLine(), $this->getTag()); } - /** - * {@inheritdoc} - */ public function getTag(): string { return 'dump'; diff --git a/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php index ef5dacb59ddd1..b95a2a05e76a4 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php @@ -24,9 +24,6 @@ */ final class FormThemeTokenParser extends AbstractTokenParser { - /** - * {@inheritdoc} - */ public function parse(Token $token): Node { $lineno = $token->getLine(); @@ -54,9 +51,6 @@ public function parse(Token $token): Node return new FormThemeNode($form, $resources, $lineno, $this->getTag(), $only); } - /** - * {@inheritdoc} - */ public function getTag(): string { return 'form_theme'; diff --git a/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php index 19b820497d9fa..c6d850d07cbf7 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php @@ -23,9 +23,6 @@ */ final class TransDefaultDomainTokenParser extends AbstractTokenParser { - /** - * {@inheritdoc} - */ public function parse(Token $token): Node { $expr = $this->parser->getExpressionParser()->parseExpression(); @@ -35,9 +32,6 @@ public function parse(Token $token): Node return new TransDefaultDomainNode($expr, $token->getLine(), $this->getTag()); } - /** - * {@inheritdoc} - */ public function getTag(): string { return 'trans_default_domain'; diff --git a/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php index b440931bba794..e60263a4a783f 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php @@ -27,9 +27,6 @@ */ final class TransTokenParser extends AbstractTokenParser { - /** - * {@inheritdoc} - */ public function parse(Token $token): Node { $lineno = $token->getLine(); @@ -85,9 +82,6 @@ public function decideTransFork(Token $token): bool return $token->test(['endtrans']); } - /** - * {@inheritdoc} - */ public function getTag(): string { return 'trans'; diff --git a/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php b/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php index 86ef269328530..0707359dd16cf 100644 --- a/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php +++ b/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php @@ -45,9 +45,6 @@ public function __construct(Environment $twig) $this->twig = $twig; } - /** - * {@inheritdoc} - */ public function extract($resource, MessageCatalogue $catalogue) { foreach ($this->extractFiles($resource) as $file) { @@ -59,9 +56,6 @@ public function extract($resource, MessageCatalogue $catalogue) } } - /** - * {@inheritdoc} - */ public function setPrefix(string $prefix) { $this->prefix = $prefix; @@ -86,9 +80,6 @@ protected function canBeExtracted(string $file): bool return $this->isFile($file) && 'twig' === pathinfo($file, \PATHINFO_EXTENSION); } - /** - * {@inheritdoc} - */ protected function extractFromDirectory($directory): iterable { $finder = new Finder(); diff --git a/src/Symfony/Bundle/DebugBundle/DebugBundle.php b/src/Symfony/Bundle/DebugBundle/DebugBundle.php index 04fd507612747..045ea5f8dbd65 100644 --- a/src/Symfony/Bundle/DebugBundle/DebugBundle.php +++ b/src/Symfony/Bundle/DebugBundle/DebugBundle.php @@ -44,9 +44,6 @@ public function boot() } } - /** - * {@inheritdoc} - */ public function build(ContainerBuilder $container) { parent::build($container); diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php index 2579bf64eab13..5c531cc91dbcd 100644 --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php @@ -22,9 +22,6 @@ */ class DumpDataCollectorPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('data_collector.dump')) { diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php index f645a48f8a3b1..caf7359690750 100644 --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php @@ -21,9 +21,6 @@ */ class Configuration implements ConfigurationInterface { - /** - * {@inheritdoc} - */ public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('debug'); diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php index 731cc62b3116d..2d077ba681f5e 100644 --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php @@ -29,9 +29,6 @@ */ class DebugExtension extends Extension { - /** - * {@inheritdoc} - */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); @@ -97,17 +94,11 @@ public function load(array $configs, ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ public function getXsdValidationBasePath(): string|false { return __DIR__.'/../Resources/config/schema'; } - /** - * {@inheritdoc} - */ public function getNamespace(): string { return 'http://symfony.com/schema/dic/debug'; diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php index f72df9e6542bc..47b3db6d2c9d3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php @@ -29,17 +29,12 @@ public function __construct(string $phpArrayFile) $this->phpArrayFile = $phpArrayFile; } - /** - * {@inheritdoc} - */ public function isOptional(): bool { return true; } /** - * {@inheritdoc} - * * @return string[] A list of classes to preload on PHP 7.4+ */ public function warmUp(string $cacheDir): array diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php index 2fd5f661d2dee..5ecc25b3d7078 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php @@ -40,9 +40,6 @@ public function __construct(Reader $annotationReader, string $phpArrayFile, stri $this->debug = $debug; } - /** - * {@inheritdoc} - */ protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter): bool { $annotatedClassPatterns = $cacheDir.'/annotations.map'; diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/CachePoolClearerCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/CachePoolClearerCacheWarmer.php index 41041aedaed99..cad71a409dbc0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/CachePoolClearerCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/CachePoolClearerCacheWarmer.php @@ -38,8 +38,6 @@ public function __construct(Psr6CacheClearer $poolClearer, array $pools = []) } /** - * {@inheritdoc} - * * @return string[] */ public function warmUp(string $cacheDirectory): array @@ -53,9 +51,6 @@ public function warmUp(string $cacheDirectory): array return []; } - /** - * {@inheritdoc} - */ public function isOptional(): bool { // optional cache warmers are not run when handling the request diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php index 95f62d9202203..7b87e487e91fc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php @@ -38,8 +38,6 @@ public function __construct(KernelInterface $kernel, LoggerInterface $logger = n } /** - * {@inheritdoc} - * * @return string[] */ public function warmUp(string $cacheDir): array @@ -79,9 +77,6 @@ private function dumpExtension(ExtensionInterface $extension, ConfigBuilderGener $generator->build($configuration); } - /** - * {@inheritdoc} - */ public function isOptional(): bool { return true; diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php index 21dd3a2728845..13daf436939e4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php @@ -34,9 +34,6 @@ public function __construct(ContainerInterface $container) $this->container = $container; } - /** - * {@inheritdoc} - */ public function warmUp(string $cacheDir): array { $router = $this->container->get('router'); @@ -48,17 +45,11 @@ public function warmUp(string $cacheDir): array throw new \LogicException(sprintf('The router "%s" cannot be warmed up because it does not implement "%s".', get_debug_type($router), WarmableInterface::class)); } - /** - * {@inheritdoc} - */ public function isOptional(): bool { return true; } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php index ccc1402e2ddfe..40093998293ce 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php @@ -39,9 +39,6 @@ public function __construct(array $loaders, string $phpArrayFile) $this->loaders = $loaders; } - /** - * {@inheritdoc} - */ protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter): bool { if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TranslationsCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TranslationsCacheWarmer.php index 8cddae7e308ce..039658f4b721b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TranslationsCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TranslationsCacheWarmer.php @@ -34,8 +34,6 @@ public function __construct(ContainerInterface $container) } /** - * {@inheritdoc} - * * @return string[] */ public function warmUp(string $cacheDir): array @@ -49,17 +47,11 @@ public function warmUp(string $cacheDir): array return []; } - /** - * {@inheritdoc} - */ public function isOptional(): bool { return true; } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php index 04025a49bba66..ba0dede3948a2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php @@ -39,9 +39,6 @@ public function __construct(ValidatorBuilder $validatorBuilder, string $phpArray $this->validatorBuilder = $validatorBuilder; } - /** - * {@inheritdoc} - */ protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter): bool { if (!method_exists($this->validatorBuilder, 'getLoaders')) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php index ed5a47f12a0f7..4b2df917db7a1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php @@ -31,9 +31,6 @@ #[AsCommand(name: 'about', description: 'Display information about the current project')] class AboutCommand extends Command { - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -47,9 +44,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index aaad074daf246..2ee2d93988864 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -52,9 +52,6 @@ public function __construct(Filesystem $filesystem, string $projectDir) $this->projectDir = $projectDir; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -87,9 +84,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { /** @var KernelInterface $kernel */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index b7d95cfec87f2..ca46a577154a3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -48,9 +48,6 @@ public function __construct(CacheClearerInterface $cacheClearer, Filesystem $fil $this->filesystem = $filesystem ?? new Filesystem(); } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -69,9 +66,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $fs = $this->filesystem; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php index 65da5d7709487..99ebf9a979595 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php @@ -45,9 +45,6 @@ public function __construct(Psr6CacheClearer $poolClearer, array $poolNames = nu $this->poolNames = $poolNames; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -63,9 +60,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolDeleteCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolDeleteCommand.php index 546bd631d492c..2c0dddd0fd9f9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolDeleteCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolDeleteCommand.php @@ -43,9 +43,6 @@ public function __construct(Psr6CacheClearer $poolClearer, array $poolNames = nu $this->poolNames = $poolNames; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -62,9 +59,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolInvalidateTagsCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolInvalidateTagsCommand.php index 8ad84bfa69503..a69624c8372c4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolInvalidateTagsCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolInvalidateTagsCommand.php @@ -41,9 +41,6 @@ public function __construct(ServiceProviderInterface $pools) $this->poolNames = array_keys($pools->getProvidedServices()); } - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -59,9 +56,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolListCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolListCommand.php index 09ec8b1ef0cc7..f1e05b0db0768 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolListCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolListCommand.php @@ -37,9 +37,6 @@ public function __construct(array $poolNames) $this->poolNames = $poolNames; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -50,9 +47,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolPruneCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolPruneCommand.php index 1e8bb7f0338a6..53f2b01dff994 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolPruneCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolPruneCommand.php @@ -38,9 +38,6 @@ public function __construct(iterable $pools) $this->pools = $pools; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -53,9 +50,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php index 36c2f76e7e3cf..dad1ab8b0e812 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php @@ -39,9 +39,6 @@ public function __construct(CacheWarmerAggregate $cacheWarmer) $this->cacheWarmer = $cacheWarmer; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -63,9 +60,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php index 33a3e458ff6bf..c5078d1b5b401 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php @@ -38,9 +38,6 @@ #[AsCommand(name: 'debug:config', description: 'Dump the current configuration for an extension')] class ConfigDebugCommand extends AbstractConfigCommand { - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -67,9 +64,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php index 271ba9bf6429b..628cb7cecf6c7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -39,9 +39,6 @@ #[AsCommand(name: 'config:dump-reference', description: 'Dump the default configuration for an extension')] class ConfigDumpReferenceCommand extends AbstractConfigCommand { - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -75,8 +72,6 @@ protected function configure() } /** - * {@inheritdoc} - * * @throws \LogicException */ protected function execute(InputInterface $input, OutputInterface $output): int diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index a0f484db7b268..25ddfe692d4c3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -38,9 +38,6 @@ class ContainerDebugCommand extends Command { use BuildDebugContainerTrait; - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -114,9 +111,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php index 5e3e891ee845f..1029dbc49d3c1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php @@ -33,9 +33,6 @@ final class ContainerLintCommand extends Command { private ContainerBuilder $containerBuilder; - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -43,9 +40,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php index ecd507127c00c..9a04d74eeea62 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php @@ -43,9 +43,6 @@ public function __construct(string $name = null, FileLinkFormatter $fileLinkForm parent::__construct($name); } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -68,9 +65,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php index a8bb8303071db..41edb7505ab5c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php @@ -46,9 +46,6 @@ public function __construct(ContainerInterface $dispatchers) $this->dispatchers = $dispatchers; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -72,8 +69,6 @@ protected function configure() } /** - * {@inheritdoc} - * * @throws \LogicException */ protected function execute(InputInterface $input, OutputInterface $output): int diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 7d2d6e9340304..a4c53beff3957 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -50,9 +50,6 @@ public function __construct(RouterInterface $router, FileLinkFormatter $fileLink $this->fileLinkFormatter = $fileLinkFormatter; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -73,8 +70,6 @@ protected function configure() } /** - * {@inheritdoc} - * * @throws InvalidArgumentException When route does not exist */ protected function execute(InputInterface $input, OutputInterface $output): int diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php index da78d510a6b4c..a654522d806f2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -47,9 +47,6 @@ public function __construct(RouterInterface $router, iterable $expressionLanguag $this->expressionLanguageProviders = $expressionLanguageProviders; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -73,9 +70,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index c2cfae702863b..b3a6a7d64f98e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -73,9 +73,6 @@ public function __construct(TranslatorInterface $translator, TranslationReaderIn $this->enabledLocales = $enabledLocales; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -121,9 +118,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php index ec399b0204c75..208849024ff3f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -75,9 +75,6 @@ public function __construct(TranslationWriterInterface $writer, TranslationReade $this->enabledLocales = $enabledLocales; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -126,9 +123,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php index 14ea912a86bd9..3daa2b9ddb71a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php @@ -66,9 +66,6 @@ public function __construct($workflows) } } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -90,9 +87,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $workflowName = $input->getArgument('name'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/XliffLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/XliffLintCommand.php index e6d21f40b3dc1..0c33e2b8b9c84 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/XliffLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/XliffLintCommand.php @@ -43,9 +43,6 @@ public function __construct() parent::__construct(null, $directoryIteratorProvider, $isReadableProvider); } - /** - * {@inheritdoc} - */ protected function configure() { parent::configure(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php index 0686cde37ccba..42c1e795ccee6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php @@ -42,9 +42,6 @@ public function __construct() parent::__construct(null, $directoryIteratorProvider, $isReadableProvider); } - /** - * {@inheritdoc} - */ protected function configure() { parent::configure(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php index 8927eb1e07b1d..d73f323af7bbc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php @@ -52,9 +52,6 @@ public function getKernel(): KernelInterface return $this->kernel; } - /** - * {@inheritdoc} - */ public function reset() { if ($this->kernel->getContainer()->has('services_resetter')) { @@ -80,9 +77,6 @@ public function doRun(InputInterface $input, OutputInterface $output): int return parent::doRun($input, $output); } - /** - * {@inheritdoc} - */ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output): int { if (!$command instanceof ListCommand) { @@ -104,9 +98,6 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI return $returnCode; } - /** - * {@inheritdoc} - */ public function find(string $name): Command { $this->registerCommands(); @@ -114,9 +105,6 @@ public function find(string $name): Command return parent::find($name); } - /** - * {@inheritdoc} - */ public function get(string $name): Command { $this->registerCommands(); @@ -130,9 +118,6 @@ public function get(string $name): Command return $command; } - /** - * {@inheritdoc} - */ public function all(string $namespace = null): array { $this->registerCommands(); @@ -140,9 +125,6 @@ public function all(string $namespace = null): array return parent::all($namespace); } - /** - * {@inheritdoc} - */ public function getLongVersion(): string { return parent::getLongVersion().sprintf(' (env: %s, debug: %s) #StandWithUkraine https://sf.to/ukraine', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index a7ddd7ce46eb4..c110f2ea86483 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -38,9 +38,6 @@ abstract class Descriptor implements DescriptorInterface */ protected $output; - /** - * {@inheritdoc} - */ public function describe(OutputInterface $output, mixed $object, array $options = []) { $this->output = $output; diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php index 0539c1ee734ca..2debdbb1629bb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php @@ -21,9 +21,6 @@ */ class ControllerResolver extends ContainerControllerResolver { - /** - * {@inheritdoc} - */ protected function instantiateController(string $class): object { $controller = parent::instantiateController($class); diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php index d7db6ebf050a4..fbbf53d3431f2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php @@ -20,9 +20,6 @@ */ class AddAnnotationsCachedReaderPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { // "annotations.cached_reader" is wired late so that any passes using diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php index 3e2f2768edc1a..f7a6bcdbd710a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php @@ -22,9 +22,6 @@ */ class AddExpressionLanguageProvidersPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { // routing diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php index ad62e19384976..d74fa11b2ae6b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php @@ -21,9 +21,6 @@ */ class WorkflowGuardListenerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasParameter('workflow.has_guard_listeners')) { diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index bfd53358618d9..99064def7ac40 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -705,9 +705,6 @@ public function load(array $configs, ContainerBuilder $container) ]); } - /** - * {@inheritdoc} - */ public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface { return new Configuration($container->getParameter('kernel.debug')); @@ -2820,9 +2817,6 @@ private function resolveTrustedHeaders(array $headers): int return $trustedHeaders; } - /** - * {@inheritdoc} - */ public function getXsdValidationBasePath(): string|false { return \dirname(__DIR__).'/Resources/config/schema'; diff --git a/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php b/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php index 102892b2f426c..f312a7afe4946 100644 --- a/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php +++ b/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php @@ -60,9 +60,6 @@ public function __construct(KernelInterface $kernel, string|StoreInterface $cach parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge($this->options, $this->getOptions())); } - /** - * {@inheritdoc} - */ protected function forward(Request $request, bool $catch = false, Response $entry = null): Response { $this->getKernel()->boot(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php index dbf77b3bd94bd..fa04ff332433d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -104,9 +104,6 @@ private function getBundlesPath(): string return $this->getConfigDir().'/bundles.php'; } - /** - * {@inheritdoc} - */ public function getCacheDir(): string { if (isset($_SERVER['APP_CACHE_DIR'])) { @@ -116,17 +113,11 @@ public function getCacheDir(): string return parent::getCacheDir(); } - /** - * {@inheritdoc} - */ public function getLogDir(): string { return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir(); } - /** - * {@inheritdoc} - */ public function registerBundles(): iterable { $contents = require $this->getBundlesPath(); @@ -137,9 +128,6 @@ public function registerBundles(): iterable } } - /** - * {@inheritdoc} - */ public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(function (ContainerBuilder $container) use ($loader) { diff --git a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php index 4fb751d4bfb32..b7e8e27eacbb5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php +++ b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php @@ -34,9 +34,6 @@ class KernelBrowser extends HttpKernelBrowser private bool $profiler = false; private bool $reboot = true; - /** - * {@inheritdoc} - */ public function __construct(KernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) { parent::__construct($kernel, $server, $history, $cookieJar); @@ -147,8 +144,6 @@ public function loginUser(object $user, string $firewallContext = 'main'): stati } /** - * {@inheritdoc} - * * @param Request $request */ protected function doRequest(object $request): Response @@ -173,8 +168,6 @@ protected function doRequest(object $request): Response } /** - * {@inheritdoc} - * * @param Request $request */ protected function doRequestInProcess(object $request): Response diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php index a0fefe7fd2fab..5e8d8f354dc96 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php @@ -40,9 +40,6 @@ public function __construct(LoaderResolverInterface $resolver, array $defaultOpt parent::__construct($resolver); } - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): RouteCollection { if ($this->loading) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableCompiledUrlMatcher.php b/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableCompiledUrlMatcher.php index dba9d6d9613d1..538427aae6cf2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableCompiledUrlMatcher.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableCompiledUrlMatcher.php @@ -21,9 +21,6 @@ */ class RedirectableCompiledUrlMatcher extends CompiledUrlMatcher implements RedirectableUrlMatcherInterface { - /** - * {@inheritdoc} - */ public function redirect(string $path, string $route, string $scheme = null): array { return [ diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php index 8fda00a771fe0..ac5db387de808 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php @@ -59,9 +59,6 @@ public function __construct(ContainerInterface $container, mixed $resource, arra $this->defaultLocale = $defaultLocale; } - /** - * {@inheritdoc} - */ public function getRouteCollection(): RouteCollection { if (null === $this->collection) { @@ -84,8 +81,6 @@ public function getRouteCollection(): RouteCollection } /** - * {@inheritdoc} - * * @return string[] A list of classes to preload on PHP 7.4+ */ public function warmUp(string $cacheDir): array @@ -193,9 +188,6 @@ private function resolve(mixed $value): mixed return str_replace('%%', '%', $escapedValue); } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php b/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php index 321ea373d85f1..883928087ea03 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php @@ -37,105 +37,66 @@ public function __construct(KernelInterface $kernel, string $privateServicesLoca $this->privateServicesLocatorId = $privateServicesLocatorId; } - /** - * {@inheritdoc} - */ public function compile() { $this->getPublicContainer()->compile(); } - /** - * {@inheritdoc} - */ public function isCompiled(): bool { return $this->getPublicContainer()->isCompiled(); } - /** - * {@inheritdoc} - */ public function getParameterBag(): ParameterBagInterface { return $this->getPublicContainer()->getParameterBag(); } - /** - * {@inheritdoc} - */ public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null { return $this->getPublicContainer()->getParameter($name); } - /** - * {@inheritdoc} - */ public function hasParameter(string $name): bool { return $this->getPublicContainer()->hasParameter($name); } - /** - * {@inheritdoc} - */ public function setParameter(string $name, mixed $value) { $this->getPublicContainer()->setParameter($name, $value); } - /** - * {@inheritdoc} - */ public function set(string $id, mixed $service) { $this->getPublicContainer()->set($id, $service); } - /** - * {@inheritdoc} - */ public function has(string $id): bool { return $this->getPublicContainer()->has($id) || $this->getPrivateContainer()->has($id); } - /** - * {@inheritdoc} - */ public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE): ?object { return $this->getPrivateContainer()->has($id) ? $this->getPrivateContainer()->get($id) : $this->getPublicContainer()->get($id, $invalidBehavior); } - /** - * {@inheritdoc} - */ public function initialized(string $id): bool { return $this->getPublicContainer()->initialized($id); } - /** - * {@inheritdoc} - */ public function reset() { // ignore the call } - /** - * {@inheritdoc} - */ public function getServiceIds(): array { return $this->getPublicContainer()->getServiceIds(); } - /** - * {@inheritdoc} - */ public function getRemovedIds(): array { return $this->getPublicContainer()->getRemovedIds(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SecurityController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SecurityController.php index d90d7512f24aa..28e3d141aaedc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SecurityController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SecurityController.php @@ -30,9 +30,6 @@ public function profileAction() return new Response('Welcome '.$this->container->get('security.token_storage')->getToken()->getUserIdentifier().'!'); } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php index 2d88510520531..80cee0f1ae344 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php @@ -21,9 +21,6 @@ class TestExtension extends Extension implements PrependExtensionInterface { private $customConfig; - /** - * {@inheritdoc} - */ public function load(array $configs, ContainerBuilder $container) { $configuration = $this->getConfiguration($configs, $container); @@ -32,17 +29,11 @@ public function load(array $configs, ContainerBuilder $container) $container->setAlias('test.annotation_reader', new Alias('annotation_reader', true)); } - /** - * {@inheritdoc} - */ public function prepend(ContainerBuilder $container) { $container->prependExtensionConfig('test', ['custom' => 'foo']); } - /** - * {@inheritdoc} - */ public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface { return new Configuration($this->customConfig); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php index c1b1026ac737e..8a739b0c30940 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php @@ -93,9 +93,6 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load $c->register('halloween', 'stdClass')->setPublic(true); } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index ff0981a71444c..ab5074e8dfa45 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -418,9 +418,6 @@ private function createTranslator($loader, $options, $translatorClass = Translat class TranslatorWithInvalidLocale extends Translator { - /** - * {@inheritdoc} - */ public function getLocale(): string { return 'invalid locale'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php index b4d9a664a5e02..3116080f042c0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -95,8 +95,6 @@ public function __construct(ContainerInterface $container, MessageFormatterInter } /** - * {@inheritdoc} - * * @return string[] */ public function warmUp(string $cacheDir): array @@ -128,9 +126,6 @@ public function addResource(string $format, mixed $resource, string $locale, str $this->resources[] = [$format, $resource, $locale, $domain]; } - /** - * {@inheritdoc} - */ protected function initializeCatalogue(string $locale) { $this->initialize(); diff --git a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php index c7df65486efdf..dd446208e39d2 100644 --- a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php +++ b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php @@ -55,9 +55,6 @@ public function __construct(TokenStorageInterface $tokenStorage = null, RoleHier $this->hasVarDumper = class_exists(ClassStub::class); } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { if (null === $this->tokenStorage) { @@ -205,9 +202,6 @@ public function collect(Request $request, Response $response, \Throwable $except $this->data['authenticators'] = $this->firewall ? $this->firewall->getAuthenticatorsInfo() : []; } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; @@ -350,9 +344,6 @@ public function getAuthenticators(): array|Data return $this->data['authenticators']; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'security'; diff --git a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php index 5a3d0a1c609d8..a30900a5342e2 100644 --- a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php +++ b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php @@ -38,9 +38,6 @@ public function supports(Request $request): ?bool return $this->listener->supports($request); } - /** - * {@inheritdoc} - */ public function authenticate(RequestEvent $event) { $startTime = microtime(true); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php index 3109cf27c5ab1..607d1f06c927d 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php @@ -22,9 +22,6 @@ */ class AddExpressionLanguageProvidersPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if ($container->has('security.expression_language')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php index c3c7b86ab2f72..273a0db67fddf 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php @@ -29,9 +29,6 @@ class AddSecurityVotersPass implements CompilerPassInterface { use PriorityTaggedServiceTrait; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('security.access.decision_manager')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php index 461a5ad66d081..5b107b5ef0dfc 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php @@ -21,9 +21,6 @@ */ class AddSessionDomainConstraintPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasParameter('session.storage.options') || !$container->has('security.http_utils')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php index d959d4bda9e67..fb4b6f83dc3b8 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php @@ -21,9 +21,6 @@ */ class CleanRememberMeVerifierPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('cache.system')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php index 20094957cdb65..8eac2cf83a8c0 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php @@ -52,9 +52,6 @@ class RegisterGlobalSecurityEventListenersPass implements CompilerPassInterface SecurityEvents::INTERACTIVE_LOGIN, ]; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->has('event_dispatcher') || !$container->hasParameter('security.firewalls')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php index 2b1159eff979a..fdffab1bbf395 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php @@ -27,9 +27,6 @@ */ class RegisterTokenUsageTrackingPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->has('security.untracked_token_storage')) { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php index 5de431c2c04c8..4727e62f7c8ff 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php @@ -26,9 +26,6 @@ final class ReplaceDecoratedRememberMeHandlerPass implements CompilerPassInterfa { private const HANDLER_TAG = 'security.remember_me_handler'; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { $handledFirewalls = []; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php index 7034e780cc1d2..1e38c58643638 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AccessTokenFactory.php @@ -64,9 +64,6 @@ public function getPriority(): int return self::PRIORITY; } - /** - * {@inheritdoc} - */ public function getKey(): string { return 'access_token'; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginFactory.php index 9307cba86e3f3..303ae2a183196 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginFactory.php @@ -39,9 +39,6 @@ public function getPriority(): int return self::PRIORITY; } - /** - * {@inheritdoc} - */ public function getKey(): string { return 'json-login'; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php index 2a85c2486c8f1..d3ec4633cf5ce 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php @@ -235,9 +235,6 @@ private function createTokenVerifier(ContainerBuilder $container, string $firewa return new Reference($tokenVerifierId, ContainerInterface::NULL_ON_INVALID_REFERENCE); } - /** - * {@inheritdoc} - */ public function prepend(ContainerBuilder $container) { $rememberMeSecureDefault = false; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index b5e7a619fdc1f..3f1c0aeb244bd 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -931,9 +931,6 @@ public function addUserProviderFactory(UserProviderFactoryInterface $factory) $this->userProviderFactories[] = $factory; } - /** - * {@inheritdoc} - */ public function getXsdValidationBasePath(): string|false { return __DIR__.'/../Resources/config/schema'; diff --git a/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php b/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php index 98f54c8634abd..9e91f3930ab08 100644 --- a/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php +++ b/src/Symfony/Bundle/SecurityBundle/EventListener/FirewallListener.php @@ -56,9 +56,6 @@ public function onKernelFinishRequest(FinishRequestEvent $event) parent::onKernelFinishRequest($event); } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/Symfony/Bundle/SecurityBundle/RememberMe/DecoratedRememberMeHandler.php b/src/Symfony/Bundle/SecurityBundle/RememberMe/DecoratedRememberMeHandler.php index 56c2886c6c607..ed6d0ed20d5be 100644 --- a/src/Symfony/Bundle/SecurityBundle/RememberMe/DecoratedRememberMeHandler.php +++ b/src/Symfony/Bundle/SecurityBundle/RememberMe/DecoratedRememberMeHandler.php @@ -31,25 +31,16 @@ public function __construct(RememberMeHandlerInterface $handler) $this->handler = $handler; } - /** - * {@inheritDoc} - */ public function createRememberMeCookie(UserInterface $user): void { $this->handler->createRememberMeCookie($user); } - /** - * {@inheritDoc} - */ public function consumeRememberMeCookie(RememberMeDetails $rememberMeDetails): UserInterface { return $this->handler->consumeRememberMeCookie($rememberMeDetails); } - /** - * {@inheritDoc} - */ public function clearRememberMeCookie(): void { $this->handler->clearRememberMeCookie(); diff --git a/src/Symfony/Bundle/SecurityBundle/Security/UserAuthenticator.php b/src/Symfony/Bundle/SecurityBundle/Security/UserAuthenticator.php index 174f1d015e729..786457800367e 100644 --- a/src/Symfony/Bundle/SecurityBundle/Security/UserAuthenticator.php +++ b/src/Symfony/Bundle/SecurityBundle/Security/UserAuthenticator.php @@ -38,9 +38,6 @@ public function __construct(FirewallMap $firewallMap, ContainerInterface $userAu $this->requestStack = $requestStack; } - /** - * {@inheritdoc} - */ public function authenticateUser(UserInterface $user, AuthenticatorInterface $authenticator, Request $request, array $badges = []): ?Response { return $this->getForFirewall()->authenticateUser($user, $authenticator, $request, $badges); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php index c77b1e204e0db..22f7de69b208c 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php @@ -51,9 +51,6 @@ public function secureAction() throw new \Exception('Wrapper', 0, new \Exception('Another Wrapper', 0, new AccessDeniedException())); } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php index 8ccd51e72d0f0..0f89b3c1b4fc8 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php @@ -36,9 +36,6 @@ public function __construct(RequestStack $requestStack) $this->requestStack = $requestStack; } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder @@ -71,9 +68,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) }); } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { /* Note: the form's csrf_token_id must correspond to that for the form login diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php index 9733b0788aac6..a09ca835897fd 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php @@ -68,9 +68,6 @@ public function homepageAction() return (new Response('Homepage'))->setPublic(); } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php index 7d90b2a671e86..09b0ff09ba8d1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php @@ -60,9 +60,6 @@ public function secureAction() throw new \Exception('Wrapper', 0, new \Exception('Another Wrapper', 0, new AccessDeniedException())); } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php index c330723adff15..62490a739bdcc 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php @@ -18,9 +18,6 @@ class FormLoginBundle extends Bundle { - /** - * {@inheritdoc} - */ public function build(ContainerBuilder $container) { parent::build($container); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php index 95161c26ec6db..5e2891885daf4 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php @@ -192,33 +192,21 @@ public function __toString(): string return $this->getUserIdentifier(); } - /** - * {@inheritdoc} - */ public function getRoles(): array { return $this->roles; } - /** - * {@inheritdoc} - */ public function getPassword(): ?string { return $this->password; } - /** - * {@inheritdoc} - */ public function getSalt(): string { return ''; } - /** - * {@inheritdoc} - */ public function getUsername(): string { return $this->username; @@ -229,41 +217,26 @@ public function getUserIdentifier(): string return $this->username; } - /** - * {@inheritdoc} - */ public function isAccountNonExpired(): bool { return $this->accountNonExpired; } - /** - * {@inheritdoc} - */ public function isAccountNonLocked(): bool { return $this->accountNonLocked; } - /** - * {@inheritdoc} - */ public function isCredentialsNonExpired(): bool { return $this->credentialsNonExpired; } - /** - * {@inheritdoc} - */ public function isEnabled(): bool { return $this->enabled; } - /** - * {@inheritdoc} - */ public function eraseCredentials(): void { } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php index 2839d5dfaff60..d10326e676a38 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php @@ -46,9 +46,6 @@ public function __construct($varDir, $testCase, $rootConfig, $environment, $debu parent::__construct($environment, $debug); } - /** - * {@inheritdoc} - */ public function getContainerClass(): string { return parent::getContainerClass().substr(md5(implode('', $this->rootConfig)), -16); diff --git a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php index 63d0227513845..d26ddf358aaba 100644 --- a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php +++ b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php @@ -36,8 +36,6 @@ public function __construct(ContainerInterface $container, iterable $iterator) } /** - * {@inheritdoc} - * * @return string[] A list of template files to preload on PHP 7.4+ */ public function warmUp(string $cacheDir): array @@ -68,17 +66,11 @@ public function warmUp(string $cacheDir): array return $files; } - /** - * {@inheritdoc} - */ public function isOptional(): bool { return true; } - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { return [ diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index 5de2b2aad1358..f85dd13aa2f3a 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -23,9 +23,6 @@ #[AsCommand(name: 'lint:twig', description: 'Lint a Twig template and outputs encountered errors')] final class LintCommand extends BaseLintCommand { - /** - * {@inheritdoc} - */ protected function configure() { parent::configure(); diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index f598524da4d64..607136872a849 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -194,9 +194,6 @@ private function normalizeBundleName(string $name): string return $name; } - /** - * {@inheritdoc} - */ public function getXsdValidationBasePath(): string|false { return __DIR__.'/../Resources/config/schema'; diff --git a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php index d460cf1462035..23a69bc76490c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php +++ b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php @@ -57,9 +57,6 @@ public function load(array $configs, ContainerBuilder $container) ->replaceArgument(3, new ServiceClosureArgument(new Reference('debug.file_link_formatter.url_format'))); } - /** - * {@inheritdoc} - */ public function getXsdValidationBasePath(): string|false { return __DIR__.'/../Resources/config/schema'; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php index c29b4c4f52911..bd7d57de02432 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php @@ -60,9 +60,6 @@ public function leave(Profile $profile): void } } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ @@ -103,9 +100,6 @@ public function dumpLog(Environment $env, string $message, Data $context = null) return ''.strtr($message, $replacements).''; } - /** - * {@inheritdoc} - */ public function getName() { return 'profiler'; diff --git a/src/Symfony/Component/Asset/Context/NullContext.php b/src/Symfony/Component/Asset/Context/NullContext.php index d662fef4e49de..982ca3cb8910c 100644 --- a/src/Symfony/Component/Asset/Context/NullContext.php +++ b/src/Symfony/Component/Asset/Context/NullContext.php @@ -18,17 +18,11 @@ */ class NullContext implements ContextInterface { - /** - * {@inheritdoc} - */ public function getBasePath(): string { return ''; } - /** - * {@inheritdoc} - */ public function isSecure(): bool { return false; diff --git a/src/Symfony/Component/Asset/Context/RequestStackContext.php b/src/Symfony/Component/Asset/Context/RequestStackContext.php index 19cd52613cb97..431c7f1a89f36 100644 --- a/src/Symfony/Component/Asset/Context/RequestStackContext.php +++ b/src/Symfony/Component/Asset/Context/RequestStackContext.php @@ -31,9 +31,6 @@ public function __construct(RequestStack $requestStack, string $basePath = '', b $this->secure = $secure; } - /** - * {@inheritdoc} - */ public function getBasePath(): string { if (!$request = $this->requestStack->getMainRequest()) { @@ -43,9 +40,6 @@ public function getBasePath(): string return $request->getBasePath(); } - /** - * {@inheritdoc} - */ public function isSecure(): bool { if (!$request = $this->requestStack->getMainRequest()) { diff --git a/src/Symfony/Component/Asset/Package.php b/src/Symfony/Component/Asset/Package.php index 76cd9496f46ac..35f3fb649d068 100644 --- a/src/Symfony/Component/Asset/Package.php +++ b/src/Symfony/Component/Asset/Package.php @@ -32,17 +32,11 @@ public function __construct(VersionStrategyInterface $versionStrategy, ContextIn $this->context = $context ?? new NullContext(); } - /** - * {@inheritdoc} - */ public function getVersion(string $path): string { return $this->versionStrategy->getVersion($path); } - /** - * {@inheritdoc} - */ public function getUrl(string $path): string { if ($this->isAbsoluteUrl($path)) { diff --git a/src/Symfony/Component/Asset/PathPackage.php b/src/Symfony/Component/Asset/PathPackage.php index 4c79140d59659..d8e08a3c34807 100644 --- a/src/Symfony/Component/Asset/PathPackage.php +++ b/src/Symfony/Component/Asset/PathPackage.php @@ -46,9 +46,6 @@ public function __construct(string $basePath, VersionStrategyInterface $versionS } } - /** - * {@inheritdoc} - */ public function getUrl(string $path): string { $versionedPath = parent::getUrl($path); diff --git a/src/Symfony/Component/Asset/UrlPackage.php b/src/Symfony/Component/Asset/UrlPackage.php index abd85672de11c..5f3c1cc405235 100644 --- a/src/Symfony/Component/Asset/UrlPackage.php +++ b/src/Symfony/Component/Asset/UrlPackage.php @@ -64,9 +64,6 @@ public function __construct(string|array $baseUrls, VersionStrategyInterface $ve } } - /** - * {@inheritdoc} - */ public function getUrl(string $path): string { if ($this->isAbsoluteUrl($path)) { diff --git a/src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.php b/src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.php index 93dbbb9e265de..6903d7b627861 100644 --- a/src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.php +++ b/src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.php @@ -18,17 +18,11 @@ */ class EmptyVersionStrategy implements VersionStrategyInterface { - /** - * {@inheritdoc} - */ public function getVersion(string $path): string { return ''; } - /** - * {@inheritdoc} - */ public function applyVersion(string $path): string { return $path; diff --git a/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php b/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php index 6c6a3434ae545..4cbc8f735f0e7 100644 --- a/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php +++ b/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php @@ -31,17 +31,11 @@ public function __construct(string $version, string $format = null) $this->format = $format ?: '%s?%s'; } - /** - * {@inheritdoc} - */ public function getVersion(string $path): string { return $this->version; } - /** - * {@inheritdoc} - */ public function applyVersion(string $path): string { $versionized = sprintf($this->format, ltrim($path, '/'), $this->getVersion($path)); diff --git a/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserCookieValueSame.php b/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserCookieValueSame.php index c551cb2fa2db8..ef9b4a05920b8 100644 --- a/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserCookieValueSame.php +++ b/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserCookieValueSame.php @@ -31,9 +31,6 @@ public function __construct(string $name, string $value, bool $raw = false, stri $this->raw = $raw; } - /** - * {@inheritdoc} - */ public function toString(): string { $str = sprintf('has cookie "%s"', $this->name); @@ -50,8 +47,6 @@ public function toString(): string /** * @param AbstractBrowser $browser - * - * {@inheritdoc} */ protected function matches($browser): bool { @@ -65,8 +60,6 @@ protected function matches($browser): bool /** * @param AbstractBrowser $browser - * - * {@inheritdoc} */ protected function failureDescription($browser): string { diff --git a/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserHasCookie.php b/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserHasCookie.php index 40ed949906f07..e6d7ab4f48475 100644 --- a/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserHasCookie.php +++ b/src/Symfony/Component/BrowserKit/Test/Constraint/BrowserHasCookie.php @@ -27,9 +27,6 @@ public function __construct(string $name, string $path = '/', string $domain = n $this->domain = $domain; } - /** - * {@inheritdoc} - */ public function toString(): string { $str = sprintf('has cookie "%s"', $this->name); @@ -45,8 +42,6 @@ public function toString(): string /** * @param AbstractBrowser $browser - * - * {@inheritdoc} */ protected function matches($browser): bool { @@ -55,8 +50,6 @@ protected function matches($browser): bool /** * @param AbstractBrowser $browser - * - * {@inheritdoc} */ protected function failureDescription($browser): string { diff --git a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php index 8025e68144272..f013eee6d2140 100644 --- a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php @@ -129,9 +129,6 @@ public static function createConnection(string $dsn, array $options = []) throw new InvalidArgumentException(sprintf('Unsupported DSN: "%s".', $dsn)); } - /** - * {@inheritdoc} - */ public function commit(): bool { $ok = true; diff --git a/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php index e775bbf15f9e4..878e7441e04cd 100644 --- a/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php @@ -165,9 +165,6 @@ protected function doDeleteYieldTags(array $ids): iterable $this->doDelete($ids); } - /** - * {@inheritdoc} - */ public function commit(): bool { $ok = true; @@ -229,9 +226,6 @@ public function commit(): bool return $ok; } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { if (!$keys) { @@ -281,9 +275,6 @@ public function deleteItems(array $keys): bool return $ok; } - /** - * {@inheritdoc} - */ public function invalidateTags(array $tags): bool { if (empty($tags)) { diff --git a/src/Symfony/Component/Cache/Adapter/AdapterInterface.php b/src/Symfony/Component/Cache/Adapter/AdapterInterface.php index 7b0771b7d71c6..e55672093f16b 100644 --- a/src/Symfony/Component/Cache/Adapter/AdapterInterface.php +++ b/src/Symfony/Component/Cache/Adapter/AdapterInterface.php @@ -24,20 +24,12 @@ class_exists(CacheItem::class); */ interface AdapterInterface extends CacheItemPoolInterface { - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem; /** - * {@inheritdoc} - * * @return iterable */ public function getItems(array $keys = []): iterable; - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool; } diff --git a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php index 47656c925bcf0..d6d0246d66b2a 100644 --- a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php @@ -52,9 +52,6 @@ public static function isSupported() return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN); } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); @@ -74,17 +71,11 @@ protected function doFetch(array $ids): iterable } } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { return apcu_exists($id); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) @@ -92,9 +83,6 @@ protected function doClear(string $namespace): bool : apcu_clear_cache(); } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { foreach ($ids as $id) { @@ -104,9 +92,6 @@ protected function doDelete(array $ids): bool return true; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { if (null !== $this->marshaller && (!$values = $this->marshaller->marshall($values, $failed))) { diff --git a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php index ca2feaecbcc4c..2ff499d30c506 100644 --- a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php @@ -74,9 +74,6 @@ static function ($key, $value, $isHit, $tags) { ); } - /** - * {@inheritdoc} - */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { $item = $this->getItem($key); @@ -94,17 +91,11 @@ public function get(string $key, callable $callback, float $beta = null, array & return $item->get(); } - /** - * {@inheritdoc} - */ public function delete(string $key): bool { return $this->deleteItem($key); } - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > microtime(true)) { @@ -122,9 +113,6 @@ public function hasItem(mixed $key): bool return isset($this->expiries[$key]) && !$this->deleteItem($key); } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { if (!$isHit = $this->hasItem($key)) { @@ -141,9 +129,6 @@ public function getItem(mixed $key): CacheItem return (self::$createCacheItem)($key, $value, $isHit, $this->tags[$key] ?? null); } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { \assert(self::validateKeys($keys)); @@ -151,9 +136,6 @@ public function getItems(array $keys = []): iterable return $this->generateItems($keys, microtime(true), self::$createCacheItem); } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { \assert('' !== CacheItem::validateKey($key)); @@ -162,9 +144,6 @@ public function deleteItem(mixed $key): bool return true; } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { foreach ($keys as $key) { @@ -174,9 +153,6 @@ public function deleteItems(array $keys): bool return true; } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { if (!$item instanceof CacheItem) { @@ -231,25 +207,16 @@ public function save(CacheItemInterface $item): bool return true; } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { return $this->save($item); } - /** - * {@inheritdoc} - */ public function commit(): bool { return true; } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { if ('' !== $prefix) { @@ -293,9 +260,6 @@ public function getValues(): array return $values; } - /** - * {@inheritdoc} - */ public function reset() { $this->clear(); diff --git a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php index 01c6553600341..1b42849ef0355 100644 --- a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php @@ -88,9 +88,6 @@ static function ($sourceItem, $item, $defaultLifetime, $sourceMetadata = null) { ); } - /** - * {@inheritdoc} - */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { $doSave = true; @@ -125,9 +122,6 @@ public function get(string $key, callable $callback, float $beta = null, array & return $wrap(); } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { $syncItem = self::$syncItem; @@ -150,9 +144,6 @@ public function getItem(mixed $key): CacheItem return $item; } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { return $this->generateItems($this->adapters[0]->getItems($keys), 0); @@ -189,9 +180,6 @@ private function generateItems(iterable $items, int $adapterIndex): \Generator } } - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { foreach ($this->adapters as $adapter) { @@ -203,9 +191,6 @@ public function hasItem(mixed $key): bool return false; } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { $cleared = true; @@ -222,9 +207,6 @@ public function clear(string $prefix = ''): bool return $cleared; } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { $deleted = true; @@ -237,9 +219,6 @@ public function deleteItem(mixed $key): bool return $deleted; } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { $deleted = true; @@ -252,9 +231,6 @@ public function deleteItems(array $keys): bool return $deleted; } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { $saved = true; @@ -267,9 +243,6 @@ public function save(CacheItemInterface $item): bool return $saved; } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { $saved = true; @@ -282,9 +255,6 @@ public function saveDeferred(CacheItemInterface $item): bool return $saved; } - /** - * {@inheritdoc} - */ public function commit(): bool { $committed = true; @@ -297,9 +267,6 @@ public function commit(): bool return $committed; } - /** - * {@inheritdoc} - */ public function prune(): bool { $pruned = true; @@ -313,9 +280,6 @@ public function prune(): bool return $pruned; } - /** - * {@inheritdoc} - */ public function reset() { foreach ($this->adapters as $adapter) { diff --git a/src/Symfony/Component/Cache/Adapter/CouchbaseBucketAdapter.php b/src/Symfony/Component/Cache/Adapter/CouchbaseBucketAdapter.php index 98711d2853117..89700b2ce3247 100644 --- a/src/Symfony/Component/Cache/Adapter/CouchbaseBucketAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/CouchbaseBucketAdapter.php @@ -156,9 +156,6 @@ private static function initOptions(array $options): array return $options; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { $resultsCouchbase = $this->bucket->get($ids); @@ -174,17 +171,11 @@ protected function doFetch(array $ids): iterable return $results; } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { return false !== $this->bucket->get($id); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { if ('' === $namespace) { @@ -196,9 +187,6 @@ protected function doClear(string $namespace): bool return false; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { $results = $this->bucket->remove(array_values($ids)); @@ -213,9 +201,6 @@ protected function doDelete(array $ids): bool return 0 === \count($results); } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { if (!$values = $this->marshaller->marshall($values, $failed)) { diff --git a/src/Symfony/Component/Cache/Adapter/CouchbaseCollectionAdapter.php b/src/Symfony/Component/Cache/Adapter/CouchbaseCollectionAdapter.php index 03fc8acd764a9..b452ed5b5986d 100644 --- a/src/Symfony/Component/Cache/Adapter/CouchbaseCollectionAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/CouchbaseCollectionAdapter.php @@ -131,9 +131,6 @@ private static function getOptions(string $options): array return $results; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): array { $results = []; @@ -152,25 +149,16 @@ protected function doFetch(array $ids): array return $results; } - /** - * {@inheritdoc} - */ protected function doHave($id): bool { return $this->connection->exists($id)->exists(); } - /** - * {@inheritdoc} - */ protected function doClear($namespace): bool { return false; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { $idsErrors = []; @@ -188,9 +176,6 @@ protected function doDelete(array $ids): bool return 0 === \count($idsErrors); } - /** - * {@inheritdoc} - */ protected function doSave(array $values, $lifetime): array|bool { if (!$values = $this->marshaller->marshall($values, $failed)) { diff --git a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php index bc8cbb6b87560..15a711e370384 100644 --- a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php @@ -98,9 +98,6 @@ public function createTable(): void } } - /** - * {@inheritdoc} - */ public function configureSchema(Schema $schema, Connection $forConnection): void { // only update the schema for this connection @@ -115,9 +112,6 @@ public function configureSchema(Schema $schema, Connection $forConnection): void $this->addTableToSchema($schema); } - /** - * {@inheritdoc} - */ public function prune(): bool { $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ?"; @@ -138,9 +132,6 @@ public function prune(): bool return true; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { $now = time(); @@ -175,9 +166,6 @@ protected function doFetch(array $ids): iterable } } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = ? AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ?)"; @@ -192,9 +180,6 @@ protected function doHave(string $id): bool return (bool) $result->fetchOne(); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { if ('' === $namespace) { @@ -215,9 +200,6 @@ protected function doClear(string $namespace): bool return true; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { $sql = "DELETE FROM $this->table WHERE $this->idCol IN (?)"; @@ -229,9 +211,6 @@ protected function doDelete(array $ids): bool return true; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { if (!$values = $this->marshaller->marshall($values, $failed)) { diff --git a/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php index 2b5677d31c1b2..2163eb16f1dc8 100644 --- a/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php @@ -41,9 +41,6 @@ public function __construct(string $namespace = '', int $defaultLifetime = 0, st $this->init($namespace, $directory); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { $ok = $this->doClearCache($namespace); @@ -90,9 +87,6 @@ protected function doClear(string $namespace): bool return $ok; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array { $failed = $this->doSaveCache($values, $lifetime); @@ -129,9 +123,6 @@ protected function doSave(array $values, int $lifetime, array $addTagData = [], return $failed; } - /** - * {@inheritdoc} - */ protected function doDeleteYieldTags(array $ids): iterable { foreach ($ids as $id) { @@ -168,9 +159,6 @@ protected function doDeleteYieldTags(array $ids): iterable } } - /** - * {@inheritdoc} - */ protected function doDeleteTagRelations(array $tagData): bool { foreach ($tagData as $tagId => $idList) { @@ -183,9 +171,6 @@ protected function doDeleteTagRelations(array $tagData): bool return true; } - /** - * {@inheritdoc} - */ protected function doInvalidate(array $tagIds): bool { foreach ($tagIds as $tagId) { diff --git a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php index 9222596d62132..06d9e286f9934 100644 --- a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php @@ -237,9 +237,6 @@ public static function createConnection(array|string $servers, array $options = } } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { if (!$values = $this->marshaller->marshall($values, $failed)) { @@ -258,9 +255,6 @@ protected function doSave(array $values, int $lifetime): array|bool return $this->checkResultCode($this->getClient()->setMulti($encodedValues, $lifetime)) ? $failed : false; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { try { @@ -279,17 +273,11 @@ protected function doFetch(array $ids): iterable } } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { return false !== $this->getClient()->get(self::encodeKey($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode()); } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { $ok = true; @@ -303,9 +291,6 @@ protected function doDelete(array $ids): bool return $ok; } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { return '' === $namespace && $this->getClient()->flush(); diff --git a/src/Symfony/Component/Cache/Adapter/NullAdapter.php b/src/Symfony/Component/Cache/Adapter/NullAdapter.php index 7827000b5fe7c..590c4e1ca34ea 100644 --- a/src/Symfony/Component/Cache/Adapter/NullAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/NullAdapter.php @@ -37,9 +37,6 @@ static function ($key) { ); } - /** - * {@inheritdoc} - */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { $save = true; @@ -47,81 +44,51 @@ public function get(string $key, callable $callback, float $beta = null, array & return $callback((self::$createCacheItem)($key), $save); } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { return (self::$createCacheItem)($key); } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { return $this->generateItems($keys); } - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { return false; } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { return true; } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { return true; } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { return true; } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { return true; } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { return true; } - /** - * {@inheritdoc} - */ public function commit(): bool { return true; } - /** - * {@inheritdoc} - */ public function delete(string $key): bool { return $this->deleteItem($key); diff --git a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php index 8bf72210f8c5f..355efbe8ff061 100644 --- a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php @@ -120,9 +120,6 @@ public function createTable() $conn->exec($sql); } - /** - * {@inheritdoc} - */ public function prune(): bool { $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= :time"; @@ -150,9 +147,6 @@ public function prune(): bool } } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { $connection = $this->getConnection(); @@ -196,9 +190,6 @@ protected function doFetch(array $ids): iterable } } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { $connection = $this->getConnection(); @@ -213,9 +204,6 @@ protected function doHave(string $id): bool return (bool) $stmt->fetchColumn(); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { $conn = $this->getConnection(); @@ -238,9 +226,6 @@ protected function doClear(string $namespace): bool return true; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); @@ -254,9 +239,6 @@ protected function doDelete(array $ids): bool return true; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { if (!$values = $this->marshaller->marshall($values, $failed)) { diff --git a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php index 72a3692cd665b..796ffb56d1f10 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php @@ -78,9 +78,6 @@ public static function create(string $file, CacheItemPoolInterface $fallbackPool return new static($file, $fallbackPool); } - /** - * {@inheritdoc} - */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { if (!isset($this->values)) { @@ -111,9 +108,6 @@ public function get(string $key, callable $callback, float $beta = null, array & return $value; } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { if (!\is_string($key)) { @@ -143,9 +137,6 @@ public function getItem(mixed $key): CacheItem return (self::$createCacheItem)($key, $value, $isHit); } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { foreach ($keys as $key) { @@ -160,9 +151,6 @@ public function getItems(array $keys = []): iterable return $this->generateItems($keys); } - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { if (!\is_string($key)) { @@ -175,9 +163,6 @@ public function hasItem(mixed $key): bool return isset($this->keys[$key]) || $this->pool->hasItem($key); } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { if (!\is_string($key)) { @@ -190,9 +175,6 @@ public function deleteItem(mixed $key): bool return !isset($this->keys[$key]) && $this->pool->deleteItem($key); } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { $deleted = true; @@ -220,9 +202,6 @@ public function deleteItems(array $keys): bool return $deleted; } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { if (!isset($this->values)) { @@ -232,9 +211,6 @@ public function save(CacheItemInterface $item): bool return !isset($this->keys[$item->getKey()]) && $this->pool->save($item); } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { if (!isset($this->values)) { @@ -244,17 +220,11 @@ public function saveDeferred(CacheItemInterface $item): bool return !isset($this->keys[$item->getKey()]) && $this->pool->saveDeferred($item); } - /** - * {@inheritdoc} - */ public function commit(): bool { return $this->pool->commit(); } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { $this->keys = $this->values = []; diff --git a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php index 39468ce66a0fd..23949f5b3f68d 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php @@ -89,9 +89,6 @@ public function prune(): bool return $pruned; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { if ($this->appendOnly) { @@ -165,9 +162,6 @@ protected function doFetch(array $ids): iterable goto begin; } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { if ($this->appendOnly && isset($this->values[$id])) { @@ -205,9 +199,6 @@ protected function doHave(string $id): bool return $now < $expiresAt; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { $ok = true; @@ -267,9 +258,6 @@ protected function doSave(array $values, int $lifetime): array|bool return $ok; } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { $this->values = []; @@ -277,9 +265,6 @@ protected function doClear(string $namespace): bool return $this->doCommonClear($namespace); } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { foreach ($ids as $id) { diff --git a/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php b/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php index d2cd0b9428339..9782b4a06744e 100644 --- a/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php @@ -80,9 +80,6 @@ static function (CacheItemInterface $innerItem, CacheItem $item, $expiry = null) ); } - /** - * {@inheritdoc} - */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { if (!$this->pool instanceof CacheInterface) { @@ -98,9 +95,6 @@ public function get(string $key, callable $callback, float $beta = null, array & }, $beta, $metadata); } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { $item = $this->pool->getItem($this->getId($key)); @@ -108,9 +102,6 @@ public function getItem(mixed $key): CacheItem return (self::$createCacheItem)($key, $item, $this->poolHash); } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { if ($this->namespaceLen) { @@ -122,17 +113,11 @@ public function getItems(array $keys = []): iterable return $this->generateItems($this->pool->getItems($keys)); } - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { return $this->pool->hasItem($this->getId($key)); } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { if ($this->pool instanceof AdapterInterface) { @@ -142,17 +127,11 @@ public function clear(string $prefix = ''): bool return $this->pool->clear(); } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { return $this->pool->deleteItem($this->getId($key)); } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { if ($this->namespaceLen) { @@ -164,25 +143,16 @@ public function deleteItems(array $keys): bool return $this->pool->deleteItems($keys); } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { return $this->doSave($item, __FUNCTION__); } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { return $this->doSave($item, __FUNCTION__); } - /** - * {@inheritdoc} - */ public function commit(): bool { return $this->pool->commit(); diff --git a/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php b/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php index 664c18bba4474..a72b037b03d38 100644 --- a/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php +++ b/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php @@ -40,9 +40,6 @@ public function __construct(CacheInterface $pool, string $namespace = '', int $d $this->miss = new \stdClass(); } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { foreach ($this->pool->getMultiple($ids, $this->miss) as $key => $value) { @@ -52,33 +49,21 @@ protected function doFetch(array $ids): iterable } } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { return $this->pool->has($id); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { return $this->pool->clear(); } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { return $this->pool->deleteMultiple($ids); } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime); diff --git a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php index 368fdca598c65..8f731dd61efb4 100644 --- a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php @@ -81,9 +81,6 @@ public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInter $this->namespace = $namespace; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime, array $addTagData = [], array $delTagData = []): array { $eviction = $this->getRedisEvictionPolicy(); @@ -135,9 +132,6 @@ protected function doSave(array $values, int $lifetime, array $addTagData = [], return $failed; } - /** - * {@inheritdoc} - */ protected function doDeleteYieldTags(array $ids): iterable { $lua = <<<'EOLUA' @@ -176,9 +170,6 @@ protected function doDeleteYieldTags(array $ids): iterable } } - /** - * {@inheritdoc} - */ protected function doDeleteTagRelations(array $tagData): bool { $results = $this->pipeline(static function () use ($tagData) { @@ -194,9 +185,6 @@ protected function doDeleteTagRelations(array $tagData): bool return true; } - /** - * {@inheritdoc} - */ protected function doInvalidate(array $tagIds): bool { // This script scans the set of items linked to tag: it empties the set diff --git a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php index 732d024290982..90b1a73770f2e 100644 --- a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php @@ -114,9 +114,6 @@ static function (AdapterInterface $tagsAdapter, array $tags) { ); } - /** - * {@inheritdoc} - */ public function invalidateTags(array $tags): bool { $ids = []; @@ -129,17 +126,11 @@ public function invalidateTags(array $tags): bool return !$tags || $this->tags->deleteItems($ids); } - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { return $this->getItem($key)->isHit(); } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { foreach ($this->getItems([$key]) as $item) { @@ -147,9 +138,6 @@ public function getItem(mixed $key): CacheItem } } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { $tagKeys = []; @@ -206,9 +194,6 @@ public function getItems(array $keys = []): iterable return (self::$setCacheItemTags)($bufferedItems, $itemTags); } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { if ('' !== $prefix) { @@ -228,17 +213,11 @@ public function clear(string $prefix = ''): bool return $this->pool->clear(); } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { return $this->deleteItems([$key]); } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { foreach ($keys as $key) { @@ -250,9 +229,6 @@ public function deleteItems(array $keys): bool return $this->pool->deleteItems($keys); } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { if (!$item instanceof CacheItem) { @@ -263,9 +239,6 @@ public function save(CacheItemInterface $item): bool return $this->commit(); } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { if (!$item instanceof CacheItem) { @@ -276,9 +249,6 @@ public function saveDeferred(CacheItemInterface $item): bool return true; } - /** - * {@inheritdoc} - */ public function commit(): bool { if (!$items = $this->deferred) { @@ -304,17 +274,11 @@ public function commit(): bool return $ok; } - /** - * {@inheritdoc} - */ public function prune(): bool { return $this->pool instanceof PruneableInterface && $this->pool->prune(); } - /** - * {@inheritdoc} - */ public function reset() { $this->commit(); diff --git a/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php b/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php index 7c4c9ce9aea29..a99819962e7f1 100644 --- a/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/TraceableAdapter.php @@ -35,9 +35,6 @@ public function __construct(AdapterInterface $pool) $this->pool = $pool; } - /** - * {@inheritdoc} - */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { if (!$this->pool instanceof CacheInterface) { @@ -67,9 +64,6 @@ public function get(string $key, callable $callback, float $beta = null, array & return $value; } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { $event = $this->start(__FUNCTION__); @@ -87,9 +81,6 @@ public function getItem(mixed $key): CacheItem return $item; } - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { $event = $this->start(__FUNCTION__); @@ -100,9 +91,6 @@ public function hasItem(mixed $key): bool } } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { $event = $this->start(__FUNCTION__); @@ -113,9 +101,6 @@ public function deleteItem(mixed $key): bool } } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { $event = $this->start(__FUNCTION__); @@ -126,9 +111,6 @@ public function save(CacheItemInterface $item): bool } } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { $event = $this->start(__FUNCTION__); @@ -139,9 +121,6 @@ public function saveDeferred(CacheItemInterface $item): bool } } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { $event = $this->start(__FUNCTION__); @@ -165,9 +144,6 @@ public function getItems(array $keys = []): iterable return $f(); } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { $event = $this->start(__FUNCTION__); @@ -182,9 +158,6 @@ public function clear(string $prefix = ''): bool } } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { $event = $this->start(__FUNCTION__); @@ -196,9 +169,6 @@ public function deleteItems(array $keys): bool } } - /** - * {@inheritdoc} - */ public function commit(): bool { $event = $this->start(__FUNCTION__); @@ -209,9 +179,6 @@ public function commit(): bool } } - /** - * {@inheritdoc} - */ public function prune(): bool { if (!$this->pool instanceof PruneableInterface) { @@ -225,9 +192,6 @@ public function prune(): bool } } - /** - * {@inheritdoc} - */ public function reset() { if ($this->pool instanceof ResetInterface) { @@ -237,9 +201,6 @@ public function reset() $this->clearCalls(); } - /** - * {@inheritdoc} - */ public function delete(string $key): bool { $event = $this->start(__FUNCTION__); diff --git a/src/Symfony/Component/Cache/Adapter/TraceableTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/TraceableTagAwareAdapter.php index 35506339be4d4..c85d199e49cb6 100644 --- a/src/Symfony/Component/Cache/Adapter/TraceableTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/TraceableTagAwareAdapter.php @@ -23,9 +23,6 @@ public function __construct(TagAwareAdapterInterface $pool) parent::__construct($pool); } - /** - * {@inheritdoc} - */ public function invalidateTags(array $tags): bool { $event = $this->start(__FUNCTION__); diff --git a/src/Symfony/Component/Cache/CacheItem.php b/src/Symfony/Component/Cache/CacheItem.php index 0d3d9f1b3e6c9..66c89f47f081a 100644 --- a/src/Symfony/Component/Cache/CacheItem.php +++ b/src/Symfony/Component/Cache/CacheItem.php @@ -34,33 +34,22 @@ final class CacheItem implements ItemInterface protected ?string $poolHash = null; protected bool $isTaggable = false; - /** - * {@inheritdoc} - */ public function getKey(): string { return $this->key; } - /** - * {@inheritdoc} - */ public function get(): mixed { return $this->value; } - /** - * {@inheritdoc} - */ public function isHit(): bool { return $this->isHit; } /** - * {@inheritdoc} - * * @return $this */ public function set($value): static @@ -71,8 +60,6 @@ public function set($value): static } /** - * {@inheritdoc} - * * @return $this */ public function expiresAt(?\DateTimeInterface $expiration): static @@ -83,8 +70,6 @@ public function expiresAt(?\DateTimeInterface $expiration): static } /** - * {@inheritdoc} - * * @return $this */ public function expiresAfter(mixed $time): static @@ -102,9 +87,6 @@ public function expiresAfter(mixed $time): static return $this; } - /** - * {@inheritdoc} - */ public function tag(mixed $tags): static { if (!$this->isTaggable) { @@ -133,9 +115,6 @@ public function tag(mixed $tags): static return $this; } - /** - * {@inheritdoc} - */ public function getMetadata(): array { return $this->metadata; diff --git a/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php b/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php index e7dbb641f0cdb..bbbf1f5d1240b 100644 --- a/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php +++ b/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php @@ -36,9 +36,6 @@ public function addInstance(string $name, TraceableAdapter $instance) $this->instances[$name] = $instance; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $empty = ['calls' => [], 'adapters' => [], 'config' => [], 'options' => [], 'statistics' => []]; @@ -65,9 +62,6 @@ public function lateCollect() $this->data['instances']['calls'] = $this->cloneVar($this->data['instances']['calls']); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'cache'; diff --git a/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php b/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php index 33b3b6ec922ad..888e6a05ad871 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CacheCollectorPass.php @@ -26,9 +26,6 @@ */ class CacheCollectorPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('data_collector.cache')) { diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php index 76dd19d2acbb2..8f77c1a6c7cc9 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolClearerPass.php @@ -20,9 +20,6 @@ */ class CachePoolClearerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $container->getParameterBag()->remove('cache.prefix.seed'); diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php index e292e3180e235..8aa7e46cb0b80 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php @@ -29,9 +29,6 @@ */ class CachePoolPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if ($container->hasParameter('cache.prefix.seed')) { diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php index 3bbc4b84aa62e..a8d072db5c9da 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPrunerPass.php @@ -23,9 +23,6 @@ */ class CachePoolPrunerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('console.command.cache_pool_prune')) { diff --git a/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php b/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php index 5c34fb2ea59d3..e11607b3daaf2 100644 --- a/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php +++ b/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php @@ -34,9 +34,6 @@ public function __construct(bool $useIgbinarySerialize = null, bool $throwOnSeri $this->throwOnSerializationFailure = $throwOnSerializationFailure; } - /** - * {@inheritdoc} - */ public function marshall(array $values, ?array &$failed): array { $serialized = $failed = []; @@ -59,9 +56,6 @@ public function marshall(array $values, ?array &$failed): array return $serialized; } - /** - * {@inheritdoc} - */ public function unmarshall(string $value): mixed { if ('b:0;' === $value) { diff --git a/src/Symfony/Component/Cache/Marshaller/DeflateMarshaller.php b/src/Symfony/Component/Cache/Marshaller/DeflateMarshaller.php index 95e3d320694aa..35237de688415 100644 --- a/src/Symfony/Component/Cache/Marshaller/DeflateMarshaller.php +++ b/src/Symfony/Component/Cache/Marshaller/DeflateMarshaller.php @@ -31,17 +31,11 @@ public function __construct(MarshallerInterface $marshaller) $this->marshaller = $marshaller; } - /** - * {@inheritdoc} - */ public function marshall(array $values, ?array &$failed): array { return array_map('gzdeflate', $this->marshaller->marshall($values, $failed)); } - /** - * {@inheritdoc} - */ public function unmarshall(string $value): mixed { if (false !== $inflatedValue = @gzinflate($value)) { diff --git a/src/Symfony/Component/Cache/Marshaller/SodiumMarshaller.php b/src/Symfony/Component/Cache/Marshaller/SodiumMarshaller.php index 4d8a04ee6da45..ee64c949a3771 100644 --- a/src/Symfony/Component/Cache/Marshaller/SodiumMarshaller.php +++ b/src/Symfony/Component/Cache/Marshaller/SodiumMarshaller.php @@ -48,9 +48,6 @@ public static function isSupported(): bool return \function_exists('sodium_crypto_box_seal'); } - /** - * {@inheritdoc} - */ public function marshall(array $values, ?array &$failed): array { $encryptionKey = sodium_crypto_box_publickey($this->decryptionKeys[0]); @@ -63,9 +60,6 @@ public function marshall(array $values, ?array &$failed): array return $encryptedValues; } - /** - * {@inheritdoc} - */ public function unmarshall(string $value): mixed { foreach ($this->decryptionKeys as $k) { diff --git a/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php b/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php index 60961538584e2..4fd093c6906bf 100644 --- a/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php +++ b/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php @@ -25,9 +25,6 @@ public function __construct(MarshallerInterface $marshaller = null) $this->marshaller = $marshaller ?? new DefaultMarshaller(); } - /** - * {@inheritdoc} - */ public function marshall(array $values, ?array &$failed): array { $failed = $notSerialized = $serialized = []; @@ -64,9 +61,6 @@ public function marshall(array $values, ?array &$failed): array return $serialized; } - /** - * {@inheritdoc} - */ public function unmarshall(string $value): mixed { // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F diff --git a/src/Symfony/Component/Cache/Psr16Cache.php b/src/Symfony/Component/Cache/Psr16Cache.php index e36646ef0827b..f21384fee967f 100644 --- a/src/Symfony/Component/Cache/Psr16Cache.php +++ b/src/Symfony/Component/Cache/Psr16Cache.php @@ -77,9 +77,6 @@ static function (CacheItem $item) { ); } - /** - * {@inheritdoc} - */ public function get($key, $default = null): mixed { try { @@ -97,9 +94,6 @@ public function get($key, $default = null): mixed return $item->isHit() ? $item->get() : $default; } - /** - * {@inheritdoc} - */ public function set($key, $value, $ttl = null): bool { try { @@ -120,9 +114,6 @@ public function set($key, $value, $ttl = null): bool return $this->pool->save($item); } - /** - * {@inheritdoc} - */ public function delete($key): bool { try { @@ -134,17 +125,11 @@ public function delete($key): bool } } - /** - * {@inheritdoc} - */ public function clear(): bool { return $this->pool->clear(); } - /** - * {@inheritdoc} - */ public function getMultiple($keys, $default = null): iterable { if ($keys instanceof \Traversable) { @@ -177,9 +162,6 @@ public function getMultiple($keys, $default = null): iterable return $values; } - /** - * {@inheritdoc} - */ public function setMultiple($values, $ttl = null): bool { $valuesIsArray = \is_array($values); @@ -228,9 +210,6 @@ public function setMultiple($values, $ttl = null): bool return $this->pool->commit() && $ok; } - /** - * {@inheritdoc} - */ public function deleteMultiple($keys): bool { if ($keys instanceof \Traversable) { @@ -248,9 +227,6 @@ public function deleteMultiple($keys): bool } } - /** - * {@inheritdoc} - */ public function has($key): bool { try { diff --git a/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php index 8862e54cb2bd3..22811f5e9663a 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php @@ -43,9 +43,6 @@ public static function setupBeforeClass(): void ); } - /** - * {@inheritdoc} - */ public function createCachePool($defaultLifetime = 0): CacheItemPoolInterface { $client = $defaultLifetime diff --git a/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseCollectionAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseCollectionAdapterTest.php index bae6a27d4c725..be5b2ea63dd6e 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseCollectionAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseCollectionAdapterTest.php @@ -43,9 +43,6 @@ public static function setupBeforeClass(): void ); } - /** - * {@inheritdoc} - */ public function createCachePool($defaultLifetime = 0): CacheItemPoolInterface { if (!CouchbaseCollectionAdapter::isSupported()) { diff --git a/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php b/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php index cf1d1b901f16e..1757ea3051557 100644 --- a/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php +++ b/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php @@ -87,9 +87,6 @@ abstract protected function doDelete(array $ids): bool; */ abstract protected function doSave(array $values, int $lifetime): array|bool; - /** - * {@inheritdoc} - */ public function hasItem(mixed $key): bool { $id = $this->getId($key); @@ -107,9 +104,6 @@ public function hasItem(mixed $key): bool } } - /** - * {@inheritdoc} - */ public function clear(string $prefix = ''): bool { $this->deferred = []; @@ -146,17 +140,11 @@ public function clear(string $prefix = ''): bool } } - /** - * {@inheritdoc} - */ public function deleteItem(mixed $key): bool { return $this->deleteItems([$key]); } - /** - * {@inheritdoc} - */ public function deleteItems(array $keys): bool { $ids = []; @@ -192,9 +180,6 @@ public function deleteItems(array $keys): bool return $ok; } - /** - * {@inheritdoc} - */ public function getItem(mixed $key): CacheItem { $id = $this->getId($key); @@ -219,9 +204,6 @@ public function getItem(mixed $key): CacheItem return (self::$createCacheItem)($key, null, false); } - /** - * {@inheritdoc} - */ public function getItems(array $keys = []): iterable { $ids = []; @@ -247,9 +229,6 @@ public function getItems(array $keys = []): iterable return $this->generateItems($items, $ids); } - /** - * {@inheritdoc} - */ public function save(CacheItemInterface $item): bool { if (!$item instanceof CacheItem) { @@ -260,9 +239,6 @@ public function save(CacheItemInterface $item): bool return $this->commit(); } - /** - * {@inheritdoc} - */ public function saveDeferred(CacheItemInterface $item): bool { if (!$item instanceof CacheItem) { @@ -293,9 +269,6 @@ public function enableVersioning(bool $enable = true): bool return $wasEnabled; } - /** - * {@inheritdoc} - */ public function reset() { if ($this->deferred) { diff --git a/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php b/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php index 8e30a552b0036..612631f176bc6 100644 --- a/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php +++ b/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php @@ -50,9 +50,6 @@ private function init(string $namespace, ?string $directory) $this->directory = $directory; } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { $ok = true; @@ -68,9 +65,6 @@ protected function doClear(string $namespace): bool return $ok; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { $ok = true; diff --git a/src/Symfony/Component/Cache/Traits/FilesystemTrait.php b/src/Symfony/Component/Cache/Traits/FilesystemTrait.php index 05ad8ed674a64..b1464f0c5026e 100644 --- a/src/Symfony/Component/Cache/Traits/FilesystemTrait.php +++ b/src/Symfony/Component/Cache/Traits/FilesystemTrait.php @@ -47,9 +47,6 @@ public function prune(): bool return $pruned; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { $values = []; @@ -76,9 +73,6 @@ protected function doFetch(array $ids): iterable return $values; } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { $file = $this->getFile($id); @@ -86,9 +80,6 @@ protected function doHave(string $id): bool return is_file($file) && (@filemtime($file) > time() || $this->doFetch([$id])); } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { $expiresAt = $lifetime ? (time() + $lifetime) : 0; diff --git a/src/Symfony/Component/Cache/Traits/ProxyTrait.php b/src/Symfony/Component/Cache/Traits/ProxyTrait.php index ba6f8cba90e13..45aa4aea2afe8 100644 --- a/src/Symfony/Component/Cache/Traits/ProxyTrait.php +++ b/src/Symfony/Component/Cache/Traits/ProxyTrait.php @@ -23,17 +23,11 @@ trait ProxyTrait { private object $pool; - /** - * {@inheritdoc} - */ public function prune(): bool { return $this->pool instanceof PruneableInterface && $this->pool->prune(); } - /** - * {@inheritdoc} - */ public function reset() { if ($this->pool instanceof ResetInterface) { diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index c745deb6e4618..5682e119038e0 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -345,9 +345,6 @@ public static function createConnection(string $dsn, array $options = []): \Redi return $redis; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids): iterable { if (!$ids) { @@ -381,17 +378,11 @@ protected function doFetch(array $ids): iterable return $result; } - /** - * {@inheritdoc} - */ protected function doHave(string $id): bool { return (bool) $this->redis->exists($id); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace): bool { if ($this->redis instanceof \Predis\ClientInterface) { @@ -453,9 +444,6 @@ protected function doClear(string $namespace): bool return $cleared; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids): bool { if (!$ids) { @@ -490,9 +478,6 @@ protected function doDelete(array $ids): bool return true; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime): array|bool { if (!$values = $this->marshaller->marshall($values, $failed)) { diff --git a/src/Symfony/Component/Config/ConfigCacheFactory.php b/src/Symfony/Component/Config/ConfigCacheFactory.php index 86351c48d5a90..39adad1e1a529 100644 --- a/src/Symfony/Component/Config/ConfigCacheFactory.php +++ b/src/Symfony/Component/Config/ConfigCacheFactory.php @@ -32,9 +32,6 @@ public function __construct(bool $debug) $this->debug = $debug; } - /** - * {@inheritdoc} - */ public function cache(string $file, callable $callback): ConfigCacheInterface { $cache = new ConfigCache($file, $this->debug); diff --git a/src/Symfony/Component/Config/Definition/ArrayNode.php b/src/Symfony/Component/Config/Definition/ArrayNode.php index 76b811c7fbff2..97500c90a75d3 100644 --- a/src/Symfony/Component/Config/Definition/ArrayNode.php +++ b/src/Symfony/Component/Config/Definition/ArrayNode.php @@ -38,8 +38,6 @@ public function setNormalizeKeys(bool $normalizeKeys) } /** - * {@inheritdoc} - * * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML. * After running this method, all keys are normalized to foo_bar. * @@ -148,25 +146,16 @@ public function shouldIgnoreExtraKeys(): bool return $this->ignoreExtraKeys; } - /** - * {@inheritdoc} - */ public function setName(string $name) { $this->name = $name; } - /** - * {@inheritdoc} - */ public function hasDefaultValue(): bool { return $this->addIfNotSet; } - /** - * {@inheritdoc} - */ public function getDefaultValue(): mixed { if (!$this->hasDefaultValue()) { @@ -203,8 +192,6 @@ public function addChild(NodeInterface $node) } /** - * {@inheritdoc} - * * @throws UnsetKeyException * @throws InvalidConfigurationException if the node doesn't have enough children */ @@ -251,9 +238,6 @@ protected function finalizeValue(mixed $value): mixed return $value; } - /** - * {@inheritdoc} - */ protected function validateType(mixed $value) { if (!\is_array($value) && (!$this->allowFalse || false !== $value)) { @@ -268,8 +252,6 @@ protected function validateType(mixed $value) } /** - * {@inheritdoc} - * * @throws InvalidConfigurationException */ protected function normalizeValue(mixed $value): mixed @@ -346,8 +328,6 @@ protected function remapXml(array $value): array } /** - * {@inheritdoc} - * * @throws InvalidConfigurationException * @throws \RuntimeException */ @@ -392,9 +372,6 @@ protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed return $leftSide; } - /** - * {@inheritdoc} - */ protected function allowPlaceholders(): bool { return false; diff --git a/src/Symfony/Component/Config/Definition/BaseNode.php b/src/Symfony/Component/Config/Definition/BaseNode.php index d227336a2897f..d5d145e96a631 100644 --- a/src/Symfony/Component/Config/Definition/BaseNode.php +++ b/src/Symfony/Component/Config/Definition/BaseNode.php @@ -222,9 +222,6 @@ public function setFinalValidationClosures(array $closures) $this->finalValidationClosures = $closures; } - /** - * {@inheritdoc} - */ public function isRequired(): bool { return $this->required; @@ -251,17 +248,11 @@ public function getDeprecation(string $node, string $path): array ]; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; } - /** - * {@inheritdoc} - */ public function getPath(): string { if (null !== $this->parent) { @@ -271,9 +262,6 @@ public function getPath(): string return $this->name; } - /** - * {@inheritdoc} - */ final public function merge(mixed $leftSide, mixed $rightSide): mixed { if (!$this->allowOverwrite) { @@ -312,9 +300,6 @@ final public function merge(mixed $leftSide, mixed $rightSide): mixed return $this->mergeValues($leftSide, $rightSide); } - /** - * {@inheritdoc} - */ final public function normalize(mixed $value): mixed { $value = $this->preNormalize($value); @@ -368,9 +353,6 @@ public function getParent(): ?NodeInterface return $this->parent; } - /** - * {@inheritdoc} - */ final public function finalize(mixed $value): mixed { if ($value !== $placeholders = self::resolvePlaceholderValue($value)) { diff --git a/src/Symfony/Component/Config/Definition/BooleanNode.php b/src/Symfony/Component/Config/Definition/BooleanNode.php index 7798567d9c461..812881d6dd035 100644 --- a/src/Symfony/Component/Config/Definition/BooleanNode.php +++ b/src/Symfony/Component/Config/Definition/BooleanNode.php @@ -20,9 +20,6 @@ */ class BooleanNode extends ScalarNode { - /** - * {@inheritdoc} - */ protected function validateType(mixed $value) { if (!\is_bool($value)) { @@ -36,18 +33,12 @@ protected function validateType(mixed $value) } } - /** - * {@inheritdoc} - */ protected function isValueEmpty(mixed $value): bool { // a boolean value cannot be empty return false; } - /** - * {@inheritdoc} - */ protected function getValidPlaceholderTypes(): array { return ['bool']; diff --git a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php index f81f62429f244..fe0160d8f16ea 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php @@ -37,9 +37,6 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition protected $nodeBuilder; protected $normalizeKeys = true; - /** - * {@inheritdoc} - */ public function __construct(?string $name, NodeParentInterface $parent = null) { parent::__construct($name, $parent); @@ -48,17 +45,11 @@ public function __construct(?string $name, NodeParentInterface $parent = null) $this->trueEquivalent = []; } - /** - * {@inheritdoc} - */ public function setBuilder(NodeBuilder $builder) { $this->nodeBuilder = $builder; } - /** - * {@inheritdoc} - */ public function children(): NodeBuilder { return $this->getNodeBuilder(); @@ -335,9 +326,6 @@ public function normalizeKeys(bool $bool): static return $this; } - /** - * {@inheritdoc} - */ public function append(NodeDefinition $node): static { $this->children[$node->name] = $node->setParent($this); @@ -357,9 +345,6 @@ protected function getNodeBuilder(): NodeBuilder return $this->nodeBuilder->setParent($this); } - /** - * {@inheritdoc} - */ protected function createNode(): NodeInterface { if (null === $this->prototype) { diff --git a/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php index 2f26975f0a593..3d8fad4d55d31 100644 --- a/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php @@ -21,9 +21,6 @@ */ class BooleanNodeDefinition extends ScalarNodeDefinition { - /** - * {@inheritdoc} - */ public function __construct(?string $name, NodeParentInterface $parent = null) { parent::__construct($name, $parent); @@ -40,8 +37,6 @@ protected function instantiateNode(): BooleanNode } /** - * {@inheritdoc} - * * @throws InvalidDefinitionException */ public function cannotBeEmpty(): static diff --git a/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php index 83a67580c7248..890910c95d4fe 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php @@ -58,8 +58,6 @@ public function min(int|float $min): static } /** - * {@inheritdoc} - * * @throws InvalidDefinitionException */ public function cannotBeEmpty(): static diff --git a/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php index 7ea15d3147aa0..c49391f44473e 100644 --- a/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php @@ -29,9 +29,6 @@ protected function instantiateNode(): VariableNode return new VariableNode($this->name, $this->parent, $this->pathSeparator); } - /** - * {@inheritdoc} - */ protected function createNode(): NodeInterface { $node = $this->instantiateNode(); diff --git a/src/Symfony/Component/Config/Definition/EnumNode.php b/src/Symfony/Component/Config/Definition/EnumNode.php index 3a777119171f7..f8b451cc1ecd6 100644 --- a/src/Symfony/Component/Config/Definition/EnumNode.php +++ b/src/Symfony/Component/Config/Definition/EnumNode.php @@ -38,9 +38,6 @@ public function getValues() return $this->values; } - /** - * {@inheritdoc} - */ protected function finalizeValue(mixed $value): mixed { $value = parent::finalizeValue($value); diff --git a/src/Symfony/Component/Config/Definition/FloatNode.php b/src/Symfony/Component/Config/Definition/FloatNode.php index 235927f7b817a..e9123e8b0d363 100644 --- a/src/Symfony/Component/Config/Definition/FloatNode.php +++ b/src/Symfony/Component/Config/Definition/FloatNode.php @@ -20,9 +20,6 @@ */ class FloatNode extends NumericNode { - /** - * {@inheritdoc} - */ protected function validateType(mixed $value) { // Integers are also accepted, we just cast them @@ -41,9 +38,6 @@ protected function validateType(mixed $value) } } - /** - * {@inheritdoc} - */ protected function getValidPlaceholderTypes(): array { return ['float']; diff --git a/src/Symfony/Component/Config/Definition/IntegerNode.php b/src/Symfony/Component/Config/Definition/IntegerNode.php index 62643feb4888b..cc9132c749245 100644 --- a/src/Symfony/Component/Config/Definition/IntegerNode.php +++ b/src/Symfony/Component/Config/Definition/IntegerNode.php @@ -20,9 +20,6 @@ */ class IntegerNode extends NumericNode { - /** - * {@inheritdoc} - */ protected function validateType(mixed $value) { if (!\is_int($value)) { @@ -36,9 +33,6 @@ protected function validateType(mixed $value) } } - /** - * {@inheritdoc} - */ protected function getValidPlaceholderTypes(): array { return ['int']; diff --git a/src/Symfony/Component/Config/Definition/Loader/DefinitionFileLoader.php b/src/Symfony/Component/Config/Definition/Loader/DefinitionFileLoader.php index 1a1a37d041efd..506f787cab4cb 100644 --- a/src/Symfony/Component/Config/Definition/Loader/DefinitionFileLoader.php +++ b/src/Symfony/Component/Config/Definition/Loader/DefinitionFileLoader.php @@ -34,9 +34,6 @@ public function __construct( parent::__construct($locator); } - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { // the loader variable is exposed to the included file below @@ -60,9 +57,6 @@ public function load(mixed $resource, string $type = null): mixed return null; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { if (!\is_string($resource)) { diff --git a/src/Symfony/Component/Config/Definition/NumericNode.php b/src/Symfony/Component/Config/Definition/NumericNode.php index 4d3e01355e9e2..da32b843a7dc9 100644 --- a/src/Symfony/Component/Config/Definition/NumericNode.php +++ b/src/Symfony/Component/Config/Definition/NumericNode.php @@ -30,9 +30,6 @@ public function __construct(?string $name, NodeInterface $parent = null, int|flo $this->max = $max; } - /** - * {@inheritdoc} - */ protected function finalizeValue(mixed $value): mixed { $value = parent::finalizeValue($value); @@ -53,9 +50,6 @@ protected function finalizeValue(mixed $value): mixed return $value; } - /** - * {@inheritdoc} - */ protected function isValueEmpty(mixed $value): bool { // a numeric value cannot be empty diff --git a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php index b32706ff1a634..d3ca83bdb0c79 100644 --- a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +++ b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -89,9 +89,6 @@ public function setDefaultValue(array $value) $this->defaultValue = $value; } - /** - * {@inheritdoc} - */ public function hasDefaultValue(): bool { return true; @@ -112,8 +109,6 @@ public function setAddChildrenIfNoneSet(int|string|array|null $children = ['defa } /** - * {@inheritdoc} - * * The default value could be either explicited or derived from the prototype * default value. */ @@ -158,9 +153,6 @@ public function addChild(NodeInterface $node) throw new Exception('A prototyped array node cannot have concrete children.'); } - /** - * {@inheritdoc} - */ protected function finalizeValue(mixed $value): mixed { if (false === $value) { @@ -187,8 +179,6 @@ protected function finalizeValue(mixed $value): mixed } /** - * {@inheritdoc} - * * @throws DuplicateKeyException */ protected function normalizeValue(mixed $value): mixed @@ -255,9 +245,6 @@ protected function normalizeValue(mixed $value): mixed return $normalized; } - /** - * {@inheritdoc} - */ protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed { if (false === $rightSide) { diff --git a/src/Symfony/Component/Config/Definition/ScalarNode.php b/src/Symfony/Component/Config/Definition/ScalarNode.php index 50e0365234122..766436dd23514 100644 --- a/src/Symfony/Component/Config/Definition/ScalarNode.php +++ b/src/Symfony/Component/Config/Definition/ScalarNode.php @@ -27,9 +27,6 @@ */ class ScalarNode extends VariableNode { - /** - * {@inheritdoc} - */ protected function validateType(mixed $value) { if (!\is_scalar($value) && null !== $value) { @@ -43,9 +40,6 @@ protected function validateType(mixed $value) } } - /** - * {@inheritdoc} - */ protected function isValueEmpty(mixed $value): bool { // assume environment variables are never empty (which in practice is likely to be true during runtime) @@ -57,9 +51,6 @@ protected function isValueEmpty(mixed $value): bool return null === $value || '' === $value; } - /** - * {@inheritdoc} - */ protected function getValidPlaceholderTypes(): array { return ['bool', 'int', 'float', 'string']; diff --git a/src/Symfony/Component/Config/Definition/VariableNode.php b/src/Symfony/Component/Config/Definition/VariableNode.php index a06e0e154f65c..c636f12c4e632 100644 --- a/src/Symfony/Component/Config/Definition/VariableNode.php +++ b/src/Symfony/Component/Config/Definition/VariableNode.php @@ -33,17 +33,11 @@ public function setDefaultValue(mixed $value) $this->defaultValue = $value; } - /** - * {@inheritdoc} - */ public function hasDefaultValue(): bool { return $this->defaultValueSet; } - /** - * {@inheritdoc} - */ public function getDefaultValue(): mixed { $v = $this->defaultValue; @@ -61,24 +55,15 @@ public function setAllowEmptyValue(bool $boolean) $this->allowEmptyValue = $boolean; } - /** - * {@inheritdoc} - */ public function setName(string $name) { $this->name = $name; } - /** - * {@inheritdoc} - */ protected function validateType(mixed $value) { } - /** - * {@inheritdoc} - */ protected function finalizeValue(mixed $value): mixed { // deny environment variables only when using custom validators @@ -106,17 +91,11 @@ protected function finalizeValue(mixed $value): mixed return $value; } - /** - * {@inheritdoc} - */ protected function normalizeValue(mixed $value): mixed { return $value; } - /** - * {@inheritdoc} - */ protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed { return $rightSide; diff --git a/src/Symfony/Component/Config/FileLocator.php b/src/Symfony/Component/Config/FileLocator.php index 21122e52c92e2..ab18232db164c 100644 --- a/src/Symfony/Component/Config/FileLocator.php +++ b/src/Symfony/Component/Config/FileLocator.php @@ -30,9 +30,6 @@ public function __construct(string|array $paths = []) $this->paths = (array) $paths; } - /** - * {@inheritdoc} - */ public function locate(string $name, string $currentPath = null, bool $first = true) { if ('' === $name) { diff --git a/src/Symfony/Component/Config/Loader/DelegatingLoader.php b/src/Symfony/Component/Config/Loader/DelegatingLoader.php index 29c2d3033286c..fac3724e9eac3 100644 --- a/src/Symfony/Component/Config/Loader/DelegatingLoader.php +++ b/src/Symfony/Component/Config/Loader/DelegatingLoader.php @@ -28,9 +28,6 @@ public function __construct(LoaderResolverInterface $resolver) $this->resolver = $resolver; } - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { if (false === $loader = $this->resolver->resolve($resource, $type)) { @@ -40,9 +37,6 @@ public function load(mixed $resource, string $type = null): mixed return $loader->load($resource, $type); } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return false !== $this->resolver->resolve($resource, $type); diff --git a/src/Symfony/Component/Config/Loader/GlobFileLoader.php b/src/Symfony/Component/Config/Loader/GlobFileLoader.php index f52d0f79d939e..f921ec555a654 100644 --- a/src/Symfony/Component/Config/Loader/GlobFileLoader.php +++ b/src/Symfony/Component/Config/Loader/GlobFileLoader.php @@ -18,17 +18,11 @@ */ class GlobFileLoader extends FileLoader { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { return $this->import($resource); } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return 'glob' === $type; diff --git a/src/Symfony/Component/Config/Loader/Loader.php b/src/Symfony/Component/Config/Loader/Loader.php index e0974fb151d9e..2ab50b021b2b8 100644 --- a/src/Symfony/Component/Config/Loader/Loader.php +++ b/src/Symfony/Component/Config/Loader/Loader.php @@ -28,17 +28,11 @@ public function __construct(string $env = null) $this->env = $env; } - /** - * {@inheritdoc} - */ public function getResolver(): LoaderResolverInterface { return $this->resolver; } - /** - * {@inheritdoc} - */ public function setResolver(LoaderResolverInterface $resolver) { $this->resolver = $resolver; diff --git a/src/Symfony/Component/Config/Loader/LoaderResolver.php b/src/Symfony/Component/Config/Loader/LoaderResolver.php index 81e555f1a5c20..fa00730dc4905 100644 --- a/src/Symfony/Component/Config/Loader/LoaderResolver.php +++ b/src/Symfony/Component/Config/Loader/LoaderResolver.php @@ -36,9 +36,6 @@ public function __construct(array $loaders = []) } } - /** - * {@inheritdoc} - */ public function resolve(mixed $resource, string $type = null): LoaderInterface|false { foreach ($this->loaders as $loader) { diff --git a/src/Symfony/Component/Config/Resource/ClassExistenceResource.php b/src/Symfony/Component/Config/Resource/ClassExistenceResource.php index 22b4309e98464..eb886e90281c2 100644 --- a/src/Symfony/Component/Config/Resource/ClassExistenceResource.php +++ b/src/Symfony/Component/Config/Resource/ClassExistenceResource.php @@ -53,8 +53,6 @@ public function getResource(): string } /** - * {@inheritdoc} - * * @throws \ReflectionException when a parent class/interface/trait is not found */ public function isFresh(int $timestamp): bool diff --git a/src/Symfony/Component/Config/Resource/ComposerResource.php b/src/Symfony/Component/Config/Resource/ComposerResource.php index 807878abdd2d4..e9b78b4fdcfde 100644 --- a/src/Symfony/Component/Config/Resource/ComposerResource.php +++ b/src/Symfony/Component/Config/Resource/ComposerResource.php @@ -40,9 +40,6 @@ public function __toString(): string return __CLASS__; } - /** - * {@inheritdoc} - */ public function isFresh(int $timestamp): bool { self::refresh(); diff --git a/src/Symfony/Component/Config/Resource/DirectoryResource.php b/src/Symfony/Component/Config/Resource/DirectoryResource.php index 3154dac9f964c..b95ae2c194f87 100644 --- a/src/Symfony/Component/Config/Resource/DirectoryResource.php +++ b/src/Symfony/Component/Config/Resource/DirectoryResource.php @@ -56,9 +56,6 @@ public function getPattern(): ?string return $this->pattern; } - /** - * {@inheritdoc} - */ public function isFresh(int $timestamp): bool { if (!is_dir($this->resource)) { diff --git a/src/Symfony/Component/Config/Resource/FileExistenceResource.php b/src/Symfony/Component/Config/Resource/FileExistenceResource.php index 39c3d8b779bd4..e7b91ff382bb2 100644 --- a/src/Symfony/Component/Config/Resource/FileExistenceResource.php +++ b/src/Symfony/Component/Config/Resource/FileExistenceResource.php @@ -46,9 +46,6 @@ public function getResource(): string return $this->resource; } - /** - * {@inheritdoc} - */ public function isFresh(int $timestamp): bool { return file_exists($this->resource) === $this->exists; diff --git a/src/Symfony/Component/Config/Resource/FileResource.php b/src/Symfony/Component/Config/Resource/FileResource.php index d10e8a5aafa5f..6e8f9bdb3567d 100644 --- a/src/Symfony/Component/Config/Resource/FileResource.php +++ b/src/Symfony/Component/Config/Resource/FileResource.php @@ -53,9 +53,6 @@ public function getResource(): string return $this->resource; } - /** - * {@inheritdoc} - */ public function isFresh(int $timestamp): bool { return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp; diff --git a/src/Symfony/Component/Config/Resource/GlobResource.php b/src/Symfony/Component/Config/Resource/GlobResource.php index 96699c8d9d45e..7acfcd663b410 100644 --- a/src/Symfony/Component/Config/Resource/GlobResource.php +++ b/src/Symfony/Component/Config/Resource/GlobResource.php @@ -69,9 +69,6 @@ public function __toString(): string return 'glob.'.$this->prefix.(int) $this->recursive.$this->pattern.(int) $this->forExclusion.implode("\0", $this->excludedPrefixes); } - /** - * {@inheritdoc} - */ public function isFresh(int $timestamp): bool { $hash = $this->computeHash(); diff --git a/src/Symfony/Component/Config/Resource/ReflectionClassResource.php b/src/Symfony/Component/Config/Resource/ReflectionClassResource.php index 63c3603b8682a..279ff203c2ac8 100644 --- a/src/Symfony/Component/Config/Resource/ReflectionClassResource.php +++ b/src/Symfony/Component/Config/Resource/ReflectionClassResource.php @@ -35,9 +35,6 @@ public function __construct(\ReflectionClass $classReflector, array $excludedVen $this->excludedVendors = $excludedVendors; } - /** - * {@inheritdoc} - */ public function isFresh(int $timestamp): bool { if (!isset($this->hash)) { diff --git a/src/Symfony/Component/Config/ResourceCheckerConfigCache.php b/src/Symfony/Component/Config/ResourceCheckerConfigCache.php index c87a92fefdd5a..40be86e5ec9b0 100644 --- a/src/Symfony/Component/Config/ResourceCheckerConfigCache.php +++ b/src/Symfony/Component/Config/ResourceCheckerConfigCache.php @@ -40,9 +40,6 @@ public function __construct(string $file, iterable $resourceCheckers = []) $this->resourceCheckers = $resourceCheckers; } - /** - * {@inheritdoc} - */ public function getPath(): string { return $this->file; diff --git a/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php b/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php index 3a94d3f17432a..97d52006fae32 100644 --- a/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php +++ b/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php @@ -29,9 +29,6 @@ public function __construct(iterable $resourceCheckers = []) $this->resourceCheckers = $resourceCheckers; } - /** - * {@inheritdoc} - */ public function cache(string $file, callable $callable): ConfigCacheInterface { $cache = new ResourceCheckerConfigCache($file, $this->resourceCheckers); diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 7b79b1138cece..4a841c8c4fc1e 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -303,9 +303,6 @@ public function doRun(InputInterface $input, OutputInterface $output) return $exitCode; } - /** - * {@inheritdoc} - */ public function reset() { } diff --git a/src/Symfony/Component/Console/Command/HelpCommand.php b/src/Symfony/Component/Console/Command/HelpCommand.php index f5ddd5204faef..d4134e170b454 100644 --- a/src/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/Symfony/Component/Console/Command/HelpCommand.php @@ -27,9 +27,6 @@ class HelpCommand extends Command { private Command $command; - /** - * {@inheritdoc} - */ protected function configure() { $this->ignoreValidationErrors(); @@ -66,9 +63,6 @@ public function setCommand(Command $command) $this->command = $command; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $this->command ??= $this->getApplication()->find($input->getArgument('command_name')); diff --git a/src/Symfony/Component/Console/Command/LazyCommand.php b/src/Symfony/Component/Console/Command/LazyCommand.php index 09911ced1afbb..ca5a8f4cebfae 100644 --- a/src/Symfony/Component/Console/Command/LazyCommand.php +++ b/src/Symfony/Component/Console/Command/LazyCommand.php @@ -111,8 +111,6 @@ public function getNativeDefinition(): InputDefinition } /** - * {@inheritdoc} - * * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion */ public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static @@ -124,8 +122,6 @@ public function addArgument(string $name, int $mode = null, string $description } /** - * {@inheritdoc} - * * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion */ public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static diff --git a/src/Symfony/Component/Console/Command/ListCommand.php b/src/Symfony/Component/Console/Command/ListCommand.php index 420bdde28004b..cab88b4392291 100644 --- a/src/Symfony/Component/Console/Command/ListCommand.php +++ b/src/Symfony/Component/Console/Command/ListCommand.php @@ -25,9 +25,6 @@ */ class ListCommand extends Command { - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -64,9 +61,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $helper = new DescriptorHelper(); diff --git a/src/Symfony/Component/Console/CommandLoader/ContainerCommandLoader.php b/src/Symfony/Component/Console/CommandLoader/ContainerCommandLoader.php index 651fb665e08ed..bfa0ac4673806 100644 --- a/src/Symfony/Component/Console/CommandLoader/ContainerCommandLoader.php +++ b/src/Symfony/Component/Console/CommandLoader/ContainerCommandLoader.php @@ -34,9 +34,6 @@ public function __construct(ContainerInterface $container, array $commandMap) $this->commandMap = $commandMap; } - /** - * {@inheritdoc} - */ public function get(string $name): Command { if (!$this->has($name)) { @@ -46,17 +43,11 @@ public function get(string $name): Command return $this->container->get($this->commandMap[$name]); } - /** - * {@inheritdoc} - */ public function has(string $name): bool { return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); } - /** - * {@inheritdoc} - */ public function getNames(): array { return array_keys($this->commandMap); diff --git a/src/Symfony/Component/Console/CommandLoader/FactoryCommandLoader.php b/src/Symfony/Component/Console/CommandLoader/FactoryCommandLoader.php index c55dc1d02ba4e..9ced75aebe748 100644 --- a/src/Symfony/Component/Console/CommandLoader/FactoryCommandLoader.php +++ b/src/Symfony/Component/Console/CommandLoader/FactoryCommandLoader.php @@ -31,17 +31,11 @@ public function __construct(array $factories) $this->factories = $factories; } - /** - * {@inheritdoc} - */ public function has(string $name): bool { return isset($this->factories[$name]); } - /** - * {@inheritdoc} - */ public function get(string $name): Command { if (!isset($this->factories[$name])) { @@ -53,9 +47,6 @@ public function get(string $name): Command return $factory(); } - /** - * {@inheritdoc} - */ public function getNames(): array { return array_keys($this->factories); diff --git a/src/Symfony/Component/Console/Completion/CompletionInput.php b/src/Symfony/Component/Console/Completion/CompletionInput.php index 872f919127d5d..3ef8db5d1e07e 100644 --- a/src/Symfony/Component/Console/Completion/CompletionInput.php +++ b/src/Symfony/Component/Console/Completion/CompletionInput.php @@ -64,9 +64,6 @@ public static function fromTokens(array $tokens, int $currentIndex): self return $input; } - /** - * {@inheritdoc} - */ public function bind(InputDefinition $definition): void { parent::bind($definition); diff --git a/src/Symfony/Component/Console/Descriptor/Descriptor.php b/src/Symfony/Component/Console/Descriptor/Descriptor.php index a3648301fec88..bac0adfb50699 100644 --- a/src/Symfony/Component/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Component/Console/Descriptor/Descriptor.php @@ -31,9 +31,6 @@ abstract class Descriptor implements DescriptorInterface */ protected $output; - /** - * {@inheritdoc} - */ public function describe(OutputInterface $output, object $object, array $options = []) { $this->output = $output; diff --git a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php index 1d2865941a0db..6f79a17a9d08c 100644 --- a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php @@ -26,17 +26,11 @@ */ class JsonDescriptor extends Descriptor { - /** - * {@inheritdoc} - */ protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeData($this->getInputArgumentData($argument), $options); } - /** - * {@inheritdoc} - */ protected function describeInputOption(InputOption $option, array $options = []) { $this->writeData($this->getInputOptionData($option), $options); @@ -45,25 +39,16 @@ protected function describeInputOption(InputOption $option, array $options = []) } } - /** - * {@inheritdoc} - */ protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeData($this->getInputDefinitionData($definition), $options); } - /** - * {@inheritdoc} - */ protected function describeCommand(Command $command, array $options = []) { $this->writeData($this->getCommandData($command, $options['short'] ?? false), $options); } - /** - * {@inheritdoc} - */ protected function describeApplication(Application $application, array $options = []) { $describedNamespace = $options['namespace'] ?? null; diff --git a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php index 21ceca6c2cc47..fbd9c534616e0 100644 --- a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -28,9 +28,6 @@ */ class MarkdownDescriptor extends Descriptor { - /** - * {@inheritdoc} - */ public function describe(OutputInterface $output, object $object, array $options = []) { $decorated = $output->isDecorated(); @@ -41,17 +38,11 @@ public function describe(OutputInterface $output, object $object, array $options $output->setDecorated($decorated); } - /** - * {@inheritdoc} - */ protected function write(string $content, bool $decorated = true) { parent::write($content, $decorated); } - /** - * {@inheritdoc} - */ protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->write( @@ -63,9 +54,6 @@ protected function describeInputArgument(InputArgument $argument, array $options ); } - /** - * {@inheritdoc} - */ protected function describeInputOption(InputOption $option, array $options = []) { $name = '--'.$option->getName(); @@ -87,9 +75,6 @@ protected function describeInputOption(InputOption $option, array $options = []) ); } - /** - * {@inheritdoc} - */ protected function describeInputDefinition(InputDefinition $definition, array $options = []) { if ($showArguments = \count($definition->getArguments()) > 0) { @@ -117,9 +102,6 @@ protected function describeInputDefinition(InputDefinition $definition, array $o } } - /** - * {@inheritdoc} - */ protected function describeCommand(Command $command, array $options = []) { if ($options['short'] ?? false) { @@ -160,9 +142,6 @@ protected function describeCommand(Command $command, array $options = []) } } - /** - * {@inheritdoc} - */ protected function describeApplication(Application $application, array $options = []) { $describedNamespace = $options['namespace'] ?? null; diff --git a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php index 3f309f5d4fc49..48a0b42af9b10 100644 --- a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php @@ -28,9 +28,6 @@ */ class TextDescriptor extends Descriptor { - /** - * {@inheritdoc} - */ protected function describeInputArgument(InputArgument $argument, array $options = []) { if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { @@ -51,9 +48,6 @@ protected function describeInputArgument(InputArgument $argument, array $options ), $options); } - /** - * {@inheritdoc} - */ protected function describeInputOption(InputOption $option, array $options = []) { if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { @@ -89,9 +83,6 @@ protected function describeInputOption(InputOption $option, array $options = []) ), $options); } - /** - * {@inheritdoc} - */ protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); @@ -131,9 +122,6 @@ protected function describeInputDefinition(InputDefinition $definition, array $o } } - /** - * {@inheritdoc} - */ protected function describeCommand(Command $command, array $options = []) { $command->mergeApplicationDefinition(false); @@ -169,9 +157,6 @@ protected function describeCommand(Command $command, array $options = []) } } - /** - * {@inheritdoc} - */ protected function describeApplication(Application $application, array $options = []) { $describedNamespace = $options['namespace'] ?? null; @@ -245,9 +230,6 @@ protected function describeApplication(Application $application, array $options } } - /** - * {@inheritdoc} - */ private function writeText(string $content, array $options = []) { $this->write( diff --git a/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php index 4f7cd8b3e0821..f4643a9ac77be 100644 --- a/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php @@ -120,41 +120,26 @@ public function getApplicationDocument(Application $application, string $namespa return $dom; } - /** - * {@inheritdoc} - */ protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeDocument($this->getInputArgumentDocument($argument)); } - /** - * {@inheritdoc} - */ protected function describeInputOption(InputOption $option, array $options = []) { $this->writeDocument($this->getInputOptionDocument($option)); } - /** - * {@inheritdoc} - */ protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeDocument($this->getInputDefinitionDocument($definition)); } - /** - * {@inheritdoc} - */ protected function describeCommand(Command $command, array $options = []) { $this->writeDocument($this->getCommandDocument($command, $options['short'] ?? false)); } - /** - * {@inheritdoc} - */ protected function describeApplication(Application $application, array $options = []) { $this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null, $options['short'] ?? false)); diff --git a/src/Symfony/Component/Console/Formatter/NullOutputFormatter.php b/src/Symfony/Component/Console/Formatter/NullOutputFormatter.php index 7950fad1ede30..5c11c7644dd08 100644 --- a/src/Symfony/Component/Console/Formatter/NullOutputFormatter.php +++ b/src/Symfony/Component/Console/Formatter/NullOutputFormatter.php @@ -18,50 +18,32 @@ final class NullOutputFormatter implements OutputFormatterInterface { private NullOutputFormatterStyle $style; - /** - * {@inheritdoc} - */ public function format(?string $message): ?string { return null; } - /** - * {@inheritdoc} - */ public function getStyle(string $name): OutputFormatterStyleInterface { // to comply with the interface we must return a OutputFormatterStyleInterface return $this->style ??= new NullOutputFormatterStyle(); } - /** - * {@inheritdoc} - */ public function hasStyle(string $name): bool { return false; } - /** - * {@inheritdoc} - */ public function isDecorated(): bool { return false; } - /** - * {@inheritdoc} - */ public function setDecorated(bool $decorated): void { // do nothing } - /** - * {@inheritdoc} - */ public function setStyle(string $name, OutputFormatterStyleInterface $style): void { // do nothing diff --git a/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php index 9232510f4a49c..52d92ff872c9d 100644 --- a/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php @@ -16,49 +16,31 @@ */ final class NullOutputFormatterStyle implements OutputFormatterStyleInterface { - /** - * {@inheritdoc} - */ public function apply(string $text): string { return $text; } - /** - * {@inheritdoc} - */ public function setBackground(string $color = null): void { // do nothing } - /** - * {@inheritdoc} - */ public function setForeground(string $color = null): void { // do nothing } - /** - * {@inheritdoc} - */ public function setOption(string $option): void { // do nothing } - /** - * {@inheritdoc} - */ public function setOptions(array $options): void { // do nothing } - /** - * {@inheritdoc} - */ public function unsetOption(string $option): void { // do nothing diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/Symfony/Component/Console/Formatter/OutputFormatter.php index 0112350a50790..38e75c3178855 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatter.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -81,41 +81,26 @@ public function __construct(bool $decorated = false, array $styles = []) $this->styleStack = new OutputFormatterStyleStack(); } - /** - * {@inheritdoc} - */ public function setDecorated(bool $decorated) { $this->decorated = $decorated; } - /** - * {@inheritdoc} - */ public function isDecorated(): bool { return $this->decorated; } - /** - * {@inheritdoc} - */ public function setStyle(string $name, OutputFormatterStyleInterface $style) { $this->styles[strtolower($name)] = $style; } - /** - * {@inheritdoc} - */ public function hasStyle(string $name): bool { return isset($this->styles[strtolower($name)]); } - /** - * {@inheritdoc} - */ public function getStyle(string $name): OutputFormatterStyleInterface { if (!$this->hasStyle($name)) { @@ -125,17 +110,11 @@ public function getStyle(string $name): OutputFormatterStyleInterface return $this->styles[strtolower($name)]; } - /** - * {@inheritdoc} - */ public function format(?string $message): ?string { return $this->formatAndWrap($message, 0); } - /** - * {@inheritdoc} - */ public function formatAndWrap(?string $message, int $width) { if (null === $message) { diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index 9e8ea967ebf49..c0029f821a0f0 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -38,17 +38,11 @@ public function __construct(string $foreground = null, string $background = null $this->color = new Color($this->foreground = $foreground ?: '', $this->background = $background ?: '', $this->options = $options); } - /** - * {@inheritdoc} - */ public function setForeground(string $color = null) { $this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options); } - /** - * {@inheritdoc} - */ public function setBackground(string $color = null) { $this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options); @@ -59,18 +53,12 @@ public function setHref(string $url): void $this->href = $url; } - /** - * {@inheritdoc} - */ public function setOption(string $option) { $this->options[] = $option; $this->color = new Color($this->foreground, $this->background, $this->options); } - /** - * {@inheritdoc} - */ public function unsetOption(string $option) { $pos = array_search($option, $this->options); @@ -81,17 +69,11 @@ public function unsetOption(string $option) $this->color = new Color($this->foreground, $this->background, $this->options); } - /** - * {@inheritdoc} - */ public function setOptions(array $options) { $this->color = new Color($this->foreground, $this->background, $this->options = $options); } - /** - * {@inheritdoc} - */ public function apply(string $text): string { $this->handlesHrefGracefully ??= 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') diff --git a/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php b/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php index 64c7cffffd589..9ea7fb9145779 100644 --- a/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php +++ b/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php @@ -91,9 +91,6 @@ private function getBorder(string $id): string return sprintf(' ', self::COLORS[$this->started[$id]['border']]); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'debug_formatter'; diff --git a/src/Symfony/Component/Console/Helper/DescriptorHelper.php b/src/Symfony/Component/Console/Helper/DescriptorHelper.php index 63597c63078cf..3015ff08d2c04 100644 --- a/src/Symfony/Component/Console/Helper/DescriptorHelper.php +++ b/src/Symfony/Component/Console/Helper/DescriptorHelper.php @@ -77,9 +77,6 @@ public function register(string $format, DescriptorInterface $descriptor): stati return $this; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'descriptor'; diff --git a/src/Symfony/Component/Console/Helper/FormatterHelper.php b/src/Symfony/Component/Console/Helper/FormatterHelper.php index 2d7d1fade5bd9..279e4c799b5e9 100644 --- a/src/Symfony/Component/Console/Helper/FormatterHelper.php +++ b/src/Symfony/Component/Console/Helper/FormatterHelper.php @@ -74,9 +74,6 @@ public function truncate(string $message, int $length, string $suffix = '...'): return self::substr($message, 0, $length).$suffix; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'formatter'; diff --git a/src/Symfony/Component/Console/Helper/Helper.php b/src/Symfony/Component/Console/Helper/Helper.php index 44e3199a987c8..7eff29a3f877e 100644 --- a/src/Symfony/Component/Console/Helper/Helper.php +++ b/src/Symfony/Component/Console/Helper/Helper.php @@ -23,17 +23,11 @@ abstract class Helper implements HelperInterface { protected $helperSet = null; - /** - * {@inheritdoc} - */ public function setHelperSet(HelperSet $helperSet = null) { $this->helperSet = $helperSet; } - /** - * {@inheritdoc} - */ public function getHelperSet(): ?HelperSet { return $this->helperSet; diff --git a/src/Symfony/Component/Console/Helper/InputAwareHelper.php b/src/Symfony/Component/Console/Helper/InputAwareHelper.php index 0d0dba23e330b..ba81e37713be1 100644 --- a/src/Symfony/Component/Console/Helper/InputAwareHelper.php +++ b/src/Symfony/Component/Console/Helper/InputAwareHelper.php @@ -23,9 +23,6 @@ abstract class InputAwareHelper extends Helper implements InputAwareInterface { protected $input; - /** - * {@inheritdoc} - */ public function setInput(InputInterface $input) { $this->input = $input; diff --git a/src/Symfony/Component/Console/Helper/ProcessHelper.php b/src/Symfony/Component/Console/Helper/ProcessHelper.php index e5ba4db44b38e..26d35a1a89d12 100644 --- a/src/Symfony/Component/Console/Helper/ProcessHelper.php +++ b/src/Symfony/Component/Console/Helper/ProcessHelper.php @@ -130,9 +130,6 @@ private function escapeString(string $str): string return str_replace('<', '\\<', $str); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'process'; diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index f34a57aa3e5b0..3811aa82cec20 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -84,9 +84,6 @@ public function ask(InputInterface $input, OutputInterface $output, Question $qu } } - /** - * {@inheritdoc} - */ public function getName(): string { return 'question'; diff --git a/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php b/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php index 01f94aba4b5ed..109045d043839 100644 --- a/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php @@ -25,9 +25,6 @@ */ class SymfonyQuestionHelper extends QuestionHelper { - /** - * {@inheritdoc} - */ protected function writePrompt(OutputInterface $output, Question $question) { $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); @@ -83,9 +80,6 @@ protected function writePrompt(OutputInterface $output, Question $question) $output->write($prompt); } - /** - * {@inheritdoc} - */ protected function writeError(OutputInterface $output, \Exception $error) { if ($output instanceof SymfonyStyle) { diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php index a9585de17e5ca..c0c28bb5812ac 100644 --- a/src/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/Symfony/Component/Console/Input/ArgvInput.php @@ -60,9 +60,6 @@ protected function setTokens(array $tokens) $this->tokens = $tokens; } - /** - * {@inheritdoc} - */ protected function parse() { $parseOptions = true; @@ -263,9 +260,6 @@ private function addLongOption(string $name, mixed $value) } } - /** - * {@inheritdoc} - */ public function getFirstArgument(): ?string { $isOption = false; @@ -298,9 +292,6 @@ public function getFirstArgument(): ?string return null; } - /** - * {@inheritdoc} - */ public function hasParameterOption(string|array $values, bool $onlyParams = false): bool { $values = (array) $values; @@ -323,9 +314,6 @@ public function hasParameterOption(string|array $values, bool $onlyParams = fals return false; } - /** - * {@inheritdoc} - */ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed { $values = (array) $values; diff --git a/src/Symfony/Component/Console/Input/ArrayInput.php b/src/Symfony/Component/Console/Input/ArrayInput.php index 369eb0ca4147f..02fb4e8eefdd5 100644 --- a/src/Symfony/Component/Console/Input/ArrayInput.php +++ b/src/Symfony/Component/Console/Input/ArrayInput.php @@ -34,9 +34,6 @@ public function __construct(array $parameters, InputDefinition $definition = nul parent::__construct($definition); } - /** - * {@inheritdoc} - */ public function getFirstArgument(): ?string { foreach ($this->parameters as $param => $value) { @@ -50,9 +47,6 @@ public function getFirstArgument(): ?string return null; } - /** - * {@inheritdoc} - */ public function hasParameterOption(string|array $values, bool $onlyParams = false): bool { $values = (array) $values; @@ -74,9 +68,6 @@ public function hasParameterOption(string|array $values, bool $onlyParams = fals return false; } - /** - * {@inheritdoc} - */ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed { $values = (array) $values; @@ -122,9 +113,6 @@ public function __toString(): string return implode(' ', $params); } - /** - * {@inheritdoc} - */ protected function parse() { foreach ($this->parameters as $key => $value) { diff --git a/src/Symfony/Component/Console/Input/Input.php b/src/Symfony/Component/Console/Input/Input.php index 1db503cb27627..7b90713c865f5 100644 --- a/src/Symfony/Component/Console/Input/Input.php +++ b/src/Symfony/Component/Console/Input/Input.php @@ -43,9 +43,6 @@ public function __construct(InputDefinition $definition = null) } } - /** - * {@inheritdoc} - */ public function bind(InputDefinition $definition) { $this->arguments = []; @@ -60,9 +57,6 @@ public function bind(InputDefinition $definition) */ abstract protected function parse(); - /** - * {@inheritdoc} - */ public function validate() { $definition = $this->definition; @@ -77,33 +71,21 @@ public function validate() } } - /** - * {@inheritdoc} - */ public function isInteractive(): bool { return $this->interactive; } - /** - * {@inheritdoc} - */ public function setInteractive(bool $interactive) { $this->interactive = $interactive; } - /** - * {@inheritdoc} - */ public function getArguments(): array { return array_merge($this->definition->getArgumentDefaults(), $this->arguments); } - /** - * {@inheritdoc} - */ public function getArgument(string $name): mixed { if (!$this->definition->hasArgument($name)) { @@ -113,9 +95,6 @@ public function getArgument(string $name): mixed return $this->arguments[$name] ?? $this->definition->getArgument($name)->getDefault(); } - /** - * {@inheritdoc} - */ public function setArgument(string $name, mixed $value) { if (!$this->definition->hasArgument($name)) { @@ -125,25 +104,16 @@ public function setArgument(string $name, mixed $value) $this->arguments[$name] = $value; } - /** - * {@inheritdoc} - */ public function hasArgument(string $name): bool { return $this->definition->hasArgument($name); } - /** - * {@inheritdoc} - */ public function getOptions(): array { return array_merge($this->definition->getOptionDefaults(), $this->options); } - /** - * {@inheritdoc} - */ public function getOption(string $name): mixed { if ($this->definition->hasNegation($name)) { @@ -161,9 +131,6 @@ public function getOption(string $name): mixed return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); } - /** - * {@inheritdoc} - */ public function setOption(string $name, mixed $value) { if ($this->definition->hasNegation($name)) { @@ -177,9 +144,6 @@ public function setOption(string $name, mixed $value) $this->options[$name] = $value; } - /** - * {@inheritdoc} - */ public function hasOption(string $name): bool { return $this->definition->hasOption($name) || $this->definition->hasNegation($name); @@ -193,17 +157,11 @@ public function escapeToken(string $token): string return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token); } - /** - * {@inheritdoc} - */ public function setStream($stream) { $this->stream = $stream; } - /** - * {@inheritdoc} - */ public function getStream() { return $this->stream; diff --git a/src/Symfony/Component/Console/Logger/ConsoleLogger.php b/src/Symfony/Component/Console/Logger/ConsoleLogger.php index 961b8cc9eb8cc..5e2e6c14428a4 100644 --- a/src/Symfony/Component/Console/Logger/ConsoleLogger.php +++ b/src/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -59,9 +59,6 @@ public function __construct(OutputInterface $output, array $verbosityLevelMap = $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap; } - /** - * {@inheritdoc} - */ public function log($level, $message, array $context = []): void { if (!isset($this->verbosityLevelMap[$level])) { diff --git a/src/Symfony/Component/Console/Output/BufferedOutput.php b/src/Symfony/Component/Console/Output/BufferedOutput.php index 784e309bdd923..94d4e414a0a1b 100644 --- a/src/Symfony/Component/Console/Output/BufferedOutput.php +++ b/src/Symfony/Component/Console/Output/BufferedOutput.php @@ -29,9 +29,6 @@ public function fetch(): string return $content; } - /** - * {@inheritdoc} - */ protected function doWrite(string $message, bool $newline) { $this->buffer .= $message; diff --git a/src/Symfony/Component/Console/Output/ConsoleOutput.php b/src/Symfony/Component/Console/Output/ConsoleOutput.php index fb2134b9ed7ed..e3aa92c7fcf87 100644 --- a/src/Symfony/Component/Console/Output/ConsoleOutput.php +++ b/src/Symfony/Component/Console/Output/ConsoleOutput.php @@ -64,44 +64,29 @@ public function section(): ConsoleSectionOutput return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter()); } - /** - * {@inheritdoc} - */ public function setDecorated(bool $decorated) { parent::setDecorated($decorated); $this->stderr->setDecorated($decorated); } - /** - * {@inheritdoc} - */ public function setFormatter(OutputFormatterInterface $formatter) { parent::setFormatter($formatter); $this->stderr->setFormatter($formatter); } - /** - * {@inheritdoc} - */ public function setVerbosity(int $level) { parent::setVerbosity($level); $this->stderr->setVerbosity($level); } - /** - * {@inheritdoc} - */ public function getErrorOutput(): OutputInterface { return $this->stderr; } - /** - * {@inheritdoc} - */ public function setErrorOutput(OutputInterface $error) { $this->stderr = $error; diff --git a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php b/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php index 950fb08a0bf7c..844947343e5c7 100644 --- a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php +++ b/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php @@ -117,9 +117,6 @@ public function addContent(string $input, bool $newline = true) } } - /** - * {@inheritdoc} - */ protected function doWrite(string $message, bool $newline) { if (!$this->isDecorated()) { diff --git a/src/Symfony/Component/Console/Output/NullOutput.php b/src/Symfony/Component/Console/Output/NullOutput.php index 768207f0ee957..4884cbad90599 100644 --- a/src/Symfony/Component/Console/Output/NullOutput.php +++ b/src/Symfony/Component/Console/Output/NullOutput.php @@ -26,98 +26,62 @@ class NullOutput implements OutputInterface { private NullOutputFormatter $formatter; - /** - * {@inheritdoc} - */ public function setFormatter(OutputFormatterInterface $formatter) { // do nothing } - /** - * {@inheritdoc} - */ public function getFormatter(): OutputFormatterInterface { // to comply with the interface we must return a OutputFormatterInterface return $this->formatter ??= new NullOutputFormatter(); } - /** - * {@inheritdoc} - */ public function setDecorated(bool $decorated) { // do nothing } - /** - * {@inheritdoc} - */ public function isDecorated(): bool { return false; } - /** - * {@inheritdoc} - */ public function setVerbosity(int $level) { // do nothing } - /** - * {@inheritdoc} - */ public function getVerbosity(): int { return self::VERBOSITY_QUIET; } - /** - * {@inheritdoc} - */ public function isQuiet(): bool { return true; } - /** - * {@inheritdoc} - */ public function isVerbose(): bool { return false; } - /** - * {@inheritdoc} - */ public function isVeryVerbose(): bool { return false; } - /** - * {@inheritdoc} - */ public function isDebug(): bool { return false; } - /** - * {@inheritdoc} - */ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL) { // do nothing } - /** - * {@inheritdoc} - */ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) { // do nothing diff --git a/src/Symfony/Component/Console/Output/Output.php b/src/Symfony/Component/Console/Output/Output.php index c337e113faaf3..4cb71acbad7a0 100644 --- a/src/Symfony/Component/Console/Output/Output.php +++ b/src/Symfony/Component/Console/Output/Output.php @@ -44,97 +44,61 @@ public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $deco $this->formatter->setDecorated($decorated); } - /** - * {@inheritdoc} - */ public function setFormatter(OutputFormatterInterface $formatter) { $this->formatter = $formatter; } - /** - * {@inheritdoc} - */ public function getFormatter(): OutputFormatterInterface { return $this->formatter; } - /** - * {@inheritdoc} - */ public function setDecorated(bool $decorated) { $this->formatter->setDecorated($decorated); } - /** - * {@inheritdoc} - */ public function isDecorated(): bool { return $this->formatter->isDecorated(); } - /** - * {@inheritdoc} - */ public function setVerbosity(int $level) { $this->verbosity = $level; } - /** - * {@inheritdoc} - */ public function getVerbosity(): int { return $this->verbosity; } - /** - * {@inheritdoc} - */ public function isQuiet(): bool { return self::VERBOSITY_QUIET === $this->verbosity; } - /** - * {@inheritdoc} - */ public function isVerbose(): bool { return self::VERBOSITY_VERBOSE <= $this->verbosity; } - /** - * {@inheritdoc} - */ public function isVeryVerbose(): bool { return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; } - /** - * {@inheritdoc} - */ public function isDebug(): bool { return self::VERBOSITY_DEBUG <= $this->verbosity; } - /** - * {@inheritdoc} - */ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL) { $this->write($messages, true, $options); } - /** - * {@inheritdoc} - */ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index ac58e415cc98e..8623ec6b2b6e1 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -64,9 +64,6 @@ public function getStream() return $this->stream; } - /** - * {@inheritdoc} - */ protected function doWrite(string $message, bool $newline) { if ($newline) { diff --git a/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php b/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php index 0d375e0c8d1cd..1ca5a13e822e2 100644 --- a/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php +++ b/src/Symfony/Component/Console/Output/TrimmedBufferOutput.php @@ -45,9 +45,6 @@ public function fetch(): string return $content; } - /** - * {@inheritdoc} - */ protected function doWrite(string $message, bool $newline) { $this->buffer .= $message; diff --git a/src/Symfony/Component/Console/Style/OutputStyle.php b/src/Symfony/Component/Console/Style/OutputStyle.php index 1338f04c6487f..b694bb53a7ab0 100644 --- a/src/Symfony/Component/Console/Style/OutputStyle.php +++ b/src/Symfony/Component/Console/Style/OutputStyle.php @@ -30,9 +30,6 @@ public function __construct(OutputInterface $output) $this->output = $output; } - /** - * {@inheritdoc} - */ public function newLine(int $count = 1) { $this->output->write(str_repeat(\PHP_EOL, $count)); @@ -43,97 +40,61 @@ public function createProgressBar(int $max = 0): ProgressBar return new ProgressBar($this->output, $max); } - /** - * {@inheritdoc} - */ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) { $this->output->write($messages, $newline, $type); } - /** - * {@inheritdoc} - */ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) { $this->output->writeln($messages, $type); } - /** - * {@inheritdoc} - */ public function setVerbosity(int $level) { $this->output->setVerbosity($level); } - /** - * {@inheritdoc} - */ public function getVerbosity(): int { return $this->output->getVerbosity(); } - /** - * {@inheritdoc} - */ public function setDecorated(bool $decorated) { $this->output->setDecorated($decorated); } - /** - * {@inheritdoc} - */ public function isDecorated(): bool { return $this->output->isDecorated(); } - /** - * {@inheritdoc} - */ public function setFormatter(OutputFormatterInterface $formatter) { $this->output->setFormatter($formatter); } - /** - * {@inheritdoc} - */ public function getFormatter(): OutputFormatterInterface { return $this->output->getFormatter(); } - /** - * {@inheritdoc} - */ public function isQuiet(): bool { return $this->output->isQuiet(); } - /** - * {@inheritdoc} - */ public function isVerbose(): bool { return $this->output->isVerbose(); } - /** - * {@inheritdoc} - */ public function isVeryVerbose(): bool { return $this->output->isVeryVerbose(); } - /** - * {@inheritdoc} - */ public function isDebug(): bool { return $this->output->isDebug(); diff --git a/src/Symfony/Component/Console/Style/SymfonyStyle.php b/src/Symfony/Component/Console/Style/SymfonyStyle.php index 2f3aa85994dbe..997f86279d918 100644 --- a/src/Symfony/Component/Console/Style/SymfonyStyle.php +++ b/src/Symfony/Component/Console/Style/SymfonyStyle.php @@ -69,9 +69,6 @@ public function block(string|array $messages, string $type = null, string $style $this->newLine(); } - /** - * {@inheritdoc} - */ public function title(string $message) { $this->autoPrependBlock(); @@ -82,9 +79,6 @@ public function title(string $message) $this->newLine(); } - /** - * {@inheritdoc} - */ public function section(string $message) { $this->autoPrependBlock(); @@ -95,9 +89,6 @@ public function section(string $message) $this->newLine(); } - /** - * {@inheritdoc} - */ public function listing(array $elements) { $this->autoPrependText(); @@ -109,9 +100,6 @@ public function listing(array $elements) $this->newLine(); } - /** - * {@inheritdoc} - */ public function text(string|array $message) { $this->autoPrependText(); @@ -130,33 +118,21 @@ public function comment(string|array $message) $this->block($message, null, null, ' // ', false, false); } - /** - * {@inheritdoc} - */ public function success(string|array $message) { $this->block($message, 'OK', 'fg=black;bg=green', ' ', true); } - /** - * {@inheritdoc} - */ public function error(string|array $message) { $this->block($message, 'ERROR', 'fg=white;bg=red', ' ', true); } - /** - * {@inheritdoc} - */ public function warning(string|array $message) { $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true); } - /** - * {@inheritdoc} - */ public function note(string|array $message) { $this->block($message, 'NOTE', 'fg=yellow', ' ! '); @@ -170,17 +146,11 @@ public function info(string|array $message) $this->block($message, 'INFO', 'fg=green', ' ', true); } - /** - * {@inheritdoc} - */ public function caution(string|array $message) { $this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', true); } - /** - * {@inheritdoc} - */ public function table(array $headers, array $rows) { $this->createTable() @@ -240,9 +210,6 @@ public function definitionList(string|array|TableSeparator ...$list) $this->horizontalTable($headers, [$row]); } - /** - * {@inheritdoc} - */ public function ask(string $question, string $default = null, callable $validator = null): mixed { $question = new Question($question, $default); @@ -251,9 +218,6 @@ public function ask(string $question, string $default = null, callable $validato return $this->askQuestion($question); } - /** - * {@inheritdoc} - */ public function askHidden(string $question, callable $validator = null): mixed { $question = new Question($question); @@ -264,17 +228,11 @@ public function askHidden(string $question, callable $validator = null): mixed return $this->askQuestion($question); } - /** - * {@inheritdoc} - */ public function confirm(string $question, bool $default = true): bool { return $this->askQuestion(new ConfirmationQuestion($question, $default)); } - /** - * {@inheritdoc} - */ public function choice(string $question, array $choices, mixed $default = null, bool $multiSelect = false): mixed { if (null !== $default) { @@ -288,26 +246,17 @@ public function choice(string $question, array $choices, mixed $default = null, return $this->askQuestion($questionChoice); } - /** - * {@inheritdoc} - */ public function progressStart(int $max = 0) { $this->progressBar = $this->createProgressBar($max); $this->progressBar->start(); } - /** - * {@inheritdoc} - */ public function progressAdvance(int $step = 1) { $this->getProgressBar()->advance($step); } - /** - * {@inheritdoc} - */ public function progressFinish() { $this->getProgressBar()->finish(); @@ -315,9 +264,6 @@ public function progressFinish() unset($this->progressBar); } - /** - * {@inheritdoc} - */ public function createProgressBar(int $max = 0): ProgressBar { $progressBar = parent::createProgressBar($max); @@ -359,9 +305,6 @@ public function askQuestion(Question $question): mixed return $answer; } - /** - * {@inheritdoc} - */ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { @@ -374,9 +317,6 @@ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORM } } - /** - * {@inheritdoc} - */ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { @@ -389,9 +329,6 @@ public function write(string|iterable $messages, bool $newline = false, int $typ } } - /** - * {@inheritdoc} - */ public function newLine(int $count = 1) { parent::newLine($count); diff --git a/src/Symfony/Component/Console/Tester/Constraint/CommandIsSuccessful.php b/src/Symfony/Component/Console/Tester/Constraint/CommandIsSuccessful.php index a473242376d0f..09c6194b91c1b 100644 --- a/src/Symfony/Component/Console/Tester/Constraint/CommandIsSuccessful.php +++ b/src/Symfony/Component/Console/Tester/Constraint/CommandIsSuccessful.php @@ -16,33 +16,21 @@ final class CommandIsSuccessful extends Constraint { - /** - * {@inheritdoc} - */ public function toString(): string { return 'is successful'; } - /** - * {@inheritdoc} - */ protected function matches($other): bool { return Command::SUCCESS === $other; } - /** - * {@inheritdoc} - */ protected function failureDescription($other): string { return 'the command '.$this->toString(); } - /** - * {@inheritdoc} - */ protected function additionalFailureDescription($other): string { $mapping = [ diff --git a/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php b/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php index da64dca00b949..5801be1abafc6 100644 --- a/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php +++ b/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php @@ -43,9 +43,6 @@ public function getNamespacesProvider() final class TestApplication extends Application { - /** - * {@inheritdoc} - */ protected function getDefaultCommands(): array { return []; diff --git a/src/Symfony/Component/CssSelector/Node/AttributeNode.php b/src/Symfony/Component/CssSelector/Node/AttributeNode.php index bca9db7006717..ba4df31001e20 100644 --- a/src/Symfony/Component/CssSelector/Node/AttributeNode.php +++ b/src/Symfony/Component/CssSelector/Node/AttributeNode.php @@ -63,9 +63,6 @@ public function getValue(): ?string return $this->value; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); diff --git a/src/Symfony/Component/CssSelector/Node/ClassNode.php b/src/Symfony/Component/CssSelector/Node/ClassNode.php index b9284073ce34b..717445870f375 100644 --- a/src/Symfony/Component/CssSelector/Node/ClassNode.php +++ b/src/Symfony/Component/CssSelector/Node/ClassNode.php @@ -42,9 +42,6 @@ public function getName(): string return $this->name; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); diff --git a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php index 33889948569c7..19fecb700194d 100644 --- a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php @@ -49,9 +49,6 @@ public function getSubSelector(): NodeInterface return $this->subSelector; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity()); diff --git a/src/Symfony/Component/CssSelector/Node/ElementNode.php b/src/Symfony/Component/CssSelector/Node/ElementNode.php index b05164fea4bda..39f4d9cc07d59 100644 --- a/src/Symfony/Component/CssSelector/Node/ElementNode.php +++ b/src/Symfony/Component/CssSelector/Node/ElementNode.php @@ -42,9 +42,6 @@ public function getElement(): ?string return $this->element; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return new Specificity(0, 0, $this->element ? 1 : 0); diff --git a/src/Symfony/Component/CssSelector/Node/FunctionNode.php b/src/Symfony/Component/CssSelector/Node/FunctionNode.php index 5bfca1842f385..8428bacc9c2e9 100644 --- a/src/Symfony/Component/CssSelector/Node/FunctionNode.php +++ b/src/Symfony/Component/CssSelector/Node/FunctionNode.php @@ -57,9 +57,6 @@ public function getArguments(): array return $this->arguments; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); diff --git a/src/Symfony/Component/CssSelector/Node/HashNode.php b/src/Symfony/Component/CssSelector/Node/HashNode.php index 5f5923fb691bc..3af8e84743a31 100644 --- a/src/Symfony/Component/CssSelector/Node/HashNode.php +++ b/src/Symfony/Component/CssSelector/Node/HashNode.php @@ -42,9 +42,6 @@ public function getId(): string return $this->id; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->selector->getSpecificity()->plus(new Specificity(1, 0, 0)); diff --git a/src/Symfony/Component/CssSelector/Node/NegationNode.php b/src/Symfony/Component/CssSelector/Node/NegationNode.php index c75d052b03da2..f80675838c0e6 100644 --- a/src/Symfony/Component/CssSelector/Node/NegationNode.php +++ b/src/Symfony/Component/CssSelector/Node/NegationNode.php @@ -42,9 +42,6 @@ public function getSubSelector(): NodeInterface return $this->subSelector; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity()); diff --git a/src/Symfony/Component/CssSelector/Node/PseudoNode.php b/src/Symfony/Component/CssSelector/Node/PseudoNode.php index 6825f3a3db4c1..c21cd6e925ea5 100644 --- a/src/Symfony/Component/CssSelector/Node/PseudoNode.php +++ b/src/Symfony/Component/CssSelector/Node/PseudoNode.php @@ -42,9 +42,6 @@ public function getIdentifier(): string return $this->identifier; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); diff --git a/src/Symfony/Component/CssSelector/Node/SelectorNode.php b/src/Symfony/Component/CssSelector/Node/SelectorNode.php index b1d6c58e0a68e..0b09ab5dc7094 100644 --- a/src/Symfony/Component/CssSelector/Node/SelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/SelectorNode.php @@ -42,9 +42,6 @@ public function getPseudoElement(): ?string return $this->pseudoElement; } - /** - * {@inheritdoc} - */ public function getSpecificity(): Specificity { return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0)); diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php index 93f318844a5bd..cc01d1e6e8357 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php @@ -26,9 +26,6 @@ */ class CommentHandler implements HandlerInterface { - /** - * {@inheritdoc} - */ public function handle(Reader $reader, TokenStream $stream): bool { if ('/*' !== $reader->getSubstring(2)) { diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php index cde8cda2b23e5..b29042f56185c 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php @@ -38,9 +38,6 @@ public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $esca $this->escaping = $escaping; } - /** - * {@inheritdoc} - */ public function handle(Reader $reader, TokenStream $stream): bool { $match = $reader->findPattern($this->patterns->getHashPattern()); diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php index 2b9e02e05038f..25c0761e90e9e 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php @@ -38,9 +38,6 @@ public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $esca $this->escaping = $escaping; } - /** - * {@inheritdoc} - */ public function handle(Reader $reader, TokenStream $stream): bool { $match = $reader->findPattern($this->patterns->getIdentifierPattern()); diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php index d3bbe5f41157e..e3eb7afe32bbc 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php @@ -35,9 +35,6 @@ public function __construct(TokenizerPatterns $patterns) $this->patterns = $patterns; } - /** - * {@inheritdoc} - */ public function handle(Reader $reader, TokenStream $stream): bool { $match = $reader->findPattern($this->patterns->getNumberPattern()); diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php index 341c75fc78ff6..5fd44df2650ef 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php @@ -40,9 +40,6 @@ public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $esca $this->escaping = $escaping; } - /** - * {@inheritdoc} - */ public function handle(Reader $reader, TokenStream $stream): bool { $quote = $reader->getSubstring(1); diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php index 21345e32c70da..eb41c3f7fac63 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php @@ -27,9 +27,6 @@ */ class WhitespaceHandler implements HandlerInterface { - /** - * {@inheritdoc} - */ public function handle(Reader $reader, TokenStream $stream): bool { $match = $reader->findPattern('~^[ \t\r\n\f]+~'); diff --git a/src/Symfony/Component/CssSelector/Parser/Parser.php b/src/Symfony/Component/CssSelector/Parser/Parser.php index df77e2ce4a19c..22633991b916e 100644 --- a/src/Symfony/Component/CssSelector/Parser/Parser.php +++ b/src/Symfony/Component/CssSelector/Parser/Parser.php @@ -34,9 +34,6 @@ public function __construct(Tokenizer $tokenizer = null) $this->tokenizer = $tokenizer ?? new Tokenizer(); } - /** - * {@inheritdoc} - */ public function parse(string $source): array { $reader = new Reader($source); diff --git a/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php b/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php index 17fa8c27e7fdb..f0ce611849529 100644 --- a/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php +++ b/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php @@ -28,9 +28,6 @@ */ class ClassParser implements ParserInterface { - /** - * {@inheritdoc} - */ public function parse(string $source): array { // Matches an optional namespace, optional element, and required class diff --git a/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php b/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php index 8b9a8638696fd..a448e4a87df34 100644 --- a/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php +++ b/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php @@ -27,9 +27,6 @@ */ class ElementParser implements ParserInterface { - /** - * {@inheritdoc} - */ public function parse(string $source): array { // Matches an optional namespace, required element or `*` diff --git a/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php b/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php index 222df5cd29dad..a6391912003f9 100644 --- a/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php +++ b/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php @@ -31,9 +31,6 @@ */ class EmptyStringParser implements ParserInterface { - /** - * {@inheritdoc} - */ public function parse(string $source): array { // Matches an empty string diff --git a/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php b/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php index fb07ee6cf86ff..6683126a3fd0f 100644 --- a/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php +++ b/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php @@ -28,9 +28,6 @@ */ class HashParser implements ParserInterface { - /** - * {@inheritdoc} - */ public function parse(string $source): array { // Matches an optional namespace, optional element, and required id diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php index 44e0035a78757..495f882910d5a 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php @@ -23,41 +23,26 @@ */ abstract class AbstractExtension implements ExtensionInterface { - /** - * {@inheritdoc} - */ public function getNodeTranslators(): array { return []; } - /** - * {@inheritdoc} - */ public function getCombinationTranslators(): array { return []; } - /** - * {@inheritdoc} - */ public function getFunctionTranslators(): array { return []; } - /** - * {@inheritdoc} - */ public function getPseudoClassTranslators(): array { return []; } - /** - * {@inheritdoc} - */ public function getAttributeMatchingTranslators(): array { return []; diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php index b40a86bf66ae9..3c785e97a44e2 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php @@ -26,9 +26,6 @@ */ class AttributeMatchingExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getAttributeMatchingTranslators(): array { return [ @@ -109,9 +106,6 @@ public function translateDifferent(XPathExpr $xpath, string $attribute, ?string )); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'attribute-matching'; diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php index e75da8b49e30c..f78d48883760e 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php @@ -25,9 +25,6 @@ */ class CombinationExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getCombinationTranslators(): array { return [ @@ -61,9 +58,6 @@ public function translateIndirectAdjacent(XPathExpr $xpath, XPathExpr $combinedX return $xpath->join('/following-sibling::', $combinedXpath); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'combination'; diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php index 4ed9c2392d112..4b9d7bc2667c0 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php @@ -30,9 +30,6 @@ */ class FunctionExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getFunctionTranslators(): array { return [ @@ -161,9 +158,6 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function): XPathEx )); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'function'; diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php index 95289818a194e..4653add5d28c5 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php @@ -36,9 +36,6 @@ public function __construct(Translator $translator) ->setFlag(NodeExtension::ATTRIBUTE_NAME_IN_LOWER_CASE, true); } - /** - * {@inheritdoc} - */ public function getPseudoClassTranslators(): array { return [ @@ -53,9 +50,6 @@ public function getPseudoClassTranslators(): array ]; } - /** - * {@inheritdoc} - */ public function getFunctionTranslators(): array { return [ @@ -177,9 +171,6 @@ public function translateVisited(XPathExpr $xpath): XPathExpr return $xpath->addCondition('0'); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'html'; diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php index 70f287b569621..49e894adee0df 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php @@ -59,9 +59,6 @@ public function hasFlag(int $flag): bool return (bool) ($this->flags & $flag); } - /** - * {@inheritdoc} - */ public function getNodeTranslators(): array { return [ @@ -182,9 +179,6 @@ public function translateElement(Node\ElementNode $node): XPathExpr return $xpath; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'node'; diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php index a9b6abc4bf011..36ab582ee9f9c 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php @@ -26,9 +26,6 @@ */ class PseudoClassExtension extends AbstractExtension { - /** - * {@inheritdoc} - */ public function getPseudoClassTranslators(): array { return [ @@ -112,9 +109,6 @@ public function translateEmpty(XPathExpr $xpath): XPathExpr return $xpath->addCondition('not(*) and not(string-length())'); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'pseudo-class'; diff --git a/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/Symfony/Component/CssSelector/XPath/Translator.php index 128a4a9397ac3..4c5d5a063bffb 100644 --- a/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -87,9 +87,6 @@ public static function getXpathLiteral(string $element): string return sprintf('concat(%s)', implode(', ', $parts)); } - /** - * {@inheritdoc} - */ public function cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string { $selectors = $this->parseSelectors($cssExpr); @@ -106,9 +103,6 @@ public function cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self return implode(' | ', $selectors); } - /** - * {@inheritdoc} - */ public function selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::'): string { return ($prefix ?: '').$this->nodeToXPath($selector); diff --git a/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php b/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php index 4f109fea12323..448f684255646 100644 --- a/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php +++ b/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php @@ -40,17 +40,11 @@ public function __construct(mixed $value, bool $trackUsage = true, int $type = 0 $this->file = $file; } - /** - * {@inheritdoc} - */ public function getValues(): array { return [$this->value, $this->identifier, $this->used, $this->type, $this->file]; } - /** - * {@inheritdoc} - */ public function setValues(array $values) { if (5 === \count($values)) { diff --git a/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php b/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php index 9f68b3b2769ed..064ff0b242c28 100644 --- a/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php +++ b/src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php @@ -27,17 +27,11 @@ public function __construct(mixed $value) $this->values = [$value]; } - /** - * {@inheritdoc} - */ public function getValues(): array { return $this->values; } - /** - * {@inheritdoc} - */ public function setValues(array $values) { if ([0] !== array_keys($values)) { diff --git a/src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php b/src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php index 5fa088ee5d00b..fe927c91b887d 100644 --- a/src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php +++ b/src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php @@ -32,9 +32,6 @@ public function __construct(\Closure $factory, array $serviceMap, array $service parent::__construct($serviceMap); } - /** - * {@inheritdoc} - */ public function get(string $id): mixed { return match (\count($this->serviceMap[$id] ?? [])) { @@ -44,9 +41,6 @@ public function get(string $id): mixed }; } - /** - * {@inheritdoc} - */ public function getProvidedServices(): array { return $this->serviceTypes ??= array_map(function () { return '?'; }, $this->serviceMap); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php index 2f1631ed3083a..afc8183571a57 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php @@ -36,9 +36,6 @@ abstract class AbstractRecursivePass implements CompilerPassInterface private ExpressionLanguage $expressionLanguage; private bool $inExpression = false; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $this->container = $container; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php index a24a9d58c65d2..96b1253161ca4 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php @@ -19,9 +19,6 @@ final class AliasDeprecatedPublicServicesPass extends AbstractRecursivePass { private array $aliases = []; - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof Reference && isset($this->aliases[$id = (string) $value])) { @@ -31,9 +28,6 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed return parent::processValue($value, $isRoot); } - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { foreach ($container->findTaggedServiceIds('container.private') as $id => $tags) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php index e2477988f704a..aadae28d4ccfb 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php @@ -20,9 +20,6 @@ */ class AutoAliasServicePass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowireAsDecoratorPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowireAsDecoratorPass.php index 66eed9a37fa77..ef11e343ec2a3 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowireAsDecoratorPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowireAsDecoratorPass.php @@ -21,9 +21,6 @@ */ final class AutowireAsDecoratorPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { foreach ($container->getDefinitions() as $definition) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index a12a74294419f..11376411c9091 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -61,9 +61,6 @@ public function __construct(bool $throwOnAutowireException = true) }; } - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $this->populateCombinedAliases($container); @@ -84,9 +81,6 @@ public function process(ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { try { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php index e3a242b3f514c..da2fc5947d938 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php @@ -21,9 +21,6 @@ */ class AutowireRequiredMethodsPass extends AbstractRecursivePass { - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { $value = parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredPropertiesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredPropertiesPass.php index 41032030560c2..d77e9955b004d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredPropertiesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredPropertiesPass.php @@ -24,9 +24,6 @@ */ class AutowireRequiredPropertiesPass extends AbstractRecursivePass { - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { $value = parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php index e0054ef9d2e84..a021280804841 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php @@ -29,9 +29,6 @@ public function __construct(bool $throwExceptions = true) $this->throwExceptions = $throwExceptions; } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if (!$value instanceof Definition) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php index 645f9efd7fbf8..622f58a92ddfa 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php @@ -25,9 +25,6 @@ class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass { private array $serviceLocatorContextIds = []; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $this->serviceLocatorContextIds = []; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php index 274a575aba06c..a8b3c7d9fac9f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php @@ -75,9 +75,6 @@ public function __construct(bool $autoload = false, array $skippedIds = []) $this->skippedIds = $skippedIds; } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if (isset($this->skippedIds[$this->currentId])) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php index 18d959524694c..5f290f91575b0 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php @@ -23,9 +23,6 @@ */ class DefinitionErrorExceptionPass extends AbstractRecursivePass { - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if (!$value instanceof Definition || !$value->hasErrors()) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php index 27e5048245914..7a6283841a78f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php @@ -21,9 +21,6 @@ */ class ExtensionCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { foreach ($container->getExtensions() as $extension) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php index 9ccf834664e32..0fff617508791 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php @@ -104,9 +104,6 @@ public function process(ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof ArgumentInterface) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php index c182d7cdae8b0..4afff8f78939c 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php @@ -29,9 +29,6 @@ */ class MergeExtensionConfigurationPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $parameters = $container->getParameterBag()->all(); @@ -130,9 +127,6 @@ public function freezeAfterProcessing(Extension $extension, ContainerBuilder $co } } - /** - * {@inheritdoc} - */ public function getEnvPlaceholders(): array { return $this->processedEnvPlaceholders ?? parent::getEnvPlaceholders(); @@ -160,33 +154,21 @@ public function __construct(ExtensionInterface $extension, ParameterBagInterface $this->extensionClass = \get_class($extension); } - /** - * {@inheritdoc} - */ public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): static { throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', get_debug_type($pass), $this->extensionClass)); } - /** - * {@inheritdoc} - */ public function registerExtension(ExtensionInterface $extension) { throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', get_debug_type($extension), $this->extensionClass)); } - /** - * {@inheritdoc} - */ public function compile(bool $resolveEnvPlaceholders = false) { throw new LogicException(sprintf('Cannot compile the container in extension "%s".', $this->extensionClass)); } - /** - * {@inheritdoc} - */ public function resolveEnvPlaceholders(mixed $value, string|bool $format = null, array &$usedEnvs = null): mixed { if (true !== $format || !\is_string($value)) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php index 6c9c180448fb5..ab9227e8ad5bf 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php @@ -26,9 +26,6 @@ final class RegisterAutoconfigureAttributesPass implements CompilerPassInterface { private static $registerForAutoconfiguration; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { foreach ($container->getDefinitions() as $id => $definition) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php index 35f824d172929..41acfb276e20a 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php @@ -72,9 +72,6 @@ public function process(ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if (!$value instanceof Reference) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php index af69f29aa3c33..ce4c2d321e836 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -85,9 +85,6 @@ public function process(ContainerBuilder $container) $this->replacements = []; } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof Reference && isset($this->replacements[$referenceId = (string) $value])) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php index 2efb12b04894c..31924263504e5 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php @@ -32,9 +32,6 @@ class ResolveBindingsPass extends AbstractRecursivePass private array $unusedBindings = []; private array $errorMessages = []; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $this->usedBindings = $container->getRemovedBindingIds(); @@ -90,9 +87,6 @@ public function process(ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof TypedReference && $value->getType() === (string) $value) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php index e67a2a8ed78ec..a679e3ab9b663 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php @@ -20,9 +20,6 @@ */ class ResolveClassPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { foreach ($container->getDefinitions() as $id => $definition) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php index 7d5d95d20fc56..49e5f369efb49 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php @@ -19,9 +19,6 @@ */ class ResolveFactoryClassPass extends AbstractRecursivePass { - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php index 200921373dedb..6b1a27e5a7cb6 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php @@ -25,9 +25,6 @@ class ResolveHotPathPass extends AbstractRecursivePass { private array $resolvedIds = []; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { try { @@ -38,9 +35,6 @@ public function process(ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof ArgumentInterface) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php index a6f5187782f74..59acd67607e7a 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php @@ -24,9 +24,6 @@ */ class ResolveInstanceofConditionalsPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { foreach ($container->getAutoconfiguredInstanceof() as $interface => $definition) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php index b4f38b4273479..53bf4b2c8323b 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php @@ -24,9 +24,6 @@ */ class ResolveNamedArgumentsPass extends AbstractRecursivePass { - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof AbstractArgument && $value->getText().'.' === $value->getTextWithContext()) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php index 211245e2d9ef0..c105721cddb54 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php @@ -26,9 +26,6 @@ class ResolveNoPreloadPass extends AbstractRecursivePass private array $resolvedIds = []; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $this->container = $container; @@ -61,9 +58,6 @@ public function process(ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->hasDefinition($id = (string) $value)) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php index 07631de6ec622..6bca33da6d0ad 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php @@ -32,8 +32,6 @@ public function __construct( } /** - * {@inheritdoc} - * * @throws ParameterNotFoundException */ public function process(ContainerBuilder $container) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php index f6ee152929def..a9eca5bba37e9 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php @@ -22,9 +22,6 @@ */ class ResolveReferencesToAliasesPass extends AbstractRecursivePass { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { parent::process($container); @@ -39,9 +36,6 @@ public function process(ContainerBuilder $container) } } - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if (!$value instanceof Reference) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php index d9362a6402046..1fca5ebaa5f8a 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php @@ -22,9 +22,6 @@ class ResolveTaggedIteratorArgumentPass extends AbstractRecursivePass { use PriorityTaggedServiceTrait; - /** - * {@inheritdoc} - */ protected function processValue(mixed $value, bool $isRoot = false): mixed { if (!$value instanceof TaggedIteratorArgument) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php index 510e9009389e1..0aa1a4acaae01 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php @@ -30,9 +30,6 @@ class ValidateEnvPlaceholdersPass implements CompilerPassInterface private array $extensionConfig = []; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $this->extensionConfig = []; diff --git a/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResourceChecker.php b/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResourceChecker.php index 6901127056876..619c5e19785fa 100644 --- a/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResourceChecker.php +++ b/src/Symfony/Component/DependencyInjection/Config/ContainerParametersResourceChecker.php @@ -27,17 +27,11 @@ public function __construct(ContainerInterface $container) $this->container = $container; } - /** - * {@inheritdoc} - */ public function supports(ResourceInterface $metadata): bool { return $metadata instanceof ContainerParametersResource; } - /** - * {@inheritdoc} - */ public function isFresh(ResourceInterface $resource, int $timestamp): bool { foreach ($resource->getParameters() as $key => $value) { diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 20ca68e514572..9c830e77c8fe2 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -269,9 +269,6 @@ public function initialized(string $id): bool return isset($this->services[$id]); } - /** - * {@inheritdoc} - */ public function reset() { $services = $this->services + $this->privates; diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 2d00add867ad2..e364e9f40e35e 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -746,9 +746,6 @@ public function compile(bool $resolveEnvPlaceholders = false) } } - /** - * {@inheritdoc} - */ public function getServiceIds(): array { return array_map('strval', array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds()))); @@ -1549,9 +1546,6 @@ public static function hash(mixed $value): string return str_replace(['/', '+'], ['.', '_'], $hash); } - /** - * {@inheritdoc} - */ protected function getEnv(string $name): mixed { $value = parent::getEnv($name); diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 7498b04001da4..6ea2de7c3f14a 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -93,9 +93,6 @@ class PhpDumper extends Dumper private string $class; private ProxyDumper $proxyDumper; - /** - * {@inheritdoc} - */ public function __construct(ContainerBuilder $container) { if (!$container->isCompiled()) { diff --git a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php index 9cbd9fd3f79d2..25207c386aa04 100644 --- a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php +++ b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php @@ -34,9 +34,6 @@ public function __construct(ContainerInterface $container, \Traversable $loaders $this->loaders = $loaders ?? new \ArrayIterator(); } - /** - * {@inheritdoc} - */ public static function getProvidedTypes(): array { return [ @@ -62,9 +59,6 @@ public static function getProvidedTypes(): array ]; } - /** - * {@inheritdoc} - */ public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed { $i = strpos($name, ':'); diff --git a/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php b/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php index df47f53a4f625..1a7f5fd38efb0 100644 --- a/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php +++ b/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php @@ -27,9 +27,6 @@ */ class ExpressionLanguage extends BaseExpressionLanguage { - /** - * {@inheritdoc} - */ public function __construct(CacheItemPoolInterface $cache = null, array $providers = [], callable $serviceCompiler = null, \Closure $getEnv = null) { // prepend the default provider to let users override it easily diff --git a/src/Symfony/Component/DependencyInjection/Extension/Extension.php b/src/Symfony/Component/DependencyInjection/Extension/Extension.php index d553203c438fa..00192d0da577d 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/Extension.php +++ b/src/Symfony/Component/DependencyInjection/Extension/Extension.php @@ -28,17 +28,11 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn { private array $processedConfigs = []; - /** - * {@inheritdoc} - */ public function getXsdValidationBasePath() { return false; } - /** - * {@inheritdoc} - */ public function getNamespace() { return 'http://example.org/schema/dic/'.$this->getAlias(); @@ -73,9 +67,6 @@ public function getAlias(): string return Container::underscore($classBaseName); } - /** - * {@inheritdoc} - */ public function getConfiguration(array $config, ContainerBuilder $container) { $class = static::class; diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php index 363a8df9fc875..053f80f11bbec 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php @@ -23,9 +23,6 @@ */ final class LazyServiceInstantiator implements InstantiatorInterface { - /** - * {@inheritdoc} - */ public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object { $dumper = new LazyServiceDumper(); diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php index 38ccca525b1ef..a0c445ebb8329 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php @@ -15,17 +15,12 @@ use Symfony\Component\DependencyInjection\Definition; /** - * {@inheritdoc} - * * Noop proxy instantiator - produces the real service instead of a proxy instance. * * @author Marco Pivetta */ class RealServiceInstantiator implements InstantiatorInterface { - /** - * {@inheritdoc} - */ public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object { return $realInstantiator(); diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php index 889026889bed9..ed66f6962db8b 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php @@ -28,9 +28,6 @@ public function __construct( ) { } - /** - * {@inheritdoc} - */ public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): bool { $asGhostObject = false; @@ -68,9 +65,6 @@ public function isProxyCandidate(Definition $definition, bool &$asGhostObject = return true; } - /** - * {@inheritdoc} - */ public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string { if ($dumper = $this->useProxyManager($definition)) { @@ -102,9 +96,6 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ EOF; } - /** - * {@inheritdoc} - */ public function getProxyCode(Definition $definition): string { if ($dumper = $this->useProxyManager($definition)) { diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php index 8800af6017625..4a061c187638e 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php @@ -22,25 +22,16 @@ */ class NullDumper implements DumperInterface { - /** - * {@inheritdoc} - */ public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): bool { return $asGhostObject = false; } - /** - * {@inheritdoc} - */ public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string { return ''; } - /** - * {@inheritdoc} - */ public function getProxyCode(Definition $definition): string { return ''; diff --git a/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php b/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php index d84563603e012..94305ae9438b2 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php @@ -31,17 +31,11 @@ public function __construct(ContainerBuilder $container, string $env = null) parent::__construct($env); } - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { return $resource($this->container, $this->env); } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return $resource instanceof \Closure; diff --git a/src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php b/src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php index 1247e0413ac8e..1b5e81d1981c0 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php @@ -18,9 +18,6 @@ */ class DirectoryLoader extends FileLoader { - /** - * {@inheritdoc} - */ public function load(mixed $file, string $type = null): mixed { $file = rtrim($file, '/'); @@ -42,9 +39,6 @@ public function load(mixed $file, string $type = null): mixed return null; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { if ('directory' === $type) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php index 9504c4cee664f..d48ddb2612b6c 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php @@ -48,8 +48,6 @@ public function __construct(ContainerBuilder $container, FileLocatorInterface $l } /** - * {@inheritdoc} - * * @param bool|string $ignoreErrors Whether errors should be ignored; pass "not_found" to ignore only when the loaded resource is not found */ public function import(mixed $resource, string $type = null, bool|string $ignoreErrors = false, string $sourceResource = null, $exclude = null): mixed diff --git a/src/Symfony/Component/DependencyInjection/Loader/GlobFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/GlobFileLoader.php index e232af5f706c4..50349b25793d0 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/GlobFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/GlobFileLoader.php @@ -18,9 +18,6 @@ */ class GlobFileLoader extends FileLoader { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { foreach ($this->glob($resource, false, $globResource) as $path => $info) { @@ -32,9 +29,6 @@ public function load(mixed $resource, string $type = null): mixed return null; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return 'glob' === $type; diff --git a/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php index 43861894296fb..0a3e86b73399a 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php @@ -21,9 +21,6 @@ */ class IniFileLoader extends FileLoader { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { $path = $this->locator->locate($resource); @@ -54,9 +51,6 @@ public function load(mixed $resource, string $type = null): mixed return null; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { if (!\is_string($resource)) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php index 7c279d19b241d..66ba89b00127e 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php @@ -42,9 +42,6 @@ public function __construct(ContainerBuilder $container, FileLocatorInterface $l $this->generator = $generator; } - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { // the container and loader variables are exposed to the included file below @@ -74,9 +71,6 @@ public function load(mixed $resource, string $type = null): mixed return null; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { if (!\is_string($resource)) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 99c9d6975a194..c0fafa4fc54ee 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -40,9 +40,6 @@ class XmlFileLoader extends FileLoader protected $autoRegisterAliasesForSinglyImplementedInterfaces = false; - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { $path = $this->locator->locate($resource); @@ -95,9 +92,6 @@ private function loadXml(\DOMDocument $xml, string $path, \DOMNode $root = null) } } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { if (!\is_string($resource)) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index 3f51206f89ff5..b7fdeae28c4ca 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -113,9 +113,6 @@ class YamlFileLoader extends FileLoader protected $autoRegisterAliasesForSinglyImplementedInterfaces = false; - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { $path = $this->locator->locate($resource); @@ -180,9 +177,6 @@ private function loadContent(array $content, string $path) } } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { if (!\is_string($resource)) { diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag.php index cc58658e6f769..7aa5ff80a06a8 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag.php @@ -25,25 +25,16 @@ public function __construct(Container $container) $this->container = $container; } - /** - * {@inheritdoc} - */ public function all(): array { return $this->container->getParameterBag()->all(); } - /** - * {@inheritdoc} - */ public function get(string $name): array|bool|string|int|float|\UnitEnum|null { return $this->container->getParameter($name); } - /** - * {@inheritdoc} - */ public function has(string $name): bool { return $this->container->hasParameter($name); diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php index bee5f8c49afd7..0e4041605ca5a 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php @@ -26,9 +26,6 @@ class EnvPlaceholderParameterBag extends ParameterBag private static int $counter = 0; - /** - * {@inheritdoc} - */ public function get(string $name): array|bool|string|int|float|null { if (str_starts_with($name, 'env(') && str_ends_with($name, ')') && 'env()' !== $name) { @@ -135,9 +132,6 @@ public function getProvidedTypes(): array return $this->providedTypes; } - /** - * {@inheritdoc} - */ public function resolve() { if ($this->resolved) { diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php index 2a617ffd8edc8..4e0f4bc2e929d 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php @@ -34,33 +34,21 @@ public function __construct(array $parameters = []) $this->resolved = true; } - /** - * {@inheritdoc} - */ public function clear() { throw new LogicException('Impossible to call clear() on a frozen ParameterBag.'); } - /** - * {@inheritdoc} - */ public function add(array $parameters) { throw new LogicException('Impossible to call add() on a frozen ParameterBag.'); } - /** - * {@inheritdoc} - */ public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value) { throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); } - /** - * {@inheritdoc} - */ public function remove(string $name) { throw new LogicException('Impossible to call remove() on a frozen ParameterBag.'); diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php index 319650cd53094..54cdc1a6f0f15 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php @@ -30,17 +30,11 @@ public function __construct(array $parameters = []) $this->add($parameters); } - /** - * {@inheritdoc} - */ public function clear() { $this->parameters = []; } - /** - * {@inheritdoc} - */ public function add(array $parameters) { foreach ($parameters as $key => $value) { @@ -48,17 +42,11 @@ public function add(array $parameters) } } - /** - * {@inheritdoc} - */ public function all(): array { return $this->parameters; } - /** - * {@inheritdoc} - */ public function get(string $name): array|bool|string|int|float|\UnitEnum|null { if (!\array_key_exists($name, $this->parameters)) { @@ -96,33 +84,21 @@ public function get(string $name): array|bool|string|int|float|\UnitEnum|null return $this->parameters[$name]; } - /** - * {@inheritdoc} - */ public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value) { $this->parameters[$name] = $value; } - /** - * {@inheritdoc} - */ public function has(string $name): bool { return \array_key_exists($name, $this->parameters); } - /** - * {@inheritdoc} - */ public function remove(string $name) { unset($this->parameters[$name]); } - /** - * {@inheritdoc} - */ public function resolve() { if ($this->resolved) { @@ -237,9 +213,6 @@ public function isResolved() return $this->resolved; } - /** - * {@inheritdoc} - */ public function escapeValue(mixed $value): mixed { if (\is_string($value)) { @@ -258,9 +231,6 @@ public function escapeValue(mixed $value): mixed return $value; } - /** - * {@inheritdoc} - */ public function unescapeValue(mixed $value): mixed { if (\is_string($value)) { diff --git a/src/Symfony/Component/DependencyInjection/ServiceLocator.php b/src/Symfony/Component/DependencyInjection/ServiceLocator.php index cf39c535297ce..94dbfd0ad9018 100644 --- a/src/Symfony/Component/DependencyInjection/ServiceLocator.php +++ b/src/Symfony/Component/DependencyInjection/ServiceLocator.php @@ -33,9 +33,6 @@ class ServiceLocator implements ServiceProviderInterface, \Countable private ?string $externalId = null; private ?Container $container = null; - /** - * {@inheritdoc} - */ public function get(string $id): mixed { if (!$this->externalId) { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index a168efa7f15fa..47efc42331fd1 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -932,9 +932,6 @@ public function testServiceSubscriber() $container->register(TestDefinition1::class, TestDefinition1::class)->setPublic(true); $container->addCompilerPass(new class() implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $container->setDefinition('late_alias', new Definition(TestDefinition1::class))->setPublic(true); diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php index 8c4248c044b6e..f8df35b69c45a 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php @@ -27,9 +27,6 @@ public function __construct(string $selector, string $attribute, string $expecte $this->expectedText = $expectedText; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has a node matching selector "%s" with attribute "%s" of value "%s"', $this->selector, $this->attribute, $this->expectedText); @@ -37,8 +34,6 @@ public function toString(): string /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function matches($crawler): bool { @@ -52,8 +47,6 @@ protected function matches($crawler): bool /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function failureDescription($crawler): string { diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorExists.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorExists.php index 710ce5518c5eb..5d0c100aefac0 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorExists.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorExists.php @@ -23,9 +23,6 @@ public function __construct(string $selector) $this->selector = $selector; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('matches selector "%s"', $this->selector); @@ -33,8 +30,6 @@ public function toString(): string /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function matches($crawler): bool { @@ -43,8 +38,6 @@ protected function matches($crawler): bool /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function failureDescription($crawler): string { diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php index 751b4274dad74..c70fff1d0b024 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextContains.php @@ -27,9 +27,6 @@ public function __construct(string $selector, string $expectedText) $this->expectedText = $expectedText; } - /** - * {@inheritdoc} - */ public function toString(): string { if ($this->hasNode) { @@ -41,8 +38,6 @@ public function toString(): string /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function matches($crawler): bool { @@ -61,8 +56,6 @@ protected function matches($crawler): bool /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function failureDescription($crawler): string { diff --git a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php index e24b152f4f34c..269e23fcef9ca 100644 --- a/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php +++ b/src/Symfony/Component/DomCrawler/Test/Constraint/CrawlerSelectorTextSame.php @@ -25,9 +25,6 @@ public function __construct(string $selector, string $expectedText) $this->expectedText = $expectedText; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has a node matching selector "%s" with content "%s"', $this->selector, $this->expectedText); @@ -35,8 +32,6 @@ public function toString(): string /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function matches($crawler): bool { @@ -50,8 +45,6 @@ protected function matches($crawler): bool /** * @param Crawler $crawler - * - * {@inheritdoc} */ protected function failureDescription($crawler): string { diff --git a/src/Symfony/Component/Dotenv/Command/DotenvDumpCommand.php b/src/Symfony/Component/Dotenv/Command/DotenvDumpCommand.php index 66b753b9a89ad..0102175a72bef 100644 --- a/src/Symfony/Component/Dotenv/Command/DotenvDumpCommand.php +++ b/src/Symfony/Component/Dotenv/Command/DotenvDumpCommand.php @@ -40,9 +40,6 @@ public function __construct(string $projectDir, string $defaultEnv = null) parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -59,9 +56,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $config = []; diff --git a/src/Symfony/Component/ErrorHandler/Error/ClassNotFoundError.php b/src/Symfony/Component/ErrorHandler/Error/ClassNotFoundError.php index 3406ad0be957d..8a17745c4b896 100644 --- a/src/Symfony/Component/ErrorHandler/Error/ClassNotFoundError.php +++ b/src/Symfony/Component/ErrorHandler/Error/ClassNotFoundError.php @@ -13,9 +13,6 @@ class ClassNotFoundError extends \Error { - /** - * {@inheritdoc} - */ public function __construct(string $message, \Throwable $previous) { parent::__construct($message, $previous->getCode(), $previous->getPrevious()); diff --git a/src/Symfony/Component/ErrorHandler/Error/FatalError.php b/src/Symfony/Component/ErrorHandler/Error/FatalError.php index e7d3845cdda47..a1fd5a9956fd7 100644 --- a/src/Symfony/Component/ErrorHandler/Error/FatalError.php +++ b/src/Symfony/Component/ErrorHandler/Error/FatalError.php @@ -16,8 +16,6 @@ class FatalError extends \Error private array $error; /** - * {@inheritdoc} - * * @param array $error An array as returned by error_get_last() */ public function __construct(string $message, int $code, array $error, int $traceOffset = null, bool $traceArgs = true, array $trace = null) @@ -78,9 +76,6 @@ public function __construct(string $message, int $code, array $error, int $trace } } - /** - * {@inheritdoc} - */ public function getError(): array { return $this->error; diff --git a/src/Symfony/Component/ErrorHandler/Error/UndefinedFunctionError.php b/src/Symfony/Component/ErrorHandler/Error/UndefinedFunctionError.php index 0ed2b7c2f7c19..5063b73d733d0 100644 --- a/src/Symfony/Component/ErrorHandler/Error/UndefinedFunctionError.php +++ b/src/Symfony/Component/ErrorHandler/Error/UndefinedFunctionError.php @@ -13,9 +13,6 @@ class UndefinedFunctionError extends \Error { - /** - * {@inheritdoc} - */ public function __construct(string $message, \Throwable $previous) { parent::__construct($message, $previous->getCode(), $previous->getPrevious()); diff --git a/src/Symfony/Component/ErrorHandler/Error/UndefinedMethodError.php b/src/Symfony/Component/ErrorHandler/Error/UndefinedMethodError.php index f492a42bede56..35f15451cd158 100644 --- a/src/Symfony/Component/ErrorHandler/Error/UndefinedMethodError.php +++ b/src/Symfony/Component/ErrorHandler/Error/UndefinedMethodError.php @@ -13,9 +13,6 @@ class UndefinedMethodError extends \Error { - /** - * {@inheritdoc} - */ public function __construct(string $message, \Throwable $previous) { parent::__construct($message, $previous->getCode(), $previous->getPrevious()); diff --git a/src/Symfony/Component/ErrorHandler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php b/src/Symfony/Component/ErrorHandler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php index 14c9a398d903d..153819f2a0804 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php +++ b/src/Symfony/Component/ErrorHandler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php @@ -21,9 +21,6 @@ */ class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface { - /** - * {@inheritdoc} - */ public function enhance(\Throwable $error): ?\Throwable { // Some specific versions of PHP produce a fatal error when extending a not found class. diff --git a/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php b/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php index 2e3838a84d382..0458c26ac2a17 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php +++ b/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php @@ -19,9 +19,6 @@ */ class UndefinedFunctionErrorEnhancer implements ErrorEnhancerInterface { - /** - * {@inheritdoc} - */ public function enhance(\Throwable $error): ?\Throwable { if ($error instanceof FatalError) { diff --git a/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php b/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php index d5eb6d6b1e4a6..80eaec9bf22e9 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php +++ b/src/Symfony/Component/ErrorHandler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php @@ -19,9 +19,6 @@ */ class UndefinedMethodErrorEnhancer implements ErrorEnhancerInterface { - /** - * {@inheritdoc} - */ public function enhance(\Throwable $error): ?\Throwable { if ($error instanceof FatalError) { diff --git a/src/Symfony/Component/ErrorHandler/ErrorRenderer/CliErrorRenderer.php b/src/Symfony/Component/ErrorHandler/ErrorRenderer/CliErrorRenderer.php index 5c0f6a7dce636..04b3edb1b30ab 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorRenderer/CliErrorRenderer.php +++ b/src/Symfony/Component/ErrorHandler/ErrorRenderer/CliErrorRenderer.php @@ -23,9 +23,6 @@ class_exists(CliDumper::class); */ class CliErrorRenderer implements ErrorRendererInterface { - /** - * {@inheritdoc} - */ public function render(\Throwable $exception): FlattenException { $cloner = new VarCloner(); diff --git a/src/Symfony/Component/ErrorHandler/ErrorRenderer/HtmlErrorRenderer.php b/src/Symfony/Component/ErrorHandler/ErrorRenderer/HtmlErrorRenderer.php index b3603b261ec79..a4d67708850a3 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorRenderer/HtmlErrorRenderer.php +++ b/src/Symfony/Component/ErrorHandler/ErrorRenderer/HtmlErrorRenderer.php @@ -59,9 +59,6 @@ public function __construct(bool|callable $debug = false, string $charset = null $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function render(\Throwable $exception): FlattenException { $headers = ['Content-Type' => 'text/html; charset='.$this->charset]; diff --git a/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php b/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php index dceb7fb63cad2..8130b2ee0bbb2 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php +++ b/src/Symfony/Component/ErrorHandler/ErrorRenderer/SerializerErrorRenderer.php @@ -42,9 +42,6 @@ public function __construct(SerializerInterface $serializer, string|callable $fo $this->debug = \is_bool($debug) ? $debug : $debug(...); } - /** - * {@inheritdoc} - */ public function render(\Throwable $exception): FlattenException { $headers = []; diff --git a/src/Symfony/Component/ErrorHandler/Tests/Fixtures/ExtendedFinalMethod.php b/src/Symfony/Component/ErrorHandler/Tests/Fixtures/ExtendedFinalMethod.php index 3a9b9d742d102..978707a8ed86e 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/Fixtures/ExtendedFinalMethod.php +++ b/src/Symfony/Component/ErrorHandler/Tests/Fixtures/ExtendedFinalMethod.php @@ -6,9 +6,6 @@ class ExtendedFinalMethod extends FinalMethod { use FinalMethod2Trait; - /** - * {@inheritdoc} - */ public function finalMethod() { } diff --git a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php index 5005067e2c3cb..e0ab370ba66f5 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php @@ -51,25 +51,16 @@ public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $sto $this->requestStack = $requestStack; } - /** - * {@inheritdoc} - */ public function addListener(string $eventName, callable|array $listener, int $priority = 0) { $this->dispatcher->addListener($eventName, $listener, $priority); } - /** - * {@inheritdoc} - */ public function addSubscriber(EventSubscriberInterface $subscriber) { $this->dispatcher->addSubscriber($subscriber); } - /** - * {@inheritdoc} - */ public function removeListener(string $eventName, callable|array $listener) { if (isset($this->wrappedListeners[$eventName])) { @@ -85,25 +76,16 @@ public function removeListener(string $eventName, callable|array $listener) return $this->dispatcher->removeListener($eventName, $listener); } - /** - * {@inheritdoc} - */ public function removeSubscriber(EventSubscriberInterface $subscriber) { return $this->dispatcher->removeSubscriber($subscriber); } - /** - * {@inheritdoc} - */ public function getListeners(string $eventName = null): array { return $this->dispatcher->getListeners($eventName); } - /** - * {@inheritdoc} - */ public function getListenerPriority(string $eventName, callable|array $listener): ?int { // we might have wrapped listeners for the event (if called while dispatching) @@ -119,17 +101,11 @@ public function getListenerPriority(string $eventName, callable|array $listener) return $this->dispatcher->getListenerPriority($eventName, $listener); } - /** - * {@inheritdoc} - */ public function hasListeners(string $eventName = null): bool { return $this->dispatcher->hasListeners($eventName); } - /** - * {@inheritdoc} - */ public function dispatch(object $event, string $eventName = null): object { $eventName ??= \get_class($event); diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/Symfony/Component/EventDispatcher/EventDispatcher.php index 28ab10811d711..27828c6eff969 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -42,9 +42,6 @@ public function __construct() } } - /** - * {@inheritdoc} - */ public function dispatch(object $event, string $eventName = null): object { $eventName ??= \get_class($event); @@ -62,9 +59,6 @@ public function dispatch(object $event, string $eventName = null): object return $event; } - /** - * {@inheritdoc} - */ public function getListeners(string $eventName = null): array { if (null !== $eventName) { @@ -88,9 +82,6 @@ public function getListeners(string $eventName = null): array return array_filter($this->sorted); } - /** - * {@inheritdoc} - */ public function getListenerPriority(string $eventName, callable|array $listener): ?int { if (empty($this->listeners[$eventName])) { @@ -117,9 +108,6 @@ public function getListenerPriority(string $eventName, callable|array $listener) return null; } - /** - * {@inheritdoc} - */ public function hasListeners(string $eventName = null): bool { if (null !== $eventName) { @@ -135,18 +123,12 @@ public function hasListeners(string $eventName = null): bool return false; } - /** - * {@inheritdoc} - */ public function addListener(string $eventName, callable|array $listener, int $priority = 0) { $this->listeners[$eventName][$priority][] = $listener; unset($this->sorted[$eventName], $this->optimized[$eventName]); } - /** - * {@inheritdoc} - */ public function removeListener(string $eventName, callable|array $listener) { if (empty($this->listeners[$eventName])) { @@ -175,9 +157,6 @@ public function removeListener(string $eventName, callable|array $listener) } } - /** - * {@inheritdoc} - */ public function addSubscriber(EventSubscriberInterface $subscriber) { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { @@ -193,9 +172,6 @@ public function addSubscriber(EventSubscriberInterface $subscriber) } } - /** - * {@inheritdoc} - */ public function removeSubscriber(EventSubscriberInterface $subscriber) { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { diff --git a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php index a54358284985e..182ba080d54f6 100644 --- a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php @@ -25,65 +25,41 @@ public function __construct(EventDispatcherInterface $dispatcher) $this->dispatcher = $dispatcher; } - /** - * {@inheritdoc} - */ public function dispatch(object $event, string $eventName = null): object { return $this->dispatcher->dispatch($event, $eventName); } - /** - * {@inheritdoc} - */ public function addListener(string $eventName, callable|array $listener, int $priority = 0) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } - /** - * {@inheritdoc} - */ public function addSubscriber(EventSubscriberInterface $subscriber) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } - /** - * {@inheritdoc} - */ public function removeListener(string $eventName, callable|array $listener) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } - /** - * {@inheritdoc} - */ public function removeSubscriber(EventSubscriberInterface $subscriber) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } - /** - * {@inheritdoc} - */ public function getListeners(string $eventName = null): array { return $this->dispatcher->getListeners($eventName); } - /** - * {@inheritdoc} - */ public function getListenerPriority(string $eventName, callable|array $listener): ?int { return $this->dispatcher->getListenerPriority($eventName, $listener); } - /** - * {@inheritdoc} - */ public function hasListeners(string $eventName = null): bool { return $this->dispatcher->hasListeners($eventName); diff --git a/src/Symfony/Component/Filesystem/Exception/IOException.php b/src/Symfony/Component/Filesystem/Exception/IOException.php index bcca860de498b..a3c5445534c72 100644 --- a/src/Symfony/Component/Filesystem/Exception/IOException.php +++ b/src/Symfony/Component/Filesystem/Exception/IOException.php @@ -29,9 +29,6 @@ public function __construct(string $message, int $code = 0, \Throwable $previous parent::__construct($message, $code, $previous); } - /** - * {@inheritdoc} - */ public function getPath(): ?string { return $this->path; diff --git a/src/Symfony/Component/Form/AbstractExtension.php b/src/Symfony/Component/Form/AbstractExtension.php index 79d61e8bc0a3f..6ba5624bd9dfa 100644 --- a/src/Symfony/Component/Form/AbstractExtension.php +++ b/src/Symfony/Component/Form/AbstractExtension.php @@ -43,9 +43,6 @@ abstract class AbstractExtension implements FormExtensionInterface */ private bool $typeGuesserLoaded = false; - /** - * {@inheritdoc} - */ public function getType(string $name): FormTypeInterface { if (!isset($this->types)) { @@ -59,9 +56,6 @@ public function getType(string $name): FormTypeInterface return $this->types[$name]; } - /** - * {@inheritdoc} - */ public function hasType(string $name): bool { if (!isset($this->types)) { @@ -71,9 +65,6 @@ public function hasType(string $name): bool return isset($this->types[$name]); } - /** - * {@inheritdoc} - */ public function getTypeExtensions(string $name): array { if (!isset($this->typeExtensions)) { @@ -84,9 +75,6 @@ public function getTypeExtensions(string $name): array ?? []; } - /** - * {@inheritdoc} - */ public function hasTypeExtensions(string $name): bool { if (!isset($this->typeExtensions)) { @@ -96,9 +84,6 @@ public function hasTypeExtensions(string $name): bool return isset($this->typeExtensions[$name]) && \count($this->typeExtensions[$name]) > 0; } - /** - * {@inheritdoc} - */ public function getTypeGuesser(): ?FormTypeGuesserInterface { if (!$this->typeGuesserLoaded) { diff --git a/src/Symfony/Component/Form/AbstractRendererEngine.php b/src/Symfony/Component/Form/AbstractRendererEngine.php index ada182f57b10d..f79f1c1338d30 100644 --- a/src/Symfony/Component/Form/AbstractRendererEngine.php +++ b/src/Symfony/Component/Form/AbstractRendererEngine.php @@ -61,9 +61,6 @@ public function __construct(array $defaultThemes = []) $this->defaultThemes = $defaultThemes; } - /** - * {@inheritdoc} - */ public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true) { $cacheKey = $view->vars[self::CACHE_KEY_VAR]; @@ -78,9 +75,6 @@ public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = unset($this->resources[$cacheKey], $this->resourceHierarchyLevels[$cacheKey]); } - /** - * {@inheritdoc} - */ public function getResourceForBlockName(FormView $view, string $blockName): mixed { $cacheKey = $view->vars[self::CACHE_KEY_VAR]; @@ -92,9 +86,6 @@ public function getResourceForBlockName(FormView $view, string $blockName): mixe return $this->resources[$cacheKey][$blockName]; } - /** - * {@inheritdoc} - */ public function getResourceForBlockNameHierarchy(FormView $view, array $blockNameHierarchy, int $hierarchyLevel): mixed { $cacheKey = $view->vars[self::CACHE_KEY_VAR]; @@ -107,9 +98,6 @@ public function getResourceForBlockNameHierarchy(FormView $view, array $blockNam return $this->resources[$cacheKey][$blockName]; } - /** - * {@inheritdoc} - */ public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel): int|false { $cacheKey = $view->vars[self::CACHE_KEY_VAR]; diff --git a/src/Symfony/Component/Form/AbstractType.php b/src/Symfony/Component/Form/AbstractType.php index 3325b8bc27567..da401930d7833 100644 --- a/src/Symfony/Component/Form/AbstractType.php +++ b/src/Symfony/Component/Form/AbstractType.php @@ -20,45 +20,27 @@ */ abstract class AbstractType implements FormTypeInterface { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { } - /** - * {@inheritdoc} - */ public function getBlockPrefix() { return StringUtil::fqcnToBlockPrefix(static::class) ?: ''; } - /** - * {@inheritdoc} - */ public function getParent() { return FormType::class; diff --git a/src/Symfony/Component/Form/AbstractTypeExtension.php b/src/Symfony/Component/Form/AbstractTypeExtension.php index 9d369bf294e96..bcd408c170a19 100644 --- a/src/Symfony/Component/Form/AbstractTypeExtension.php +++ b/src/Symfony/Component/Form/AbstractTypeExtension.php @@ -18,30 +18,18 @@ */ abstract class AbstractTypeExtension implements FormTypeExtensionInterface { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { } diff --git a/src/Symfony/Component/Form/Button.php b/src/Symfony/Component/Form/Button.php index 7c80d03e341ec..58a77a7763687 100644 --- a/src/Symfony/Component/Form/Button.php +++ b/src/Symfony/Component/Form/Button.php @@ -81,9 +81,6 @@ public function offsetUnset(mixed $offset): void throw new BadMethodCallException('Buttons cannot have children.'); } - /** - * {@inheritdoc} - */ public function setParent(FormInterface $parent = null): static { if ($this->submitted) { @@ -95,9 +92,6 @@ public function setParent(FormInterface $parent = null): static return $this; } - /** - * {@inheritdoc} - */ public function getParent(): ?FormInterface { return $this->parent; @@ -147,17 +141,11 @@ public function remove(string $name): static throw new BadMethodCallException('Buttons cannot have children.'); } - /** - * {@inheritdoc} - */ public function all(): array { return []; } - /** - * {@inheritdoc} - */ public function getErrors(bool $deep = false, bool $flatten = true): FormErrorIterator { return new FormErrorIterator($this, []); @@ -266,9 +254,6 @@ public function isRequired(): bool return false; } - /** - * {@inheritdoc} - */ public function isDisabled(): bool { if ($this->parent?->isDisabled()) { @@ -340,25 +325,16 @@ public function submit(array|string|null $submittedData, bool $clearMissing = tr return $this; } - /** - * {@inheritdoc} - */ public function getRoot(): FormInterface { return $this->parent ? $this->parent->getRoot() : $this; } - /** - * {@inheritdoc} - */ public function isRoot(): bool { return null === $this->parent; } - /** - * {@inheritdoc} - */ public function createView(FormView $parent = null): FormView { if (null === $parent && $this->parent) { diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index 7c8f186e12d4a..387c3571fcb9a 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -173,9 +173,6 @@ public function resetModelTransformers(): static throw new BadMethodCallException('Buttons do not support data transformers.'); } - /** - * {@inheritdoc} - */ public function setAttribute(string $name, mixed $value): static { $this->attributes[$name] = $value; @@ -183,9 +180,6 @@ public function setAttribute(string $name, mixed $value): static return $this; } - /** - * {@inheritdoc} - */ public function setAttributes(array $attributes): static { $this->attributes = $attributes; @@ -415,9 +409,6 @@ public function getEventDispatcher(): EventDispatcherInterface throw new BadMethodCallException('Buttons do not support event dispatching.'); } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; diff --git a/src/Symfony/Component/Form/CallbackTransformer.php b/src/Symfony/Component/Form/CallbackTransformer.php index 8870526b8f332..2a79b5b3653cf 100644 --- a/src/Symfony/Component/Form/CallbackTransformer.php +++ b/src/Symfony/Component/Form/CallbackTransformer.php @@ -22,17 +22,11 @@ public function __construct(callable $transform, callable $reverseTransform) $this->reverseTransform = $reverseTransform(...); } - /** - * {@inheritdoc} - */ public function transform(mixed $data): mixed { return ($this->transform)($data); } - /** - * {@inheritdoc} - */ public function reverseTransform(mixed $data): mixed { return ($this->reverseTransform)($data); diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php index 890ed4a978d37..a438ce2e10f45 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php @@ -90,41 +90,26 @@ public function __construct(iterable $choices, callable $value = null) $this->structuredValues = $structuredValues; } - /** - * {@inheritdoc} - */ public function getChoices(): array { return $this->choices; } - /** - * {@inheritdoc} - */ public function getValues(): array { return array_map('strval', array_keys($this->choices)); } - /** - * {@inheritdoc} - */ public function getStructuredValues(): array { return $this->structuredValues; } - /** - * {@inheritdoc} - */ public function getOriginalKeys(): array { return $this->originalKeys; } - /** - * {@inheritdoc} - */ public function getChoicesForValues(array $values): array { $choices = []; @@ -138,9 +123,6 @@ public function getChoicesForValues(array $values): array return $choices; } - /** - * {@inheritdoc} - */ public function getValuesForChoices(array $choices): array { $values = []; diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/Cache/ChoiceLoader.php b/src/Symfony/Component/Form/ChoiceList/Factory/Cache/ChoiceLoader.php index 83b2ca0aa2ab4..70c3f77e869e7 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/Cache/ChoiceLoader.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/Cache/ChoiceLoader.php @@ -26,25 +26,16 @@ */ final class ChoiceLoader extends AbstractStaticOption implements ChoiceLoaderInterface { - /** - * {@inheritdoc} - */ public function loadChoiceList(callable $value = null): ChoiceListInterface { return $this->getOption()->loadChoiceList($value); } - /** - * {@inheritdoc} - */ public function loadChoicesForValues(array $values, callable $value = null): array { return $this->getOption()->loadChoicesForValues($values, $value); } - /** - * {@inheritdoc} - */ public function loadValuesForChoices(array $choices, callable $value = null): array { return $this->getOption()->loadValuesForChoices($choices, $value); diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php index f5174bcfd5cc1..62d1b71d9da56 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php @@ -77,9 +77,6 @@ public function getDecoratedFactory(): ChoiceListFactoryInterface return $this->decoratedFactory; } - /** - * {@inheritdoc} - */ public function createListFromChoices(iterable $choices, mixed $value = null, mixed $filter = null): ChoiceListInterface { if ($choices instanceof \Traversable) { @@ -113,9 +110,6 @@ public function createListFromChoices(iterable $choices, mixed $value = null, mi return $this->lists[$hash]; } - /** - * {@inheritdoc} - */ public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value = null, mixed $filter = null): ChoiceListInterface { $cache = true; @@ -151,9 +145,6 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value return $this->lists[$hash]; } - /** - * {@inheritdoc} - */ public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = []): ChoiceListView { $cache = true; diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php b/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php index 9ab806cbc573c..0d39b590cfd4c 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php @@ -30,9 +30,6 @@ */ class DefaultChoiceListFactory implements ChoiceListFactoryInterface { - /** - * {@inheritdoc} - */ public function createListFromChoices(iterable $choices, callable $value = null, callable $filter = null): ChoiceListInterface { if ($filter) { @@ -47,9 +44,6 @@ public function createListFromChoices(iterable $choices, callable $value = null, return new ArrayChoiceList($choices, $value); } - /** - * {@inheritdoc} - */ public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null, callable $filter = null): ChoiceListInterface { if ($filter) { @@ -59,9 +53,6 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, callable $va return new LazyChoiceList($loader, $value); } - /** - * {@inheritdoc} - */ public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = []): ChoiceListView { $preferredViews = []; diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php index 3da57ecfbf1ab..2f29bda726cab 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php @@ -55,9 +55,6 @@ public function getDecoratedFactory(): ChoiceListFactoryInterface return $this->decoratedFactory; } - /** - * {@inheritdoc} - */ public function createListFromChoices(iterable $choices, mixed $value = null, mixed $filter = null): ChoiceListInterface { if (\is_string($value)) { @@ -89,9 +86,6 @@ public function createListFromChoices(iterable $choices, mixed $value = null, mi return $this->decoratedFactory->createListFromChoices($choices, $value, $filter); } - /** - * {@inheritdoc} - */ public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value = null, mixed $filter = null): ChoiceListInterface { if (\is_string($value)) { @@ -123,9 +117,6 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value return $this->decoratedFactory->createListFromLoader($loader, $value, $filter); } - /** - * {@inheritdoc} - */ public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = []): ChoiceListView { $accessor = $this->propertyAccessor; diff --git a/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php index dd545430cf233..b34d3708ab069 100644 --- a/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php @@ -51,49 +51,31 @@ public function __construct(ChoiceLoaderInterface $loader, callable $value = nul $this->value = null === $value ? null : $value(...); } - /** - * {@inheritdoc} - */ public function getChoices(): array { return $this->loader->loadChoiceList($this->value)->getChoices(); } - /** - * {@inheritdoc} - */ public function getValues(): array { return $this->loader->loadChoiceList($this->value)->getValues(); } - /** - * {@inheritdoc} - */ public function getStructuredValues(): array { return $this->loader->loadChoiceList($this->value)->getStructuredValues(); } - /** - * {@inheritdoc} - */ public function getOriginalKeys(): array { return $this->loader->loadChoiceList($this->value)->getOriginalKeys(); } - /** - * {@inheritdoc} - */ public function getChoicesForValues(array $values): array { return $this->loader->loadChoicesForValues($values, $this->value); } - /** - * {@inheritdoc} - */ public function getValuesForChoices(array $choices): array { return $this->loader->loadValuesForChoices($choices, $this->value); diff --git a/src/Symfony/Component/Form/ChoiceList/Loader/AbstractChoiceLoader.php b/src/Symfony/Component/Form/ChoiceList/Loader/AbstractChoiceLoader.php index 6aa2267a039b0..4554352d7a31d 100644 --- a/src/Symfony/Component/Form/ChoiceList/Loader/AbstractChoiceLoader.php +++ b/src/Symfony/Component/Form/ChoiceList/Loader/AbstractChoiceLoader.php @@ -23,17 +23,12 @@ abstract class AbstractChoiceLoader implements ChoiceLoaderInterface /** * @final - * - * {@inheritdoc} */ public function loadChoiceList(callable $value = null): ChoiceListInterface { return new ArrayChoiceList($this->choices ??= $this->loadChoices(), $value); } - /** - * {@inheritdoc} - */ public function loadChoicesForValues(array $values, callable $value = null): array { if (!$values) { @@ -43,9 +38,6 @@ public function loadChoicesForValues(array $values, callable $value = null): arr return $this->doLoadChoicesForValues($values, $value); } - /** - * {@inheritdoc} - */ public function loadValuesForChoices(array $choices, callable $value = null): array { if (!$choices) { diff --git a/src/Symfony/Component/Form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php b/src/Symfony/Component/Form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php index 02911b3d456bf..069941c1e2234 100644 --- a/src/Symfony/Component/Form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php @@ -52,17 +52,11 @@ protected function loadChoices(): iterable return $choices ?? []; } - /** - * {@inheritdoc} - */ public function loadChoicesForValues(array $values, callable $value = null): array { return array_filter($this->decoratedLoader->loadChoicesForValues($values, $value), $this->filter); } - /** - * {@inheritdoc} - */ public function loadValuesForChoices(array $choices, callable $value = null): array { return $this->decoratedLoader->loadValuesForChoices(array_filter($choices, $this->filter), $value); diff --git a/src/Symfony/Component/Form/ChoiceList/Loader/IntlCallbackChoiceLoader.php b/src/Symfony/Component/Form/ChoiceList/Loader/IntlCallbackChoiceLoader.php index a96b03ad345f8..448320f9d9fa4 100644 --- a/src/Symfony/Component/Form/ChoiceList/Loader/IntlCallbackChoiceLoader.php +++ b/src/Symfony/Component/Form/ChoiceList/Loader/IntlCallbackChoiceLoader.php @@ -19,17 +19,11 @@ */ class IntlCallbackChoiceLoader extends CallbackChoiceLoader { - /** - * {@inheritdoc} - */ public function loadChoicesForValues(array $values, callable $value = null): array { return parent::loadChoicesForValues(array_filter($values), $value); } - /** - * {@inheritdoc} - */ public function loadValuesForChoices(array $choices, callable $value = null): array { $choices = array_filter($choices); diff --git a/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php b/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php index 1c692bb79bcd5..453601a6f7221 100644 --- a/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php +++ b/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php @@ -35,8 +35,6 @@ public function __construct(string $label, array $choices = []) } /** - * {@inheritdoc} - * * @return \Traversable */ public function getIterator(): \Traversable diff --git a/src/Symfony/Component/Form/Command/DebugCommand.php b/src/Symfony/Component/Form/Command/DebugCommand.php index d30a547ce84fd..159051046f35f 100644 --- a/src/Symfony/Component/Form/Command/DebugCommand.php +++ b/src/Symfony/Component/Form/Command/DebugCommand.php @@ -54,9 +54,6 @@ public function __construct(FormRegistryInterface $formRegistry, array $namespac $this->fileLinkFormatter = $fileLinkFormatter; } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -98,9 +95,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php b/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php index 975ae405f61ae..f6b09c26929a5 100644 --- a/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php @@ -40,9 +40,6 @@ abstract class Descriptor implements DescriptorInterface protected $parents = []; protected $extensions = []; - /** - * {@inheritdoc} - */ public function describe(OutputInterface $output, ?object $object, array $options = []) { $this->output = $output instanceof OutputStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); diff --git a/src/Symfony/Component/Form/Extension/Core/DataAccessor/CallbackAccessor.php b/src/Symfony/Component/Form/Extension/Core/DataAccessor/CallbackAccessor.php index 617f7d692f0ce..a7d5bb13fea09 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataAccessor/CallbackAccessor.php +++ b/src/Symfony/Component/Form/Extension/Core/DataAccessor/CallbackAccessor.php @@ -22,9 +22,6 @@ */ class CallbackAccessor implements DataAccessorInterface { - /** - * {@inheritdoc} - */ public function getValue(object|array $data, FormInterface $form): mixed { if (null === $getter = $form->getConfig()->getOption('getter')) { @@ -34,9 +31,6 @@ public function getValue(object|array $data, FormInterface $form): mixed return ($getter)($data, $form); } - /** - * {@inheritdoc} - */ public function setValue(object|array &$data, mixed $value, FormInterface $form): void { if (null === $setter = $form->getConfig()->getOption('setter')) { @@ -46,17 +40,11 @@ public function setValue(object|array &$data, mixed $value, FormInterface $form) ($setter)($data, $form->getData(), $form); } - /** - * {@inheritdoc} - */ public function isReadable(object|array $data, FormInterface $form): bool { return null !== $form->getConfig()->getOption('getter'); } - /** - * {@inheritdoc} - */ public function isWritable(object|array $data, FormInterface $form): bool { return null !== $form->getConfig()->getOption('setter'); diff --git a/src/Symfony/Component/Form/Extension/Core/DataAccessor/ChainAccessor.php b/src/Symfony/Component/Form/Extension/Core/DataAccessor/ChainAccessor.php index 46709b29ad097..ac600f16f0d1c 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataAccessor/ChainAccessor.php +++ b/src/Symfony/Component/Form/Extension/Core/DataAccessor/ChainAccessor.php @@ -30,9 +30,6 @@ public function __construct(iterable $accessors) $this->accessors = $accessors; } - /** - * {@inheritdoc} - */ public function getValue(object|array $data, FormInterface $form): mixed { foreach ($this->accessors as $accessor) { @@ -44,9 +41,6 @@ public function getValue(object|array $data, FormInterface $form): mixed throw new AccessException('Unable to read from the given form data as no accessor in the chain is able to read the data.'); } - /** - * {@inheritdoc} - */ public function setValue(object|array &$data, mixed $value, FormInterface $form): void { foreach ($this->accessors as $accessor) { @@ -60,9 +54,6 @@ public function setValue(object|array &$data, mixed $value, FormInterface $form) throw new AccessException('Unable to write the given value as no accessor in the chain is able to set the data.'); } - /** - * {@inheritdoc} - */ public function isReadable(object|array $data, FormInterface $form): bool { foreach ($this->accessors as $accessor) { @@ -74,9 +65,6 @@ public function isReadable(object|array $data, FormInterface $form): bool return false; } - /** - * {@inheritdoc} - */ public function isWritable(object|array $data, FormInterface $form): bool { foreach ($this->accessors as $accessor) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php b/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php index 57785a89679f2..85efa150f4fb7 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php +++ b/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php @@ -36,9 +36,6 @@ public function __construct(PropertyAccessorInterface $propertyAccessor = null) $this->propertyAccessor = $propertyAccessor ?? PropertyAccess::createPropertyAccessor(); } - /** - * {@inheritdoc} - */ public function getValue(object|array $data, FormInterface $form): mixed { if (null === $propertyPath = $form->getPropertyPath()) { @@ -48,9 +45,6 @@ public function getValue(object|array $data, FormInterface $form): mixed return $this->getPropertyValue($data, $propertyPath); } - /** - * {@inheritdoc} - */ public function setValue(object|array &$data, mixed $value, FormInterface $form): void { if (null === $propertyPath = $form->getPropertyPath()) { @@ -70,17 +64,11 @@ public function setValue(object|array &$data, mixed $value, FormInterface $form) } } - /** - * {@inheritdoc} - */ public function isReadable(object|array $data, FormInterface $form): bool { return null !== $form->getPropertyPath(); } - /** - * {@inheritdoc} - */ public function isWritable(object|array $data, FormInterface $form): bool { return null !== $form->getPropertyPath(); diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php index 9ded60e830e63..f461e0e1263ca 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php +++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php @@ -25,9 +25,6 @@ */ class CheckboxListMapper implements DataMapperInterface { - /** - * {@inheritdoc} - */ public function mapDataToForms(mixed $choices, \Traversable $checkboxes) { if (null === $choices) { @@ -44,9 +41,6 @@ public function mapDataToForms(mixed $choices, \Traversable $checkboxes) } } - /** - * {@inheritdoc} - */ public function mapFormsToData(\Traversable $checkboxes, mixed &$choices) { if (!\is_array($choices)) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php index 58f6ff5e5a093..0404af0844661 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php +++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php @@ -35,9 +35,6 @@ public function __construct(DataAccessorInterface $dataAccessor = null) ]); } - /** - * {@inheritdoc} - */ public function mapDataToForms(mixed $data, \Traversable $forms): void { $empty = null === $data || [] === $data; @@ -57,9 +54,6 @@ public function mapDataToForms(mixed $data, \Traversable $forms): void } } - /** - * {@inheritdoc} - */ public function mapFormsToData(\Traversable $forms, mixed &$data): void { if (null === $data) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php index ebf761c4dd7f7..4ae0fc3c8f738 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php +++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php @@ -25,9 +25,6 @@ */ class RadioListMapper implements DataMapperInterface { - /** - * {@inheritdoc} - */ public function mapDataToForms(mixed $choice, \Traversable $radios) { if (!\is_string($choice)) { @@ -40,9 +37,6 @@ public function mapDataToForms(mixed $choice, \Traversable $radios) } } - /** - * {@inheritdoc} - */ public function mapFormsToData(\Traversable $radios, mixed &$choice) { if (null !== $choice && !\is_string($choice)) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php index 645237363c48a..e6e575d7698ef 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php @@ -28,9 +28,6 @@ public function __construct(bool $multiple = false) $this->multiple = $multiple; } - /** - * {@inheritdoc} - */ public function transform(mixed $dateTimeZone): mixed { if (null === $dateTimeZone) { @@ -52,9 +49,6 @@ public function transform(mixed $dateTimeZone): mixed return $dateTimeZone->getName(); } - /** - * {@inheritdoc} - */ public function reverseTransform(mixed $value): mixed { if (null === $value) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php index ccf4701b90c10..db774a075c7b6 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php @@ -33,9 +33,6 @@ public function __construct(?bool $grouping = false, ?int $roundingMode = \Numbe parent::__construct(0, $grouping, $roundingMode, $locale); } - /** - * {@inheritdoc} - */ public function reverseTransform(mixed $value): int|float|null { $decimalSeparator = $this->getNumberFormatter()->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php index f158ecba2d1a9..86849c4ea8190 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php @@ -28,9 +28,6 @@ public function __construct(bool $multiple = false) $this->multiple = $multiple; } - /** - * {@inheritdoc} - */ public function transform(mixed $intlTimeZone): mixed { if (null === $intlTimeZone) { @@ -52,9 +49,6 @@ public function transform(mixed $intlTimeZone): mixed return $intlTimeZone->getID(); } - /** - * {@inheritdoc} - */ public function reverseTransform(mixed $value): mixed { if (null === $value) { diff --git a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php index 4ac58bd2acd05..8606802e126fc 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php @@ -28,18 +28,12 @@ */ abstract class BaseType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->setDisabled($options['disabled']); $builder->setAutoInitialize($options['auto_initialize']); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $name = $form->getName(); @@ -118,9 +112,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) ]); } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ diff --git a/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php b/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php index 2a78e1d77c5fa..1be317ebd3d23 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/BirthdayType.php @@ -16,9 +16,6 @@ class BirthdayType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -29,17 +26,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('years', 'array'); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return DateType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'birthday'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php b/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php index 2fb77f9eda193..ee39cee56b413 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ButtonType.php @@ -21,25 +21,16 @@ */ class ButtonType extends BaseType implements ButtonTypeInterface { - /** - * {@inheritdoc} - */ public function getParent(): ?string { return null; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'button'; } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php index 96c557d0a3d69..d513694a4ccf8 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php @@ -20,9 +20,6 @@ class CheckboxType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { // Unlike in other types, where the data is NULL by default, it @@ -35,9 +32,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->addViewTransformer(new BooleanToStringTransformer($options['value'], $options['false_values'])); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, [ @@ -46,9 +40,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) ]); } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $emptyData = function (FormInterface $form, $viewData) { @@ -69,9 +60,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('false_values', 'array'); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'checkbox'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php index 3fc8707650976..2dde39e8af9ef 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php @@ -62,9 +62,6 @@ public function __construct(ChoiceListFactoryInterface $choiceListFactory = null $this->translator = $translator; } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $unknownValues = []; @@ -218,9 +215,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) }, 256); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $choiceTranslationDomain = $options['choice_translation_domain']; @@ -277,9 +271,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { if ($options['expanded']) { @@ -297,9 +288,6 @@ public function finishView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $emptyData = function (Options $options) { @@ -391,9 +379,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('group_by', ['null', 'callable', 'string', PropertyPath::class, GroupBy::class]); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'choice'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php index 4ec0f1be70f55..c310441cc7121 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php @@ -21,9 +21,6 @@ class CollectionType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { if ($options['allow_add'] && $options['prototype']) { @@ -51,9 +48,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->addEventSubscriber($resizeListener); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, [ @@ -67,9 +61,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { $prefixOffset = -2; @@ -101,9 +92,6 @@ public function finishView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $entryOptionsNormalizer = function (Options $options, $value) { @@ -131,9 +119,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('prototype_options', 'array'); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'collection'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php b/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php index fb53d7fd037c5..26d670634bb2f 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php @@ -33,9 +33,6 @@ public function __construct(TranslatorInterface $translator = null) $this->translator = $translator; } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { if (!$options['html5']) { @@ -62,9 +59,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) }); } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -75,17 +69,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('html5', 'bool'); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'color'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php b/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php index 8d5c6487d2a72..25aa652f5cc72 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php @@ -22,9 +22,6 @@ class CountryType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -50,17 +47,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('alpha3', 'bool'); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ChoiceType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'country'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php b/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php index fe7842fd26803..435bc157091bc 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php @@ -22,9 +22,6 @@ class CurrencyType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -47,17 +44,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ChoiceType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'currency'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php index eeb43fc64724d..e745c1af045ee 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php @@ -43,9 +43,6 @@ class DateIntervalType extends AbstractType 'choice' => ChoiceType::class, ]; - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { if (!$options['with_years'] && !$options['with_months'] && !$options['with_weeks'] && !$options['with_days'] && !$options['with_hours'] && !$options['with_minutes'] && !$options['with_seconds']) { @@ -148,9 +145,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $vars = [ @@ -163,9 +157,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) $view->vars = array_replace($view->vars, $vars); } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $compound = function (Options $options) { @@ -277,9 +268,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('labels', 'array'); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'dateinterval'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index dc1549a52106c..35022530e6873 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -47,9 +47,6 @@ class DateTimeType extends AbstractType \IntlDateFormatter::SHORT, ]; - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $parts = ['year', 'month', 'day', 'hour']; @@ -202,9 +199,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['widget'] = $options['widget']; @@ -226,9 +220,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $compound = function (Options $options) { @@ -348,9 +339,6 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'datetime'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index 1360ed450ff6e..d88819ebd673e 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -43,9 +43,6 @@ class DateType extends AbstractType 'choice' => ChoiceType::class, ]; - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $dateFormat = \is_int($options['format']) ? $options['format'] : self::DEFAULT_FORMAT; @@ -182,9 +179,6 @@ class_exists(\IntlTimeZone::class, false) ? \IntlTimeZone::createDefault() : nul } } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { $view->vars['widget'] = $options['widget']; @@ -222,9 +216,6 @@ public function finishView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $compound = function (Options $options) { @@ -333,9 +324,6 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'date'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php b/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php index 4284db1869a52..70e8c8a191ce3 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/EmailType.php @@ -16,9 +16,6 @@ class EmailType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -26,17 +23,11 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'email'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php index b99b734162eb7..9e8e81394e8ce 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php @@ -41,9 +41,6 @@ public function __construct(TranslatorInterface $translator = null) $this->translator = $translator; } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { // Ensure that submitted data is always an uploaded file or an array of some @@ -85,9 +82,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) }); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { if ($options['multiple']) { @@ -101,17 +95,11 @@ public function buildView(FormView $view, FormInterface $form, array $options) ]); } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { $view->vars['multipart'] = true; } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $dataClass = null; @@ -135,9 +123,6 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'file'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php index efb61c739bf53..451e7381d12e3 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php @@ -38,9 +38,6 @@ public function __construct(PropertyAccessorInterface $propertyAccessor = null) ])); } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); @@ -69,9 +66,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->setIsEmptyCallback($options['is_empty_callback']); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { parent::buildView($view, $form, $options); @@ -122,9 +116,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) ]); } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { $multipart = false; @@ -139,9 +130,6 @@ public function finishView(FormView $view, FormInterface $form, array $options) $view->vars['multipart'] = $multipart; } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); @@ -232,17 +220,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setInfo('setter', 'A callable that accepts three arguments (a reference to the view data, the submitted value and the current form field).'); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return null; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'form'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php b/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php index b54ea01ca132e..a69e172bc6586 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php @@ -16,9 +16,6 @@ class HiddenType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -31,9 +28,6 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'hidden'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php b/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php index 3d69448e34dd5..49e37f7490afd 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php @@ -20,17 +20,11 @@ class IntegerType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->addViewTransformer(new IntegerToLocalizedStringTransformer($options['grouping'], $options['rounding_mode'], !$options['grouping'] ? 'en' : null)); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { if ($options['grouping']) { @@ -38,9 +32,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -62,9 +53,6 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'integer'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php b/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php index b1184a4309c3f..f875657eaaaa9 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php @@ -23,9 +23,6 @@ class LanguageType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -74,17 +71,11 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ChoiceType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'language'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php b/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php index b0cb9a8e008fb..d4adca1f5993a 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php @@ -22,9 +22,6 @@ class LocaleType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -47,17 +44,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ChoiceType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'locale'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php index cf6246acc86bc..e9ecd409eb9f2 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php @@ -24,9 +24,6 @@ class MoneyType extends AbstractType { protected static $patterns = []; - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { // Values used in HTML5 number inputs should be formatted as in "1234.5", ie. 'en' format without grouping, @@ -42,9 +39,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) ; } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['money_pattern'] = self::getPattern($options['currency']); @@ -54,9 +48,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -93,9 +84,6 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'money'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php b/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php index fd75f689d778d..6d2d9eca2e0c5 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php @@ -23,9 +23,6 @@ class NumberType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->addViewTransformer(new NumberToLocalizedStringTransformer( @@ -40,9 +37,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { if ($options['html5']) { @@ -52,9 +46,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -90,9 +81,6 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'number'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php index cbb0d977877a1..495160361d443 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/PasswordType.php @@ -18,9 +18,6 @@ class PasswordType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { if ($options['always_empty'] || !$form->isSubmitted()) { @@ -28,9 +25,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -40,17 +34,11 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'password'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php b/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php index 9b98f9b08919c..d006c6d5e185a 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/PercentType.php @@ -20,9 +20,6 @@ class PercentType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->addViewTransformer(new PercentToLocalizedStringTransformer( @@ -33,9 +30,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) )); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['symbol'] = $options['symbol']; @@ -45,9 +39,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -78,9 +69,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('html5', 'bool'); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'percent'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php index c668420c2cef4..d40f39106d76b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php @@ -16,9 +16,6 @@ class RadioType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -26,17 +23,11 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return CheckboxType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'radio'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php b/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php index e150323b10217..857028c9c135d 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/RangeType.php @@ -16,9 +16,6 @@ class RangeType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -26,17 +23,11 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'range'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php b/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php index a511cf070ec5e..fb55bf2940c01 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/RepeatedType.php @@ -18,9 +18,6 @@ class RepeatedType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { // Overwrite required option for child fields @@ -44,9 +41,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) ; } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -65,9 +59,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('second_options', 'array'); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'repeated'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ResetType.php b/src/Symfony/Component/Form/Extension/Core/Type/ResetType.php index 40801c0d0902d..9a53a3dc68b30 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ResetType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ResetType.php @@ -21,17 +21,11 @@ */ class ResetType extends AbstractType implements ButtonTypeInterface { - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ButtonType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'reset'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php b/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php index e29ca152b3a42..76ed42011872a 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/SearchType.php @@ -16,9 +16,6 @@ class SearchType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -26,17 +23,11 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'search'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php b/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php index 7f423668b17cc..dde44576525a4 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/SubmitType.php @@ -33,26 +33,17 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefault('validate', true); $resolver->setAllowedTypes('validate', 'bool'); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ButtonType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'submit'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TelType.php b/src/Symfony/Component/Form/Extension/Core/Type/TelType.php index 36ec764001418..8ba7fd843b353 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TelType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TelType.php @@ -16,9 +16,6 @@ class TelType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -26,17 +23,11 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'tel'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TextType.php b/src/Symfony/Component/Form/Extension/Core/Type/TextType.php index 4bbd89efe7a09..dd019192bc441 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TextType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TextType.php @@ -30,9 +30,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -40,26 +37,17 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'text'; } - /** - * {@inheritdoc} - */ public function transform(mixed $data): mixed { // Model data should not be transformed return $data; } - /** - * {@inheritdoc} - */ public function reverseTransform(mixed $data): mixed { return $data ?? ''; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php b/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php index 5aca8503869fc..43d8e0eac44b1 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php @@ -17,26 +17,17 @@ class TextareaType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['pattern'] = null; unset($view->vars['attr']['pattern']); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'textarea'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php index 11f4c36e20920..2b8bbb5010214 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php @@ -34,9 +34,6 @@ class TimeType extends AbstractType 'choice' => ChoiceType::class, ]; - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $parts = ['hour']; @@ -212,9 +209,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, [ @@ -239,9 +233,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $compound = function (Options $options) { @@ -374,9 +365,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('reference_date', ['null', \DateTimeInterface::class]); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'time'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php index d9ef804fd74f5..edea6678e2ef0 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php @@ -25,9 +25,6 @@ class TimezoneType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { if ('datetimezone' === $options['input']) { @@ -37,9 +34,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -91,17 +85,11 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ChoiceType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'timezone'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php b/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php index c73bd295822e7..4fb9cae664bc9 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TransformationFailureExtension.php @@ -35,9 +35,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [FormType::class]; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php b/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php index abda5fd0b7dd6..24eab77d8e77b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/UlidType.php @@ -21,9 +21,6 @@ */ class UlidType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder @@ -31,9 +28,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) ; } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ diff --git a/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php b/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php index 36aee7699f80a..313fbedbf5334 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php @@ -20,9 +20,6 @@ class UrlType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { if (null !== $options['default_protocol']) { @@ -30,9 +27,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { if ($options['default_protocol']) { @@ -41,9 +35,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -54,17 +45,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('default_protocol', ['null', 'string']); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return TextType::class; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'url'; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php b/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php index f551d639a219f..214d308689d34 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/UuidType.php @@ -21,9 +21,6 @@ */ class UuidType extends AbstractType { - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder @@ -31,9 +28,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) ; } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ diff --git a/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php b/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php index 71f3146b7dd67..760bb880b1bd0 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/WeekType.php @@ -28,9 +28,6 @@ class WeekType extends AbstractType 'choice' => ChoiceType::class, ]; - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { if ('string' === $options['input']) { @@ -83,9 +80,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['widget'] = $options['widget']; @@ -95,9 +89,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $compound = function (Options $options) { @@ -183,9 +174,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setAllowedTypes('weeks', 'int[]'); } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return 'week'; diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php index 97228f56c9bd9..026bed3604464 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php @@ -33,9 +33,6 @@ public function __construct(CsrfTokenManagerInterface $tokenManager, TranslatorI $this->translationDomain = $translationDomain; } - /** - * {@inheritdoc} - */ protected function loadTypeExtensions(): array { return [ diff --git a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php index ca3bf22dff3d9..ec96dc6aedfb7 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php +++ b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php @@ -86,9 +86,6 @@ public function finishView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ @@ -100,9 +97,6 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [FormType::class]; diff --git a/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php b/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php index cafd0ffc665d4..50b36bd67f073 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php @@ -28,9 +28,6 @@ public function __construct(FormDataCollectorInterface $dataCollector) $this->dataCollector = $dataCollector; } - /** - * {@inheritdoc} - */ protected function loadTypeExtensions(): array { return [ diff --git a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php index dbc36123c7437..be30912c7cc6b 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php @@ -31,9 +31,6 @@ public function __construct(FormDataCollectorInterface $dataCollector) $this->dataCollector = $dataCollector; } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php index f4640f1ff07b1..525d8ffeccd4b 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php @@ -89,17 +89,11 @@ public function reset() ]; } - /** - * {@inheritdoc} - */ public function associateFormWithView(FormInterface $form, FormView $view) { $this->formsByView[spl_object_hash($view)] = spl_object_hash($form); } - /** - * {@inheritdoc} - */ public function collectConfiguration(FormInterface $form) { $hash = spl_object_hash($form); @@ -118,9 +112,6 @@ public function collectConfiguration(FormInterface $form) } } - /** - * {@inheritdoc} - */ public function collectDefaultData(FormInterface $form) { $hash = spl_object_hash($form); @@ -140,9 +131,6 @@ public function collectDefaultData(FormInterface $form) } } - /** - * {@inheritdoc} - */ public function collectSubmittedData(FormInterface $form) { $hash = spl_object_hash($form); @@ -174,9 +162,6 @@ public function collectSubmittedData(FormInterface $form) } } - /** - * {@inheritdoc} - */ public function collectViewVariables(FormView $view) { $hash = spl_object_hash($view); @@ -195,33 +180,21 @@ public function collectViewVariables(FormView $view) } } - /** - * {@inheritdoc} - */ public function buildPreliminaryFormTree(FormInterface $form) { $this->data['forms'][$form->getName()] = &$this->recursiveBuildPreliminaryFormTree($form, $this->data['forms_by_hash']); } - /** - * {@inheritdoc} - */ public function buildFinalFormTree(FormInterface $form, FormView $view) { $this->data['forms'][$form->getName()] = &$this->recursiveBuildFinalFormTree($form, $view, $this->data['forms_by_hash']); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'form'; } - /** - * {@inheritdoc} - */ public function getData(): array|Data { return $this->data; @@ -243,9 +216,6 @@ public function __sleep(): array return parent::__sleep(); } - /** - * {@inheritdoc} - */ protected function getCasters(): array { return parent::getCasters() + [ diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php index e9a54df8fe608..028e8c06d033b 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php @@ -22,9 +22,6 @@ */ class FormDataExtractor implements FormDataExtractorInterface { - /** - * {@inheritdoc} - */ public function extractConfiguration(FormInterface $form): array { $data = [ @@ -50,9 +47,6 @@ public function extractConfiguration(FormInterface $form): array return $data; } - /** - * {@inheritdoc} - */ public function extractDefaultData(FormInterface $form): array { $data = [ @@ -73,9 +67,6 @@ public function extractDefaultData(FormInterface $form): array return $data; } - /** - * {@inheritdoc} - */ public function extractSubmittedData(FormInterface $form): array { $data = [ @@ -132,9 +123,6 @@ public function extractSubmittedData(FormInterface $form): array return $data; } - /** - * {@inheritdoc} - */ public function extractViewVariables(FormView $view): array { $data = [ diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php index 7563e778e87aa..d273fbbc757ad 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php @@ -36,41 +36,26 @@ public function __construct(ResolvedFormTypeInterface $proxiedType, FormDataColl $this->dataCollector = $dataCollector; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return $this->proxiedType->getBlockPrefix(); } - /** - * {@inheritdoc} - */ public function getParent(): ?ResolvedFormTypeInterface { return $this->proxiedType->getParent(); } - /** - * {@inheritdoc} - */ public function getInnerType(): FormTypeInterface { return $this->proxiedType->getInnerType(); } - /** - * {@inheritdoc} - */ public function getTypeExtensions(): array { return $this->proxiedType->getTypeExtensions(); } - /** - * {@inheritdoc} - */ public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []): FormBuilderInterface { $builder = $this->proxiedType->createBuilder($factory, $name, $options); @@ -81,33 +66,21 @@ public function createBuilder(FormFactoryInterface $factory, string $name, array return $builder; } - /** - * {@inheritdoc} - */ public function createView(FormInterface $form, FormView $parent = null): FormView { return $this->proxiedType->createView($form, $parent); } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $this->proxiedType->buildForm($builder, $options); } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $this->proxiedType->buildView($view, $form, $options); } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { $this->proxiedType->finishView($view, $form, $options); @@ -132,9 +105,6 @@ public function finishView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function getOptionsResolver(): OptionsResolver { return $this->proxiedType->getOptionsResolver(); diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php index 835a7e879ab5a..eea5bfd4aec00 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php @@ -33,9 +33,6 @@ public function __construct(ResolvedFormTypeFactoryInterface $proxiedFactory, Fo $this->dataCollector = $dataCollector; } - /** - * {@inheritdoc} - */ public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null): ResolvedFormTypeInterface { return new ResolvedTypeDataCollectorProxy( diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php b/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php index 73f8a214fac5a..d014f0e457f72 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php @@ -32,17 +32,11 @@ public function __construct(FormDataCollectorInterface $dataCollector) $this->listener = new DataCollectorListener($dataCollector); } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->addEventSubscriber($this->listener); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [FormType::class]; diff --git a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php index 5fe0371df7091..0b978d693de91 100644 --- a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php +++ b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php @@ -36,9 +36,6 @@ public function __construct(ContainerInterface $typeContainer, array $typeExtens $this->guesserServices = $guesserServices; } - /** - * {@inheritdoc} - */ public function getType(string $name): FormTypeInterface { if (!$this->typeContainer->has($name)) { @@ -48,17 +45,11 @@ public function getType(string $name): FormTypeInterface return $this->typeContainer->get($name); } - /** - * {@inheritdoc} - */ public function hasType(string $name): bool { return $this->typeContainer->has($name); } - /** - * {@inheritdoc} - */ public function getTypeExtensions(string $name): array { $extensions = []; @@ -82,17 +73,11 @@ public function getTypeExtensions(string $name): array return $extensions; } - /** - * {@inheritdoc} - */ public function hasTypeExtensions(string $name): bool { return isset($this->typeExtensionServices[$name]); } - /** - * {@inheritdoc} - */ public function getTypeGuesser(): ?FormTypeGuesserInterface { if (!$this->guesserLoaded) { diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php index 17317c780f318..3b1aaebf02648 100644 --- a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php @@ -35,9 +35,6 @@ public function __construct(ServerParams $serverParams = null) $this->serverParams = $serverParams ?? new ServerParams(); } - /** - * {@inheritdoc} - */ public function handleRequest(FormInterface $form, mixed $request = null) { if (!$request instanceof Request) { @@ -109,9 +106,6 @@ public function handleRequest(FormInterface $form, mixed $request = null) $form->submit($data, 'PATCH' !== $method); } - /** - * {@inheritdoc} - */ public function isFileUpload(mixed $data): bool { return $data instanceof File; diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php b/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php index 3d283d0e4ed55..9a5ae66618ddc 100644 --- a/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php @@ -29,17 +29,11 @@ public function __construct(RequestHandlerInterface $requestHandler = null) $this->requestHandler = $requestHandler ?? new HttpFoundationRequestHandler(); } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->setRequestHandler($this->requestHandler); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [FormType::class]; diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php index 694281ddd1238..6dec01be224e6 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php @@ -31,9 +31,6 @@ class Form extends Constraint */ protected static $errorNames = self::ERROR_NAMES; - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return self::CLASS_CONSTRAINT; diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php index 3b5b699ce3094..ada84f14bf89b 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php @@ -29,9 +29,6 @@ class FormValidator extends ConstraintValidator */ private \SplObjectStorage $resolvedGroups; - /** - * {@inheritdoc} - */ public function validate(mixed $form, Constraint $formConstraint) { if (!$formConstraint instanceof Form) { diff --git a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php index 3d010b77c5b6b..2963d6f7b02ef 100644 --- a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php @@ -26,9 +26,6 @@ class ValidationListener implements EventSubscriberInterface private ValidatorInterface $validator; private ViolationMapperInterface $violationMapper; - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [FormEvents::POST_SUBMIT => 'validateForm']; diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php index 0e9e2a9d7ecbb..9366a20f89ea6 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/BaseValidatorExtension.php @@ -24,9 +24,6 @@ */ abstract class BaseValidatorExtension extends AbstractTypeExtension { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { // Make sure that validation groups end up as null, closure or array diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php index 40fe64df40a9e..26653dc9985b0 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php @@ -37,17 +37,11 @@ public function __construct(ValidatorInterface $validator, bool $legacyErrorMess $this->violationMapper = new ViolationMapper($formRenderer, $translator); } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->addEventSubscriber(new ValidationListener($this->validator, $this->violationMapper)); } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); @@ -69,9 +63,6 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setNormalizer('constraints', $constraintsNormalizer); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [FormType::class]; diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php index 4bda0b27d1c77..664a3edae2766 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php @@ -21,9 +21,6 @@ */ class RepeatedTypeValidatorExtension extends AbstractTypeExtension { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { // Map errors to the first field @@ -36,9 +33,6 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [RepeatedType::class]; diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/SubmitTypeValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/SubmitTypeValidatorExtension.php index ea273d0ad9ca2..8efae7d52ee49 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/SubmitTypeValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/SubmitTypeValidatorExtension.php @@ -18,9 +18,6 @@ */ class SubmitTypeValidatorExtension extends BaseValidatorExtension { - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [SubmitType::class]; diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php index b5ddecd99d38d..14f6c8f2d8b7e 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php @@ -32,9 +32,6 @@ public function __construct(TranslatorInterface $translator, string $translation $this->translationDomain = $translationDomain; } - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $translator = $this->translator; @@ -46,9 +43,6 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [FormType::class]; diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php index 5eba3a291a57c..46738b401e544 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php @@ -64,9 +64,6 @@ public function __construct(MetadataFactoryInterface $metadataFactory) $this->metadataFactory = $metadataFactory; } - /** - * {@inheritdoc} - */ public function guessType(string $class, string $property): ?TypeGuess { return $this->guess($class, $property, function (Constraint $constraint) { @@ -74,9 +71,6 @@ public function guessType(string $class, string $property): ?TypeGuess }); } - /** - * {@inheritdoc} - */ public function guessRequired(string $class, string $property): ?ValueGuess { return $this->guess($class, $property, function (Constraint $constraint) { @@ -86,9 +80,6 @@ public function guessRequired(string $class, string $property): ?ValueGuess }, false); } - /** - * {@inheritdoc} - */ public function guessMaxLength(string $class, string $property): ?ValueGuess { return $this->guess($class, $property, function (Constraint $constraint) { @@ -96,9 +87,6 @@ public function guessMaxLength(string $class, string $property): ?ValueGuess }); } - /** - * {@inheritdoc} - */ public function guessPattern(string $class, string $property): ?ValueGuess { return $this->guess($class, $property, function (Constraint $constraint) { diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php index 7f6b88d6c4233..961d5df140fb4 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php @@ -38,9 +38,6 @@ public function __construct(FormRendererInterface $formRenderer = null, Translat $this->translator = $translator; } - /** - * {@inheritdoc} - */ public function mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false) { $this->allowNonSynchronized = $allowNonSynchronized; diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php index fe68518ab1fcb..19fc582bedd8d 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php @@ -101,17 +101,11 @@ public function __toString(): string return $this->pathAsString; } - /** - * {@inheritdoc} - */ public function getLength(): int { return $this->length; } - /** - * {@inheritdoc} - */ public function getParent(): ?PropertyPathInterface { if ($this->length <= 1) { @@ -130,17 +124,11 @@ public function getParent(): ?PropertyPathInterface return $parent; } - /** - * {@inheritdoc} - */ public function getElements(): array { return $this->elements; } - /** - * {@inheritdoc} - */ public function getElement(int $index): string { if (!isset($this->elements[$index])) { @@ -150,9 +138,6 @@ public function getElement(int $index): string return $this->elements[$index]; } - /** - * {@inheritdoc} - */ public function isProperty(int $index): bool { if (!isset($this->isIndex[$index])) { @@ -162,9 +147,6 @@ public function isProperty(int $index): bool return !$this->isIndex[$index]; } - /** - * {@inheritdoc} - */ public function isIndex(int $index): bool { if (!isset($this->isIndex[$index])) { diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 88d60a140e561..b2b96a0a1f701 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -165,25 +165,16 @@ public function __clone() } } - /** - * {@inheritdoc} - */ public function getConfig(): FormConfigInterface { return $this->config; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; } - /** - * {@inheritdoc} - */ public function getPropertyPath(): ?PropertyPathInterface { if ($this->propertyPath || $this->propertyPath = $this->config->getPropertyPath()) { @@ -209,9 +200,6 @@ public function getPropertyPath(): ?PropertyPathInterface return $this->propertyPath; } - /** - * {@inheritdoc} - */ public function isRequired(): bool { if (null === $this->parent || $this->parent->isRequired()) { @@ -221,9 +209,6 @@ public function isRequired(): bool return false; } - /** - * {@inheritdoc} - */ public function isDisabled(): bool { if (null === $this->parent || !$this->parent->isDisabled()) { @@ -233,9 +218,6 @@ public function isDisabled(): bool return true; } - /** - * {@inheritdoc} - */ public function setParent(FormInterface $parent = null): static { if ($this->submitted) { @@ -251,33 +233,21 @@ public function setParent(FormInterface $parent = null): static return $this; } - /** - * {@inheritdoc} - */ public function getParent(): ?FormInterface { return $this->parent; } - /** - * {@inheritdoc} - */ public function getRoot(): FormInterface { return $this->parent ? $this->parent->getRoot() : $this; } - /** - * {@inheritdoc} - */ public function isRoot(): bool { return null === $this->parent; } - /** - * {@inheritdoc} - */ public function setData(mixed $modelData): static { // If the form is submitted while disabled, it is set to submitted, but the data is not @@ -357,9 +327,6 @@ public function setData(mixed $modelData): static return $this; } - /** - * {@inheritdoc} - */ public function getData(): mixed { if ($this->inheritData) { @@ -381,9 +348,6 @@ public function getData(): mixed return $this->modelData; } - /** - * {@inheritdoc} - */ public function getNormData(): mixed { if ($this->inheritData) { @@ -405,9 +369,6 @@ public function getNormData(): mixed return $this->normData; } - /** - * {@inheritdoc} - */ public function getViewData(): mixed { if ($this->inheritData) { @@ -429,17 +390,11 @@ public function getViewData(): mixed return $this->viewData; } - /** - * {@inheritdoc} - */ public function getExtraData(): array { return $this->extraData; } - /** - * {@inheritdoc} - */ public function initialize(): static { if (null !== $this->parent) { @@ -456,9 +411,6 @@ public function initialize(): static return $this; } - /** - * {@inheritdoc} - */ public function handleRequest(mixed $request = null): static { $this->config->getRequestHandler()->handleRequest($this, $request); @@ -466,9 +418,6 @@ public function handleRequest(mixed $request = null): static return $this; } - /** - * {@inheritdoc} - */ public function submit(mixed $submittedData, bool $clearMissing = true): static { if ($this->submitted) { @@ -645,9 +594,6 @@ public function submit(mixed $submittedData, bool $clearMissing = true): static return $this; } - /** - * {@inheritdoc} - */ public function addError(FormError $error): static { if (null === $error->getOrigin()) { @@ -663,33 +609,21 @@ public function addError(FormError $error): static return $this; } - /** - * {@inheritdoc} - */ public function isSubmitted(): bool { return $this->submitted; } - /** - * {@inheritdoc} - */ public function isSynchronized(): bool { return null === $this->transformationFailure; } - /** - * {@inheritdoc} - */ public function getTransformationFailure(): ?Exception\TransformationFailedException { return $this->transformationFailure; } - /** - * {@inheritdoc} - */ public function isEmpty(): bool { foreach ($this->children as $child) { @@ -709,9 +643,6 @@ public function isEmpty(): bool ($this->modelData instanceof \Traversable && 0 === iterator_count($this->modelData)); } - /** - * {@inheritdoc} - */ public function isValid(): bool { if (!$this->submitted) { @@ -737,9 +668,6 @@ public function getClickedButton(): FormInterface|ClickableInterface|null return $this->parent && method_exists($this->parent, 'getClickedButton') ? $this->parent->getClickedButton() : null; } - /** - * {@inheritdoc} - */ public function getErrors(bool $deep = false, bool $flatten = true): FormErrorIterator { $errors = $this->errors; @@ -771,9 +699,6 @@ public function getErrors(bool $deep = false, bool $flatten = true): FormErrorIt return new FormErrorIterator($this, $errors); } - /** - * {@inheritdoc} - */ public function clearErrors(bool $deep = false): static { $this->errors = []; @@ -790,17 +715,11 @@ public function clearErrors(bool $deep = false): static return $this; } - /** - * {@inheritdoc} - */ public function all(): array { return iterator_to_array($this->children); } - /** - * {@inheritdoc} - */ public function add(FormInterface|string $child, string $type = null, array $options = []): static { if ($this->submitted) { @@ -865,9 +784,6 @@ public function add(FormInterface|string $child, string $type = null, array $opt return $this; } - /** - * {@inheritdoc} - */ public function remove(string $name): static { if ($this->submitted) { @@ -885,17 +801,11 @@ public function remove(string $name): static return $this; } - /** - * {@inheritdoc} - */ public function has(string $name): bool { return isset($this->children[$name]); } - /** - * {@inheritdoc} - */ public function get(string $name): FormInterface { if (isset($this->children[$name])) { @@ -973,9 +883,6 @@ public function count(): int return \count($this->children); } - /** - * {@inheritdoc} - */ public function createView(FormView $parent = null): FormView { if (null === $parent && $this->parent) { diff --git a/src/Symfony/Component/Form/FormBuilder.php b/src/Symfony/Component/Form/FormBuilder.php index 9864235cfb179..c6215635eccda 100644 --- a/src/Symfony/Component/Form/FormBuilder.php +++ b/src/Symfony/Component/Form/FormBuilder.php @@ -45,9 +45,6 @@ public function __construct(?string $name, ?string $dataClass, EventDispatcherIn $this->setFormFactory($factory); } - /** - * {@inheritdoc} - */ public function add(FormBuilderInterface|string $child, string $type = null, array $options = []): static { if ($this->locked) { @@ -74,9 +71,6 @@ public function add(FormBuilderInterface|string $child, string $type = null, arr return $this; } - /** - * {@inheritdoc} - */ public function create(string $name, string $type = null, array $options = []): FormBuilderInterface { if ($this->locked) { @@ -94,9 +88,6 @@ public function create(string $name, string $type = null, array $options = []): return $this->getFormFactory()->createBuilderForProperty($this->getDataClass(), $name, null, $options); } - /** - * {@inheritdoc} - */ public function get(string $name): FormBuilderInterface { if ($this->locked) { @@ -114,9 +105,6 @@ public function get(string $name): FormBuilderInterface throw new InvalidArgumentException(sprintf('The child with the name "%s" does not exist.', $name)); } - /** - * {@inheritdoc} - */ public function remove(string $name): static { if ($this->locked) { @@ -128,9 +116,6 @@ public function remove(string $name): static return $this; } - /** - * {@inheritdoc} - */ public function has(string $name): bool { if ($this->locked) { @@ -140,9 +125,6 @@ public function has(string $name): bool return isset($this->unresolvedChildren[$name]) || isset($this->children[$name]); } - /** - * {@inheritdoc} - */ public function all(): array { if ($this->locked) { @@ -163,9 +145,6 @@ public function count(): int return \count($this->children); } - /** - * {@inheritdoc} - */ public function getFormConfig(): FormConfigInterface { /** @var $config self */ @@ -177,9 +156,6 @@ public function getFormConfig(): FormConfigInterface return $config; } - /** - * {@inheritdoc} - */ public function getForm(): FormInterface { if ($this->locked) { @@ -204,8 +180,6 @@ public function getForm(): FormInterface } /** - * {@inheritdoc} - * * @return \Traversable */ public function getIterator(): \Traversable diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index 4a03594e0dd90..094bb8846302a 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -84,9 +84,6 @@ public function __construct(?string $name, ?string $dataClass, EventDispatcherIn $this->options = $options; } - /** - * {@inheritdoc} - */ public function addEventListener(string $eventName, callable $listener, int $priority = 0): static { if ($this->locked) { @@ -98,9 +95,6 @@ public function addEventListener(string $eventName, callable $listener, int $pri return $this; } - /** - * {@inheritdoc} - */ public function addEventSubscriber(EventSubscriberInterface $subscriber): static { if ($this->locked) { @@ -112,9 +106,6 @@ public function addEventSubscriber(EventSubscriberInterface $subscriber): static return $this; } - /** - * {@inheritdoc} - */ public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false): static { if ($this->locked) { @@ -130,9 +121,6 @@ public function addViewTransformer(DataTransformerInterface $viewTransformer, bo return $this; } - /** - * {@inheritdoc} - */ public function resetViewTransformers(): static { if ($this->locked) { @@ -144,9 +132,6 @@ public function resetViewTransformers(): static return $this; } - /** - * {@inheritdoc} - */ public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false): static { if ($this->locked) { @@ -162,9 +147,6 @@ public function addModelTransformer(DataTransformerInterface $modelTransformer, return $this; } - /** - * {@inheritdoc} - */ public function resetModelTransformers(): static { if ($this->locked) { @@ -176,9 +158,6 @@ public function resetModelTransformers(): static return $this; } - /** - * {@inheritdoc} - */ public function getEventDispatcher(): EventDispatcherInterface { if ($this->locked && !$this->dispatcher instanceof ImmutableEventDispatcher) { @@ -188,169 +167,106 @@ public function getEventDispatcher(): EventDispatcherInterface return $this->dispatcher; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; } - /** - * {@inheritdoc} - */ public function getPropertyPath(): ?PropertyPathInterface { return $this->propertyPath; } - /** - * {@inheritdoc} - */ public function getMapped(): bool { return $this->mapped; } - /** - * {@inheritdoc} - */ public function getByReference(): bool { return $this->byReference; } - /** - * {@inheritdoc} - */ public function getInheritData(): bool { return $this->inheritData; } - /** - * {@inheritdoc} - */ public function getCompound(): bool { return $this->compound; } - /** - * {@inheritdoc} - */ public function getType(): ResolvedFormTypeInterface { return $this->type; } - /** - * {@inheritdoc} - */ public function getViewTransformers(): array { return $this->viewTransformers; } - /** - * {@inheritdoc} - */ public function getModelTransformers(): array { return $this->modelTransformers; } - /** - * {@inheritdoc} - */ public function getDataMapper(): ?DataMapperInterface { return $this->dataMapper; } - /** - * {@inheritdoc} - */ public function getRequired(): bool { return $this->required; } - /** - * {@inheritdoc} - */ public function getDisabled(): bool { return $this->disabled; } - /** - * {@inheritdoc} - */ public function getErrorBubbling(): bool { return $this->errorBubbling; } - /** - * {@inheritdoc} - */ public function getEmptyData(): mixed { return $this->emptyData; } - /** - * {@inheritdoc} - */ public function getAttributes(): array { return $this->attributes; } - /** - * {@inheritdoc} - */ public function hasAttribute(string $name): bool { return \array_key_exists($name, $this->attributes); } - /** - * {@inheritdoc} - */ public function getAttribute(string $name, mixed $default = null): mixed { return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } - /** - * {@inheritdoc} - */ public function getData(): mixed { return $this->data; } - /** - * {@inheritdoc} - */ public function getDataClass(): ?string { return $this->dataClass; } - /** - * {@inheritdoc} - */ public function getDataLocked(): bool { return $this->dataLocked; } - /** - * {@inheritdoc} - */ public function getFormFactory(): FormFactoryInterface { if (!isset($this->formFactory)) { @@ -360,73 +276,46 @@ public function getFormFactory(): FormFactoryInterface return $this->formFactory; } - /** - * {@inheritdoc} - */ public function getAction(): string { return $this->action; } - /** - * {@inheritdoc} - */ public function getMethod(): string { return $this->method; } - /** - * {@inheritdoc} - */ public function getRequestHandler(): RequestHandlerInterface { return $this->requestHandler ??= self::$nativeRequestHandler ??= new NativeRequestHandler(); } - /** - * {@inheritdoc} - */ public function getAutoInitialize(): bool { return $this->autoInitialize; } - /** - * {@inheritdoc} - */ public function getOptions(): array { return $this->options; } - /** - * {@inheritdoc} - */ public function hasOption(string $name): bool { return \array_key_exists($name, $this->options); } - /** - * {@inheritdoc} - */ public function getOption(string $name, mixed $default = null): mixed { return \array_key_exists($name, $this->options) ? $this->options[$name] : $default; } - /** - * {@inheritdoc} - */ public function getIsEmptyCallback(): ?callable { return $this->isEmptyCallback; } - /** - * {@inheritdoc} - */ public function setAttribute(string $name, mixed $value): static { if ($this->locked) { @@ -438,9 +327,6 @@ public function setAttribute(string $name, mixed $value): static return $this; } - /** - * {@inheritdoc} - */ public function setAttributes(array $attributes): static { if ($this->locked) { @@ -452,9 +338,6 @@ public function setAttributes(array $attributes): static return $this; } - /** - * {@inheritdoc} - */ public function setDataMapper(DataMapperInterface $dataMapper = null): static { if ($this->locked) { @@ -466,9 +349,6 @@ public function setDataMapper(DataMapperInterface $dataMapper = null): static return $this; } - /** - * {@inheritdoc} - */ public function setDisabled(bool $disabled): static { if ($this->locked) { @@ -480,9 +360,6 @@ public function setDisabled(bool $disabled): static return $this; } - /** - * {@inheritdoc} - */ public function setEmptyData(mixed $emptyData): static { if ($this->locked) { @@ -494,9 +371,6 @@ public function setEmptyData(mixed $emptyData): static return $this; } - /** - * {@inheritdoc} - */ public function setErrorBubbling(bool $errorBubbling): static { if ($this->locked) { @@ -508,9 +382,6 @@ public function setErrorBubbling(bool $errorBubbling): static return $this; } - /** - * {@inheritdoc} - */ public function setRequired(bool $required): static { if ($this->locked) { @@ -522,9 +393,6 @@ public function setRequired(bool $required): static return $this; } - /** - * {@inheritdoc} - */ public function setPropertyPath(string|PropertyPathInterface|null $propertyPath): static { if ($this->locked) { @@ -540,9 +408,6 @@ public function setPropertyPath(string|PropertyPathInterface|null $propertyPath) return $this; } - /** - * {@inheritdoc} - */ public function setMapped(bool $mapped): static { if ($this->locked) { @@ -554,9 +419,6 @@ public function setMapped(bool $mapped): static return $this; } - /** - * {@inheritdoc} - */ public function setByReference(bool $byReference): static { if ($this->locked) { @@ -568,9 +430,6 @@ public function setByReference(bool $byReference): static return $this; } - /** - * {@inheritdoc} - */ public function setInheritData(bool $inheritData): static { if ($this->locked) { @@ -582,9 +441,6 @@ public function setInheritData(bool $inheritData): static return $this; } - /** - * {@inheritdoc} - */ public function setCompound(bool $compound): static { if ($this->locked) { @@ -596,9 +452,6 @@ public function setCompound(bool $compound): static return $this; } - /** - * {@inheritdoc} - */ public function setType(ResolvedFormTypeInterface $type): static { if ($this->locked) { @@ -610,9 +463,6 @@ public function setType(ResolvedFormTypeInterface $type): static return $this; } - /** - * {@inheritdoc} - */ public function setData(mixed $data): static { if ($this->locked) { @@ -624,9 +474,6 @@ public function setData(mixed $data): static return $this; } - /** - * {@inheritdoc} - */ public function setDataLocked(bool $locked): static { if ($this->locked) { @@ -638,9 +485,6 @@ public function setDataLocked(bool $locked): static return $this; } - /** - * {@inheritdoc} - */ public function setFormFactory(FormFactoryInterface $formFactory) { if ($this->locked) { @@ -652,9 +496,6 @@ public function setFormFactory(FormFactoryInterface $formFactory) return $this; } - /** - * {@inheritdoc} - */ public function setAction(string $action): static { if ($this->locked) { @@ -666,9 +507,6 @@ public function setAction(string $action): static return $this; } - /** - * {@inheritdoc} - */ public function setMethod(string $method): static { if ($this->locked) { @@ -680,9 +518,6 @@ public function setMethod(string $method): static return $this; } - /** - * {@inheritdoc} - */ public function setRequestHandler(RequestHandlerInterface $requestHandler): static { if ($this->locked) { @@ -694,9 +529,6 @@ public function setRequestHandler(RequestHandlerInterface $requestHandler): stat return $this; } - /** - * {@inheritdoc} - */ public function setAutoInitialize(bool $initialize): static { if ($this->locked) { @@ -708,9 +540,6 @@ public function setAutoInitialize(bool $initialize): static return $this; } - /** - * {@inheritdoc} - */ public function getFormConfig(): FormConfigInterface { if ($this->locked) { @@ -724,9 +553,6 @@ public function getFormConfig(): FormConfigInterface return $config; } - /** - * {@inheritdoc} - */ public function setIsEmptyCallback(?callable $isEmptyCallback): static { $this->isEmptyCallback = null === $isEmptyCallback ? null : $isEmptyCallback(...); diff --git a/src/Symfony/Component/Form/FormFactory.php b/src/Symfony/Component/Form/FormFactory.php index 1b762739952e2..9e1234f8317c9 100644 --- a/src/Symfony/Component/Form/FormFactory.php +++ b/src/Symfony/Component/Form/FormFactory.php @@ -23,41 +23,26 @@ public function __construct(FormRegistryInterface $registry) $this->registry = $registry; } - /** - * {@inheritdoc} - */ public function create(string $type = FormType::class, mixed $data = null, array $options = []): FormInterface { return $this->createBuilder($type, $data, $options)->getForm(); } - /** - * {@inheritdoc} - */ public function createNamed(string $name, string $type = FormType::class, mixed $data = null, array $options = []): FormInterface { return $this->createNamedBuilder($name, $type, $data, $options)->getForm(); } - /** - * {@inheritdoc} - */ public function createForProperty(string $class, string $property, mixed $data = null, array $options = []): FormInterface { return $this->createBuilderForProperty($class, $property, $data, $options)->getForm(); } - /** - * {@inheritdoc} - */ public function createBuilder(string $type = FormType::class, mixed $data = null, array $options = []): FormBuilderInterface { return $this->createNamedBuilder($this->registry->getType($type)->getBlockPrefix(), $type, $data, $options); } - /** - * {@inheritdoc} - */ public function createNamedBuilder(string $name, string $type = FormType::class, mixed $data = null, array $options = []): FormBuilderInterface { if (null !== $data && !\array_key_exists('data', $options)) { @@ -75,9 +60,6 @@ public function createNamedBuilder(string $name, string $type = FormType::class, return $builder; } - /** - * {@inheritdoc} - */ public function createBuilderForProperty(string $class, string $property, mixed $data = null, array $options = []): FormBuilderInterface { if (null === $guesser = $this->registry->getTypeGuesser()) { diff --git a/src/Symfony/Component/Form/FormFactoryBuilder.php b/src/Symfony/Component/Form/FormFactoryBuilder.php index 0ad58a660eb0c..42b8dec9f42ea 100644 --- a/src/Symfony/Component/Form/FormFactoryBuilder.php +++ b/src/Symfony/Component/Form/FormFactoryBuilder.php @@ -49,9 +49,6 @@ public function __construct(bool $forceCoreExtension = false) $this->forceCoreExtension = $forceCoreExtension; } - /** - * {@inheritdoc} - */ public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory): static { $this->resolvedTypeFactory = $resolvedTypeFactory; @@ -59,9 +56,6 @@ public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolve return $this; } - /** - * {@inheritdoc} - */ public function addExtension(FormExtensionInterface $extension): static { $this->extensions[] = $extension; @@ -69,9 +63,6 @@ public function addExtension(FormExtensionInterface $extension): static return $this; } - /** - * {@inheritdoc} - */ public function addExtensions(array $extensions): static { $this->extensions = array_merge($this->extensions, $extensions); @@ -79,9 +70,6 @@ public function addExtensions(array $extensions): static return $this; } - /** - * {@inheritdoc} - */ public function addType(FormTypeInterface $type): static { $this->types[] = $type; @@ -89,9 +77,6 @@ public function addType(FormTypeInterface $type): static return $this; } - /** - * {@inheritdoc} - */ public function addTypes(array $types): static { foreach ($types as $type) { @@ -101,9 +86,6 @@ public function addTypes(array $types): static return $this; } - /** - * {@inheritdoc} - */ public function addTypeExtension(FormTypeExtensionInterface $typeExtension): static { foreach ($typeExtension::getExtendedTypes() as $extendedType) { @@ -113,9 +95,6 @@ public function addTypeExtension(FormTypeExtensionInterface $typeExtension): sta return $this; } - /** - * {@inheritdoc} - */ public function addTypeExtensions(array $typeExtensions): static { foreach ($typeExtensions as $typeExtension) { @@ -125,9 +104,6 @@ public function addTypeExtensions(array $typeExtensions): static return $this; } - /** - * {@inheritdoc} - */ public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser): static { $this->typeGuessers[] = $typeGuesser; @@ -135,9 +111,6 @@ public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser): static return $this; } - /** - * {@inheritdoc} - */ public function addTypeGuessers(array $typeGuessers): static { $this->typeGuessers = array_merge($this->typeGuessers, $typeGuessers); @@ -145,9 +118,6 @@ public function addTypeGuessers(array $typeGuessers): static return $this; } - /** - * {@inheritdoc} - */ public function getFormFactory(): FormFactoryInterface { $extensions = $this->extensions; diff --git a/src/Symfony/Component/Form/FormRegistry.php b/src/Symfony/Component/Form/FormRegistry.php index 5453c6d35677e..07420507db229 100644 --- a/src/Symfony/Component/Form/FormRegistry.php +++ b/src/Symfony/Component/Form/FormRegistry.php @@ -54,9 +54,6 @@ public function __construct(array $extensions, ResolvedFormTypeFactoryInterface $this->resolvedTypeFactory = $resolvedTypeFactory; } - /** - * {@inheritdoc} - */ public function getType(string $name): ResolvedFormTypeInterface { if (!isset($this->types[$name])) { @@ -118,9 +115,6 @@ private function resolveType(FormTypeInterface $type): ResolvedFormTypeInterface } } - /** - * {@inheritdoc} - */ public function hasType(string $name): bool { if (isset($this->types[$name])) { @@ -136,9 +130,6 @@ public function hasType(string $name): bool return true; } - /** - * {@inheritdoc} - */ public function getTypeGuesser(): ?FormTypeGuesserInterface { if (false === $this->guesser) { @@ -158,9 +149,6 @@ public function getTypeGuesser(): ?FormTypeGuesserInterface return $this->guesser; } - /** - * {@inheritdoc} - */ public function getExtensions(): array { return $this->extensions; diff --git a/src/Symfony/Component/Form/FormRenderer.php b/src/Symfony/Component/Form/FormRenderer.php index ab8ff1aa3bd3b..12c7c0dddd5cd 100644 --- a/src/Symfony/Component/Form/FormRenderer.php +++ b/src/Symfony/Component/Form/FormRenderer.php @@ -37,25 +37,16 @@ public function __construct(FormRendererEngineInterface $engine, CsrfTokenManage $this->csrfTokenManager = $csrfTokenManager; } - /** - * {@inheritdoc} - */ public function getEngine(): FormRendererEngineInterface { return $this->engine; } - /** - * {@inheritdoc} - */ public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true) { $this->engine->setTheme($view, $themes, $useDefaultThemes); } - /** - * {@inheritdoc} - */ public function renderCsrfToken(string $tokenId): string { if (null === $this->csrfTokenManager) { @@ -65,9 +56,6 @@ public function renderCsrfToken(string $tokenId): string return $this->csrfTokenManager->getToken($tokenId)->getValue(); } - /** - * {@inheritdoc} - */ public function renderBlock(FormView $view, string $blockName, array $variables = []): string { $resource = $this->engine->getResourceForBlockName($view, $blockName); @@ -124,9 +112,6 @@ public function renderBlock(FormView $view, string $blockName, array $variables return $html; } - /** - * {@inheritdoc} - */ public function searchAndRenderBlock(FormView $view, string $blockNameSuffix, array $variables = []): string { $renderOnlyOnce = 'row' === $blockNameSuffix || 'widget' === $blockNameSuffix; @@ -277,9 +262,6 @@ public function searchAndRenderBlock(FormView $view, string $blockNameSuffix, ar return $html; } - /** - * {@inheritdoc} - */ public function humanize(string $text): string { return ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $text)))); diff --git a/src/Symfony/Component/Form/FormTypeGuesserChain.php b/src/Symfony/Component/Form/FormTypeGuesserChain.php index 1ce69d8d3d7b1..7d8f617f7baaa 100644 --- a/src/Symfony/Component/Form/FormTypeGuesserChain.php +++ b/src/Symfony/Component/Form/FormTypeGuesserChain.php @@ -43,9 +43,6 @@ public function __construct(iterable $guessers) $this->guessers = array_merge([], ...$tmpGuessers); } - /** - * {@inheritdoc} - */ public function guessType(string $class, string $property): ?TypeGuess { return $this->guess(function ($guesser) use ($class, $property) { @@ -53,9 +50,6 @@ public function guessType(string $class, string $property): ?TypeGuess }); } - /** - * {@inheritdoc} - */ public function guessRequired(string $class, string $property): ?ValueGuess { return $this->guess(function ($guesser) use ($class, $property) { @@ -63,9 +57,6 @@ public function guessRequired(string $class, string $property): ?ValueGuess }); } - /** - * {@inheritdoc} - */ public function guessMaxLength(string $class, string $property): ?ValueGuess { return $this->guess(function ($guesser) use ($class, $property) { @@ -73,9 +64,6 @@ public function guessMaxLength(string $class, string $property): ?ValueGuess }); } - /** - * {@inheritdoc} - */ public function guessPattern(string $class, string $property): ?ValueGuess { return $this->guess(function ($guesser) use ($class, $property) { diff --git a/src/Symfony/Component/Form/NativeRequestHandler.php b/src/Symfony/Component/Form/NativeRequestHandler.php index 679c190e4a0d6..cf193398c8318 100644 --- a/src/Symfony/Component/Form/NativeRequestHandler.php +++ b/src/Symfony/Component/Form/NativeRequestHandler.php @@ -40,8 +40,6 @@ public function __construct(ServerParams $params = null) } /** - * {@inheritdoc} - * * @throws Exception\UnexpectedTypeException If the $request is not null */ public function handleRequest(FormInterface $form, mixed $request = null) @@ -124,9 +122,6 @@ public function handleRequest(FormInterface $form, mixed $request = null) $form->submit($data, 'PATCH' !== $method); } - /** - * {@inheritdoc} - */ public function isFileUpload(mixed $data): bool { // POST data will always be strings or arrays of strings. Thus, we can be sure diff --git a/src/Symfony/Component/Form/PreloadedExtension.php b/src/Symfony/Component/Form/PreloadedExtension.php index 3c0ae26e89dcc..5590eda3706f7 100644 --- a/src/Symfony/Component/Form/PreloadedExtension.php +++ b/src/Symfony/Component/Form/PreloadedExtension.php @@ -40,9 +40,6 @@ public function __construct(array $types, array $typeExtensions, FormTypeGuesser } } - /** - * {@inheritdoc} - */ public function getType(string $name): FormTypeInterface { if (!isset($this->types[$name])) { @@ -52,34 +49,22 @@ public function getType(string $name): FormTypeInterface return $this->types[$name]; } - /** - * {@inheritdoc} - */ public function hasType(string $name): bool { return isset($this->types[$name]); } - /** - * {@inheritdoc} - */ public function getTypeExtensions(string $name): array { return $this->typeExtensions[$name] ?? []; } - /** - * {@inheritdoc} - */ public function hasTypeExtensions(string $name): bool { return !empty($this->typeExtensions[$name]); } - /** - * {@inheritdoc} - */ public function getTypeGuesser(): ?FormTypeGuesserInterface { return $this->typeGuesser; diff --git a/src/Symfony/Component/Form/ResolvedFormType.php b/src/Symfony/Component/Form/ResolvedFormType.php index 884d538a449a1..af794a3b7c0d6 100644 --- a/src/Symfony/Component/Form/ResolvedFormType.php +++ b/src/Symfony/Component/Form/ResolvedFormType.php @@ -50,41 +50,26 @@ public function __construct(FormTypeInterface $innerType, array $typeExtensions $this->parent = $parent; } - /** - * {@inheritdoc} - */ public function getBlockPrefix(): string { return $this->innerType->getBlockPrefix(); } - /** - * {@inheritdoc} - */ public function getParent(): ?ResolvedFormTypeInterface { return $this->parent; } - /** - * {@inheritdoc} - */ public function getInnerType(): FormTypeInterface { return $this->innerType; } - /** - * {@inheritdoc} - */ public function getTypeExtensions(): array { return $this->typeExtensions; } - /** - * {@inheritdoc} - */ public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []): FormBuilderInterface { try { @@ -102,17 +87,11 @@ public function createBuilder(FormFactoryInterface $factory, string $name, array return $builder; } - /** - * {@inheritdoc} - */ public function createView(FormInterface $form, FormView $parent = null): FormView { return $this->newView($parent); } - /** - * {@inheritdoc} - */ public function buildForm(FormBuilderInterface $builder, array $options) { $this->parent?->buildForm($builder, $options); @@ -124,9 +103,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ public function buildView(FormView $view, FormInterface $form, array $options) { $this->parent?->buildView($view, $form, $options); @@ -138,9 +114,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function finishView(FormView $view, FormInterface $form, array $options) { $this->parent?->finishView($view, $form, $options); @@ -153,9 +126,6 @@ public function finishView(FormView $view, FormInterface $form, array $options) } } - /** - * {@inheritdoc} - */ public function getOptionsResolver(): OptionsResolver { if (!isset($this->optionsResolver)) { diff --git a/src/Symfony/Component/Form/ResolvedFormTypeFactory.php b/src/Symfony/Component/Form/ResolvedFormTypeFactory.php index 48f62bad32b67..fd7c4521b28a0 100644 --- a/src/Symfony/Component/Form/ResolvedFormTypeFactory.php +++ b/src/Symfony/Component/Form/ResolvedFormTypeFactory.php @@ -16,9 +16,6 @@ */ class ResolvedFormTypeFactory implements ResolvedFormTypeFactoryInterface { - /** - * {@inheritdoc} - */ public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null): ResolvedFormTypeInterface { return new ResolvedFormType($type, $typeExtensions, $parent); diff --git a/src/Symfony/Component/Form/ReversedTransformer.php b/src/Symfony/Component/Form/ReversedTransformer.php index d2a835ba9001d..8572672369a6e 100644 --- a/src/Symfony/Component/Form/ReversedTransformer.php +++ b/src/Symfony/Component/Form/ReversedTransformer.php @@ -28,17 +28,11 @@ public function __construct(DataTransformerInterface $reversedTransformer) $this->reversedTransformer = $reversedTransformer; } - /** - * {@inheritdoc} - */ public function transform(mixed $value): mixed { return $this->reversedTransformer->reverseTransform($value); } - /** - * {@inheritdoc} - */ public function reverseTransform(mixed $value): mixed { return $this->reversedTransformer->transform($value); diff --git a/src/Symfony/Component/Form/SubmitButton.php b/src/Symfony/Component/Form/SubmitButton.php index bc7e1c3f7ffed..37ce141d27afb 100644 --- a/src/Symfony/Component/Form/SubmitButton.php +++ b/src/Symfony/Component/Form/SubmitButton.php @@ -20,9 +20,6 @@ class SubmitButton extends Button implements ClickableInterface { private bool $clicked = false; - /** - * {@inheritdoc} - */ public function isClicked(): bool { return $this->clicked; diff --git a/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php b/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php index 2547e871cc90e..16894bea0c84c 100644 --- a/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php +++ b/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php @@ -30,9 +30,6 @@ abstract class FormPerformanceTestCase extends FormIntegrationTestCase */ protected $maxRunningTime = 0; - /** - * {@inheritdoc} - */ protected function runTest() { $s = microtime(true); diff --git a/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php b/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php index 5058bf6a6fa45..d67f0b96ace50 100644 --- a/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php +++ b/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php @@ -20,9 +20,6 @@ */ class ChoiceSubType extends AbstractType { - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(['expanded' => true]); @@ -34,9 +31,6 @@ public function configureOptions(OptionsResolver $resolver) }); } - /** - * {@inheritdoc} - */ public function getParent(): ?string { return ChoiceType::class; diff --git a/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php b/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php index 34242c5b69bc4..1751531d19adc 100644 --- a/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php +++ b/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php @@ -18,9 +18,6 @@ class ChoiceTypeExtension extends AbstractTypeExtension { public static $extendedType; - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefault('choices', [ @@ -29,9 +26,6 @@ public function configureOptions(OptionsResolver $resolver) ]); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [self::$extendedType]; diff --git a/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php b/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php index 20fe789cd7dd9..b04eb61721c41 100644 --- a/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php +++ b/src/Symfony/Component/Form/Tests/Fixtures/LazyChoiceTypeExtension.php @@ -19,9 +19,6 @@ class LazyChoiceTypeExtension extends AbstractTypeExtension { public static $extendedType; - /** - * {@inheritdoc} - */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefault('choice_loader', ChoiceList::lazy($this, function () { @@ -32,9 +29,6 @@ public function configureOptions(OptionsResolver $resolver) })); } - /** - * {@inheritdoc} - */ public static function getExtendedTypes(): iterable { return [self::$extendedType]; diff --git a/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php b/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php index b3cdf5e57188c..e1335fefa6d67 100644 --- a/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php +++ b/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php @@ -78,17 +78,11 @@ public function __destruct() array_splice($this->managedCursors, $this->cursorId, 1); } - /** - * {@inheritdoc} - */ public function current(): mixed { return $this->current; } - /** - * {@inheritdoc} - */ public function next(): void { ++$this->cursor; @@ -102,9 +96,6 @@ public function next(): void } } - /** - * {@inheritdoc} - */ public function key(): mixed { if (null === $this->key) { @@ -114,17 +105,11 @@ public function key(): mixed return $this->key; } - /** - * {@inheritdoc} - */ public function valid(): bool { return null !== $this->key; } - /** - * {@inheritdoc} - */ public function rewind(): void { $this->cursor = 0; diff --git a/src/Symfony/Component/HttpClient/AmpHttpClient.php b/src/Symfony/Component/HttpClient/AmpHttpClient.php index 168bf133a04aa..2252b14ad901f 100644 --- a/src/Symfony/Component/HttpClient/AmpHttpClient.php +++ b/src/Symfony/Component/HttpClient/AmpHttpClient.php @@ -68,8 +68,6 @@ public function __construct(array $defaultOptions = [], callable $clientConfigur /** * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} */ public function request(string $method, string $url, array $options = []): ResponseInterface { @@ -141,9 +139,6 @@ public function request(string $method, string $url, array $options = []): Respo return new AmpResponse($this->multi, $request, $options, $this->logger); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof AmpResponse) { diff --git a/src/Symfony/Component/HttpClient/AsyncDecoratorTrait.php b/src/Symfony/Component/HttpClient/AsyncDecoratorTrait.php index 1a2aa4fb06781..912b8250eacee 100644 --- a/src/Symfony/Component/HttpClient/AsyncDecoratorTrait.php +++ b/src/Symfony/Component/HttpClient/AsyncDecoratorTrait.php @@ -26,15 +26,10 @@ trait AsyncDecoratorTrait use DecoratorTrait; /** - * {@inheritdoc} - * * @return AsyncResponse */ abstract public function request(string $method, string $url, array $options = []): ResponseInterface; - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof AsyncResponse) { diff --git a/src/Symfony/Component/HttpClient/CachingHttpClient.php b/src/Symfony/Component/HttpClient/CachingHttpClient.php index b2d8156899d37..5e3fbf507501c 100644 --- a/src/Symfony/Component/HttpClient/CachingHttpClient.php +++ b/src/Symfony/Component/HttpClient/CachingHttpClient.php @@ -64,9 +64,6 @@ public function __construct(HttpClientInterface $client, StoreInterface $store, } } - /** - * {@inheritdoc} - */ public function request(string $method, string $url, array $options = []): ResponseInterface { [$url, $options] = $this->prepareRequest($method, $url, $options, $this->defaultOptions, true); @@ -107,9 +104,6 @@ public function request(string $method, string $url, array $options = []): Respo return MockResponse::fromRequest($method, $url, $options, $response); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof ResponseInterface) { diff --git a/src/Symfony/Component/HttpClient/Chunk/DataChunk.php b/src/Symfony/Component/HttpClient/Chunk/DataChunk.php index e2365cd0b6d6e..3507a0cd021d0 100644 --- a/src/Symfony/Component/HttpClient/Chunk/DataChunk.php +++ b/src/Symfony/Component/HttpClient/Chunk/DataChunk.php @@ -29,57 +29,36 @@ public function __construct(int $offset = 0, string $content = '') $this->content = $content; } - /** - * {@inheritdoc} - */ public function isTimeout(): bool { return false; } - /** - * {@inheritdoc} - */ public function isFirst(): bool { return false; } - /** - * {@inheritdoc} - */ public function isLast(): bool { return false; } - /** - * {@inheritdoc} - */ public function getInformationalStatus(): ?array { return null; } - /** - * {@inheritdoc} - */ public function getContent(): string { return $this->content; } - /** - * {@inheritdoc} - */ public function getOffset(): int { return $this->offset; } - /** - * {@inheritdoc} - */ public function getError(): ?string { return null; diff --git a/src/Symfony/Component/HttpClient/Chunk/ErrorChunk.php b/src/Symfony/Component/HttpClient/Chunk/ErrorChunk.php index a989c39a78d62..c797fc343d8bb 100644 --- a/src/Symfony/Component/HttpClient/Chunk/ErrorChunk.php +++ b/src/Symfony/Component/HttpClient/Chunk/ErrorChunk.php @@ -39,9 +39,6 @@ public function __construct(int $offset, \Throwable|string $error) } } - /** - * {@inheritdoc} - */ public function isTimeout(): bool { $this->didThrow = true; @@ -53,53 +50,35 @@ public function isTimeout(): bool return true; } - /** - * {@inheritdoc} - */ public function isFirst(): bool { $this->didThrow = true; throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); } - /** - * {@inheritdoc} - */ public function isLast(): bool { $this->didThrow = true; throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); } - /** - * {@inheritdoc} - */ public function getInformationalStatus(): ?array { $this->didThrow = true; throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); } - /** - * {@inheritdoc} - */ public function getContent(): string { $this->didThrow = true; throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); } - /** - * {@inheritdoc} - */ public function getOffset(): int { return $this->offset; } - /** - * {@inheritdoc} - */ public function getError(): ?string { return $this->errorMessage; diff --git a/src/Symfony/Component/HttpClient/Chunk/FirstChunk.php b/src/Symfony/Component/HttpClient/Chunk/FirstChunk.php index d891ca856d347..f6ba8b8acb44c 100644 --- a/src/Symfony/Component/HttpClient/Chunk/FirstChunk.php +++ b/src/Symfony/Component/HttpClient/Chunk/FirstChunk.php @@ -18,9 +18,6 @@ */ class FirstChunk extends DataChunk { - /** - * {@inheritdoc} - */ public function isFirst(): bool { return true; diff --git a/src/Symfony/Component/HttpClient/Chunk/InformationalChunk.php b/src/Symfony/Component/HttpClient/Chunk/InformationalChunk.php index fbc3ccbd18a3b..31ed1aa248d18 100644 --- a/src/Symfony/Component/HttpClient/Chunk/InformationalChunk.php +++ b/src/Symfony/Component/HttpClient/Chunk/InformationalChunk.php @@ -25,9 +25,6 @@ public function __construct(int $statusCode, array $headers) $this->status = [$statusCode, $headers]; } - /** - * {@inheritdoc} - */ public function getInformationalStatus(): ?array { return $this->status; diff --git a/src/Symfony/Component/HttpClient/Chunk/LastChunk.php b/src/Symfony/Component/HttpClient/Chunk/LastChunk.php index 84095d39257e8..a64d123792b54 100644 --- a/src/Symfony/Component/HttpClient/Chunk/LastChunk.php +++ b/src/Symfony/Component/HttpClient/Chunk/LastChunk.php @@ -18,9 +18,6 @@ */ class LastChunk extends DataChunk { - /** - * {@inheritdoc} - */ public function isLast(): bool { return true; diff --git a/src/Symfony/Component/HttpClient/CurlHttpClient.php b/src/Symfony/Component/HttpClient/CurlHttpClient.php index e963a08212de2..c1e3dd9fa6e48 100644 --- a/src/Symfony/Component/HttpClient/CurlHttpClient.php +++ b/src/Symfony/Component/HttpClient/CurlHttpClient.php @@ -81,8 +81,6 @@ public function setLogger(LoggerInterface $logger): void /** * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} */ public function request(string $method, string $url, array $options = []): ResponseInterface { @@ -304,9 +302,6 @@ public function request(string $method, string $url, array $options = []): Respo return $pushedResponse ?? new CurlResponse($this->multi, $ch, $options, $this->logger, $method, self::createRedirectResolver($options, $host, $port), CurlClientState::$curlVersion['version_number'], $url); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof CurlResponse) { diff --git a/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php b/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php index de7251b004461..781be5df1b4a3 100644 --- a/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php +++ b/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php @@ -36,9 +36,6 @@ public function registerClient(string $name, TraceableHttpClient $client) $this->clients[$name] = $client; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->reset(); @@ -78,9 +75,6 @@ public function getErrorCount(): int return $this->data['error_count'] ?? 0; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'http_client'; diff --git a/src/Symfony/Component/HttpClient/DecoratorTrait.php b/src/Symfony/Component/HttpClient/DecoratorTrait.php index 45a90e57e960e..f38664b4353a7 100644 --- a/src/Symfony/Component/HttpClient/DecoratorTrait.php +++ b/src/Symfony/Component/HttpClient/DecoratorTrait.php @@ -30,25 +30,16 @@ public function __construct(HttpClientInterface $client = null) $this->client = $client ?? HttpClient::create(); } - /** - * {@inheritdoc} - */ public function request(string $method, string $url, array $options = []): ResponseInterface { return $this->client->request($method, $url, $options); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { return $this->client->stream($responses, $timeout); } - /** - * {@inheritdoc} - */ public function withOptions(array $options): static { $clone = clone $this; diff --git a/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php b/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php index b127c1ba60a0c..a5be24dcca09b 100644 --- a/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php +++ b/src/Symfony/Component/HttpClient/DependencyInjection/HttpClientPass.php @@ -19,9 +19,6 @@ final class HttpClientPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('data_collector.http_client')) { diff --git a/src/Symfony/Component/HttpClient/HttpClientTrait.php b/src/Symfony/Component/HttpClient/HttpClientTrait.php index a2ed4bc71e8b1..62329290c0682 100644 --- a/src/Symfony/Component/HttpClient/HttpClientTrait.php +++ b/src/Symfony/Component/HttpClient/HttpClientTrait.php @@ -25,9 +25,6 @@ trait HttpClientTrait { private static int $CHUNK_SIZE = 16372; - /** - * {@inheritdoc} - */ public function withOptions(array $options): static { $clone = clone $this; diff --git a/src/Symfony/Component/HttpClient/HttplugClient.php b/src/Symfony/Component/HttpClient/HttplugClient.php index 8b552c9533b6d..8245067f06d28 100644 --- a/src/Symfony/Component/HttpClient/HttplugClient.php +++ b/src/Symfony/Component/HttpClient/HttplugClient.php @@ -95,9 +95,6 @@ public function __construct(HttpClientInterface $client = null, ResponseFactoryI $this->waitLoop = new HttplugWaitLoop($this->client, $this->promisePool, $this->responseFactory, $this->streamFactory); } - /** - * {@inheritdoc} - */ public function sendRequest(RequestInterface $request): Psr7ResponseInterface { try { @@ -107,9 +104,6 @@ public function sendRequest(RequestInterface $request): Psr7ResponseInterface } } - /** - * {@inheritdoc} - */ public function sendAsyncRequest(RequestInterface $request): HttplugPromise { if (!$promisePool = $this->promisePool) { @@ -148,9 +142,6 @@ public function wait(float $maxDuration = null, float $idleTimeout = null): int return $this->waitLoop->wait(null, $maxDuration, $idleTimeout); } - /** - * {@inheritdoc} - */ public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1'): RequestInterface { if ($this->responseFactory instanceof RequestFactoryInterface) { @@ -175,9 +166,6 @@ public function createRequest($method, $uri, array $headers = [], $body = null, return $request; } - /** - * {@inheritdoc} - */ public function createStream($body = null): StreamInterface { if ($body instanceof StreamInterface) { @@ -199,9 +187,6 @@ public function createStream($body = null): StreamInterface return $stream; } - /** - * {@inheritdoc} - */ public function createUri($uri): UriInterface { if ($uri instanceof UriInterface) { diff --git a/src/Symfony/Component/HttpClient/MockHttpClient.php b/src/Symfony/Component/HttpClient/MockHttpClient.php index 8df09120295dc..7906b9a96c418 100644 --- a/src/Symfony/Component/HttpClient/MockHttpClient.php +++ b/src/Symfony/Component/HttpClient/MockHttpClient.php @@ -59,9 +59,6 @@ public function setResponseFactory($responseFactory): void $this->responseFactory = !\is_callable($responseFactory) ? $responseFactory : $responseFactory(...); } - /** - * {@inheritdoc} - */ public function request(string $method, string $url, array $options = []): ResponseInterface { [$url, $options] = $this->prepareRequest($method, $url, $options, $this->defaultOptions, true); @@ -87,9 +84,6 @@ public function request(string $method, string $url, array $options = []): Respo return MockResponse::fromRequest($method, $url, $options, $response); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof ResponseInterface) { @@ -104,9 +98,6 @@ public function getRequestsCount(): int return $this->requestsCount; } - /** - * {@inheritdoc} - */ public function withOptions(array $options): static { $clone = clone $this; diff --git a/src/Symfony/Component/HttpClient/NativeHttpClient.php b/src/Symfony/Component/HttpClient/NativeHttpClient.php index f9ecb103acca9..734effbb40354 100644 --- a/src/Symfony/Component/HttpClient/NativeHttpClient.php +++ b/src/Symfony/Component/HttpClient/NativeHttpClient.php @@ -61,8 +61,6 @@ public function __construct(array $defaultOptions = [], int $maxHostConnections /** * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} */ public function request(string $method, string $url, array $options = []): ResponseInterface { @@ -254,9 +252,6 @@ public function request(string $method, string $url, array $options = []): Respo return new NativeResponse($this->multi, $context, implode('', $url), $options, $info, $resolver, $onProgress, $this->logger); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof NativeResponse) { diff --git a/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php b/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php index 9185dd304f579..89885abe1f4f7 100644 --- a/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php +++ b/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php @@ -62,9 +62,6 @@ public function __construct(HttpClientInterface $client, string|array $subnets = $this->subnets = $subnets; } - /** - * {@inheritdoc} - */ public function request(string $method, string $url, array $options = []): ResponseInterface { $onProgress = $options['on_progress'] ?? null; @@ -90,17 +87,11 @@ public function request(string $method, string $url, array $options = []): Respo return $this->client->request($method, $url, $options); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { return $this->client->stream($responses, $timeout); } - /** - * {@inheritdoc} - */ public function setLogger(LoggerInterface $logger): void { if ($this->client instanceof LoggerAwareInterface) { @@ -108,9 +99,6 @@ public function setLogger(LoggerInterface $logger): void } } - /** - * {@inheritdoc} - */ public function withOptions(array $options): static { $clone = clone $this; diff --git a/src/Symfony/Component/HttpClient/Psr18Client.php b/src/Symfony/Component/HttpClient/Psr18Client.php index aa713601baa46..98809284cd83d 100644 --- a/src/Symfony/Component/HttpClient/Psr18Client.php +++ b/src/Symfony/Component/HttpClient/Psr18Client.php @@ -79,9 +79,6 @@ public function __construct(HttpClientInterface $client = null, ResponseFactoryI $this->streamFactory = $streamFactory; } - /** - * {@inheritdoc} - */ public function sendRequest(RequestInterface $request): ResponseInterface { try { @@ -122,9 +119,6 @@ public function sendRequest(RequestInterface $request): ResponseInterface } } - /** - * {@inheritdoc} - */ public function createRequest(string $method, $uri): RequestInterface { if ($this->responseFactory instanceof RequestFactoryInterface) { @@ -142,9 +136,6 @@ public function createRequest(string $method, $uri): RequestInterface throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); } - /** - * {@inheritdoc} - */ public function createStream(string $content = ''): StreamInterface { $stream = $this->streamFactory->createStream($content); @@ -156,25 +147,16 @@ public function createStream(string $content = ''): StreamInterface return $stream; } - /** - * {@inheritdoc} - */ public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface { return $this->streamFactory->createStreamFromFile($filename, $mode); } - /** - * {@inheritdoc} - */ public function createStreamFromResource($resource): StreamInterface { return $this->streamFactory->createStreamFromResource($resource); } - /** - * {@inheritdoc} - */ public function createUri(string $uri = ''): UriInterface { if ($this->responseFactory instanceof UriFactoryInterface) { diff --git a/src/Symfony/Component/HttpClient/Response/AmpResponse.php b/src/Symfony/Component/HttpClient/Response/AmpResponse.php index f107ccfa6cf65..c0453436e8b8c 100644 --- a/src/Symfony/Component/HttpClient/Response/AmpResponse.php +++ b/src/Symfony/Component/HttpClient/Response/AmpResponse.php @@ -137,9 +137,6 @@ public function __construct(AmpClientState $multi, Request $request, array $opti }); } - /** - * {@inheritdoc} - */ public function getInfo(string $type = null): mixed { return null !== $type ? $this->info[$type] ?? null : $this->info; @@ -168,9 +165,6 @@ public function __destruct() } } - /** - * {@inheritdoc} - */ private static function schedule(self $response, array &$runningResponses): void { if (isset($runningResponses[0])) { @@ -186,8 +180,6 @@ private static function schedule(self $response, array &$runningResponses): void } /** - * {@inheritdoc} - * * @param AmpClientState $multi */ private static function perform(ClientState $multi, array &$responses = null): void @@ -208,8 +200,6 @@ private static function perform(ClientState $multi, array &$responses = null): v } /** - * {@inheritdoc} - * * @param AmpClientState $multi */ private static function select(ClientState $multi, float $timeout): int diff --git a/src/Symfony/Component/HttpClient/Response/AsyncResponse.php b/src/Symfony/Component/HttpClient/Response/AsyncResponse.php index 63337a9e94362..8236623b2793f 100644 --- a/src/Symfony/Component/HttpClient/Response/AsyncResponse.php +++ b/src/Symfony/Component/HttpClient/Response/AsyncResponse.php @@ -123,9 +123,6 @@ public function getInfo(string $type = null): mixed return $this->info + $this->response->getInfo(); } - /** - * {@inheritdoc} - */ public function toStream(bool $throw = true) { if ($throw) { @@ -146,9 +143,6 @@ public function toStream(bool $throw = true) return $stream; } - /** - * {@inheritdoc} - */ public function cancel(): void { if ($this->info['canceled']) { diff --git a/src/Symfony/Component/HttpClient/Response/CommonResponseTrait.php b/src/Symfony/Component/HttpClient/Response/CommonResponseTrait.php index 448b854248324..06f6b7d88a33c 100644 --- a/src/Symfony/Component/HttpClient/Response/CommonResponseTrait.php +++ b/src/Symfony/Component/HttpClient/Response/CommonResponseTrait.php @@ -35,9 +35,6 @@ trait CommonResponseTrait private int $offset = 0; private ?array $jsonData = null; - /** - * {@inheritdoc} - */ public function getContent(bool $throw = true): string { if ($this->initializer) { @@ -75,9 +72,6 @@ public function getContent(bool $throw = true): string return stream_get_contents($this->content); } - /** - * {@inheritdoc} - */ public function toArray(bool $throw = true): array { if ('' === $content = $this->getContent($throw)) { @@ -106,9 +100,6 @@ public function toArray(bool $throw = true): array return $content; } - /** - * {@inheritdoc} - */ public function toStream(bool $throw = true) { if ($throw) { diff --git a/src/Symfony/Component/HttpClient/Response/CurlResponse.php b/src/Symfony/Component/HttpClient/Response/CurlResponse.php index 81e29ef8d94f6..034bbbed190ff 100644 --- a/src/Symfony/Component/HttpClient/Response/CurlResponse.php +++ b/src/Symfony/Component/HttpClient/Response/CurlResponse.php @@ -204,9 +204,6 @@ public function __construct(CurlClientState $multi, \CurlHandle|string $ch, arra }); } - /** - * {@inheritdoc} - */ public function getInfo(string $type = null): mixed { if (!$info = $this->finalInfo) { @@ -235,9 +232,6 @@ public function getInfo(string $type = null): mixed return null !== $type ? $info[$type] ?? null : $info; } - /** - * {@inheritdoc} - */ public function getContent(bool $throw = true): string { $performing = self::$performing; @@ -265,9 +259,6 @@ public function __destruct() } } - /** - * {@inheritdoc} - */ private static function schedule(self $response, array &$runningResponses): void { if (isset($runningResponses[$i = (int) $response->multi->handle])) { @@ -284,8 +275,6 @@ private static function schedule(self $response, array &$runningResponses): void } /** - * {@inheritdoc} - * * @param CurlClientState $multi */ private static function perform(ClientState $multi, array &$responses = null): void @@ -343,8 +332,6 @@ private static function perform(ClientState $multi, array &$responses = null): v } /** - * {@inheritdoc} - * * @param CurlClientState $multi */ private static function select(ClientState $multi, float $timeout): int diff --git a/src/Symfony/Component/HttpClient/Response/HttplugPromise.php b/src/Symfony/Component/HttpClient/Response/HttplugPromise.php index 943b5b0b3a8fb..deaea720da735 100644 --- a/src/Symfony/Component/HttpClient/Response/HttplugPromise.php +++ b/src/Symfony/Component/HttpClient/Response/HttplugPromise.php @@ -43,17 +43,12 @@ public function cancel(): void $this->promise->cancel(); } - /** - * {@inheritdoc} - */ public function getState(): string { return $this->promise->getState(); } /** - * {@inheritdoc} - * * @return Psr7ResponseInterface|mixed */ public function wait($unwrap = true): mixed diff --git a/src/Symfony/Component/HttpClient/Response/MockResponse.php b/src/Symfony/Component/HttpClient/Response/MockResponse.php index 044734a3b8d87..0d99032819651 100644 --- a/src/Symfony/Component/HttpClient/Response/MockResponse.php +++ b/src/Symfony/Component/HttpClient/Response/MockResponse.php @@ -90,17 +90,11 @@ public function getRequestMethod(): string return $this->requestMethod; } - /** - * {@inheritdoc} - */ public function getInfo(string $type = null): mixed { return null !== $type ? $this->info[$type] ?? null : $this->info; } - /** - * {@inheritdoc} - */ public function cancel(): void { $this->info['canceled'] = true; @@ -112,9 +106,6 @@ public function cancel(): void } } - /** - * {@inheritdoc} - */ protected function close(): void { $this->inflate = null; @@ -156,9 +147,6 @@ public static function fromRequest(string $method, string $url, array $options, return $response; } - /** - * {@inheritdoc} - */ protected static function schedule(self $response, array &$runningResponses): void { if (!isset($response->id)) { @@ -174,9 +162,6 @@ protected static function schedule(self $response, array &$runningResponses): vo $runningResponses[0][1][$response->id] = $response; } - /** - * {@inheritdoc} - */ protected static function perform(ClientState $multi, array &$responses): void { foreach ($responses as $response) { @@ -220,9 +205,6 @@ protected static function perform(ClientState $multi, array &$responses): void } } - /** - * {@inheritdoc} - */ protected static function select(ClientState $multi, float $timeout): int { return 42; diff --git a/src/Symfony/Component/HttpClient/Response/NativeResponse.php b/src/Symfony/Component/HttpClient/Response/NativeResponse.php index ab0cf095908f7..a6b9dd989bebb 100644 --- a/src/Symfony/Component/HttpClient/Response/NativeResponse.php +++ b/src/Symfony/Component/HttpClient/Response/NativeResponse.php @@ -88,9 +88,6 @@ public function __construct(NativeClientState $multi, $context, string $url, arr }); } - /** - * {@inheritdoc} - */ public function getInfo(string $type = null): mixed { if (!$info = $this->finalInfo) { @@ -209,18 +206,12 @@ private function open(): void $this->multi->hosts[$host] = 1 + ($this->multi->hosts[$host] ?? 0); } - /** - * {@inheritdoc} - */ private function close(): void { $this->canary->cancel(); $this->handle = $this->buffer = $this->inflate = $this->onProgress = null; } - /** - * {@inheritdoc} - */ private static function schedule(self $response, array &$runningResponses): void { if (!isset($runningResponses[$i = $response->multi->id])) { @@ -237,8 +228,6 @@ private static function schedule(self $response, array &$runningResponses): void } /** - * {@inheritdoc} - * * @param NativeClientState $multi */ private static function perform(ClientState $multi, array &$responses = null): void @@ -348,8 +337,6 @@ private static function perform(ClientState $multi, array &$responses = null): v } /** - * {@inheritdoc} - * * @param NativeClientState $multi */ private static function select(ClientState $multi, float $timeout): int diff --git a/src/Symfony/Component/HttpClient/Response/TransportResponseTrait.php b/src/Symfony/Component/HttpClient/Response/TransportResponseTrait.php index f2615111bc97a..ac53b99a6282a 100644 --- a/src/Symfony/Component/HttpClient/Response/TransportResponseTrait.php +++ b/src/Symfony/Component/HttpClient/Response/TransportResponseTrait.php @@ -46,9 +46,6 @@ trait TransportResponseTrait private ?array $finalInfo = null; private ?LoggerInterface $logger = null; - /** - * {@inheritdoc} - */ public function getStatusCode(): int { if ($this->initializer) { @@ -58,9 +55,6 @@ public function getStatusCode(): int return $this->info['http_code']; } - /** - * {@inheritdoc} - */ public function getHeaders(bool $throw = true): array { if ($this->initializer) { @@ -74,9 +68,6 @@ public function getHeaders(bool $throw = true): array return $this->headers; } - /** - * {@inheritdoc} - */ public function cancel(): void { $this->info['canceled'] = true; diff --git a/src/Symfony/Component/HttpClient/ScopingHttpClient.php b/src/Symfony/Component/HttpClient/ScopingHttpClient.php index ba51081dcdc19..6b106df2da1ed 100644 --- a/src/Symfony/Component/HttpClient/ScopingHttpClient.php +++ b/src/Symfony/Component/HttpClient/ScopingHttpClient.php @@ -54,9 +54,6 @@ public static function forBaseUri(HttpClientInterface $client, string $baseUri, return new self($client, [$regexp => $defaultOptions], $regexp); } - /** - * {@inheritdoc} - */ public function request(string $method, string $url, array $options = []): ResponseInterface { $e = null; @@ -93,9 +90,6 @@ public function request(string $method, string $url, array $options = []): Respo return $this->client->request($method, $url, $options); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { return $this->client->stream($responses, $timeout); @@ -108,9 +102,6 @@ public function reset() } } - /** - * {@inheritdoc} - */ public function setLogger(LoggerInterface $logger): void { if ($this->client instanceof LoggerAwareInterface) { @@ -118,9 +109,6 @@ public function setLogger(LoggerInterface $logger): void } } - /** - * {@inheritdoc} - */ public function withOptions(array $options): static { $clone = clone $this; diff --git a/src/Symfony/Component/HttpClient/TraceableHttpClient.php b/src/Symfony/Component/HttpClient/TraceableHttpClient.php index a89cfc94d50c3..b9df9732aa9dd 100644 --- a/src/Symfony/Component/HttpClient/TraceableHttpClient.php +++ b/src/Symfony/Component/HttpClient/TraceableHttpClient.php @@ -37,9 +37,6 @@ public function __construct(HttpClientInterface $client, Stopwatch $stopwatch = $this->tracedRequests = new \ArrayObject(); } - /** - * {@inheritdoc} - */ public function request(string $method, string $url, array $options = []): ResponseInterface { $content = null; @@ -69,9 +66,6 @@ public function request(string $method, string $url, array $options = []): Respo return new TraceableResponse($this->client, $this->client->request($method, $url, $options), $content, $this->stopwatch?->start("$method $url", 'http_client')); } - /** - * {@inheritdoc} - */ public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof TraceableResponse) { @@ -95,9 +89,6 @@ public function reset() $this->tracedRequests->exchangeArray([]); } - /** - * {@inheritdoc} - */ public function setLogger(LoggerInterface $logger): void { if ($this->client instanceof LoggerAwareInterface) { @@ -105,9 +96,6 @@ public function setLogger(LoggerInterface $logger): void } } - /** - * {@inheritdoc} - */ public function withOptions(array $options): static { $clone = clone $this; diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index 65cb51f95c665..415936602ca94 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -177,9 +177,6 @@ public function setContentDisposition(string $disposition, string $filename = '' return $this; } - /** - * {@inheritdoc} - */ public function prepare(Request $request): static { if (!$this->headers->has('Content-Type')) { @@ -283,9 +280,6 @@ private function hasValidIfRangeHeader(?string $header): bool return $lastModified->format('D, d M Y H:i:s').' GMT' === $header; } - /** - * {@inheritdoc} - */ public function sendContent(): static { if (!$this->isSuccessful()) { @@ -328,8 +322,6 @@ public function sendContent(): static } /** - * {@inheritdoc} - * * @throws \LogicException when the content is not null */ public function setContent(?string $content): static @@ -341,9 +333,6 @@ public function setContent(?string $content): static return $this; } - /** - * {@inheritdoc} - */ public function getContent(): string|false { return false; diff --git a/src/Symfony/Component/HttpFoundation/FileBag.php b/src/Symfony/Component/HttpFoundation/FileBag.php index fdf514a125f82..7ed39408fd5af 100644 --- a/src/Symfony/Component/HttpFoundation/FileBag.php +++ b/src/Symfony/Component/HttpFoundation/FileBag.php @@ -31,18 +31,12 @@ public function __construct(array $parameters = []) $this->replace($parameters); } - /** - * {@inheritdoc} - */ public function replace(array $files = []) { $this->parameters = []; $this->add($files); } - /** - * {@inheritdoc} - */ public function set(string $key, mixed $value) { if (!\is_array($value) && !$value instanceof UploadedFile) { @@ -52,9 +46,6 @@ public function set(string $key, mixed $value) parent::set($key, $this->convertFileInformation($value)); } - /** - * {@inheritdoc} - */ public function add(array $files = []) { foreach ($files as $key => $file) { diff --git a/src/Symfony/Component/HttpFoundation/InputBag.php b/src/Symfony/Component/HttpFoundation/InputBag.php index fd833467f4dd5..877ac60f3aefd 100644 --- a/src/Symfony/Component/HttpFoundation/InputBag.php +++ b/src/Symfony/Component/HttpFoundation/InputBag.php @@ -73,9 +73,6 @@ public function set(string $key, mixed $value) $this->parameters[$key] = $value; } - /** - * {@inheritdoc} - */ public function filter(string $key, mixed $default = null, int $filter = \FILTER_DEFAULT, mixed $options = []): mixed { $value = $this->has($key) ? $this->all()[$key] : $default; diff --git a/src/Symfony/Component/HttpFoundation/RequestMatcher.php b/src/Symfony/Component/HttpFoundation/RequestMatcher.php index 91dcdd51cb262..4537172cf56d3 100644 --- a/src/Symfony/Component/HttpFoundation/RequestMatcher.php +++ b/src/Symfony/Component/HttpFoundation/RequestMatcher.php @@ -139,9 +139,6 @@ public function matchAttribute(string $key, string $regexp) $this->attributes[$key] = $regexp; } - /** - * {@inheritdoc} - */ public function matches(Request $request): bool { if ($this->schemes && !\in_array($request->getScheme(), $this->schemes, true)) { diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index 2e2717416f4fd..d8ae20b496953 100644 --- a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -65,9 +65,6 @@ public function allPreserveCaseWithoutCookies() return $headers; } - /** - * {@inheritdoc} - */ public function replace(array $headers = []) { $this->headerNames = []; @@ -83,9 +80,6 @@ public function replace(array $headers = []) } } - /** - * {@inheritdoc} - */ public function all(string $key = null): array { $headers = parent::all(); @@ -103,9 +97,6 @@ public function all(string $key = null): array return $headers; } - /** - * {@inheritdoc} - */ public function set(string $key, string|array|null $values, bool $replace = true) { $uniqueKey = strtr($key, self::UPPER, self::LOWER); @@ -134,9 +125,6 @@ public function set(string $key, string|array|null $values, bool $replace = true } } - /** - * {@inheritdoc} - */ public function remove(string $key) { $uniqueKey = strtr($key, self::UPPER, self::LOWER); @@ -159,17 +147,11 @@ public function remove(string $key) } } - /** - * {@inheritdoc} - */ public function hasCacheControlDirective(string $key): bool { return \array_key_exists($key, $this->computedCacheControl); } - /** - * {@inheritdoc} - */ public function getCacheControlDirective(string $key): bool|string|null { return $this->computedCacheControl[$key] ?? null; diff --git a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php index 11b884a717d6f..665961757982e 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php @@ -31,9 +31,6 @@ public function __construct(string $storageKey = '_sf2_attributes') $this->storageKey = $storageKey; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; @@ -44,57 +41,36 @@ public function setName(string $name) $this->name = $name; } - /** - * {@inheritdoc} - */ public function initialize(array &$attributes) { $this->attributes = &$attributes; } - /** - * {@inheritdoc} - */ public function getStorageKey(): string { return $this->storageKey; } - /** - * {@inheritdoc} - */ public function has(string $name): bool { return \array_key_exists($name, $this->attributes); } - /** - * {@inheritdoc} - */ public function get(string $name, mixed $default = null): mixed { return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } - /** - * {@inheritdoc} - */ public function set(string $name, mixed $value) { $this->attributes[$name] = $value; } - /** - * {@inheritdoc} - */ public function all(): array { return $this->attributes; } - /** - * {@inheritdoc} - */ public function replace(array $attributes) { $this->attributes = []; @@ -103,9 +79,6 @@ public function replace(array $attributes) } } - /** - * {@inheritdoc} - */ public function remove(string $name): mixed { $retval = null; @@ -117,9 +90,6 @@ public function remove(string $name): mixed return $retval; } - /** - * {@inheritdoc} - */ public function clear(): mixed { $return = $this->attributes; diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php index 9fea24f91eba6..00b1ac94866ce 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php @@ -30,9 +30,6 @@ public function __construct(string $storageKey = '_symfony_flashes') $this->storageKey = $storageKey; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; @@ -43,9 +40,6 @@ public function setName(string $name) $this->name = $name; } - /** - * {@inheritdoc} - */ public function initialize(array &$flashes) { $this->flashes = &$flashes; @@ -57,33 +51,21 @@ public function initialize(array &$flashes) $this->flashes['new'] = []; } - /** - * {@inheritdoc} - */ public function add(string $type, mixed $message) { $this->flashes['new'][$type][] = $message; } - /** - * {@inheritdoc} - */ public function peek(string $type, array $default = []): array { return $this->has($type) ? $this->flashes['display'][$type] : $default; } - /** - * {@inheritdoc} - */ public function peekAll(): array { return \array_key_exists('display', $this->flashes) ? $this->flashes['display'] : []; } - /** - * {@inheritdoc} - */ public function get(string $type, array $default = []): array { $return = $default; @@ -100,9 +82,6 @@ public function get(string $type, array $default = []): array return $return; } - /** - * {@inheritdoc} - */ public function all(): array { $return = $this->flashes['display']; @@ -111,49 +90,31 @@ public function all(): array return $return; } - /** - * {@inheritdoc} - */ public function setAll(array $messages) { $this->flashes['new'] = $messages; } - /** - * {@inheritdoc} - */ public function set(string $type, string|array $messages) { $this->flashes['new'][$type] = (array) $messages; } - /** - * {@inheritdoc} - */ public function has(string $type): bool { return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; } - /** - * {@inheritdoc} - */ public function keys(): array { return array_keys($this->flashes['display']); } - /** - * {@inheritdoc} - */ public function getStorageKey(): string { return $this->storageKey; } - /** - * {@inheritdoc} - */ public function clear(): mixed { return $this->all(); diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php index 4fa4644df7c3b..a30d9528d1ff8 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -30,9 +30,6 @@ public function __construct(string $storageKey = '_symfony_flashes') $this->storageKey = $storageKey; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; @@ -43,41 +40,26 @@ public function setName(string $name) $this->name = $name; } - /** - * {@inheritdoc} - */ public function initialize(array &$flashes) { $this->flashes = &$flashes; } - /** - * {@inheritdoc} - */ public function add(string $type, mixed $message) { $this->flashes[$type][] = $message; } - /** - * {@inheritdoc} - */ public function peek(string $type, array $default = []): array { return $this->has($type) ? $this->flashes[$type] : $default; } - /** - * {@inheritdoc} - */ public function peekAll(): array { return $this->flashes; } - /** - * {@inheritdoc} - */ public function get(string $type, array $default = []): array { if (!$this->has($type)) { @@ -91,9 +73,6 @@ public function get(string $type, array $default = []): array return $return; } - /** - * {@inheritdoc} - */ public function all(): array { $return = $this->peekAll(); @@ -102,49 +81,31 @@ public function all(): array return $return; } - /** - * {@inheritdoc} - */ public function set(string $type, string|array $messages) { $this->flashes[$type] = (array) $messages; } - /** - * {@inheritdoc} - */ public function setAll(array $messages) { $this->flashes = $messages; } - /** - * {@inheritdoc} - */ public function has(string $type): bool { return \array_key_exists($type, $this->flashes) && $this->flashes[$type]; } - /** - * {@inheritdoc} - */ public function keys(): array { return array_keys($this->flashes); } - /** - * {@inheritdoc} - */ public function getStorageKey(): string { return $this->storageKey; } - /** - * {@inheritdoc} - */ public function clear(): mixed { return $this->all(); diff --git a/src/Symfony/Component/HttpFoundation/Session/Session.php b/src/Symfony/Component/HttpFoundation/Session/Session.php index 33a915ba61b53..a55dde4821a96 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Session.php +++ b/src/Symfony/Component/HttpFoundation/Session/Session.php @@ -54,73 +54,46 @@ public function __construct(SessionStorageInterface $storage = null, AttributeBa $this->registerBag($flashes); } - /** - * {@inheritdoc} - */ public function start(): bool { return $this->storage->start(); } - /** - * {@inheritdoc} - */ public function has(string $name): bool { return $this->getAttributeBag()->has($name); } - /** - * {@inheritdoc} - */ public function get(string $name, mixed $default = null): mixed { return $this->getAttributeBag()->get($name, $default); } - /** - * {@inheritdoc} - */ public function set(string $name, mixed $value) { $this->getAttributeBag()->set($name, $value); } - /** - * {@inheritdoc} - */ public function all(): array { return $this->getAttributeBag()->all(); } - /** - * {@inheritdoc} - */ public function replace(array $attributes) { $this->getAttributeBag()->replace($attributes); } - /** - * {@inheritdoc} - */ public function remove(string $name): mixed { return $this->getAttributeBag()->remove($name); } - /** - * {@inheritdoc} - */ public function clear() { $this->getAttributeBag()->clear(); } - /** - * {@inheritdoc} - */ public function isStarted(): bool { return $this->storage->isStarted(); @@ -169,9 +142,6 @@ public function isEmpty(): bool return true; } - /** - * {@inheritdoc} - */ public function invalidate(int $lifetime = null): bool { $this->storage->clear(); @@ -179,33 +149,21 @@ public function invalidate(int $lifetime = null): bool return $this->migrate(true, $lifetime); } - /** - * {@inheritdoc} - */ public function migrate(bool $destroy = false, int $lifetime = null): bool { return $this->storage->regenerate($destroy, $lifetime); } - /** - * {@inheritdoc} - */ public function save() { $this->storage->save(); } - /** - * {@inheritdoc} - */ public function getId(): string { return $this->storage->getId(); } - /** - * {@inheritdoc} - */ public function setId(string $id) { if ($this->storage->getId() !== $id) { @@ -213,25 +171,16 @@ public function setId(string $id) } } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->storage->getName(); } - /** - * {@inheritdoc} - */ public function setName(string $name) { $this->storage->setName($name); } - /** - * {@inheritdoc} - */ public function getMetadataBag(): MetadataBag { ++$this->usageIndex; @@ -242,17 +191,11 @@ public function getMetadataBag(): MetadataBag return $this->storage->getMetadataBag(); } - /** - * {@inheritdoc} - */ public function registerBag(SessionBagInterface $bag) { $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex, $this->usageReporter)); } - /** - * {@inheritdoc} - */ public function getBag(string $name): SessionBagInterface { $bag = $this->storage->getBag($name); diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionBagProxy.php b/src/Symfony/Component/HttpFoundation/Session/SessionBagProxy.php index 76dfed724cee5..e759d94db5b06 100644 --- a/src/Symfony/Component/HttpFoundation/Session/SessionBagProxy.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionBagProxy.php @@ -54,17 +54,11 @@ public function isEmpty(): bool return empty($this->data[$this->bag->getStorageKey()]); } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->bag->getName(); } - /** - * {@inheritdoc} - */ public function initialize(array &$array): void { ++$this->usageIndex; @@ -77,17 +71,11 @@ public function initialize(array &$array): void $this->bag->initialize($array); } - /** - * {@inheritdoc} - */ public function getStorageKey(): string { return $this->bag->getStorageKey(); } - /** - * {@inheritdoc} - */ public function clear(): mixed { return $this->bag->clear(); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/IdentityMarshaller.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/IdentityMarshaller.php index bea3a323edb72..411a8d1f0f56b 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/IdentityMarshaller.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/IdentityMarshaller.php @@ -18,9 +18,6 @@ */ class IdentityMarshaller implements MarshallerInterface { - /** - * {@inheritdoc} - */ public function marshall(array $values, ?array &$failed): array { foreach ($values as $key => $value) { @@ -32,9 +29,6 @@ public function marshall(array $values, ?array &$failed): array return $values; } - /** - * {@inheritdoc} - */ public function unmarshall(string $value): string { return $value; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php index 3c908e7771f31..948033ea98a8e 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -59,9 +59,6 @@ public function close(): bool return $this->memcached->quit(); } - /** - * {@inheritdoc} - */ protected function doRead(string $sessionId): string { return $this->memcached->get($this->prefix.$sessionId) ?: ''; @@ -75,9 +72,6 @@ public function updateTimestamp(string $sessionId, string $data): bool return true; } - /** - * {@inheritdoc} - */ protected function doWrite(string $sessionId, string $data): bool { $ttl = ($this->ttl instanceof \Closure ? ($this->ttl)() : $this->ttl) ?? \ini_get('session.gc_maxlifetime'); @@ -85,9 +79,6 @@ protected function doWrite(string $sessionId, string $data): bool return $this->memcached->set($this->prefix.$sessionId, $data, time() + (int) $ttl); } - /** - * {@inheritdoc} - */ protected function doDestroy(string $sessionId): bool { $result = $this->memcached->delete($this->prefix.$sessionId); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index c955377770080..63c609ae21657 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -84,9 +84,6 @@ public function close(): bool return true; } - /** - * {@inheritdoc} - */ protected function doDestroy(string $sessionId): bool { $this->getCollection()->deleteOne([ @@ -103,9 +100,6 @@ public function gc(int $maxlifetime): int|false ])->getDeletedCount(); } - /** - * {@inheritdoc} - */ protected function doWrite(string $sessionId, string $data): bool { $ttl = ($this->ttl instanceof \Closure ? ($this->ttl)() : $this->ttl) ?? \ini_get('session.gc_maxlifetime'); @@ -142,9 +136,6 @@ public function updateTimestamp(string $sessionId, string $data): bool return true; } - /** - * {@inheritdoc} - */ protected function doRead(string $sessionId): string { $dbData = $this->getCollection()->findOne([ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php index fb2d363b67341..790ac2fedd8f5 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php @@ -28,9 +28,6 @@ public function validateId(string $sessionId): bool return true; } - /** - * {@inheritdoc} - */ protected function doRead(string $sessionId): string { return ''; @@ -41,17 +38,11 @@ public function updateTimestamp(string $sessionId, string $data): bool return true; } - /** - * {@inheritdoc} - */ protected function doWrite(string $sessionId, string $data): bool { return true; } - /** - * {@inheritdoc} - */ protected function doDestroy(string $sessionId): bool { return true; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index dd80145aaf020..6efdb07ff002b 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -256,9 +256,6 @@ public function gc(int $maxlifetime): int|false return 0; } - /** - * {@inheritdoc} - */ protected function doDestroy(string $sessionId): bool { // delete the record associated with this id @@ -277,9 +274,6 @@ protected function doDestroy(string $sessionId): bool return true; } - /** - * {@inheritdoc} - */ protected function doWrite(string $sessionId, string $data): bool { $maxlifetime = (int) (($this->ttl instanceof \Closure ? ($this->ttl)() : $this->ttl) ?? \ini_get('session.gc_maxlifetime')); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php index d4dc1b91a4eaf..59f15b8b2c78c 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php @@ -53,17 +53,11 @@ public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInter $this->ttl = $options['ttl'] ?? null; } - /** - * {@inheritdoc} - */ protected function doRead(string $sessionId): string { return $this->redis->get($this->prefix.$sessionId) ?: ''; } - /** - * {@inheritdoc} - */ protected function doWrite(string $sessionId, string $data): bool { $ttl = ($this->ttl instanceof \Closure ? ($this->ttl)() : $this->ttl) ?? \ini_get('session.gc_maxlifetime'); @@ -72,9 +66,6 @@ protected function doWrite(string $sessionId, string $data): bool return $result && !$result instanceof ErrorInterface; } - /** - * {@inheritdoc} - */ protected function doDestroy(string $sessionId): bool { static $unlink = true; @@ -94,9 +85,6 @@ protected function doDestroy(string $sessionId): bool return true; } - /** - * {@inheritdoc} - */ #[\ReturnTypeWillChange] public function close(): bool { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php index f507d926935ae..1a163648155d1 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php @@ -47,9 +47,6 @@ public function open(string $savePath, string $sessionName): bool return $this->handler->open($savePath, $sessionName); } - /** - * {@inheritdoc} - */ protected function doRead(string $sessionId): string { return $this->handler->read($sessionId); @@ -60,9 +57,6 @@ public function updateTimestamp(string $sessionId, string $data): bool return $this->write($sessionId, $data); } - /** - * {@inheritdoc} - */ protected function doWrite(string $sessionId, string $data): bool { return $this->handler->write($sessionId, $data); @@ -76,9 +70,6 @@ public function destroy(string $sessionId): bool return $this->doDestroy ? $this->doDestroy($sessionId) : $destroyed; } - /** - * {@inheritdoc} - */ protected function doDestroy(string $sessionId): bool { $this->doDestroy = false; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php index 63bb93a9b6cdc..f2be617ce59d1 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php @@ -51,9 +51,6 @@ public function __construct(string $storageKey = '_sf2_meta', int $updateThresho $this->updateThreshold = $updateThreshold; } - /** - * {@inheritdoc} - */ public function initialize(array &$array) { $this->meta = &$array; @@ -91,9 +88,6 @@ public function stampNew(int $lifetime = null) $this->stampCreated($lifetime); } - /** - * {@inheritdoc} - */ public function getStorageKey(): string { return $this->storageKey; @@ -119,18 +113,12 @@ public function getLastUsed(): int return $this->lastUsed; } - /** - * {@inheritdoc} - */ public function clear(): mixed { // nothing to do return null; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php index 8495f8ff5fb4c..2a98eeb5bb89e 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php @@ -73,9 +73,6 @@ public function setSessionData(array $array) $this->data = $array; } - /** - * {@inheritdoc} - */ public function start(): bool { if ($this->started) { @@ -91,9 +88,6 @@ public function start(): bool return true; } - /** - * {@inheritdoc} - */ public function regenerate(bool $destroy = false, int $lifetime = null): bool { if (!$this->started) { @@ -106,17 +100,11 @@ public function regenerate(bool $destroy = false, int $lifetime = null): bool return true; } - /** - * {@inheritdoc} - */ public function getId(): string { return $this->id; } - /** - * {@inheritdoc} - */ public function setId(string $id) { if ($this->started) { @@ -126,25 +114,16 @@ public function setId(string $id) $this->id = $id; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; } - /** - * {@inheritdoc} - */ public function setName(string $name) { $this->name = $name; } - /** - * {@inheritdoc} - */ public function save() { if (!$this->started || $this->closed) { @@ -155,9 +134,6 @@ public function save() $this->started = false; } - /** - * {@inheritdoc} - */ public function clear() { // clear out the bags @@ -172,17 +148,11 @@ public function clear() $this->loadSession(); } - /** - * {@inheritdoc} - */ public function registerBag(SessionBagInterface $bag) { $this->bags[$bag->getName()] = $bag; } - /** - * {@inheritdoc} - */ public function getBag(string $name): SessionBagInterface { if (!isset($this->bags[$name])) { @@ -196,9 +166,6 @@ public function getBag(string $name): SessionBagInterface return $this->bags[$name]; } - /** - * {@inheritdoc} - */ public function isStarted(): bool { return $this->started; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php index d5fbd52afee76..6fecb66cdca50 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php @@ -45,9 +45,6 @@ public function __construct(string $savePath = null, string $name = 'MOCKSESSID' parent::__construct($name, $metaBag); } - /** - * {@inheritdoc} - */ public function start(): bool { if ($this->started) { @@ -65,9 +62,6 @@ public function start(): bool return true; } - /** - * {@inheritdoc} - */ public function regenerate(bool $destroy = false, int $lifetime = null): bool { if (!$this->started) { @@ -81,9 +75,6 @@ public function regenerate(bool $destroy = false, int $lifetime = null): bool return parent::regenerate($destroy, $lifetime); } - /** - * {@inheritdoc} - */ public function save() { if (!$this->started) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index b281a809c585b..d80e7436191d8 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -118,9 +118,6 @@ public function getSaveHandler(): AbstractProxy|\SessionHandlerInterface return $this->saveHandler; } - /** - * {@inheritdoc} - */ public function start(): bool { if ($this->started) { @@ -181,41 +178,26 @@ public function start(): bool return true; } - /** - * {@inheritdoc} - */ public function getId(): string { return $this->saveHandler->getId(); } - /** - * {@inheritdoc} - */ public function setId(string $id) { $this->saveHandler->setId($id); } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->saveHandler->getName(); } - /** - * {@inheritdoc} - */ public function setName(string $name) { $this->saveHandler->setName($name); } - /** - * {@inheritdoc} - */ public function regenerate(bool $destroy = false, int $lifetime = null): bool { // Cannot regenerate the session ID for non-active sessions. @@ -240,9 +222,6 @@ public function regenerate(bool $destroy = false, int $lifetime = null): bool return session_regenerate_id($destroy); } - /** - * {@inheritdoc} - */ public function save() { // Store a copy so we can restore the bags in case the session was not left empty @@ -282,9 +261,6 @@ public function save() $this->started = false; } - /** - * {@inheritdoc} - */ public function clear() { // clear out the bags @@ -299,9 +275,6 @@ public function clear() $this->loadSession(); } - /** - * {@inheritdoc} - */ public function registerBag(SessionBagInterface $bag) { if ($this->started) { @@ -311,9 +284,6 @@ public function registerBag(SessionBagInterface $bag) $this->bags[$bag->getName()] = $bag; } - /** - * {@inheritdoc} - */ public function getBag(string $name): SessionBagInterface { if (!isset($this->bags[$name])) { @@ -346,9 +316,6 @@ public function getMetadataBag(): MetadataBag return $this->metadataBag; } - /** - * {@inheritdoc} - */ public function isStarted(): bool { return $this->started; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php index 276ed318a7609..eed748f811eb7 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php @@ -30,9 +30,6 @@ public function __construct(AbstractProxy|\SessionHandlerInterface $handler = nu $this->setSaveHandler($handler); } - /** - * {@inheritdoc} - */ public function start(): bool { if ($this->started) { @@ -44,9 +41,6 @@ public function start(): bool return true; } - /** - * {@inheritdoc} - */ public function clear() { // clear out the bags and nothing else that may be set diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index 366e273716c2c..cb893d861994e 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -57,8 +57,6 @@ public function setCallback(callable $callback): static } /** - * {@inheritdoc} - * * This method only sends the headers once. * * @return $this @@ -75,8 +73,6 @@ public function sendHeaders(): static } /** - * {@inheritdoc} - * * This method only sends the content once. * * @return $this @@ -99,8 +95,6 @@ public function sendContent(): static } /** - * {@inheritdoc} - * * @throws \LogicException when the content is not null * * @return $this @@ -116,9 +110,6 @@ public function setContent(?string $content): static return $this; } - /** - * {@inheritdoc} - */ public function getContent(): string|false { return false; diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/RequestAttributeValueSame.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/RequestAttributeValueSame.php index 534c1d1388ec1..6e11426814876 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/RequestAttributeValueSame.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/RequestAttributeValueSame.php @@ -25,9 +25,6 @@ public function __construct(string $name, string $value) $this->value = $value; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has attribute "%s" with value "%s"', $this->name, $this->value); @@ -35,8 +32,6 @@ public function toString(): string /** * @param Request $request - * - * {@inheritdoc} */ protected function matches($request): bool { @@ -45,8 +40,6 @@ protected function matches($request): bool /** * @param Request $request - * - * {@inheritdoc} */ protected function failureDescription($request): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseCookieValueSame.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseCookieValueSame.php index db1e733dce18f..ca01d2745bf4d 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseCookieValueSame.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseCookieValueSame.php @@ -30,9 +30,6 @@ public function __construct(string $name, string $value, string $path = '/', str $this->domain = $domain; } - /** - * {@inheritdoc} - */ public function toString(): string { $str = sprintf('has cookie "%s"', $this->name); @@ -49,8 +46,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -64,8 +59,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseFormatSame.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseFormatSame.php index 765849960e647..b14dcee947870 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseFormatSame.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseFormatSame.php @@ -31,9 +31,6 @@ public function __construct(Request $request, ?string $format) $this->format = $format; } - /** - * {@inheritdoc} - */ public function toString(): string { return 'format is '.($this->format ?? 'null'); @@ -41,8 +38,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -51,8 +46,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { @@ -61,8 +54,6 @@ protected function failureDescription($response): string /** * @param Response $response - * - * {@inheritdoc} */ protected function additionalFailureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasCookie.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasCookie.php index 47a091b08e0b7..9b15aeae83785 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasCookie.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasCookie.php @@ -28,9 +28,6 @@ public function __construct(string $name, string $path = '/', string $domain = n $this->domain = $domain; } - /** - * {@inheritdoc} - */ public function toString(): string { $str = sprintf('has cookie "%s"', $this->name); @@ -46,8 +43,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -56,8 +51,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasHeader.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasHeader.php index 1e028976efa71..08522c89c0720 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasHeader.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHasHeader.php @@ -23,9 +23,6 @@ public function __construct(string $headerName) $this->headerName = $headerName; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has header "%s"', $this->headerName); @@ -33,8 +30,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -43,8 +38,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHeaderSame.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHeaderSame.php index dc96bec809800..8141df9722b64 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHeaderSame.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseHeaderSame.php @@ -25,9 +25,6 @@ public function __construct(string $headerName, string $expectedValue) $this->expectedValue = $expectedValue; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue); @@ -35,8 +32,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -45,8 +40,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsRedirected.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsRedirected.php index 8c4b883f0b076..bb0e53d0e6cd8 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsRedirected.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsRedirected.php @@ -16,9 +16,6 @@ final class ResponseIsRedirected extends Constraint { - /** - * {@inheritdoc} - */ public function toString(): string { return 'is redirected'; @@ -26,8 +23,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -36,8 +31,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { @@ -46,8 +39,6 @@ protected function failureDescription($response): string /** * @param Response $response - * - * {@inheritdoc} */ protected function additionalFailureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsSuccessful.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsSuccessful.php index 9c665589072b7..2c6b768061268 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsSuccessful.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsSuccessful.php @@ -16,9 +16,6 @@ final class ResponseIsSuccessful extends Constraint { - /** - * {@inheritdoc} - */ public function toString(): string { return 'is successful'; @@ -26,8 +23,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -36,8 +31,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { @@ -46,8 +39,6 @@ protected function failureDescription($response): string /** * @param Response $response - * - * {@inheritdoc} */ protected function additionalFailureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsUnprocessable.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsUnprocessable.php index 880c7818bbd60..52336a5b25dbc 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsUnprocessable.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseIsUnprocessable.php @@ -16,9 +16,6 @@ final class ResponseIsUnprocessable extends Constraint { - /** - * {@inheritdoc} - */ public function toString(): string { return 'is unprocessable'; @@ -26,8 +23,6 @@ public function toString(): string /** * @param Response $other - * - * {@inheritdoc} */ protected function matches($other): bool { @@ -36,8 +31,6 @@ protected function matches($other): bool /** * @param Response $other - * - * {@inheritdoc} */ protected function failureDescription($other): string { @@ -46,8 +39,6 @@ protected function failureDescription($other): string /** * @param Response $other - * - * {@inheritdoc} */ protected function additionalFailureDescription($other): string { diff --git a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseStatusCodeSame.php b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseStatusCodeSame.php index 8d2ce1228a9d6..cd565ba987b64 100644 --- a/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseStatusCodeSame.php +++ b/src/Symfony/Component/HttpFoundation/Test/Constraint/ResponseStatusCodeSame.php @@ -23,9 +23,6 @@ public function __construct(int $statusCode) $this->statusCode = $statusCode; } - /** - * {@inheritdoc} - */ public function toString(): string { return 'status code is '.$this->statusCode; @@ -33,8 +30,6 @@ public function toString(): string /** * @param Response $response - * - * {@inheritdoc} */ protected function matches($response): bool { @@ -43,8 +38,6 @@ protected function matches($response): bool /** * @param Response $response - * - * {@inheritdoc} */ protected function failureDescription($response): string { @@ -53,8 +46,6 @@ protected function failureDescription($response): string /** * @param Response $response - * - * {@inheritdoc} */ protected function additionalFailureDescription($response): string { diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/common.inc b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/common.inc index 397f8fc7eb5f9..6dd53efd93970 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/common.inc +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/common.inc @@ -76,9 +76,6 @@ class TestSessionHandler extends AbstractSessionHandler return parent::validateId($sessionId); } - /** - * {@inheritdoc} - */ public function read(string $sessionId): string { echo __FUNCTION__, "\n"; @@ -86,9 +83,6 @@ class TestSessionHandler extends AbstractSessionHandler return parent::read($sessionId); } - /** - * {@inheritdoc} - */ public function updateTimestamp($sessionId, $data): bool { echo __FUNCTION__, "\n"; @@ -96,9 +90,6 @@ class TestSessionHandler extends AbstractSessionHandler return true; } - /** - * {@inheritdoc} - */ public function write(string $sessionId, string $data): bool { echo __FUNCTION__, "\n"; @@ -106,9 +97,6 @@ class TestSessionHandler extends AbstractSessionHandler return parent::write($sessionId, $data); } - /** - * {@inheritdoc} - */ public function destroy(string $sessionId): bool { echo __FUNCTION__, "\n"; diff --git a/src/Symfony/Component/HttpKernel/Bundle/AbstractBundle.php b/src/Symfony/Component/HttpKernel/Bundle/AbstractBundle.php index 244f3ec32b0b2..d24a2bc7888d8 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/AbstractBundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/AbstractBundle.php @@ -48,9 +48,6 @@ public function getContainerExtension(): ?ExtensionInterface return $this->extension ??= new BundleExtension($this, $this->extensionAlias); } - /** - * {@inheritdoc} - */ public function getPath(): string { if (null === $this->path) { diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index 5ce7f28d418dc..390e6cfb217be 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -31,23 +31,15 @@ abstract class Bundle implements BundleInterface protected $path; private string $namespace; - /** - * {@inheritdoc} - */ public function boot() { } - /** - * {@inheritdoc} - */ public function shutdown() { } /** - * {@inheritdoc} - * * This method can be overridden to register compilation passes, * other extensions, ... */ @@ -87,9 +79,6 @@ public function getContainerExtension(): ?ExtensionInterface return $this->extension ?: null; } - /** - * {@inheritdoc} - */ public function getNamespace(): string { if (!isset($this->namespace)) { @@ -99,9 +88,6 @@ public function getNamespace(): string return $this->namespace; } - /** - * {@inheritdoc} - */ public function getPath(): string { if (null === $this->path) { diff --git a/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php b/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php index 61e776c33ab92..8ce77e2b74293 100644 --- a/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php +++ b/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php @@ -30,9 +30,6 @@ public function __construct(iterable $clearers = []) $this->clearers = $clearers; } - /** - * {@inheritdoc} - */ public function clear(string $cacheDir) { foreach ($this->clearers as $clearer) { diff --git a/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php b/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php index 8578940f4ba9c..054f77bc22b3e 100644 --- a/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php +++ b/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php @@ -57,9 +57,6 @@ public function clearPool(string $name): bool return $this->pools[$name]->clear(); } - /** - * {@inheritdoc} - */ public function clear(string $cacheDir) { foreach ($this->pools as $pool) { diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php index a3ff54b8d97e6..af0a2d13d1a26 100644 --- a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php +++ b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php @@ -46,9 +46,6 @@ public function enableOnlyOptionalWarmers() $this->onlyOptionalsEnabled = $this->optionalsEnabled = true; } - /** - * {@inheritdoc} - */ public function warmUp(string $cacheDir): array { if ($collectDeprecations = $this->debug && !\defined('PHPUNIT_COMPOSER_INSTALL')) { @@ -116,9 +113,6 @@ public function warmUp(string $cacheDir): array return array_values(array_unique(array_merge([], ...$preload))); } - /** - * {@inheritdoc} - */ public function isOptional(): bool { return false; diff --git a/src/Symfony/Component/HttpKernel/Config/FileLocator.php b/src/Symfony/Component/HttpKernel/Config/FileLocator.php index e2a460eccd0ac..f81f91925bbe5 100644 --- a/src/Symfony/Component/HttpKernel/Config/FileLocator.php +++ b/src/Symfony/Component/HttpKernel/Config/FileLocator.php @@ -30,9 +30,6 @@ public function __construct(KernelInterface $kernel) parent::__construct(); } - /** - * {@inheritdoc} - */ public function locate(string $file, string $currentPath = null, bool $first = true): string|array { if (isset($file[0]) && '@' === $file[0]) { diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php index 6d961318ddb98..cf690aa9291be 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php @@ -40,9 +40,6 @@ public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFa $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); } - /** - * {@inheritdoc} - */ public function getArguments(Request $request, callable $controller): array { $arguments = []; diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php index d310fee19aaa5..85dee3225e03f 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php @@ -36,9 +36,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return is_a($argument->getType(), \DateTimeInterface::class, true) && $request->attributes->has($argument->getName()); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { if (!is_a($argument->getType(), \DateTimeInterface::class, true) || !$request->attributes->has($argument->getName())) { diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php index 01d8cf9255290..eb9769c09ab17 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php @@ -33,9 +33,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return $argument->hasDefaultValue() || (null !== $argument->getType() && $argument->isNullable() && !$argument->isVariadic()); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { if ($argument->hasDefaultValue()) { diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php index 7b8293ab4ff4b..006ab29d46e04 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php @@ -58,9 +58,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return false === $this->container->has($controller); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { $controller = $request->attributes->get('_controller'); diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php index 2362e0b8c9110..370e414451d21 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php @@ -33,9 +33,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return !$argument->isVariadic() && $request->attributes->has($argument->getName()); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { return !$argument->isVariadic() && $request->attributes->has($argument->getName()) ? [$request->attributes->get($argument->getName())] : []; diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php index 01781430b69d9..6347f70196681 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php @@ -33,9 +33,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { return Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class) ? [$request] : []; diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php index a540f160f7554..96e0337d6ac3e 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/ServiceValueResolver.php @@ -58,9 +58,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return $this->container->has($controller) && $this->container->get($controller)->has($argument->getName()); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { $controller = $request->attributes->get('_controller'); diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php index d8b4fb5c00daa..c8e7575d5397a 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/SessionValueResolver.php @@ -43,9 +43,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return $request->getSession() instanceof $type; } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { if (!$request->hasSession()) { diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php index b16f8efa5bb4a..2b9e71cb3beba 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php @@ -54,9 +54,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return $return; } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): iterable { $method = \get_class($this->inner).'::'.__FUNCTION__; diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php index c7b1f8a43d266..437b770a70edf 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/UidValueResolver.php @@ -33,9 +33,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool && is_subclass_of($argument->getType(), AbstractUid::class, true); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { if ($argument->isVariadic() diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php index cf89d4feaf00d..4f6cba729e2f6 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php @@ -33,9 +33,6 @@ public function supports(Request $request, ArgumentMetadata $argument): bool return $argument->isVariadic() && $request->attributes->has($argument->getName()); } - /** - * {@inheritdoc} - */ public function resolve(Request $request, ArgumentMetadata $argument): array { if (!$argument->isVariadic() || !$request->attributes->has($argument->getName())) { diff --git a/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php index 1a0605de18d0c..6930738a28e31 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php @@ -32,9 +32,6 @@ public function __construct(ContainerInterface $container, LoggerInterface $logg parent::__construct($logger); } - /** - * {@inheritdoc} - */ protected function instantiateController(string $class): object { $class = ltrim($class, '\\'); diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php index c71d38e3d60a9..4a08041f33775 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -30,9 +30,6 @@ public function __construct(LoggerInterface $logger = null) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getController(Request $request): callable|false { if (!$controller = $request->attributes->get('_controller')) { diff --git a/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php b/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php index 585c1147241f2..57bc74417291f 100644 --- a/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php @@ -28,9 +28,6 @@ public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stop $this->stopwatch = $stopwatch; } - /** - * {@inheritdoc} - */ public function getArguments(Request $request, callable $controller): array { $e = $this->stopwatch->start('controller.get_arguments'); diff --git a/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php index c485dd12772d0..9e98513972281 100644 --- a/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php @@ -28,9 +28,6 @@ public function __construct(ControllerResolverInterface $resolver, Stopwatch $st $this->stopwatch = $stopwatch; } - /** - * {@inheritdoc} - */ public function getController(Request $request): callable|false { $e = $this->stopwatch->start('controller.get_callable'); diff --git a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php index de5c00011a684..5022180e77c62 100644 --- a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -18,9 +18,6 @@ */ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface { - /** - * {@inheritdoc} - */ public function createArgumentMetadata(string|object|array $controller, \ReflectionClass $class = null, \ReflectionFunctionAbstract $reflection = null): array { $arguments = []; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 02a89d6cd82d1..3b7ff410f6a31 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -34,9 +34,6 @@ public function setKernel(KernelInterface $kernel = null) $this->kernel = $kernel; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE); @@ -75,9 +72,6 @@ public function collect(Request $request, Response $response, \Throwable $except } } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; @@ -239,9 +233,6 @@ public function getSapiName(): string return $this->data['sapi_name']; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'config'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php index 18c074d85b054..0c122e6cff71b 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php @@ -38,9 +38,6 @@ public function __construct(EventDispatcherInterface $dispatcher = null, Request $this->requestStack = $requestStack; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; @@ -121,9 +118,6 @@ public function getOrphanedEvents(): array|Data return $this->data['orphaned_events']; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'events'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php index 382e2dc40df9a..dbe24b414eb60 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php @@ -22,9 +22,6 @@ */ class ExceptionDataCollector extends DataCollector { - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { if (null !== $exception) { @@ -34,9 +31,6 @@ public function collect(Request $request, Response $response, \Throwable $except } } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; @@ -72,9 +66,6 @@ public function getTrace(): array return $this->data['exception']->getTrace(); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'exception'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php index bbc9321320ae8..661b84e0ade9c 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php @@ -40,17 +40,11 @@ public function __construct(object $logger = null, string $containerPathPrefix = $this->requestStack = $requestStack; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; } - /** - * {@inheritdoc} - */ public function reset() { if (isset($this->logger)) { @@ -59,9 +53,6 @@ public function reset() $this->data = []; } - /** - * {@inheritdoc} - */ public function lateCollect() { if (isset($this->logger)) { @@ -187,9 +178,6 @@ public function getCompilerLogs() return $this->cloneVar($this->getContainerCompilerLogs($this->data['compiler_logs_filepath'] ?? null)); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'logger'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php index bf98efca8005c..474b5bf3fee21 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php @@ -26,17 +26,11 @@ public function __construct() $this->reset(); } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->updateMemoryUsage(); } - /** - * {@inheritdoc} - */ public function reset() { $this->data = [ @@ -45,9 +39,6 @@ public function reset() ]; } - /** - * {@inheritdoc} - */ public function lateCollect() { $this->updateMemoryUsage(); @@ -68,9 +59,6 @@ public function updateMemoryUsage() $this->data['memory'] = memory_get_peak_usage(true); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'memory'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index 1e819b0d1fe69..a406f9b5e5710 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -44,9 +44,6 @@ public function __construct(RequestStack $requestStack = null) $this->requestStack = $requestStack; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { // attributes are serialized and as they can be anything, they need to be converted to strings. @@ -391,9 +388,6 @@ public static function getSubscribedEvents(): array ]; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'request'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php index 7cecceeaf85ba..3c9f2142f493d 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php @@ -32,8 +32,6 @@ public function __construct() } /** - * {@inheritdoc} - * * @final */ public function collect(Request $request, Response $response, \Throwable $exception = null) @@ -92,9 +90,6 @@ public function getTargetRoute(): ?string return $this->data['route']; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'router'; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php index f3b8a50e2dd03..1a4169a6d9f34 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php @@ -33,9 +33,6 @@ public function __construct(KernelInterface $kernel = null, Stopwatch $stopwatch $this->stopwatch = $stopwatch; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { if (null !== $this->kernel) { @@ -52,9 +49,6 @@ public function collect(Request $request, Response $response, \Throwable $except ]; } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; @@ -62,9 +56,6 @@ public function reset() $this->stopwatch?->reset(); } - /** - * {@inheritdoc} - */ public function lateCollect() { if (null !== $this->stopwatch && isset($this->data['token'])) { @@ -131,9 +122,6 @@ public function isStopwatchInstalled(): bool return $this->data['stopwatch_installed']; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'time'; diff --git a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php index 98e54cba56c67..dff3bc9474ab2 100644 --- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -23,9 +23,6 @@ */ class TraceableEventDispatcher extends BaseTraceableEventDispatcher { - /** - * {@inheritdoc} - */ protected function beforeDispatch(string $eventName, object $event) { switch ($eventName) { @@ -58,9 +55,6 @@ protected function beforeDispatch(string $eventName, object $event) } } - /** - * {@inheritdoc} - */ protected function afterDispatch(string $eventName, object $event) { switch ($eventName) { diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php index 0cbce9b2dff09..9b691d26ef9d9 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php @@ -31,9 +31,6 @@ public function __construct(Kernel $kernel) $this->kernel = $kernel; } - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $annotatedClasses = []; diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php index 072c35f1c1cc6..8401dd4e8c03c 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php @@ -27,9 +27,6 @@ */ abstract class ConfigurableExtension extends Extension { - /** - * {@inheritdoc} - */ final public function load(array $configs, ContainerBuilder $container) { $this->loadInternal($this->processConfiguration($this->getConfiguration($configs, $container), $configs), $container); diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php b/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php index d6f5905d17fda..944b5d0bc763f 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -37,9 +37,6 @@ public function __construct(ContainerInterface $container, RequestStack $request parent::__construct($requestStack, [], $debug); } - /** - * {@inheritdoc} - */ public function render(string|ControllerReference $uri, string $renderer = 'inline', array $options = []): ?string { if (!isset($this->initialized[$renderer]) && $this->container->has($renderer)) { diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php index b6df1f6e614c8..b14e4df87c380 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php @@ -23,9 +23,6 @@ */ class LoggerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $container->setAlias(LoggerInterface::class, 'logger') diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php index bca6f2baf830a..8418b4da4a68e 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php @@ -23,9 +23,6 @@ */ class ResettableServicePass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->has('services_resetter')) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php b/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php index 7e1932e4f1c53..c3fc3fb657229 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php @@ -42,9 +42,6 @@ public function onKernelRequest(RequestEvent $event) } } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [KernelEvents::REQUEST => ['onKernelRequest', 100]]; diff --git a/src/Symfony/Component/HttpKernel/EventListener/DisallowRobotsIndexingListener.php b/src/Symfony/Component/HttpKernel/EventListener/DisallowRobotsIndexingListener.php index ca60878baf5ec..9631096f535e6 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/DisallowRobotsIndexingListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/DisallowRobotsIndexingListener.php @@ -31,9 +31,6 @@ public function onResponse(ResponseEvent $event): void } } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php b/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php index caa0f32aab508..e2501c57773a5 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php @@ -41,9 +41,6 @@ public function onKernelRequest(RequestEvent $event) $request->getHost(); } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php index 4af69778a0b92..24c1b4e8f3549 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php @@ -42,8 +42,6 @@ public function __construct(SurrogateInterface $surrogate = null, FragmentRender } /** - * {@inheritdoc} - * * Note that if the current Request has no surrogate capability, this method * falls back to use the inline rendering strategy. * diff --git a/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php index 76f74a84363a4..da4c34add4378 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php @@ -18,9 +18,6 @@ */ class EsiFragmentRenderer extends AbstractSurrogateFragmentRenderer { - /** - * {@inheritdoc} - */ public function getName(): string { return 'esi'; diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentUriGenerator.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentUriGenerator.php index b561a16f170b4..6d9a1311b746f 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentUriGenerator.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentUriGenerator.php @@ -35,9 +35,6 @@ public function __construct(string $fragmentPath, UriSigner $signer = null, Requ $this->requestStack = $requestStack; } - /** - * {@inheritDoc} - */ public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string { if (null === $request && (null === $this->requestStack || null === $request = $this->requestStack->getCurrentRequest())) { diff --git a/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php index a004f4d2b47d1..ee99f859774bf 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php @@ -49,8 +49,6 @@ public function hasTemplating(): bool } /** - * {@inheritdoc} - * * Additional available options: * * * default: The default content (it can be a template name or the content) @@ -92,9 +90,6 @@ public function render(string|ControllerReference $uri, Request $request, array return new Response(sprintf('%s', $uri, $renderedAttributes, $content)); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'hinclude'; diff --git a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php index 7201da1dd60ad..d0c17ffd87de4 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php @@ -37,8 +37,6 @@ public function __construct(HttpKernelInterface $kernel, EventDispatcherInterfac } /** - * {@inheritdoc} - * * Additional available options: * * * alt: an alternative URI to render in case of an error @@ -135,9 +133,6 @@ protected function createSubRequest(string $uri, Request $request) return $subRequest; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'inline'; diff --git a/src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php index 1f19dcfd3661f..6319bcd831d4d 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php @@ -18,9 +18,6 @@ */ class SsiFragmentRenderer extends AbstractSurrogateFragmentRenderer { - /** - * {@inheritdoc} - */ public function getName(): string { return 'ssi'; diff --git a/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php b/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php index 4e03c76bdbaec..ca01a9240b373 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php @@ -46,9 +46,6 @@ public function createCacheStrategy(): ResponseCacheStrategyInterface return new ResponseCacheStrategy(); } - /** - * {@inheritdoc} - */ public function hasSurrogateCapability(Request $request): bool { if (null === $value = $request->headers->get('Surrogate-Capability')) { @@ -58,9 +55,6 @@ public function hasSurrogateCapability(Request $request): bool return str_contains($value, sprintf('%s/1.0', strtoupper($this->getName()))); } - /** - * {@inheritdoc} - */ public function addSurrogateCapability(Request $request) { $current = $request->headers->get('Surrogate-Capability'); @@ -69,9 +63,6 @@ public function addSurrogateCapability(Request $request) $request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new); } - /** - * {@inheritdoc} - */ public function needsParsing(Response $response): bool { if (!$control = $response->headers->get('Surrogate-Control')) { @@ -83,9 +74,6 @@ public function needsParsing(Response $response): bool return (bool) preg_match($pattern, $control); } - /** - * {@inheritdoc} - */ public function handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors): string { $subRequest = Request::create($uri, Request::METHOD_GET, [], $cache->getRequest()->cookies->all(), [], $cache->getRequest()->server->all()); diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php index 1ab423812e587..9e7c3f898ab83 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -32,9 +32,6 @@ public function getName(): string return 'esi'; } - /** - * {@inheritdoc} - */ public function addSurrogateControl(Response $response) { if (str_contains($response->getContent(), '', @@ -60,9 +54,6 @@ public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreEr return $html; } - /** - * {@inheritdoc} - */ public function process(Request $request, Response $response): Response { $type = $response->headers->get('Content-Type'); diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index d97064da8b360..75fb12dba5b4e 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -183,9 +183,6 @@ public function getSurrogate(): SurrogateInterface return $this->surrogate; } - /** - * {@inheritdoc} - */ public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism @@ -239,9 +236,6 @@ public function handle(Request $request, int $type = HttpKernelInterface::MAIN_R return $response; } - /** - * {@inheritdoc} - */ public function terminate(Request $request, Response $response) { // Do not call any listeners in case of a cache hit. diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php index 6ae9c299479be..e579248c8d4c2 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php @@ -54,9 +54,6 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface 'expires' => null, ]; - /** - * {@inheritdoc} - */ public function add(Response $response) { ++$this->embeddedResponses; @@ -98,9 +95,6 @@ public function add(Response $response) } } - /** - * {@inheritdoc} - */ public function update(Response $response) { // if we have no embedded Response, do nothing diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php b/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php index 48907c27156fd..4bd1cef0a7885 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php @@ -21,17 +21,11 @@ */ class Ssi extends AbstractSurrogate { - /** - * {@inheritdoc} - */ public function getName(): string { return 'ssi'; } - /** - * {@inheritdoc} - */ public function addSurrogateControl(Response $response) { if (str_contains($response->getContent(), '', $uri); } - /** - * {@inheritdoc} - */ public function process(Request $request, Response $response): Response { $type = $response->headers->get('Content-Type'); diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index 41e1700e4e8ce..d1069a6238138 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -68,9 +68,6 @@ public function __construct(EventDispatcherInterface $dispatcher, ControllerReso } } - /** - * {@inheritdoc} - */ public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); @@ -95,9 +92,6 @@ public function handle(Request $request, int $type = HttpKernelInterface::MAIN_R } } - /** - * {@inheritdoc} - */ public function terminate(Request $request, Response $response) { $this->dispatcher->dispatch(new TerminateEvent($this, $request, $response), KernelEvents::TERMINATE); diff --git a/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php b/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php index 1557da575a9c0..0938617169bc1 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php +++ b/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php @@ -54,8 +54,6 @@ public function catchExceptions(bool $catchExceptions) } /** - * {@inheritdoc} - * * @param Request $request * * @return Response @@ -72,8 +70,6 @@ protected function doRequest(object $request) } /** - * {@inheritdoc} - * * @param Request $request * * @return string @@ -127,9 +123,6 @@ protected function getHandleScript() EOF; } - /** - * {@inheritdoc} - */ protected function filterRequest(DomRequest $request): Request { $httpRequest = Request::create($request->getUri(), $request->getMethod(), $request->getParameters(), $request->getCookies(), $request->getFiles(), $server = $request->getServer(), $request->getContent()); @@ -186,8 +179,6 @@ protected function filterFiles(array $files): array } /** - * {@inheritdoc} - * * @param Response $response */ protected function filterResponse(object $response): DomResponse diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 763e032b96d68..8210e0e308577 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -102,9 +102,6 @@ public function __clone() $this->resetServices = false; } - /** - * {@inheritdoc} - */ public function boot() { if (true === $this->booted) { @@ -133,9 +130,6 @@ public function boot() $this->booted = true; } - /** - * {@inheritdoc} - */ public function reboot(?string $warmupDir) { $this->shutdown(); @@ -143,9 +137,6 @@ public function reboot(?string $warmupDir) $this->boot(); } - /** - * {@inheritdoc} - */ public function terminate(Request $request, Response $response) { if (false === $this->booted) { @@ -157,9 +148,6 @@ public function terminate(Request $request, Response $response) } } - /** - * {@inheritdoc} - */ public function shutdown() { if (false === $this->booted) { @@ -178,9 +166,6 @@ public function shutdown() $this->resetServices = false; } - /** - * {@inheritdoc} - */ public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { if (!$this->booted) { @@ -210,17 +195,11 @@ protected function getHttpKernel(): HttpKernelInterface return $this->container->get('http_kernel'); } - /** - * {@inheritdoc} - */ public function getBundles(): array { return $this->bundles; } - /** - * {@inheritdoc} - */ public function getBundle(string $name): BundleInterface { if (!isset($this->bundles[$name])) { @@ -230,9 +209,6 @@ public function getBundle(string $name): BundleInterface return $this->bundles[$name]; } - /** - * {@inheritdoc} - */ public function locateResource(string $name): string { if ('@' !== $name[0]) { @@ -257,17 +233,11 @@ public function locateResource(string $name): string throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name)); } - /** - * {@inheritdoc} - */ public function getEnvironment(): string { return $this->environment; } - /** - * {@inheritdoc} - */ public function isDebug(): bool { return $this->debug; @@ -298,9 +268,6 @@ public function getProjectDir(): string return $this->projectDir; } - /** - * {@inheritdoc} - */ public function getContainer(): ContainerInterface { if (!$this->container) { @@ -318,42 +285,27 @@ public function setAnnotatedClassCache(array $annotatedClasses) file_put_contents(($this->warmupDir ?: $this->getBuildDir()).'/annotations.map', sprintf('debug && null !== $this->startTime ? $this->startTime : -\INF; } - /** - * {@inheritdoc} - */ public function getCacheDir(): string { return $this->getProjectDir().'/var/cache/'.$this->environment; } - /** - * {@inheritdoc} - */ public function getBuildDir(): string { // Returns $this->getCacheDir() for backward compatibility return $this->getCacheDir(); } - /** - * {@inheritdoc} - */ public function getLogDir(): string { return $this->getProjectDir().'/var/log'; } - /** - * {@inheritdoc} - */ public function getCharset(): string { return 'UTF-8'; diff --git a/src/Symfony/Component/HttpKernel/Log/Logger.php b/src/Symfony/Component/HttpKernel/Log/Logger.php index 1b3f977379f03..767f3cdb01ddd 100644 --- a/src/Symfony/Component/HttpKernel/Log/Logger.php +++ b/src/Symfony/Component/HttpKernel/Log/Logger.php @@ -68,9 +68,6 @@ public function __construct(string $minLevel = null, $output = null, callable $f } } - /** - * {@inheritdoc} - */ public function log($level, $message, array $context = []): void { if (!isset(self::LEVELS[$level])) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php index 6e71d0b5103f4..c5a11298815e0 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php @@ -42,9 +42,6 @@ public function __construct(string $dsn) } } - /** - * {@inheritdoc} - */ public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null, string $statusCode = null): array { $file = $this->getIndexFilename(); @@ -90,9 +87,6 @@ public function find(?string $ip, ?string $url, ?int $limit, ?string $method, in return array_values($result); } - /** - * {@inheritdoc} - */ public function purge() { $flags = \FilesystemIterator::SKIP_DOTS; @@ -108,9 +102,6 @@ public function purge() } } - /** - * {@inheritdoc} - */ public function read(string $token): ?Profile { if (!$token || !file_exists($file = $this->getFilename($token))) { @@ -129,8 +120,6 @@ public function read(string $token): ?Profile } /** - * {@inheritdoc} - * * @throws \RuntimeException */ public function write(Profile $profile): bool diff --git a/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php b/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php index 38a6ce698acce..2db3713eee8c0 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php @@ -43,9 +43,6 @@ public function __construct(string $genrb = 'genrb', string $envVars = '') $this->genrb = ($envVars ? $envVars.' ' : '').$genrb; } - /** - * {@inheritdoc} - */ public function compile(string $sourcePath, string $targetDir) { if (is_dir($sourcePath)) { diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php index bb595f8bd6eb7..1d998fb06a8f4 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php @@ -30,9 +30,6 @@ public function __construct(BundleReaderInterface $reader, int $bufferSize) $this->buffer = new RingBuffer($bufferSize); } - /** - * {@inheritdoc} - */ public function read(string $path, string $locale): mixed { $hash = $path.'//'.$locale; diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php index 81ec4f65086cd..7ab254e4dd60e 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php @@ -58,17 +58,11 @@ public function setLocaleAliases(array $localeAliases) $this->localeAliases = $localeAliases; } - /** - * {@inheritdoc} - */ public function read(string $path, string $locale): mixed { return $this->reader->read($path, $locale); } - /** - * {@inheritdoc} - */ public function readEntry(string $path, string $locale, array $indices, bool $fallback = true): mixed { $entry = null; diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php index 1f09efd35c8b8..1ff134cb09001 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php @@ -23,9 +23,6 @@ */ class IntlBundleReader implements BundleReaderInterface { - /** - * {@inheritdoc} - */ public function read(string $path, string $locale): mixed { // Point for future extension: Modify this class so that it works also diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php index cffda100e250f..44e8332fafd07 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php @@ -23,9 +23,6 @@ */ class JsonBundleReader implements BundleReaderInterface { - /** - * {@inheritdoc} - */ public function read(string $path, string $locale): mixed { $fileName = $path.'/'.$locale.'.json'; diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php index 5c4f18ad46b1d..9f5bee4e7ade2 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php @@ -22,9 +22,6 @@ */ class PhpBundleReader implements BundleReaderInterface { - /** - * {@inheritdoc} - */ public function read(string $path, string $locale): mixed { $fileName = $path.'/'.$locale.'.php'; diff --git a/src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php b/src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php index 92b666759f5ae..82f6beba696a9 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php @@ -20,9 +20,6 @@ */ class JsonBundleWriter implements BundleWriterInterface { - /** - * {@inheritdoc} - */ public function write(string $path, string $locale, mixed $data) { if ($data instanceof \Traversable) { diff --git a/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php b/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php index dce2ff04102e2..fd95d16e98cb6 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php @@ -20,9 +20,6 @@ */ class PhpBundleWriter implements BundleWriterInterface { - /** - * {@inheritdoc} - */ public function write(string $path, string $locale, mixed $data) { $template = <<<'TEMPLATE' diff --git a/src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php b/src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php index 562f576461ce0..f9e577777406b 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php @@ -26,9 +26,6 @@ */ class TextBundleWriter implements BundleWriterInterface { - /** - * {@inheritdoc} - */ public function write(string $path, string $locale, mixed $data, bool $fallback = true) { $file = fopen($path.'/'.$locale.'.txt', 'w'); diff --git a/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php index 712f4a1f58db7..1999138c792e7 100644 --- a/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php @@ -48,34 +48,22 @@ class CurrencyDataGenerator extends AbstractDataGenerator */ private array $currencyCodes = []; - /** - * {@inheritdoc} - */ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { return $scanner->scanLocales($sourceDir.'/curr'); } - /** - * {@inheritdoc} - */ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir) { $compiler->compile($sourceDir.'/curr', $tempDir); $compiler->compile($sourceDir.'/misc/currencyNumericCodes.txt', $tempDir); } - /** - * {@inheritdoc} - */ protected function preGenerate() { $this->currencyCodes = []; } - /** - * {@inheritdoc} - */ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array { $localeBundle = $reader->read($tempDir, $displayLocale); @@ -93,9 +81,6 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str return null; } - /** - * {@inheritdoc} - */ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array { $rootBundle = $reader->read($tempDir, 'root'); @@ -105,9 +90,6 @@ protected function generateDataForRoot(BundleEntryReaderInterface $reader, strin ]; } - /** - * {@inheritdoc} - */ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array { $supplementalDataBundle = $reader->read($tempDir, 'supplementalData'); diff --git a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php index d255b81f0395b..afff0255d99f7 100644 --- a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php @@ -98,34 +98,22 @@ class LanguageDataGenerator extends AbstractDataGenerator */ private array $languageCodes = []; - /** - * {@inheritdoc} - */ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { return $scanner->scanLocales($sourceDir.'/lang'); } - /** - * {@inheritdoc} - */ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir) { $compiler->compile($sourceDir.'/lang', $tempDir); $compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir); } - /** - * {@inheritdoc} - */ protected function preGenerate() { $this->languageCodes = []; } - /** - * {@inheritdoc} - */ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array { $localeBundle = $reader->read($tempDir, $displayLocale); @@ -153,17 +141,11 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str return null; } - /** - * {@inheritdoc} - */ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array { return null; } - /** - * {@inheritdoc} - */ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array { $metadataBundle = $reader->read($tempDir, 'metadata'); diff --git a/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php index 56909aa3c2676..f6daf9bd61abd 100644 --- a/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php @@ -33,9 +33,6 @@ class LocaleDataGenerator extends AbstractDataGenerator private array $localeAliases = []; private array $localeParents = []; - /** - * {@inheritdoc} - */ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { $this->locales = $scanner->scanLocales($sourceDir.'/locales'); @@ -45,9 +42,6 @@ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array return $this->locales; } - /** - * {@inheritdoc} - */ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir) { $filesystem = new Filesystem(); @@ -59,9 +53,6 @@ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, st $compiler->compile($sourceDir.'/region', $tempDir.'/region'); } - /** - * {@inheritdoc} - */ protected function preGenerate() { // Write parents locale file for the Translation component @@ -71,9 +62,6 @@ protected function preGenerate() ); } - /** - * {@inheritdoc} - */ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array { // Don't generate aliases, as they are resolved during runtime @@ -130,17 +118,11 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str return $data; } - /** - * {@inheritdoc} - */ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array { return null; } - /** - * {@inheritdoc} - */ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array { return [ diff --git a/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php index cd7bd3f70f28b..3b86994fb89a9 100644 --- a/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php @@ -81,34 +81,22 @@ public static function isValidCountryCode(int|string|null $region) return true; } - /** - * {@inheritdoc} - */ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { return $scanner->scanLocales($sourceDir.'/region'); } - /** - * {@inheritdoc} - */ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir) { $compiler->compile($sourceDir.'/region', $tempDir); $compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir); } - /** - * {@inheritdoc} - */ protected function preGenerate() { $this->regionCodes = []; } - /** - * {@inheritdoc} - */ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array { $localeBundle = $reader->read($tempDir, $displayLocale); @@ -127,17 +115,11 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str return null; } - /** - * {@inheritdoc} - */ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array { return null; } - /** - * {@inheritdoc} - */ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array { $metadataBundle = $reader->read($tempDir, 'metadata'); diff --git a/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php index 538e77172d7c1..1f9f421ec397a 100644 --- a/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php @@ -35,33 +35,21 @@ class ScriptDataGenerator extends AbstractDataGenerator */ private array $scriptCodes = []; - /** - * {@inheritdoc} - */ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { return $scanner->scanLocales($sourceDir.'/lang'); } - /** - * {@inheritdoc} - */ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir) { $compiler->compile($sourceDir.'/lang', $tempDir); } - /** - * {@inheritdoc} - */ protected function preGenerate() { $this->scriptCodes = []; } - /** - * {@inheritdoc} - */ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array { $localeBundle = $reader->read($tempDir, $displayLocale); @@ -80,17 +68,11 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str return null; } - /** - * {@inheritdoc} - */ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array { return null; } - /** - * {@inheritdoc} - */ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array { $this->scriptCodes = array_unique($this->scriptCodes); diff --git a/src/Symfony/Component/Intl/Data/Generator/TimezoneDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/TimezoneDataGenerator.php index 6a0606b0e7561..698495efd7ca5 100644 --- a/src/Symfony/Component/Intl/Data/Generator/TimezoneDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/TimezoneDataGenerator.php @@ -39,9 +39,6 @@ class TimezoneDataGenerator extends AbstractDataGenerator private array $zoneToCountryMapping = []; private array $localeAliases = []; - /** - * {@inheritdoc} - */ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { $this->localeAliases = $scanner->scanAliases($sourceDir.'/locales'); @@ -49,9 +46,6 @@ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array return $scanner->scanLocales($sourceDir.'/zone'); } - /** - * {@inheritdoc} - */ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir) { $filesystem = new Filesystem(); @@ -63,18 +57,12 @@ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, st $compiler->compile($sourceDir.'/misc/windowsZones.txt', $tempDir); } - /** - * {@inheritdoc} - */ protected function preGenerate() { $this->zoneIds = []; $this->zoneToCountryMapping = []; } - /** - * {@inheritdoc} - */ protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array { if (!$this->zoneToCountryMapping) { @@ -122,9 +110,6 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str return $data; } - /** - * {@inheritdoc} - */ protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array { $rootBundle = $reader->read($tempDir, 'root'); @@ -134,9 +119,6 @@ protected function generateDataForRoot(BundleEntryReaderInterface $reader, strin ]; } - /** - * {@inheritdoc} - */ protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array { $rootBundle = $reader->read($tempDir, 'root'); diff --git a/src/Symfony/Component/Intl/Data/Util/RingBuffer.php b/src/Symfony/Component/Intl/Data/Util/RingBuffer.php index 830ca91ed5c73..00cfbf7817fd3 100644 --- a/src/Symfony/Component/Intl/Data/Util/RingBuffer.php +++ b/src/Symfony/Component/Intl/Data/Util/RingBuffer.php @@ -43,17 +43,11 @@ public function __construct(int $size) $this->size = $size; } - /** - * {@inheritdoc} - */ public function offsetExists(mixed $key): bool { return isset($this->indices[$key]); } - /** - * {@inheritdoc} - */ public function offsetGet(mixed $key): mixed { if (!isset($this->indices[$key])) { @@ -63,9 +57,6 @@ public function offsetGet(mixed $key): mixed return $this->values[$this->indices[$key]]; } - /** - * {@inheritdoc} - */ public function offsetSet(mixed $key, mixed $value): void { if (false !== ($keyToRemove = array_search($this->cursor, $this->indices))) { @@ -78,9 +69,6 @@ public function offsetSet(mixed $key, mixed $value): void $this->cursor = ($this->cursor + 1) % $this->size; } - /** - * {@inheritdoc} - */ public function offsetUnset(mixed $key): void { if (isset($this->indices[$key])) { diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php index a555c81a8fef7..8d82c5aa9a078 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php @@ -35,33 +35,21 @@ public function __construct(array $config = []) $this->config = $config; } - /** - * {@inheritdoc} - */ public function getConnection(): ConnectionInterface { return $this->connection ??= new Connection($this->config); } - /** - * {@inheritdoc} - */ public function getEntryManager(): EntryManagerInterface { return $this->entryManager ??= new EntryManager($this->getConnection()); } - /** - * {@inheritdoc} - */ public function createQuery(string $dn, string $query, array $options = []): QueryInterface { return new Query($this->getConnection(), $dn, $query, $options); } - /** - * {@inheritdoc} - */ public function escape(string $subject, string $ignore = '', int $flags = 0): string { $value = ldap_escape($subject, $ignore, $flags); diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php index 9cf809fd4daa3..37fe3946d6174 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php @@ -31,9 +31,6 @@ public function __construct(Connection $connection, Query $search) $this->search = $search; } - /** - * {@inheritdoc} - */ public function toArray(): array { return $this->entries ??= iterator_to_array($this->getIterator(), false); diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php index bd5a67d9bcc57..eb33eea9adba6 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php @@ -56,17 +56,12 @@ public function __destruct() $this->disconnect(); } - /** - * {@inheritdoc} - */ public function isBound(): bool { return $this->bound; } /** - * {@inheritdoc} - * * @param string $password WARNING: When the LDAP server allows unauthenticated binds, a blank $password will always be valid */ public function bind(string $dn = null, #[\SensitiveParameter] string $password = null) diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php index 97a5e8b0cef44..bffab0e5b032b 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php @@ -30,9 +30,6 @@ public function __construct(Connection $connection) $this->connection = $connection; } - /** - * {@inheritdoc} - */ public function add(Entry $entry) { $con = $this->getConnectionResource(); @@ -44,9 +41,6 @@ public function add(Entry $entry) return $this; } - /** - * {@inheritdoc} - */ public function update(Entry $entry) { $con = $this->getConnectionResource(); @@ -56,9 +50,6 @@ public function update(Entry $entry) } } - /** - * {@inheritdoc} - */ public function remove(Entry $entry) { $con = $this->getConnectionResource(); @@ -98,9 +89,6 @@ public function removeAttributeValues(Entry $entry, string $attribute, array $va } } - /** - * {@inheritdoc} - */ public function rename(Entry $entry, string $newRdn, bool $removeOldRdn = true) { $con = $this->getConnectionResource(); diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php index 3445b5c5f58b4..ad1a52aa14419 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php @@ -61,9 +61,6 @@ public function __destruct() unset($this->results); } - /** - * {@inheritdoc} - */ public function execute(): CollectionInterface { if (!isset($this->results)) { diff --git a/src/Symfony/Component/Ldap/Ldap.php b/src/Symfony/Component/Ldap/Ldap.php index b0b02ee98f167..f16633f786ce0 100644 --- a/src/Symfony/Component/Ldap/Ldap.php +++ b/src/Symfony/Component/Ldap/Ldap.php @@ -29,33 +29,21 @@ public function __construct(AdapterInterface $adapter) $this->adapter = $adapter; } - /** - * {@inheritdoc} - */ public function bind(string $dn = null, #[\SensitiveParameter] string $password = null) { $this->adapter->getConnection()->bind($dn, $password); } - /** - * {@inheritdoc} - */ public function query(string $dn, string $query, array $options = []): QueryInterface { return $this->adapter->createQuery($dn, $query, $options); } - /** - * {@inheritdoc} - */ public function getEntryManager(): EntryManagerInterface { return $this->adapter->getEntryManager(); } - /** - * {@inheritdoc} - */ public function escape(string $subject, string $ignore = '', int $flags = 0): string { return $this->adapter->escape($subject, $ignore, $flags); diff --git a/src/Symfony/Component/Ldap/Security/LdapUser.php b/src/Symfony/Component/Ldap/Security/LdapUser.php index 6e1b1ceb09869..b66fd4e047ff0 100644 --- a/src/Symfony/Component/Ldap/Security/LdapUser.php +++ b/src/Symfony/Component/Ldap/Security/LdapUser.php @@ -47,25 +47,16 @@ public function getEntry(): Entry return $this->entry; } - /** - * {@inheritdoc} - */ public function getRoles(): array { return $this->roles; } - /** - * {@inheritdoc} - */ public function getPassword(): ?string { return $this->password; } - /** - * {@inheritdoc} - */ public function getSalt(): ?string { return null; @@ -84,9 +75,6 @@ public function getUserIdentifier(): string return $this->identifier; } - /** - * {@inheritdoc} - */ public function eraseCredentials() { $this->password = null; @@ -102,9 +90,6 @@ public function setPassword(#[\SensitiveParameter] string $password) $this->password = $password; } - /** - * {@inheritdoc} - */ public function isEqualTo(UserInterface $user): bool { if (!$user instanceof self) { diff --git a/src/Symfony/Component/Ldap/Security/LdapUserProvider.php b/src/Symfony/Component/Ldap/Security/LdapUserProvider.php index 01cfb0907ac28..8950b144ca02c 100644 --- a/src/Symfony/Component/Ldap/Security/LdapUserProvider.php +++ b/src/Symfony/Component/Ldap/Security/LdapUserProvider.php @@ -117,9 +117,6 @@ public function loadUserByIdentifier(string $identifier): UserInterface return $this->loadUser($identifier, $entry); } - /** - * {@inheritdoc} - */ public function refreshUser(UserInterface $user): UserInterface { if (!$user instanceof LdapUser) { @@ -130,8 +127,6 @@ public function refreshUser(UserInterface $user): UserInterface } /** - * {@inheritdoc} - * * @final */ public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void @@ -153,9 +148,6 @@ public function upgradePassword(PasswordAuthenticatedUserInterface $user, string } } - /** - * {@inheritdoc} - */ public function supportsClass(string $class): bool { return LdapUser::class === $class; diff --git a/src/Symfony/Component/Lock/Lock.php b/src/Symfony/Component/Lock/Lock.php index 3a3554a417f17..a7165fe9ef2fb 100644 --- a/src/Symfony/Component/Lock/Lock.php +++ b/src/Symfony/Component/Lock/Lock.php @@ -71,9 +71,6 @@ public function __destruct() $this->release(); } - /** - * {@inheritdoc} - */ public function acquire(bool $blocking = false): bool { $this->key->resetLifetime(); @@ -127,9 +124,6 @@ public function acquire(bool $blocking = false): bool } } - /** - * {@inheritdoc} - */ public function acquireRead(bool $blocking = false): bool { $this->key->resetLifetime(); @@ -188,9 +182,6 @@ public function acquireRead(bool $blocking = false): bool } } - /** - * {@inheritdoc} - */ public function refresh(float $ttl = null) { if (null === $ttl) { @@ -225,17 +216,11 @@ public function refresh(float $ttl = null) } } - /** - * {@inheritdoc} - */ public function isAcquired(): bool { return $this->dirty = $this->store->exists($this->key); } - /** - * {@inheritdoc} - */ public function release() { try { @@ -257,17 +242,11 @@ public function release() } } - /** - * {@inheritdoc} - */ public function isExpired(): bool { return $this->key->isExpired(); } - /** - * {@inheritdoc} - */ public function getRemainingLifetime(): ?float { return $this->key->getRemainingLifetime(); diff --git a/src/Symfony/Component/Lock/Store/CombinedStore.php b/src/Symfony/Component/Lock/Store/CombinedStore.php index 76a32e3dd2840..ca902117e424a 100644 --- a/src/Symfony/Component/Lock/Store/CombinedStore.php +++ b/src/Symfony/Component/Lock/Store/CombinedStore.php @@ -53,9 +53,6 @@ public function __construct(array $stores, StrategyInterface $strategy) $this->logger = new NullLogger(); } - /** - * {@inheritdoc} - */ public function save(Key $key) { $successCount = 0; @@ -128,9 +125,6 @@ public function saveRead(Key $key) throw new LockConflictedException(); } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttl) { $successCount = 0; @@ -172,9 +166,6 @@ public function putOffExpiration(Key $key, float $ttl) throw new LockConflictedException(); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { foreach ($this->stores as $store) { @@ -186,9 +177,6 @@ public function delete(Key $key) } } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { $successCount = 0; diff --git a/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php b/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php index c29dd36f76cd6..7bcd725c652b4 100644 --- a/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php +++ b/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php @@ -72,9 +72,6 @@ public function __construct(Connection|string $connOrUrl, array $options = [], f } } - /** - * {@inheritdoc} - */ public function save(Key $key) { $key->reduceLifetime($this->initialTtl); @@ -114,9 +111,6 @@ public function save(Key $key) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, $ttl) { if ($ttl < 1) { @@ -148,9 +142,6 @@ public function putOffExpiration(Key $key, $ttl) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { $this->conn->delete($this->table, [ @@ -159,9 +150,6 @@ public function delete(Key $key) ]); } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = ? AND $this->tokenCol = ? AND $this->expirationCol > {$this->getCurrentTimestampStatement()}"; diff --git a/src/Symfony/Component/Lock/Store/FlockStore.php b/src/Symfony/Component/Lock/Store/FlockStore.php index 59408ebe32444..e665be65c5ea5 100644 --- a/src/Symfony/Component/Lock/Store/FlockStore.php +++ b/src/Symfony/Component/Lock/Store/FlockStore.php @@ -53,33 +53,21 @@ public function __construct(string $lockPath = null) $this->lockPath = $lockPath; } - /** - * {@inheritdoc} - */ public function save(Key $key) { $this->lock($key, false, false); } - /** - * {@inheritdoc} - */ public function saveRead(Key $key) { $this->lock($key, true, false); } - /** - * {@inheritdoc} - */ public function waitAndSave(Key $key) { $this->lock($key, false, true); } - /** - * {@inheritdoc} - */ public function waitAndSaveRead(Key $key) { $this->lock($key, true, true); @@ -135,17 +123,11 @@ private function lock(Key $key, bool $read, bool $blocking) $key->markUnserializable(); } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttl) { // do nothing, the flock locks forever. } - /** - * {@inheritdoc} - */ public function delete(Key $key) { // The lock is maybe not acquired. @@ -161,9 +143,6 @@ public function delete(Key $key) $key->removeState(__CLASS__); } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { return $key->hasState(__CLASS__); diff --git a/src/Symfony/Component/Lock/Store/MemcachedStore.php b/src/Symfony/Component/Lock/Store/MemcachedStore.php index fc7de07adced8..66058148daa16 100644 --- a/src/Symfony/Component/Lock/Store/MemcachedStore.php +++ b/src/Symfony/Component/Lock/Store/MemcachedStore.php @@ -52,9 +52,6 @@ public function __construct(\Memcached $memcached, int $initialTtl = 300) $this->initialTtl = $initialTtl; } - /** - * {@inheritdoc} - */ public function save(Key $key) { $token = $this->getUniqueToken($key); @@ -67,9 +64,6 @@ public function save(Key $key) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttl) { if ($ttl < 1) { @@ -106,9 +100,6 @@ public function putOffExpiration(Key $key, float $ttl) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { $token = $this->getUniqueToken($key); @@ -130,9 +121,6 @@ public function delete(Key $key) $this->memcached->delete((string) $key); } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { return $this->memcached->get((string) $key) === $this->getUniqueToken($key); diff --git a/src/Symfony/Component/Lock/Store/MongoDbStore.php b/src/Symfony/Component/Lock/Store/MongoDbStore.php index 7dd8055d56fad..f4e98d55f4591 100644 --- a/src/Symfony/Component/Lock/Store/MongoDbStore.php +++ b/src/Symfony/Component/Lock/Store/MongoDbStore.php @@ -197,8 +197,6 @@ public function createTtlIndex(int $expireAfterSeconds = 0) } /** - * {@inheritdoc} - * * @throws LockExpiredException when save is called on an expired lock */ public function save(Key $key) @@ -222,8 +220,6 @@ public function save(Key $key) } /** - * {@inheritdoc} - * * @throws LockStorageException * @throws LockExpiredException */ @@ -243,9 +239,6 @@ public function putOffExpiration(Key $key, float $ttl) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { $this->getCollection()->deleteOne([ // filter @@ -254,9 +247,6 @@ public function delete(Key $key) ]); } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { return null !== $this->getCollection()->findOne([ // filter diff --git a/src/Symfony/Component/Lock/Store/PdoStore.php b/src/Symfony/Component/Lock/Store/PdoStore.php index e1126102ed899..c5a7552c8d95b 100644 --- a/src/Symfony/Component/Lock/Store/PdoStore.php +++ b/src/Symfony/Component/Lock/Store/PdoStore.php @@ -83,9 +83,6 @@ public function __construct(\PDO|string $connOrDsn, array $options = [], float $ $this->connectionOptions = $options['db_connection_options'] ?? $this->connectionOptions; } - /** - * {@inheritdoc} - */ public function save(Key $key) { $key->reduceLifetime($this->initialTtl); @@ -115,9 +112,6 @@ public function save(Key $key) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttl) { if ($ttl < 1) { @@ -143,9 +137,6 @@ public function putOffExpiration(Key $key, float $ttl) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { $sql = "DELETE FROM $this->table WHERE $this->idCol = :id AND $this->tokenCol = :token"; @@ -156,9 +147,6 @@ public function delete(Key $key) $stmt->execute(); } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND $this->tokenCol = :token AND $this->expirationCol > {$this->getCurrentTimestampStatement()}"; diff --git a/src/Symfony/Component/Lock/Store/RedisStore.php b/src/Symfony/Component/Lock/Store/RedisStore.php index 59b8dc3d311b5..05fb77b0ecc18 100644 --- a/src/Symfony/Component/Lock/Store/RedisStore.php +++ b/src/Symfony/Component/Lock/Store/RedisStore.php @@ -48,9 +48,6 @@ public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInter $this->initialTtl = $initialTtl; } - /** - * {@inheritdoc} - */ public function save(Key $key) { $script = ' @@ -96,9 +93,6 @@ public function save(Key $key) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function saveRead(Key $key) { $script = ' @@ -139,9 +133,6 @@ public function saveRead(Key $key) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttl) { $script = ' @@ -182,9 +173,6 @@ public function putOffExpiration(Key $key, float $ttl) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { $script = ' @@ -215,9 +203,6 @@ public function delete(Key $key) $this->evaluate($script, (string) $key, [$this->getUniqueToken($key)]); } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { $script = ' diff --git a/src/Symfony/Component/Lock/Store/SemaphoreStore.php b/src/Symfony/Component/Lock/Store/SemaphoreStore.php index 4375c03247dc3..ba63f641270b5 100644 --- a/src/Symfony/Component/Lock/Store/SemaphoreStore.php +++ b/src/Symfony/Component/Lock/Store/SemaphoreStore.php @@ -40,17 +40,11 @@ public function __construct() } } - /** - * {@inheritdoc} - */ public function save(Key $key) { $this->lock($key, false); } - /** - * {@inheritdoc} - */ public function waitAndSave(Key $key) { $this->lock($key, true); @@ -79,9 +73,6 @@ private function lock(Key $key, bool $blocking) $key->markUnserializable(); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { // The lock is maybe not acquired. @@ -96,17 +87,11 @@ public function delete(Key $key) $key->removeState(__CLASS__); } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttl) { // do nothing, the semaphore locks forever. } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { return $key->hasState(__CLASS__); diff --git a/src/Symfony/Component/Lock/Store/ZookeeperStore.php b/src/Symfony/Component/Lock/Store/ZookeeperStore.php index 14dc5dedb0fd4..22214b4e8328d 100644 --- a/src/Symfony/Component/Lock/Store/ZookeeperStore.php +++ b/src/Symfony/Component/Lock/Store/ZookeeperStore.php @@ -56,9 +56,6 @@ public static function createConnection(string $dsn): \Zookeeper return new \Zookeeper(implode(',', $hosts)); } - /** - * {@inheritdoc} - */ public function save(Key $key) { if ($this->exists($key)) { @@ -74,9 +71,6 @@ public function save(Key $key) $this->checkNotExpired($key); } - /** - * {@inheritdoc} - */ public function delete(Key $key) { if (!$this->exists($key)) { @@ -92,9 +86,6 @@ public function delete(Key $key) } } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { $resource = $this->getKeyResource($key); @@ -105,9 +96,6 @@ public function exists(Key $key): bool } } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttl) { // do nothing, zookeeper locks forever. diff --git a/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php b/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php index 7c3508aa999d7..2294af40494c4 100644 --- a/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php +++ b/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php @@ -18,17 +18,11 @@ */ class ConsensusStrategy implements StrategyInterface { - /** - * {@inheritdoc} - */ public function isMet(int $numberOfSuccess, int $numberOfItems): bool { return $numberOfSuccess > ($numberOfItems / 2); } - /** - * {@inheritdoc} - */ public function canBeMet(int $numberOfFailure, int $numberOfItems): bool { return $numberOfFailure < ($numberOfItems / 2); diff --git a/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php b/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php index 2a2c4ab014fb8..7602cceaddcc1 100644 --- a/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php +++ b/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php @@ -18,17 +18,11 @@ */ class UnanimousStrategy implements StrategyInterface { - /** - * {@inheritdoc} - */ public function isMet(int $numberOfSuccess, int $numberOfItems): bool { return $numberOfSuccess === $numberOfItems; } - /** - * {@inheritdoc} - */ public function canBeMet(int $numberOfFailure, int $numberOfItems): bool { return 0 === $numberOfFailure; diff --git a/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php index 97a2a54eeb762..e6eb6ada19a04 100644 --- a/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php @@ -26,9 +26,6 @@ abstract class AbstractRedisStoreTest extends AbstractStoreTest { use ExpiringStoreTestTrait; - /** - * {@inheritdoc} - */ protected function getClockDelay() { return 250000; @@ -36,9 +33,6 @@ protected function getClockDelay() abstract protected function getRedisConnection(): \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface; - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { return new RedisStore($this->getRedisConnection()); diff --git a/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php index 1b912c0139f96..28d4afcad41b1 100644 --- a/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php @@ -31,17 +31,11 @@ class CombinedStoreTest extends AbstractStoreTest use ExpiringStoreTestTrait; use SharedLockStoreTestTrait; - /** - * {@inheritdoc} - */ protected function getClockDelay() { return 250000; } - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { $redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => 6379])); diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php index eaf9f7b7b5cb9..bf688c29d077a 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php @@ -40,9 +40,6 @@ public function createPostgreSqlConnection(): Connection return DriverManager::getConnection(['url' => 'pgsql://postgres:password@'.getenv('POSTGRES_HOST')]); } - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { $conn = $this->createPostgreSqlConnection(); diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php index 3f46311ffe9ce..cf414926ff3ca 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php @@ -45,17 +45,11 @@ public static function tearDownAfterClass(): void @unlink(self::$dbFile); } - /** - * {@inheritdoc} - */ protected function getClockDelay() { return 1000000; } - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { return new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); diff --git a/src/Symfony/Component/Lock/Tests/Store/FlockStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/FlockStoreTest.php index 79cf6b0cd4e55..246cd9ff59c2e 100644 --- a/src/Symfony/Component/Lock/Tests/Store/FlockStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/FlockStoreTest.php @@ -25,9 +25,6 @@ class FlockStoreTest extends AbstractStoreTest use SharedLockStoreTestTrait; use UnserializableTestTrait; - /** - * {@inheritdoc} - */ protected function getStore(): PersistingStoreInterface { return new FlockStore(); diff --git a/src/Symfony/Component/Lock/Tests/Store/InMemoryStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/InMemoryStoreTest.php index 2d25dab81c0c1..88f2188694f9b 100644 --- a/src/Symfony/Component/Lock/Tests/Store/InMemoryStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/InMemoryStoreTest.php @@ -21,9 +21,6 @@ class InMemoryStoreTest extends AbstractStoreTest { use SharedLockStoreTestTrait; - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { return new InMemoryStore(); diff --git a/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php index 088d064f3123a..d9184972dbdd4 100644 --- a/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php @@ -43,17 +43,11 @@ public static function setUpBeforeClass(): void } } - /** - * {@inheritdoc} - */ protected function getClockDelay() { return 1000000; } - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { $memcached = new \Memcached(); diff --git a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php index 6ccdb70f480a5..7cd78d10326ba 100644 --- a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php @@ -53,9 +53,6 @@ protected function getClockDelay(): int return 250000; } - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { return new MongoDbStore(self::getMongoClient(), [ diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php index 8b8cf43381862..35a605385f4e6 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php @@ -41,17 +41,11 @@ public static function tearDownAfterClass(): void @unlink(self::$dbFile); } - /** - * {@inheritdoc} - */ protected function getClockDelay() { return 1000000; } - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { return new PdoStore('sqlite:'.self::$dbFile); diff --git a/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php index a9cbf4d1eeed8..e362b84c9c2af 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php @@ -37,9 +37,6 @@ public function getPostgresHost(): string return $host; } - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { $host = $this->getPostgresHost(); diff --git a/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php index a94c7686180f5..d64b08383823a 100644 --- a/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php @@ -25,9 +25,6 @@ class SemaphoreStoreTest extends AbstractStoreTest use BlockingStoreTestTrait; use UnserializableTestTrait; - /** - * {@inheritdoc} - */ protected function getStore(): PersistingStoreInterface { return new SemaphoreStore(); diff --git a/src/Symfony/Component/Mailer/DataCollector/MessageDataCollector.php b/src/Symfony/Component/Mailer/DataCollector/MessageDataCollector.php index ba1c3f81d725c..ce8e59f101bae 100644 --- a/src/Symfony/Component/Mailer/DataCollector/MessageDataCollector.php +++ b/src/Symfony/Component/Mailer/DataCollector/MessageDataCollector.php @@ -29,9 +29,6 @@ public function __construct(MessageLoggerListener $logger) $this->events = $logger->getEvents(); } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->data['events'] = $this->events; @@ -50,17 +47,11 @@ public function base64Encode(string $data): string return base64_encode($data); } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'mailer'; diff --git a/src/Symfony/Component/Mailer/EventListener/MessageLoggerListener.php b/src/Symfony/Component/Mailer/EventListener/MessageLoggerListener.php index 842b93c1cb40f..e12d40317e9de 100644 --- a/src/Symfony/Component/Mailer/EventListener/MessageLoggerListener.php +++ b/src/Symfony/Component/Mailer/EventListener/MessageLoggerListener.php @@ -31,9 +31,6 @@ public function __construct() $this->events = new MessageEvents(); } - /** - * {@inheritdoc} - */ public function reset() { $this->events = new MessageEvents(); diff --git a/src/Symfony/Component/Mailer/Test/Constraint/EmailCount.php b/src/Symfony/Component/Mailer/Test/Constraint/EmailCount.php index cadb1fdf83237..aaff8b886b9ca 100644 --- a/src/Symfony/Component/Mailer/Test/Constraint/EmailCount.php +++ b/src/Symfony/Component/Mailer/Test/Constraint/EmailCount.php @@ -27,9 +27,6 @@ public function __construct(int $expectedValue, string $transport = null, bool $ $this->queued = $queued; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('%shas %s "%d" emails', $this->transport ? $this->transport.' ' : '', $this->queued ? 'queued' : 'sent', $this->expectedValue); @@ -37,8 +34,6 @@ public function toString(): string /** * @param MessageEvents $events - * - * {@inheritdoc} */ protected function matches($events): bool { @@ -47,8 +42,6 @@ protected function matches($events): bool /** * @param MessageEvents $events - * - * {@inheritdoc} */ protected function failureDescription($events): string { diff --git a/src/Symfony/Component/Mailer/Test/Constraint/EmailIsQueued.php b/src/Symfony/Component/Mailer/Test/Constraint/EmailIsQueued.php index be9dac801452f..46436aa0690d0 100644 --- a/src/Symfony/Component/Mailer/Test/Constraint/EmailIsQueued.php +++ b/src/Symfony/Component/Mailer/Test/Constraint/EmailIsQueued.php @@ -16,9 +16,6 @@ final class EmailIsQueued extends Constraint { - /** - * {@inheritdoc} - */ public function toString(): string { return 'is queued'; @@ -26,8 +23,6 @@ public function toString(): string /** * @param MessageEvent $event - * - * {@inheritdoc} */ protected function matches($event): bool { @@ -36,8 +31,6 @@ protected function matches($event): bool /** * @param MessageEvent $event - * - * {@inheritdoc} */ protected function failureDescription($event): string { diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/CramMd5Authenticator.php b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/CramMd5Authenticator.php index 059b136e2be32..aa2d2b7fee410 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/CramMd5Authenticator.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/CramMd5Authenticator.php @@ -26,8 +26,6 @@ public function getAuthKeyword(): string } /** - * {@inheritdoc} - * * @see https://www.ietf.org/rfc/rfc4954.txt */ public function authenticate(EsmtpTransport $client): void diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/LoginAuthenticator.php b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/LoginAuthenticator.php index 1ce321df027da..e0b7d577e3d58 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/LoginAuthenticator.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/LoginAuthenticator.php @@ -26,8 +26,6 @@ public function getAuthKeyword(): string } /** - * {@inheritdoc} - * * @see https://www.ietf.org/rfc/rfc4954.txt */ public function authenticate(EsmtpTransport $client): void diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/PlainAuthenticator.php b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/PlainAuthenticator.php index 8d60690f405e9..6b680b511901b 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/PlainAuthenticator.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/PlainAuthenticator.php @@ -26,8 +26,6 @@ public function getAuthKeyword(): string } /** - * {@inheritdoc} - * * @see https://www.ietf.org/rfc/rfc4954.txt */ public function authenticate(EsmtpTransport $client): void diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/XOAuth2Authenticator.php b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/XOAuth2Authenticator.php index 794177675bd6d..c3aaa4909dbd0 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Auth/XOAuth2Authenticator.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Auth/XOAuth2Authenticator.php @@ -28,8 +28,6 @@ public function getAuthKeyword(): string } /** - * {@inheritdoc} - * * @see https://developers.google.com/google-apps/gmail/xoauth2_protocol#the_sasl_xoauth2_mechanism */ public function authenticate(EsmtpTransport $client): void diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsReceiver.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsReceiver.php index 5edefd4d05ca9..06ebf8e8fc617 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsReceiver.php +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsReceiver.php @@ -35,9 +35,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { try { @@ -63,9 +60,6 @@ public function get(): iterable yield $envelope->with(new AmazonSqsReceivedStamp($sqsEnvelope['id'])); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { try { @@ -75,9 +69,6 @@ public function ack(Envelope $envelope): void } } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { try { @@ -87,9 +78,6 @@ public function reject(Envelope $envelope): void } } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { try { diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsSender.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsSender.php index dff6283038f70..818cf175a8ee9 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsSender.php +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsSender.php @@ -32,9 +32,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer; } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { $encodedMessage = $this->serializer->encode($envelope); diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php index 297fccbd3f077..c8ba7f9c73d19 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php @@ -44,49 +44,31 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->sender = $sender; } - /** - * {@inheritdoc} - */ public function get(): iterable { return $this->getReceiver()->get(); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->getReceiver()->ack($envelope); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->getReceiver()->reject($envelope); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { return $this->getReceiver()->getMessageCount(); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { return $this->getSender()->send($envelope); } - /** - * {@inheritdoc} - */ public function setup(): void { try { diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceiver.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceiver.php index 6dbdc8988c5ce..fecf39b29afc3 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceiver.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceiver.php @@ -36,17 +36,11 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { yield from $this->getFromQueues($this->connection->getQueueNames()); } - /** - * {@inheritdoc} - */ public function getFromQueues(array $queueNames): iterable { foreach ($queueNames as $queueName) { @@ -83,9 +77,6 @@ private function getEnvelope(string $queueName): iterable yield $envelope->with(new AmqpReceivedStamp($amqpEnvelope, $queueName)); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { try { @@ -100,9 +91,6 @@ public function ack(Envelope $envelope): void } } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $stamp = $this->findAmqpStamp($envelope); @@ -113,9 +101,6 @@ public function reject(Envelope $envelope): void ); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { try { diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpSender.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpSender.php index d19258eb7f346..cbcecffa7ef57 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpSender.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpSender.php @@ -35,9 +35,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { $encodedMessage = $this->serializer->encode($envelope); diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpTransport.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpTransport.php index 70619624864ca..227653609d8e8 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpTransport.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpTransport.php @@ -35,57 +35,36 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { return $this->getReceiver()->get(); } - /** - * {@inheritdoc} - */ public function getFromQueues(array $queueNames): iterable { return $this->getReceiver()->getFromQueues($queueNames); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->getReceiver()->ack($envelope); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->getReceiver()->reject($envelope); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { return $this->getSender()->send($envelope); } - /** - * {@inheritdoc} - */ public function setup(): void { $this->connection->setup(); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { return $this->getReceiver()->getMessageCount(); diff --git a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdReceiver.php b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdReceiver.php index 0ad4c600659b8..734aa8296b587 100644 --- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdReceiver.php +++ b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdReceiver.php @@ -33,9 +33,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { $beanstalkdEnvelope = $this->connection->get(); @@ -58,25 +55,16 @@ public function get(): iterable return [$envelope->with(new BeanstalkdReceivedStamp($beanstalkdEnvelope['id'], $this->connection->getTube()))]; } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->connection->ack($this->findBeanstalkdReceivedStamp($envelope)->getId()); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->connection->reject($this->findBeanstalkdReceivedStamp($envelope)->getId()); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { return $this->connection->getMessageCount(); diff --git a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdSender.php b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdSender.php index a8dd7beaa11a8..ff1cac38220e2 100644 --- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdSender.php +++ b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdSender.php @@ -31,9 +31,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { $encodedMessage = $this->serializer->encode($envelope); diff --git a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdTransport.php b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdTransport.php index 4a95f22cae65e..d6698a3fae484 100644 --- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdTransport.php +++ b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdTransport.php @@ -33,41 +33,26 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { return $this->getReceiver()->get(); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->getReceiver()->ack($envelope); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->getReceiver()->reject($envelope); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { return $this->getReceiver()->getMessageCount(); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { return $this->getSender()->send($envelope); diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php index c83efe27cbe23..79310f35a9a9c 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php @@ -39,9 +39,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { try { @@ -68,9 +65,6 @@ public function get(): iterable return [$this->createEnvelopeFromData($doctrineEnvelope)]; } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { try { @@ -80,9 +74,6 @@ public function ack(Envelope $envelope): void } } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { try { @@ -92,9 +83,6 @@ public function reject(Envelope $envelope): void } } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { try { @@ -104,9 +92,6 @@ public function getMessageCount(): int } } - /** - * {@inheritdoc} - */ public function all(int $limit = null): iterable { try { @@ -120,9 +105,6 @@ public function all(int $limit = null): iterable } } - /** - * {@inheritdoc} - */ public function find(mixed $id): ?Envelope { try { diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineSender.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineSender.php index 5e89032b885c7..cccce15e104d8 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineSender.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineSender.php @@ -34,9 +34,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { $encodedMessage = $this->serializer->encode($envelope); diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransport.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransport.php index 78a2e1402b445..aeb689a8d0b4d 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransport.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransport.php @@ -37,65 +37,41 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer; } - /** - * {@inheritdoc} - */ public function get(): iterable { return $this->getReceiver()->get(); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->getReceiver()->ack($envelope); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->getReceiver()->reject($envelope); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { return $this->getReceiver()->getMessageCount(); } - /** - * {@inheritdoc} - */ public function all(int $limit = null): iterable { return $this->getReceiver()->all($limit); } - /** - * {@inheritdoc} - */ public function find(mixed $id): ?Envelope { return $this->getReceiver()->find($id); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { return $this->getSender()->send($envelope); } - /** - * {@inheritdoc} - */ public function setup(): void { $this->connection->setup(); diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisReceiver.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisReceiver.php index 8d7ffafc63806..1d4c7b4711357 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisReceiver.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisReceiver.php @@ -34,9 +34,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { $message = $this->connection->get(); @@ -69,25 +66,16 @@ public function get(): iterable return [$envelope->with(new RedisReceivedStamp($message['id']))]; } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->connection->ack($this->findRedisReceivedStamp($envelope)->getId()); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->connection->reject($this->findRedisReceivedStamp($envelope)->getId()); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { return $this->connection->getMessageCount(); diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisSender.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisSender.php index 5b292267735b3..e1333c9cbe4fe 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisSender.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisSender.php @@ -32,9 +32,6 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer; } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { $encodedMessage = $this->serializer->encode($envelope); diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisTransport.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisTransport.php index ab64981b8d8d9..8ba7ff4408403 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisTransport.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisTransport.php @@ -35,49 +35,31 @@ public function __construct(Connection $connection, SerializerInterface $seriali $this->serializer = $serializer ?? new PhpSerializer(); } - /** - * {@inheritdoc} - */ public function get(): iterable { return $this->getReceiver()->get(); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->getReceiver()->ack($envelope); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->getReceiver()->reject($envelope); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { return $this->getSender()->send($envelope); } - /** - * {@inheritdoc} - */ public function setup(): void { $this->connection->setup(); } - /** - * {@inheritdoc} - */ public function getMessageCount(): int { return $this->getReceiver()->getMessageCount(); diff --git a/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php b/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php index c5f440957d676..f1872c3514555 100644 --- a/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php +++ b/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php @@ -63,9 +63,6 @@ public function __construct(RoutableMessageBus $routableBus, ContainerInterface parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure(): void { $defaultReceiverName = 1 === \count($this->receiverNames) ? current($this->receiverNames) : null; @@ -126,9 +123,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function interact(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); @@ -152,9 +146,6 @@ protected function interact(InputInterface $input, OutputInterface $output) } } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $receivers = []; diff --git a/src/Symfony/Component/Messenger/Command/DebugCommand.php b/src/Symfony/Component/Messenger/Command/DebugCommand.php index 9d6825656f44f..0865fef548836 100644 --- a/src/Symfony/Component/Messenger/Command/DebugCommand.php +++ b/src/Symfony/Component/Messenger/Command/DebugCommand.php @@ -38,9 +38,6 @@ public function __construct(array $mapping) parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -60,9 +57,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php index 69ad7053fd1af..2b62af3ce4bb2 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php @@ -28,9 +28,6 @@ #[AsCommand(name: 'messenger:failed:remove', description: 'Remove given messages from the failure transport')] class FailedMessagesRemoveCommand extends AbstractFailedMessagesCommand { - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -51,9 +48,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php index 93c6e87efee5f..abd9ab14e7300 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php @@ -50,9 +50,6 @@ public function __construct(?string $globalReceiverName, ServiceProviderInterfac parent::__construct($globalReceiverName, $failureTransports); } - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -83,9 +80,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $this->eventDispatcher->addSubscriber(new StopWorkerOnMessageLimitListener(1)); diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php index 8abef72aecf1b..b8752d902e2c9 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php @@ -29,9 +29,6 @@ #[AsCommand(name: 'messenger:failed:show', description: 'Show one or more messages from the failure transport')] class FailedMessagesShowCommand extends AbstractFailedMessagesCommand { - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -55,9 +52,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Messenger/Command/StatsCommand.php b/src/Symfony/Component/Messenger/Command/StatsCommand.php index 72592f4e42411..ec0e802e9c4ff 100644 --- a/src/Symfony/Component/Messenger/Command/StatsCommand.php +++ b/src/Symfony/Component/Messenger/Command/StatsCommand.php @@ -38,9 +38,6 @@ public function __construct(ContainerInterface $transportLocator, array $transpo parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -58,9 +55,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Messenger/Command/StopWorkersCommand.php b/src/Symfony/Component/Messenger/Command/StopWorkersCommand.php index 13a47540894d7..e7f7fe79de985 100644 --- a/src/Symfony/Component/Messenger/Command/StopWorkersCommand.php +++ b/src/Symfony/Component/Messenger/Command/StopWorkersCommand.php @@ -35,9 +35,6 @@ public function __construct(CacheItemPoolInterface $restartSignalCachePool) parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -55,9 +52,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php b/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php index 4cbfe0a5980a2..f73d681a3ebfd 100644 --- a/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php +++ b/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php @@ -32,17 +32,11 @@ public function registerBus(string $name, TraceableMessageBus $bus) $this->traceableBuses[$name] = $bus; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { // Noop. Everything is collected live by the traceable buses & cloned as late as possible. } - /** - * {@inheritdoc} - */ public function lateCollect() { $this->data = ['messages' => [], 'buses' => array_keys($this->traceableBuses)]; @@ -62,17 +56,11 @@ public function lateCollect() $this->data['messages'] = array_column($messages, 0); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'messenger'; } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; @@ -81,9 +69,6 @@ public function reset() } } - /** - * {@inheritdoc} - */ protected function getCasters(): array { $casters = parent::getCasters(); diff --git a/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php b/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php index 5d757426e0271..22a50ec1e89aa 100644 --- a/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php +++ b/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php @@ -31,9 +31,6 @@ */ class MessengerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { $busIds = []; diff --git a/src/Symfony/Component/Messenger/Handler/BatchHandlerTrait.php b/src/Symfony/Component/Messenger/Handler/BatchHandlerTrait.php index 292665c6bfe71..07ce0791518e2 100644 --- a/src/Symfony/Component/Messenger/Handler/BatchHandlerTrait.php +++ b/src/Symfony/Component/Messenger/Handler/BatchHandlerTrait.php @@ -18,9 +18,6 @@ trait BatchHandlerTrait { private array $jobs = []; - /** - * {@inheritdoc} - */ public function flush(bool $force): void { if ($jobs = $this->jobs) { diff --git a/src/Symfony/Component/Messenger/Handler/HandlersLocator.php b/src/Symfony/Component/Messenger/Handler/HandlersLocator.php index 4f089bf9399f8..2bb944e0a7a29 100644 --- a/src/Symfony/Component/Messenger/Handler/HandlersLocator.php +++ b/src/Symfony/Component/Messenger/Handler/HandlersLocator.php @@ -32,9 +32,6 @@ public function __construct(array $handlers) $this->handlers = $handlers; } - /** - * {@inheritdoc} - */ public function getHandlers(Envelope $envelope): iterable { $seen = []; diff --git a/src/Symfony/Component/Messenger/MessageBus.php b/src/Symfony/Component/Messenger/MessageBus.php index 6f27f444325d8..6980ec54bcfd6 100644 --- a/src/Symfony/Component/Messenger/MessageBus.php +++ b/src/Symfony/Component/Messenger/MessageBus.php @@ -52,9 +52,6 @@ public function getIterator(): \Traversable } } - /** - * {@inheritdoc} - */ public function dispatch(object $message, array $stamps = []): Envelope { $envelope = Envelope::wrap($message, $stamps); diff --git a/src/Symfony/Component/Messenger/Middleware/ActivationMiddleware.php b/src/Symfony/Component/Messenger/Middleware/ActivationMiddleware.php index 99e697f24b0ad..ae1e690ebdd00 100644 --- a/src/Symfony/Component/Messenger/Middleware/ActivationMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/ActivationMiddleware.php @@ -29,9 +29,6 @@ public function __construct(MiddlewareInterface $inner, bool|callable $activated $this->activated = \is_bool($activated) ? $activated : $activated(...); } - /** - * {@inheritdoc} - */ public function handle(Envelope $envelope, StackInterface $stack): Envelope { if (\is_callable($this->activated) ? ($this->activated)($envelope) : $this->activated) { diff --git a/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php b/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php index 5c814d5467e1d..e090b037e4b23 100644 --- a/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php @@ -44,8 +44,6 @@ public function __construct(HandlersLocatorInterface $handlersLocator, bool $all } /** - * {@inheritdoc} - * * @throws NoHandlerForMessageException When no handler is found and $allowNoHandlers is false */ public function handle(Envelope $envelope, StackInterface $stack): Envelope diff --git a/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php b/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php index d218864fac637..9a9f362876215 100644 --- a/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php @@ -38,9 +38,6 @@ public function __construct(SendersLocatorInterface $sendersLocator, EventDispat $this->logger = new NullLogger(); } - /** - * {@inheritdoc} - */ public function handle(Envelope $envelope, StackInterface $stack): Envelope { $context = [ diff --git a/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php b/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php index c09ebffc28178..075916d7823e4 100644 --- a/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php @@ -32,9 +32,6 @@ public function __construct(Stopwatch $stopwatch, string $busName, string $event $this->eventCategory = $eventCategory; } - /** - * {@inheritdoc} - */ public function handle(Envelope $envelope, StackInterface $stack): Envelope { $stack = new TraceableStack($stack, $this->stopwatch, $this->busName, $this->eventCategory); @@ -66,9 +63,6 @@ public function __construct(StackInterface $stack, Stopwatch $stopwatch, string $this->eventCategory = $eventCategory; } - /** - * {@inheritdoc} - */ public function next(): MiddlewareInterface { if (null !== $this->currentEvent && $this->stopwatch->isStarted($this->currentEvent)) { diff --git a/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php b/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php index 750ac603d4586..851ef295eb3d0 100644 --- a/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php @@ -28,9 +28,6 @@ public function __construct(ValidatorInterface $validator) $this->validator = $validator; } - /** - * {@inheritdoc} - */ public function handle(Envelope $envelope, StackInterface $stack): Envelope { $message = $envelope->getMessage(); diff --git a/src/Symfony/Component/Messenger/TraceableMessageBus.php b/src/Symfony/Component/Messenger/TraceableMessageBus.php index 16c0d529d027e..cbf3279cf59aa 100644 --- a/src/Symfony/Component/Messenger/TraceableMessageBus.php +++ b/src/Symfony/Component/Messenger/TraceableMessageBus.php @@ -24,9 +24,6 @@ public function __construct(MessageBusInterface $decoratedBus) $this->decoratedBus = $decoratedBus; } - /** - * {@inheritdoc} - */ public function dispatch(object $message, array $stamps = []): Envelope { $envelope = Envelope::wrap($message, $stamps); diff --git a/src/Symfony/Component/Messenger/Transport/InMemoryTransport.php b/src/Symfony/Component/Messenger/Transport/InMemoryTransport.php index f501d74dd29e2..68ec8b619eb77 100644 --- a/src/Symfony/Component/Messenger/Transport/InMemoryTransport.php +++ b/src/Symfony/Component/Messenger/Transport/InMemoryTransport.php @@ -52,17 +52,11 @@ public function __construct(SerializerInterface $serializer = null) $this->serializer = $serializer; } - /** - * {@inheritdoc} - */ public function get(): iterable { return array_values($this->decode($this->queue)); } - /** - * {@inheritdoc} - */ public function ack(Envelope $envelope): void { $this->acknowledged[] = $this->encode($envelope); @@ -74,9 +68,6 @@ public function ack(Envelope $envelope): void unset($this->queue[$transportMessageIdStamp->getId()]); } - /** - * {@inheritdoc} - */ public function reject(Envelope $envelope): void { $this->rejected[] = $this->encode($envelope); @@ -88,9 +79,6 @@ public function reject(Envelope $envelope): void unset($this->queue[$transportMessageIdStamp->getId()]); } - /** - * {@inheritdoc} - */ public function send(Envelope $envelope): Envelope { $id = $this->nextId++; diff --git a/src/Symfony/Component/Messenger/Transport/Sender/SendersLocator.php b/src/Symfony/Component/Messenger/Transport/Sender/SendersLocator.php index 42b93e1959719..5de6936d591f7 100644 --- a/src/Symfony/Component/Messenger/Transport/Sender/SendersLocator.php +++ b/src/Symfony/Component/Messenger/Transport/Sender/SendersLocator.php @@ -37,9 +37,6 @@ public function __construct(array $sendersMap, ContainerInterface $sendersLocato $this->sendersLocator = $sendersLocator; } - /** - * {@inheritdoc} - */ public function getSenders(Envelope $envelope): iterable { if ($envelope->all(TransportNamesStamp::class)) { diff --git a/src/Symfony/Component/Messenger/Transport/Serialization/Normalizer/FlattenExceptionNormalizer.php b/src/Symfony/Component/Messenger/Transport/Serialization/Normalizer/FlattenExceptionNormalizer.php index ed56136b281a2..eb673c1211fcc 100644 --- a/src/Symfony/Component/Messenger/Transport/Serialization/Normalizer/FlattenExceptionNormalizer.php +++ b/src/Symfony/Component/Messenger/Transport/Serialization/Normalizer/FlattenExceptionNormalizer.php @@ -26,9 +26,6 @@ final class FlattenExceptionNormalizer implements DenormalizerInterface, Context { use NormalizerAwareTrait; - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array { $normalized = [ @@ -48,17 +45,11 @@ public function normalize(mixed $object, string $format = null, array $context = return $normalized; } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return $data instanceof FlattenException && ($context[Serializer::MESSENGER_SERIALIZATION_CONTEXT] ?? false); } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): FlattenException { $object = new FlattenException(); @@ -85,9 +76,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $object; } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return FlattenException::class === $type && ($context[Serializer::MESSENGER_SERIALIZATION_CONTEXT] ?? false); diff --git a/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php b/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php index e6332b3cc6fb6..aecb98391429f 100644 --- a/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php +++ b/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php @@ -20,9 +20,6 @@ */ class PhpSerializer implements SerializerInterface { - /** - * {@inheritdoc} - */ public function decode(array $encodedEnvelope): Envelope { if (empty($encodedEnvelope['body'])) { @@ -38,9 +35,6 @@ public function decode(array $encodedEnvelope): Envelope return $this->safelyUnserialize($serializeEnvelope); } - /** - * {@inheritdoc} - */ public function encode(Envelope $envelope): array { $envelope = $envelope->withoutStampsOfType(NonSendableStampInterface::class); diff --git a/src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php b/src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php index 8ea870cc3b24b..02cc0077b91b8 100644 --- a/src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php +++ b/src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php @@ -58,9 +58,6 @@ public static function create(): self return new self($serializer); } - /** - * {@inheritdoc} - */ public function decode(array $encodedEnvelope): Envelope { if (empty($encodedEnvelope['body']) || empty($encodedEnvelope['headers'])) { @@ -90,9 +87,6 @@ public function decode(array $encodedEnvelope): Envelope return new Envelope($message, $stamps); } - /** - * {@inheritdoc} - */ public function encode(Envelope $envelope): array { $context = $this->context; diff --git a/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php b/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php index 5b2e66b5c2b11..fd9a40f532412 100644 --- a/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php +++ b/src/Symfony/Component/Mime/DependencyInjection/AddMimeTypeGuesserPass.php @@ -22,9 +22,6 @@ */ class AddMimeTypeGuesserPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if ($container->has('mime_types')) { diff --git a/src/Symfony/Component/Mime/Encoder/QpEncoder.php b/src/Symfony/Component/Mime/Encoder/QpEncoder.php index 04d853ba7982b..160dde32971cf 100644 --- a/src/Symfony/Component/Mime/Encoder/QpEncoder.php +++ b/src/Symfony/Component/Mime/Encoder/QpEncoder.php @@ -106,8 +106,6 @@ protected function initSafeMap(): void } /** - * {@inheritdoc} - * * Takes an unencoded string and produces a QP encoded string from it. * * QP encoded strings have a maximum line length of 76 characters. diff --git a/src/Symfony/Component/Mime/FileBinaryMimeTypeGuesser.php b/src/Symfony/Component/Mime/FileBinaryMimeTypeGuesser.php index 5d6bee847c346..83e2950cef3ff 100644 --- a/src/Symfony/Component/Mime/FileBinaryMimeTypeGuesser.php +++ b/src/Symfony/Component/Mime/FileBinaryMimeTypeGuesser.php @@ -36,9 +36,6 @@ public function __construct(string $cmd = 'file -b --mime -- %s 2>/dev/null') $this->cmd = $cmd; } - /** - * {@inheritdoc} - */ public function isGuesserSupported(): bool { static $supported = null; @@ -58,9 +55,6 @@ public function isGuesserSupported(): bool return $supported = 0 === $exitStatus && '' !== $binPath; } - /** - * {@inheritdoc} - */ public function guessMimeType(string $path): ?string { if (!is_file($path) || !is_readable($path)) { diff --git a/src/Symfony/Component/Mime/FileinfoMimeTypeGuesser.php b/src/Symfony/Component/Mime/FileinfoMimeTypeGuesser.php index c40a8196dd476..5e96b2478e01b 100644 --- a/src/Symfony/Component/Mime/FileinfoMimeTypeGuesser.php +++ b/src/Symfony/Component/Mime/FileinfoMimeTypeGuesser.php @@ -33,17 +33,11 @@ public function __construct(string $magicFile = null) $this->magicFile = $magicFile; } - /** - * {@inheritdoc} - */ public function isGuesserSupported(): bool { return \function_exists('finfo_open'); } - /** - * {@inheritdoc} - */ public function guessMimeType(string $path): ?string { if (!is_file($path) || !is_readable($path)) { diff --git a/src/Symfony/Component/Mime/MimeTypes.php b/src/Symfony/Component/Mime/MimeTypes.php index 77cdcc23c95a5..5d8ac9f6a3a7f 100644 --- a/src/Symfony/Component/Mime/MimeTypes.php +++ b/src/Symfony/Component/Mime/MimeTypes.php @@ -78,9 +78,6 @@ public function registerGuesser(MimeTypeGuesserInterface $guesser) array_unshift($this->guessers, $guesser); } - /** - * {@inheritdoc} - */ public function getExtensions(string $mimeType): array { if ($this->extensions) { @@ -90,9 +87,6 @@ public function getExtensions(string $mimeType): array return $extensions ?? self::MAP[$mimeType] ?? self::MAP[$lcMimeType ?? strtolower($mimeType)] ?? []; } - /** - * {@inheritdoc} - */ public function getMimeTypes(string $ext): array { if ($this->mimeTypes) { @@ -102,9 +96,6 @@ public function getMimeTypes(string $ext): array return $mimeTypes ?? self::REVERSE_MAP[$ext] ?? self::REVERSE_MAP[$lcExt ?? strtolower($ext)] ?? []; } - /** - * {@inheritdoc} - */ public function isGuesserSupported(): bool { foreach ($this->guessers as $guesser) { @@ -117,8 +108,6 @@ public function isGuesserSupported(): bool } /** - * {@inheritdoc} - * * The file is passed to each registered MIME type guesser in reverse order * of their registration (last registered is queried first). Once a guesser * returns a value that is not null, this method terminates and returns the diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php b/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php index e32e3d9513bed..d7d5b928dc367 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php @@ -27,9 +27,6 @@ public function __construct(string $headerName, string $expectedValue) $this->expectedValue = $expectedValue; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('contains address "%s" with value "%s"', $this->headerName, $this->expectedValue); @@ -37,8 +34,6 @@ public function toString(): string /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function matches($message): bool { @@ -64,8 +59,6 @@ protected function matches($message): bool /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function failureDescription($message): string { diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php b/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php index a0ee81ddd7a13..3ba5c724bae7c 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php @@ -26,9 +26,6 @@ public function __construct(int $expectedValue, string $transport = null) $this->transport = $transport; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has sent "%d" attachment(s)', $this->expectedValue); @@ -36,8 +33,6 @@ public function toString(): string /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function matches($message): bool { @@ -50,8 +45,6 @@ protected function matches($message): bool /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function failureDescription($message): string { diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php b/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php index ef4a28585b618..d2cd36b805a14 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php @@ -23,9 +23,6 @@ public function __construct(string $headerName) $this->headerName = $headerName; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has header "%s"', $this->headerName); @@ -33,8 +30,6 @@ public function toString(): string /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function matches($message): bool { @@ -47,8 +42,6 @@ protected function matches($message): bool /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function failureDescription($message): string { diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php b/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php index bb0cba6984a3a..752d370719555 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php @@ -26,9 +26,6 @@ public function __construct(string $headerName, string $expectedValue) $this->expectedValue = $expectedValue; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue); @@ -36,8 +33,6 @@ public function toString(): string /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function matches($message): bool { @@ -50,8 +45,6 @@ protected function matches($message): bool /** * @param RawMessage $message - * - * {@inheritdoc} */ protected function failureDescription($message): string { diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php b/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php index c9e0dc25b6987..00a4b9dea2cb1 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php @@ -24,17 +24,12 @@ public function __construct(string $expectedText) $this->expectedText = $expectedText; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('contains "%s"', $this->expectedText); } /** - * {@inheritdoc} - * * @param RawMessage $message */ protected function matches($message): bool @@ -47,8 +42,6 @@ protected function matches($message): bool } /** - * {@inheritdoc} - * * @param RawMessage $message */ protected function failureDescription($message): string diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php b/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php index 4f55ce04bcb79..00bfd5b415dd0 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php @@ -24,17 +24,12 @@ public function __construct(string $expectedText) $this->expectedText = $expectedText; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('contains "%s"', $this->expectedText); } /** - * {@inheritdoc} - * * @param RawMessage $message */ protected function matches($message): bool @@ -47,8 +42,6 @@ protected function matches($message): bool } /** - * {@inheritdoc} - * * @param RawMessage $message */ protected function failureDescription($message): string diff --git a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransportFactory.php index 6f1332ba5ebda..5ec001ed5171b 100644 --- a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransportFactory.php @@ -21,9 +21,6 @@ */ final class KazInfoTehTransportFactory extends AbstractTransportFactory { - /** - * {@inheritdoc} - */ public function create(Dsn $dsn): TransportInterface { $scheme = $dsn->getScheme(); @@ -41,9 +38,6 @@ public function create(Dsn $dsn): TransportInterface return (new KazInfoTehTransport($username, $password, $sender, $this->client, $this->dispatcher))->setHost($host)->setPort($port); } - /** - * {@inheritdoc} - */ protected function getSupportedSchemes(): array { return ['kaz-info-teh']; diff --git a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php index 25f08cd16bf29..64934c65a91c6 100644 --- a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php @@ -31,25 +31,16 @@ public function createTransport(HttpClientInterface $client = null): TransportIn return (new KazInfoTehTransport('username', 'password', 'sender', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('test.host'); } - /** - * {@inheritdoc} - */ public function toStringProvider(): iterable { yield ['kaz-info-teh://test.host?sender=sender', $this->createTransport()]; } - /** - * {@inheritdoc} - */ public function supportedMessagesProvider(): iterable { yield [new SmsMessage('77000000000', 'KazInfoTeh!')]; } - /** - * {@inheritdoc} - */ public function unsupportedMessagesProvider(): iterable { yield [new SmsMessage('420000000000', 'KazInfoTeh!')]; diff --git a/src/Symfony/Component/Notifier/DataCollector/NotificationDataCollector.php b/src/Symfony/Component/Notifier/DataCollector/NotificationDataCollector.php index a2a7079a379e8..20e727020835d 100644 --- a/src/Symfony/Component/Notifier/DataCollector/NotificationDataCollector.php +++ b/src/Symfony/Component/Notifier/DataCollector/NotificationDataCollector.php @@ -29,9 +29,6 @@ public function __construct(NotificationLoggerListener $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->data['events'] = $this->logger->getEvents(); @@ -42,17 +39,11 @@ public function getEvents(): NotificationEvents return $this->data['events']; } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'notifier'; diff --git a/src/Symfony/Component/Notifier/EventListener/NotificationLoggerListener.php b/src/Symfony/Component/Notifier/EventListener/NotificationLoggerListener.php index 063f2425b16c7..41f1b7a08674a 100644 --- a/src/Symfony/Component/Notifier/EventListener/NotificationLoggerListener.php +++ b/src/Symfony/Component/Notifier/EventListener/NotificationLoggerListener.php @@ -28,9 +28,6 @@ public function __construct() $this->events = new NotificationEvents(); } - /** - * {@inheritdoc} - */ public function reset() { $this->events = new NotificationEvents(); diff --git a/src/Symfony/Component/Notifier/Test/Constraint/NotificationCount.php b/src/Symfony/Component/Notifier/Test/Constraint/NotificationCount.php index d7a5953763de7..ed820ccc2bb9a 100644 --- a/src/Symfony/Component/Notifier/Test/Constraint/NotificationCount.php +++ b/src/Symfony/Component/Notifier/Test/Constraint/NotificationCount.php @@ -30,9 +30,6 @@ public function __construct(int $expectedValue, string $transport = null, bool $ $this->queued = $queued; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('%shas %s "%d" emails', $this->transport ? $this->transport.' ' : '', $this->queued ? 'queued' : 'sent', $this->expectedValue); @@ -40,8 +37,6 @@ public function toString(): string /** * @param NotificationEvents $events - * - * {@inheritdoc} */ protected function matches($events): bool { @@ -50,8 +45,6 @@ protected function matches($events): bool /** * @param NotificationEvents $events - * - * {@inheritdoc} */ protected function failureDescription($events): string { diff --git a/src/Symfony/Component/Notifier/Test/Constraint/NotificationIsQueued.php b/src/Symfony/Component/Notifier/Test/Constraint/NotificationIsQueued.php index ced1041cbd4a8..90548ca30203d 100644 --- a/src/Symfony/Component/Notifier/Test/Constraint/NotificationIsQueued.php +++ b/src/Symfony/Component/Notifier/Test/Constraint/NotificationIsQueued.php @@ -19,9 +19,6 @@ */ final class NotificationIsQueued extends Constraint { - /** - * {@inheritdoc} - */ public function toString(): string { return 'is queued'; @@ -29,8 +26,6 @@ public function toString(): string /** * @param MessageEvent $event - * - * {@inheritdoc} */ protected function matches($event): bool { @@ -39,8 +34,6 @@ protected function matches($event): bool /** * @param MessageEvent $event - * - * {@inheritdoc} */ protected function failureDescription($event): string { diff --git a/src/Symfony/Component/Notifier/Test/Constraint/NotificationSubjectContains.php b/src/Symfony/Component/Notifier/Test/Constraint/NotificationSubjectContains.php index a021f895b8341..2d3fdb806334c 100644 --- a/src/Symfony/Component/Notifier/Test/Constraint/NotificationSubjectContains.php +++ b/src/Symfony/Component/Notifier/Test/Constraint/NotificationSubjectContains.php @@ -26,17 +26,12 @@ public function __construct(string $expectedText) $this->expectedText = $expectedText; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('contains "%s"', $this->expectedText); } /** - * {@inheritdoc} - * * @param MessageInterface $message */ protected function matches($message): bool @@ -45,8 +40,6 @@ protected function matches($message): bool } /** - * {@inheritdoc} - * * @param MessageInterface $message */ protected function failureDescription($message): string diff --git a/src/Symfony/Component/Notifier/Test/Constraint/NotificationTransportIsEqual.php b/src/Symfony/Component/Notifier/Test/Constraint/NotificationTransportIsEqual.php index 9800c2509758d..16b1c2b4e3134 100644 --- a/src/Symfony/Component/Notifier/Test/Constraint/NotificationTransportIsEqual.php +++ b/src/Symfony/Component/Notifier/Test/Constraint/NotificationTransportIsEqual.php @@ -26,17 +26,12 @@ public function __construct(string $expectedText) $this->expectedText = $expectedText; } - /** - * {@inheritdoc} - */ public function toString(): string { return sprintf('is "%s"', $this->expectedText); } /** - * {@inheritdoc} - * * @param MessageInterface $message */ protected function matches($message): bool @@ -45,8 +40,6 @@ protected function matches($message): bool } /** - * {@inheritdoc} - * * @param MessageInterface $message */ protected function failureDescription($message): string diff --git a/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php b/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php index 02e1dc5d49ac8..81122d1cd3424 100644 --- a/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php +++ b/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php @@ -49,9 +49,6 @@ public function __construct(PasswordHasherFactoryInterface $hasherFactory, array parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure() { $this @@ -100,9 +97,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Component/PasswordHasher/Hasher/NativePasswordHasher.php b/src/Symfony/Component/PasswordHasher/Hasher/NativePasswordHasher.php index b6dc3661fed6d..2259152071080 100644 --- a/src/Symfony/Component/PasswordHasher/Hasher/NativePasswordHasher.php +++ b/src/Symfony/Component/PasswordHasher/Hasher/NativePasswordHasher.php @@ -110,9 +110,6 @@ public function verify(string $hashedPassword, #[\SensitiveParameter] string $pl return password_verify($plainPassword, $hashedPassword); } - /** - * {@inheritdoc} - */ public function needsRehash(string $hashedPassword): bool { return password_needs_rehash($hashedPassword, $this->algorithm, $this->options); diff --git a/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php b/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php index 8b795a16c7a7f..88ef53a926a85 100644 --- a/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php +++ b/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php @@ -33,9 +33,6 @@ public function __construct(array $passwordHashers) $this->passwordHashers = $passwordHashers; } - /** - * {@inheritdoc} - */ public function getPasswordHasher(string|PasswordAuthenticatedUserInterface|PasswordHasherAwareInterface $user): PasswordHasherInterface { $hasherKey = null; diff --git a/src/Symfony/Component/PasswordHasher/Hasher/PlaintextPasswordHasher.php b/src/Symfony/Component/PasswordHasher/Hasher/PlaintextPasswordHasher.php index 68562631fac15..537075bba0c6e 100644 --- a/src/Symfony/Component/PasswordHasher/Hasher/PlaintextPasswordHasher.php +++ b/src/Symfony/Component/PasswordHasher/Hasher/PlaintextPasswordHasher.php @@ -35,9 +35,6 @@ public function __construct(bool $ignorePasswordCase = false) $this->ignorePasswordCase = $ignorePasswordCase; } - /** - * {@inheritdoc} - */ public function hash(#[\SensitiveParameter] string $plainPassword, string $salt = null): string { if ($this->isPasswordTooLong($plainPassword)) { diff --git a/src/Symfony/Component/Process/PhpProcess.php b/src/Symfony/Component/Process/PhpProcess.php index cb749f9bbbe71..486bc1dac6866 100644 --- a/src/Symfony/Component/Process/PhpProcess.php +++ b/src/Symfony/Component/Process/PhpProcess.php @@ -50,17 +50,11 @@ public function __construct(string $script, string $cwd = null, array $env = nul parent::__construct($php, $cwd, $env, $script, $timeout); } - /** - * {@inheritdoc} - */ public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, mixed $input = null, ?float $timeout = 60): static { throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class)); } - /** - * {@inheritdoc} - */ public function start(callable $callback = null, array $env = []) { if (null === $this->getCommandLine()) { diff --git a/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/src/Symfony/Component/Process/Pipes/AbstractPipes.php index bc3a7a687433b..51d3af0b52624 100644 --- a/src/Symfony/Component/Process/Pipes/AbstractPipes.php +++ b/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -41,9 +41,6 @@ public function __construct(mixed $input) } } - /** - * {@inheritdoc} - */ public function close() { foreach ($this->pipes as $pipe) { diff --git a/src/Symfony/Component/Process/Pipes/UnixPipes.php b/src/Symfony/Component/Process/Pipes/UnixPipes.php index 09c82f35b444b..aba0efced3dba 100644 --- a/src/Symfony/Component/Process/Pipes/UnixPipes.php +++ b/src/Symfony/Component/Process/Pipes/UnixPipes.php @@ -50,9 +50,6 @@ public function __destruct() $this->close(); } - /** - * {@inheritdoc} - */ public function getDescriptors(): array { if (!$this->haveReadSupport) { @@ -88,17 +85,11 @@ public function getDescriptors(): array ]; } - /** - * {@inheritdoc} - */ public function getFiles(): array { return []; } - /** - * {@inheritdoc} - */ public function readAndWrite(bool $blocking, bool $close = false): array { $this->unblock(); @@ -145,17 +136,11 @@ public function readAndWrite(bool $blocking, bool $close = false): array return $read; } - /** - * {@inheritdoc} - */ public function haveReadSupport(): bool { return $this->haveReadSupport; } - /** - * {@inheritdoc} - */ public function areOpen(): bool { return (bool) $this->pipes; diff --git a/src/Symfony/Component/Process/Pipes/WindowsPipes.php b/src/Symfony/Component/Process/Pipes/WindowsPipes.php index e68ed951264ff..9f4dedb289da0 100644 --- a/src/Symfony/Component/Process/Pipes/WindowsPipes.php +++ b/src/Symfony/Component/Process/Pipes/WindowsPipes.php @@ -103,9 +103,6 @@ public function __destruct() $this->close(); } - /** - * {@inheritdoc} - */ public function getDescriptors(): array { if (!$this->haveReadSupport) { @@ -128,17 +125,11 @@ public function getDescriptors(): array ]; } - /** - * {@inheritdoc} - */ public function getFiles(): array { return $this->files; } - /** - * {@inheritdoc} - */ public function readAndWrite(bool $blocking, bool $close = false): array { $this->unblock(); @@ -171,25 +162,16 @@ public function readAndWrite(bool $blocking, bool $close = false): array return $read; } - /** - * {@inheritdoc} - */ public function haveReadSupport(): bool { return $this->haveReadSupport; } - /** - * {@inheritdoc} - */ public function areOpen(): bool { return $this->pipes && $this->fileHandles; } - /** - * {@inheritdoc} - */ public function close() { parent::close(); diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index 532bc06d2558e..c076f572df616 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -102,9 +102,6 @@ public function __construct(int $magicMethods = self::MAGIC_GET | self::MAGIC_SE $this->writeInfoExtractor = $writeInfoExtractor ?? new ReflectionExtractor(['set'], null, null, false); } - /** - * {@inheritdoc} - */ public function getValue(object|array $objectOrArray, string|PropertyPathInterface $propertyPath): mixed { $zval = [ @@ -122,9 +119,6 @@ public function getValue(object|array $objectOrArray, string|PropertyPathInterfa return $propertyValues[\count($propertyValues) - 1][self::VALUE]; } - /** - * {@inheritdoc} - */ public function setValue(object|array &$objectOrArray, string|PropertyPathInterface $propertyPath, mixed $value) { if (\is_object($objectOrArray) && false === strpbrk((string) $propertyPath, '.[')) { @@ -220,9 +214,6 @@ private static function throwInvalidArgumentException(string $message, array $tr } } - /** - * {@inheritdoc} - */ public function isReadable(object|array $objectOrArray, string|PropertyPathInterface $propertyPath): bool { if (!$propertyPath instanceof PropertyPathInterface) { @@ -243,9 +234,6 @@ public function isReadable(object|array $objectOrArray, string|PropertyPathInter } } - /** - * {@inheritdoc} - */ public function isWritable(object|array $objectOrArray, string|PropertyPathInterface $propertyPath): bool { $propertyPath = $this->getPropertyPath($propertyPath); diff --git a/src/Symfony/Component/PropertyAccess/PropertyPath.php b/src/Symfony/Component/PropertyAccess/PropertyPath.php index 6aa0c4cafc82d..9dac36b7ba3a9 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPath.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPath.php @@ -116,17 +116,11 @@ public function __toString(): string return $this->pathAsString; } - /** - * {@inheritdoc} - */ public function getLength(): int { return $this->length; } - /** - * {@inheritdoc} - */ public function getParent(): ?PropertyPathInterface { if ($this->length <= 1) { @@ -151,17 +145,11 @@ public function getIterator(): PropertyPathIteratorInterface return new PropertyPathIterator($this); } - /** - * {@inheritdoc} - */ public function getElements(): array { return $this->elements; } - /** - * {@inheritdoc} - */ public function getElement(int $index): string { if (!isset($this->elements[$index])) { @@ -171,9 +159,6 @@ public function getElement(int $index): string return $this->elements[$index]; } - /** - * {@inheritdoc} - */ public function isProperty(int $index): bool { if (!isset($this->isIndex[$index])) { @@ -183,9 +168,6 @@ public function isProperty(int $index): bool return !$this->isIndex[$index]; } - /** - * {@inheritdoc} - */ public function isIndex(int $index): bool { if (!isset($this->isIndex[$index])) { diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php b/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php index 0f79ad2bbd897..0312ba156c142 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php @@ -30,17 +30,11 @@ public function __construct(PropertyPathInterface $path) $this->path = $path; } - /** - * {@inheritdoc} - */ public function isIndex(): bool { return $this->path->isIndex($this->key()); } - /** - * {@inheritdoc} - */ public function isProperty(): bool { return $this->path->isProperty($this->key()); diff --git a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php index 4c2be76a66262..48a2b5790b665 100644 --- a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php +++ b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoConstructorPass.php @@ -25,9 +25,6 @@ final class PropertyInfoConstructorPass implements CompilerPassInterface { use PriorityTaggedServiceTrait; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('property_info.constructor_extractor')) { diff --git a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php index 6e6ae1bc888f6..eeda8853e947c 100644 --- a/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php +++ b/src/Symfony/Component/PropertyInfo/DependencyInjection/PropertyInfoPass.php @@ -25,9 +25,6 @@ class PropertyInfoPass implements CompilerPassInterface { use PriorityTaggedServiceTrait; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('property_info')) { diff --git a/src/Symfony/Component/PropertyInfo/Extractor/ConstructorExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/ConstructorExtractor.php index fb32634fb02d6..9ee807111f4b8 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/ConstructorExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/ConstructorExtractor.php @@ -30,9 +30,6 @@ public function __construct(iterable $extractors = []) $this->extractors = $extractors; } - /** - * {@inheritdoc} - */ public function getTypes(string $class, string $property, array $context = []): ?array { foreach ($this->extractors as $extractor) { diff --git a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php index 0579169135547..3f235ca127687 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php @@ -71,9 +71,6 @@ public function __construct(DocBlockFactoryInterface $docBlockFactory = null, ar $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes; } - /** - * {@inheritdoc} - */ public function getShortDescription(string $class, string $property, array $context = []): ?string { /** @var $docBlock DocBlock */ @@ -101,9 +98,6 @@ public function getShortDescription(string $class, string $property, array $cont return null; } - /** - * {@inheritdoc} - */ public function getLongDescription(string $class, string $property, array $context = []): ?string { /** @var $docBlock DocBlock */ @@ -117,9 +111,6 @@ public function getLongDescription(string $class, string $property, array $conte return '' === $contents ? null : $contents; } - /** - * {@inheritdoc} - */ public function getTypes(string $class, string $property, array $context = []): ?array { /** @var $docBlock DocBlock */ @@ -173,9 +164,6 @@ public function getTypes(string $class, string $property, array $context = []): return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])]; } - /** - * {@inheritdoc} - */ public function getTypesFromConstructor(string $class, string $property): ?array { $docBlock = $this->getDocBlockFromConstructor($class, $property); diff --git a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php index a88cd4683af6f..09c2ff4fbac2d 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php @@ -98,9 +98,6 @@ public function __construct(array $mutatorPrefixes = null, array $accessorPrefix $this->arrayMutatorPrefixesLast = array_reverse($this->arrayMutatorPrefixesFirst); } - /** - * {@inheritdoc} - */ public function getProperties(string $class, array $context = []): ?array { try { @@ -136,9 +133,6 @@ public function getProperties(string $class, array $context = []): ?array return $properties ? array_values($properties) : null; } - /** - * {@inheritdoc} - */ public function getTypes(string $class, string $property, array $context = []): ?array { if ($fromMutator = $this->extractFromMutator($class, $property)) { @@ -163,9 +157,6 @@ public function getTypes(string $class, string $property, array $context = []): return null; } - /** - * {@inheritdoc} - */ public function getTypesFromConstructor(string $class, string $property): ?array { try { @@ -201,9 +192,6 @@ private function getReflectionParameterFromConstructor(string $property, \Reflec return null; } - /** - * {@inheritdoc} - */ public function isReadable(string $class, string $property, array $context = []): ?bool { if ($this->isAllowedProperty($class, $property)) { @@ -213,9 +201,6 @@ public function isReadable(string $class, string $property, array $context = []) return null !== $this->getReadInfo($class, $property, $context); } - /** - * {@inheritdoc} - */ public function isWritable(string $class, string $property, array $context = []): ?bool { if ($this->isAllowedProperty($class, $property)) { @@ -227,9 +212,6 @@ public function isWritable(string $class, string $property, array $context = []) return null !== $reflectionMethod; } - /** - * {@inheritdoc} - */ public function isInitializable(string $class, string $property, array $context = []): ?bool { try { @@ -255,9 +237,6 @@ public function isInitializable(string $class, string $property, array $context return false; } - /** - * {@inheritdoc} - */ public function getReadInfo(string $class, string $property, array $context = []): ?PropertyReadInfo { try { @@ -307,9 +286,6 @@ public function getReadInfo(string $class, string $property, array $context = [] return null; } - /** - * {@inheritdoc} - */ public function getWriteInfo(string $class, string $property, array $context = []): ?PropertyWriteInfo { try { diff --git a/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php index 08ff10d04ac8f..35253848b0a7a 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php @@ -30,9 +30,6 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory) $this->classMetadataFactory = $classMetadataFactory; } - /** - * {@inheritdoc} - */ public function getProperties(string $class, array $context = []): ?array { if (!\array_key_exists('serializer_groups', $context) || (null !== $context['serializer_groups'] && !\is_array($context['serializer_groups']))) { diff --git a/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php b/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php index 16ae73690298a..f096d2d8fabe6 100644 --- a/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php +++ b/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php @@ -32,57 +32,36 @@ public function __construct(PropertyInfoExtractorInterface $propertyInfoExtracto $this->cacheItemPool = $cacheItemPool; } - /** - * {@inheritdoc} - */ public function isReadable(string $class, string $property, array $context = []): ?bool { return $this->extract('isReadable', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function isWritable(string $class, string $property, array $context = []): ?bool { return $this->extract('isWritable', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function getShortDescription(string $class, string $property, array $context = []): ?string { return $this->extract('getShortDescription', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function getLongDescription(string $class, string $property, array $context = []): ?string { return $this->extract('getLongDescription', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function getProperties(string $class, array $context = []): ?array { return $this->extract('getProperties', [$class, $context]); } - /** - * {@inheritdoc} - */ public function getTypes(string $class, string $property, array $context = []): ?array { return $this->extract('getTypes', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function isInitializable(string $class, string $property, array $context = []): ?bool { return $this->extract('isInitializable', [$class, $property, $context]); diff --git a/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php b/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php index e16dfa1b79d4b..c3ab15725a1c2 100644 --- a/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php +++ b/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php @@ -42,57 +42,36 @@ public function __construct(iterable $listExtractors = [], iterable $typeExtract $this->initializableExtractors = $initializableExtractors; } - /** - * {@inheritdoc} - */ public function getProperties(string $class, array $context = []): ?array { return $this->extract($this->listExtractors, 'getProperties', [$class, $context]); } - /** - * {@inheritdoc} - */ public function getShortDescription(string $class, string $property, array $context = []): ?string { return $this->extract($this->descriptionExtractors, 'getShortDescription', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function getLongDescription(string $class, string $property, array $context = []): ?string { return $this->extract($this->descriptionExtractors, 'getLongDescription', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function getTypes(string $class, string $property, array $context = []): ?array { return $this->extract($this->typeExtractors, 'getTypes', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function isReadable(string $class, string $property, array $context = []): ?bool { return $this->extract($this->accessExtractors, 'isReadable', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function isWritable(string $class, string $property, array $context = []): ?bool { return $this->extract($this->accessExtractors, 'isWritable', [$class, $property, $context]); } - /** - * {@inheritdoc} - */ public function isInitializable(string $class, string $property, array $context = []): ?bool { return $this->extract($this->initializableExtractors, 'isInitializable', [$class, $property, $context]); diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php index d1d1b3ac25cb5..31cd4a7f8fffc 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php @@ -24,65 +24,41 @@ */ class DummyExtractor implements PropertyListExtractorInterface, PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface, PropertyInitializableExtractorInterface, ConstructorArgumentTypeExtractorInterface { - /** - * {@inheritdoc} - */ public function getShortDescription($class, $property, array $context = []): ?string { return 'short'; } - /** - * {@inheritdoc} - */ public function getLongDescription($class, $property, array $context = []): ?string { return 'long'; } - /** - * {@inheritdoc} - */ public function getTypes($class, $property, array $context = []): ?array { return [new Type(Type::BUILTIN_TYPE_INT)]; } - /** - * {@inheritdoc} - */ public function getTypesFromConstructor(string $class, string $property): ?array { return [new Type(Type::BUILTIN_TYPE_STRING)]; } - /** - * {@inheritdoc} - */ public function isReadable($class, $property, array $context = []): ?bool { return true; } - /** - * {@inheritdoc} - */ public function isWritable($class, $property, array $context = []): ?bool { return true; } - /** - * {@inheritdoc} - */ public function getProperties($class, array $context = []): ?array { return ['a', 'b']; } - /** - * {@inheritdoc} - */ public function isInitializable(string $class, string $property, array $context = []): ?bool { return true; diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php index 0f5a3e16ea279..3a18b0d8eaef0 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php @@ -24,9 +24,6 @@ */ class NullExtractor implements PropertyListExtractorInterface, PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface, PropertyInitializableExtractorInterface { - /** - * {@inheritdoc} - */ public function getShortDescription($class, $property, array $context = []): ?string { $this->assertIsString($class); @@ -35,9 +32,6 @@ public function getShortDescription($class, $property, array $context = []): ?st return null; } - /** - * {@inheritdoc} - */ public function getLongDescription($class, $property, array $context = []): ?string { $this->assertIsString($class); @@ -46,9 +40,6 @@ public function getLongDescription($class, $property, array $context = []): ?str return null; } - /** - * {@inheritdoc} - */ public function getTypes($class, $property, array $context = []): ?array { $this->assertIsString($class); @@ -57,9 +48,6 @@ public function getTypes($class, $property, array $context = []): ?array return null; } - /** - * {@inheritdoc} - */ public function isReadable($class, $property, array $context = []): ?bool { $this->assertIsString($class); @@ -68,9 +56,6 @@ public function isReadable($class, $property, array $context = []): ?bool return null; } - /** - * {@inheritdoc} - */ public function isWritable($class, $property, array $context = []): ?bool { $this->assertIsString($class); @@ -79,9 +64,6 @@ public function isWritable($class, $property, array $context = []): ?bool return null; } - /** - * {@inheritdoc} - */ public function getProperties($class, array $context = []): ?array { $this->assertIsString($class); @@ -89,9 +71,6 @@ public function getProperties($class, array $context = []): ?array return null; } - /** - * {@inheritdoc} - */ public function isInitializable(string $class, string $property, array $context = []): ?bool { return null; diff --git a/src/Symfony/Component/RateLimiter/Policy/FixedWindowLimiter.php b/src/Symfony/Component/RateLimiter/Policy/FixedWindowLimiter.php index ca84eddb62038..e440a03a91783 100644 --- a/src/Symfony/Component/RateLimiter/Policy/FixedWindowLimiter.php +++ b/src/Symfony/Component/RateLimiter/Policy/FixedWindowLimiter.php @@ -87,9 +87,6 @@ public function reserve(int $tokens = 1, float $maxTime = null): Reservation return $reservation; } - /** - * {@inheritdoc} - */ public function consume(int $tokens = 1): RateLimit { try { diff --git a/src/Symfony/Component/RateLimiter/Policy/ResetLimiterTrait.php b/src/Symfony/Component/RateLimiter/Policy/ResetLimiterTrait.php index e060d738972d6..827080c45fdf8 100644 --- a/src/Symfony/Component/RateLimiter/Policy/ResetLimiterTrait.php +++ b/src/Symfony/Component/RateLimiter/Policy/ResetLimiterTrait.php @@ -20,9 +20,6 @@ trait ResetLimiterTrait private StorageInterface $storage; private string $id; - /** - * {@inheritdoc} - */ public function reset(): void { try { diff --git a/src/Symfony/Component/RateLimiter/Policy/SlidingWindowLimiter.php b/src/Symfony/Component/RateLimiter/Policy/SlidingWindowLimiter.php index 0e6d156b1186d..c07963b9e98e1 100644 --- a/src/Symfony/Component/RateLimiter/Policy/SlidingWindowLimiter.php +++ b/src/Symfony/Component/RateLimiter/Policy/SlidingWindowLimiter.php @@ -52,9 +52,6 @@ public function reserve(int $tokens = 1, float $maxTime = null): Reservation throw new ReserveNotSupportedException(__CLASS__); } - /** - * {@inheritdoc} - */ public function consume(int $tokens = 1): RateLimit { $this->lock->acquire(true); diff --git a/src/Symfony/Component/RateLimiter/Policy/TokenBucketLimiter.php b/src/Symfony/Component/RateLimiter/Policy/TokenBucketLimiter.php index 8b1df15cbe28f..1c551f3ec2172 100644 --- a/src/Symfony/Component/RateLimiter/Policy/TokenBucketLimiter.php +++ b/src/Symfony/Component/RateLimiter/Policy/TokenBucketLimiter.php @@ -103,9 +103,6 @@ public function reserve(int $tokens = 1, float $maxTime = null): Reservation return $reservation; } - /** - * {@inheritdoc} - */ public function consume(int $tokens = 1): RateLimit { try { diff --git a/src/Symfony/Component/Routing/Generator/Dumper/CompiledUrlGeneratorDumper.php b/src/Symfony/Component/Routing/Generator/Dumper/CompiledUrlGeneratorDumper.php index 7ac5a2abcda73..1144fed5c0e1c 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/CompiledUrlGeneratorDumper.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/CompiledUrlGeneratorDumper.php @@ -88,9 +88,6 @@ public function getCompiledAliases(): array return $compiledAliases; } - /** - * {@inheritdoc} - */ public function dump(array $options = []): string { return <<routes = $routes; } - /** - * {@inheritdoc} - */ public function getRoutes(): RouteCollection { return $this->routes; diff --git a/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/Symfony/Component/Routing/Generator/UrlGenerator.php index 7a1821ef5e3dc..7b27dcc7a9bca 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -91,41 +91,26 @@ public function __construct(RouteCollection $routes, RequestContext $context, Lo $this->defaultLocale = $defaultLocale; } - /** - * {@inheritdoc} - */ public function setContext(RequestContext $context) { $this->context = $context; } - /** - * {@inheritdoc} - */ public function getContext(): RequestContext { return $this->context; } - /** - * {@inheritdoc} - */ public function setStrictRequirements(?bool $enabled) { $this->strictRequirements = $enabled; } - /** - * {@inheritdoc} - */ public function isStrictRequirements(): ?bool { return $this->strictRequirements; } - /** - * {@inheritdoc} - */ public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string { $route = null; diff --git a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php index 5f3a852d32a65..b63dc5c85e665 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -225,24 +225,15 @@ protected function addRoute(RouteCollection $collection, object $annot, array $g } } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return \is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || \in_array($type, ['annotation', 'attribute'], true)); } - /** - * {@inheritdoc} - */ public function setResolver(LoaderResolverInterface $resolver) { } - /** - * {@inheritdoc} - */ public function getResolver(): LoaderResolverInterface { } diff --git a/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php index f40fd857187d6..4699a5c6bce69 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php @@ -64,9 +64,6 @@ function (\SplFileInfo $current) { return $collection; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { if (\in_array($type, ['annotation', 'attribute'], true)) { diff --git a/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php index 9f52408163a62..5699824d8bc5f 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php @@ -62,9 +62,6 @@ public function load(mixed $file, string $type = null): ?RouteCollection return $collection; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || \in_array($type, ['annotation', 'attribute'], true)); diff --git a/src/Symfony/Component/Routing/Loader/ClosureLoader.php b/src/Symfony/Component/Routing/Loader/ClosureLoader.php index e0d64402661ab..e079e78c2731b 100644 --- a/src/Symfony/Component/Routing/Loader/ClosureLoader.php +++ b/src/Symfony/Component/Routing/Loader/ClosureLoader.php @@ -31,9 +31,6 @@ public function load(mixed $closure, string $type = null): RouteCollection return $closure($this->env); } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return $resource instanceof \Closure && (!$type || 'closure' === $type); diff --git a/src/Symfony/Component/Routing/Loader/ContainerLoader.php b/src/Symfony/Component/Routing/Loader/ContainerLoader.php index a4afdf3d46a89..716ec499a9408 100644 --- a/src/Symfony/Component/Routing/Loader/ContainerLoader.php +++ b/src/Symfony/Component/Routing/Loader/ContainerLoader.php @@ -28,17 +28,11 @@ public function __construct(ContainerInterface $container, string $env = null) parent::__construct($env); } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return 'service' === $type && \is_string($resource); } - /** - * {@inheritdoc} - */ protected function getObject(string $id): object { return $this->container->get($id); diff --git a/src/Symfony/Component/Routing/Loader/DirectoryLoader.php b/src/Symfony/Component/Routing/Loader/DirectoryLoader.php index 4ccbb7b8891aa..5f241bffeb6b1 100644 --- a/src/Symfony/Component/Routing/Loader/DirectoryLoader.php +++ b/src/Symfony/Component/Routing/Loader/DirectoryLoader.php @@ -17,9 +17,6 @@ class DirectoryLoader extends FileLoader { - /** - * {@inheritdoc} - */ public function load(mixed $file, string $type = null): mixed { $path = $this->locator->locate($file); @@ -46,9 +43,6 @@ public function load(mixed $file, string $type = null): mixed return $collection; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { // only when type is forced to directory, not to conflict with AnnotationLoader diff --git a/src/Symfony/Component/Routing/Loader/GlobFileLoader.php b/src/Symfony/Component/Routing/Loader/GlobFileLoader.php index 3cf49ccff7e1e..d3974fc7dd92f 100644 --- a/src/Symfony/Component/Routing/Loader/GlobFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/GlobFileLoader.php @@ -21,9 +21,6 @@ */ class GlobFileLoader extends FileLoader { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): mixed { $collection = new RouteCollection(); @@ -37,9 +34,6 @@ public function load(mixed $resource, string $type = null): mixed return $collection; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return 'glob' === $type; diff --git a/src/Symfony/Component/Routing/Loader/PhpFileLoader.php b/src/Symfony/Component/Routing/Loader/PhpFileLoader.php index 8a4d642527665..6abee2e82bc4a 100644 --- a/src/Symfony/Component/Routing/Loader/PhpFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/PhpFileLoader.php @@ -54,9 +54,6 @@ public function load(mixed $file, string $type = null): RouteCollection return $collection; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'php' === $type); diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index 364ef115ccb8c..4d360d2ae9ab7 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -92,9 +92,6 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, str } } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return \is_string($resource) && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'xml' === $type); diff --git a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php index 204f2b1b90f5e..c30adf1e2ae8a 100644 --- a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -105,9 +105,6 @@ public function load(mixed $file, string $type = null): RouteCollection return $collection; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return \is_string($resource) && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), ['yml', 'yaml'], true) && (!$type || 'yaml' === $type); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php index c3953d08e44cc..980aa8e51f864 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php @@ -34,9 +34,6 @@ class CompiledUrlMatcherDumper extends MatcherDumper */ private array $expressionLanguageProviders = []; - /** - * {@inheritdoc} - */ public function dump(array $options = []): string { return <<routes = $routes; } - /** - * {@inheritdoc} - */ public function getRoutes(): RouteCollection { return $this->routes; diff --git a/src/Symfony/Component/Routing/Matcher/ExpressionLanguageProvider.php b/src/Symfony/Component/Routing/Matcher/ExpressionLanguageProvider.php index 0d89a07b03c7e..303798d644032 100644 --- a/src/Symfony/Component/Routing/Matcher/ExpressionLanguageProvider.php +++ b/src/Symfony/Component/Routing/Matcher/ExpressionLanguageProvider.php @@ -29,9 +29,6 @@ public function __construct(ServiceProviderInterface $functions) $this->functions = $functions; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { $functions = []; diff --git a/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php index a1c55cc5c5f6f..8d1ad4f90ad8b 100644 --- a/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php @@ -19,9 +19,6 @@ */ abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface { - /** - * {@inheritdoc} - */ public function match(string $pathinfo): array { try { diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index 22fa5facfd3f6..68fb25db80032 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -62,25 +62,16 @@ public function __construct(RouteCollection $routes, RequestContext $context) $this->context = $context; } - /** - * {@inheritdoc} - */ public function setContext(RequestContext $context) { $this->context = $context; } - /** - * {@inheritdoc} - */ public function getContext(): RequestContext { return $this->context; } - /** - * {@inheritdoc} - */ public function match(string $pathinfo): array { $this->allow = $this->allowSchemes = []; @@ -96,9 +87,6 @@ public function match(string $pathinfo): array throw 0 < \count($this->allow) ? new MethodNotAllowedException(array_unique($this->allow)) : new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); } - /** - * {@inheritdoc} - */ public function matchRequest(Request $request): array { $this->request = $request; diff --git a/src/Symfony/Component/Routing/RouteCompiler.php b/src/Symfony/Component/Routing/RouteCompiler.php index 8c09e28227154..330639f48ef42 100644 --- a/src/Symfony/Component/Routing/RouteCompiler.php +++ b/src/Symfony/Component/Routing/RouteCompiler.php @@ -35,8 +35,6 @@ class RouteCompiler implements RouteCompilerInterface public const VARIABLE_MAXIMUM_LENGTH = 32; /** - * {@inheritdoc} - * * @throws \InvalidArgumentException if a path variable is named _fragment * @throws \LogicException if a variable is referenced more than once * @throws \DomainException if a variable name starts with a digit or if it is too long to be successfully used as diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index 1142fc9714272..b23166cc5ef8f 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -174,9 +174,6 @@ public function getOption(string $key): mixed return $this->options[$key]; } - /** - * {@inheritdoc} - */ public function getRouteCollection() { if (null === $this->collection) { @@ -186,9 +183,6 @@ public function getRouteCollection() return $this->collection; } - /** - * {@inheritdoc} - */ public function setContext(RequestContext $context) { $this->context = $context; @@ -201,9 +195,6 @@ public function setContext(RequestContext $context) } } - /** - * {@inheritdoc} - */ public function getContext(): RequestContext { return $this->context; @@ -217,25 +208,16 @@ public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFa $this->configCacheFactory = $configCacheFactory; } - /** - * {@inheritdoc} - */ public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string { return $this->getGenerator()->generate($name, $parameters, $referenceType); } - /** - * {@inheritdoc} - */ public function match(string $pathinfo): array { return $this->getMatcher()->match($pathinfo); } - /** - * {@inheritdoc} - */ public function matchRequest(Request $request): array { $matcher = $this->getMatcher(); diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php b/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php index 57c07c3140f75..234f610d89afe 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/CustomRouteCompiler.php @@ -17,9 +17,6 @@ class CustomRouteCompiler extends RouteCompiler { - /** - * {@inheritdoc} - */ public static function compile(Route $route): CompiledRoute { return new CustomCompiledRoute('', '', [], []); diff --git a/src/Symfony/Component/Runtime/GenericRuntime.php b/src/Symfony/Component/Runtime/GenericRuntime.php index 1d77529dfa093..0a31dd3d899f8 100644 --- a/src/Symfony/Component/Runtime/GenericRuntime.php +++ b/src/Symfony/Component/Runtime/GenericRuntime.php @@ -83,9 +83,6 @@ public function __construct(array $options = []) $this->options = $options; } - /** - * {@inheritdoc} - */ public function getResolver(callable $callable, \ReflectionFunction $reflector = null): ResolverInterface { $callable = $callable(...); @@ -114,9 +111,6 @@ public function getResolver(callable $callable, \ReflectionFunction $reflector = return new ClosureResolver($callable, $arguments); } - /** - * {@inheritdoc} - */ public function getRunner(?object $application): RunnerInterface { if (null === $application) { diff --git a/src/Symfony/Component/Runtime/Resolver/ClosureResolver.php b/src/Symfony/Component/Runtime/Resolver/ClosureResolver.php index 3394295a7ad1a..183dcd6ad7777 100644 --- a/src/Symfony/Component/Runtime/Resolver/ClosureResolver.php +++ b/src/Symfony/Component/Runtime/Resolver/ClosureResolver.php @@ -27,9 +27,6 @@ public function __construct(\Closure $closure, \Closure $arguments) $this->arguments = $arguments; } - /** - * {@inheritdoc} - */ public function resolve(): array { return [$this->closure, ($this->arguments)()]; diff --git a/src/Symfony/Component/Runtime/Resolver/DebugClosureResolver.php b/src/Symfony/Component/Runtime/Resolver/DebugClosureResolver.php index e382cec53a944..923ae905b7875 100644 --- a/src/Symfony/Component/Runtime/Resolver/DebugClosureResolver.php +++ b/src/Symfony/Component/Runtime/Resolver/DebugClosureResolver.php @@ -16,9 +16,6 @@ */ class DebugClosureResolver extends ClosureResolver { - /** - * {@inheritdoc} - */ public function resolve(): array { [$closure, $arguments] = parent::resolve(); diff --git a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php index 52967c6a8bb99..4f9d46f2cae1f 100644 --- a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php +++ b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php @@ -26,17 +26,11 @@ public function isAuthenticated(TokenInterface $token = null): bool return $token && $token->getUser(); } - /** - * {@inheritdoc} - */ public function isRememberMe(TokenInterface $token = null): bool { return $token && $token instanceof RememberMeToken; } - /** - * {@inheritdoc} - */ public function isFullFledged(TokenInterface $token = null): bool { return $this->isAuthenticated($token) && !$this->isRememberMe($token); diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/CacheTokenVerifier.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/CacheTokenVerifier.php index a9af59270b721..e4f1362a16cd7 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/CacheTokenVerifier.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/CacheTokenVerifier.php @@ -35,9 +35,6 @@ public function __construct(CacheItemPoolInterface $cache, int $outdatedTokenTtl $this->cacheKeyPrefix = $cacheKeyPrefix; } - /** - * {@inheritdoc} - */ public function verifyToken(PersistentTokenInterface $token, #[\SensitiveParameter] string $tokenValue): bool { if (hash_equals($token->getTokenValue(), $tokenValue)) { @@ -55,9 +52,6 @@ public function verifyToken(PersistentTokenInterface $token, #[\SensitiveParamet return hash_equals($outdatedToken, $tokenValue); } - /** - * {@inheritdoc} - */ public function updateExistingToken(PersistentTokenInterface $token, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed): void { // When a token gets updated, persist the outdated token for $outdatedTokenTtl seconds so we can diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php index e6d526613524a..e47b29f5a71a4 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php @@ -22,9 +22,6 @@ class InMemoryTokenProvider implements TokenProviderInterface { private array $tokens = []; - /** - * {@inheritdoc} - */ public function loadTokenBySeries(string $series): PersistentTokenInterface { if (!isset($this->tokens[$series])) { @@ -34,9 +31,6 @@ public function loadTokenBySeries(string $series): PersistentTokenInterface return $this->tokens[$series]; } - /** - * {@inheritdoc} - */ public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTime $lastUsed) { if (!isset($this->tokens[$series])) { @@ -53,17 +47,11 @@ public function updateToken(string $series, #[\SensitiveParameter] string $token $this->tokens[$series] = $token; } - /** - * {@inheritdoc} - */ public function deleteTokenBySeries(string $series) { unset($this->tokens[$series]); } - /** - * {@inheritdoc} - */ public function createNewToken(PersistentTokenInterface $token) { $this->tokens[$token->getSeries()] = $token; diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php index 9f3f9e76e6d02..79e5fc23dd482 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php @@ -46,9 +46,6 @@ public function __construct(string $class, string $userIdentifier, string $serie $this->lastUsed = $lastUsed; } - /** - * {@inheritdoc} - */ public function getClass(): string { return $this->class; @@ -59,25 +56,16 @@ public function getUserIdentifier(): string return $this->userIdentifier; } - /** - * {@inheritdoc} - */ public function getSeries(): string { return $this->series; } - /** - * {@inheritdoc} - */ public function getTokenValue(): string { return $this->tokenValue; } - /** - * {@inheritdoc} - */ public function getLastUsed(): \DateTime { return $this->lastUsed; diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php index 6b0a737824a67..63185eec03b9d 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php @@ -38,9 +38,6 @@ public function __construct(array $roles = []) } } - /** - * {@inheritdoc} - */ public function getRoleNames(): array { return $this->roleNames; @@ -51,25 +48,16 @@ public function getUserIdentifier(): string return $this->user ? $this->user->getUserIdentifier() : ''; } - /** - * {@inheritdoc} - */ public function getUser(): ?UserInterface { return $this->user; } - /** - * {@inheritdoc} - */ public function setUser(UserInterface $user) { $this->user = $user; } - /** - * {@inheritdoc} - */ public function eraseCredentials() { if ($this->getUser() instanceof UserInterface) { @@ -119,33 +107,21 @@ public function __unserialize(array $data): void $this->user = \is_string($user) ? new InMemoryUser($user, '', $this->roleNames, false) : $user; } - /** - * {@inheritdoc} - */ public function getAttributes(): array { return $this->attributes; } - /** - * {@inheritdoc} - */ public function setAttributes(array $attributes) { $this->attributes = $attributes; } - /** - * {@inheritdoc} - */ public function hasAttribute(string $name): bool { return \array_key_exists($name, $this->attributes); } - /** - * {@inheritdoc} - */ public function getAttribute(string $name): mixed { if (!\array_key_exists($name, $this->attributes)) { @@ -155,9 +131,6 @@ public function getAttribute(string $name): mixed return $this->attributes[$name]; } - /** - * {@inheritdoc} - */ public function setAttribute(string $name, mixed $value) { $this->attributes[$name] = $value; diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php index da269b8950284..a216d4c180e28 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php @@ -42,17 +42,11 @@ public function getFirewallName(): string return $this->firewallName; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [null, $this->firewallName, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [, $this->firewallName, $parentData] = $data; diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php index 147c1d68b6888..cf99502e0bf01 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php @@ -56,17 +56,11 @@ public function getSecret(): string return $this->secret; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [$this->secret, $this->firewallName, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [$this->secret, $this->firewallName, $parentData] = $data; diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php index 72450dc9d95f1..73f536cbf0be7 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php @@ -27,9 +27,6 @@ class TokenStorage implements TokenStorageInterface, ResetInterface private ?TokenInterface $token = null; private ?\Closure $initializer = null; - /** - * {@inheritdoc} - */ public function getToken(): ?TokenInterface { if ($initializer = $this->initializer) { @@ -40,9 +37,6 @@ public function getToken(): ?TokenInterface return $this->token; } - /** - * {@inheritdoc} - */ public function setToken(TokenInterface $token = null) { if ($token) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php index 46f6c96e1f006..b66671270ee7e 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php @@ -34,9 +34,6 @@ public function __construct(TokenStorageInterface $storage, ContainerInterface $ $this->container = $container; } - /** - * {@inheritdoc} - */ public function getToken(): ?TokenInterface { if ($this->shouldTrackUsage()) { @@ -47,9 +44,6 @@ public function getToken(): ?TokenInterface return $this->storage->getToken(); } - /** - * {@inheritdoc} - */ public function setToken(TokenInterface $token = null): void { $this->storage->setToken($token); diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/SwitchUserToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/SwitchUserToken.php index feb8c297333e7..ccb3c569785ea 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/SwitchUserToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/SwitchUserToken.php @@ -47,17 +47,11 @@ public function getOriginatedFromUri(): ?string return $this->originatedFromUri; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [$this->originalToken, $this->originatedFromUri, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { if (3 > \count($data)) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php index cd25b2b68a057..74e24a2115760 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php @@ -39,17 +39,11 @@ public function getFirewallName(): string return $this->firewallName; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [null, $this->firewallName, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [, $this->firewallName, $parentData] = $data; diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index eccbec9b1a13a..ed5857577c86b 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -48,8 +48,6 @@ public function __construct(iterable $voters = [], AccessDecisionStrategyInterfa /** * @param bool $allowMultipleAttributes Whether to allow passing multiple values to the $attributes array - * - * {@inheritdoc} */ public function decide(TokenInterface $token, array $attributes, mixed $object = null, bool $allowMultipleAttributes = false): bool { diff --git a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php index b2b131d08a63a..478ea01cba63b 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php +++ b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php @@ -38,9 +38,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AccessDecisionM $this->accessDecisionManager = $accessDecisionManager; } - /** - * {@inheritdoc} - */ final public function isGranted(mixed $attribute, mixed $subject = null): bool { $token = $this->tokenStorage->getToken(); diff --git a/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php b/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php index 6d9ad0acdb796..8f87767a28e7e 100644 --- a/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php +++ b/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php @@ -29,9 +29,6 @@ class_exists(ExpressionLanguageProvider::class); */ class ExpressionLanguage extends BaseExpressionLanguage { - /** - * {@inheritdoc} - */ public function __construct(CacheItemPoolInterface $cache = null, array $providers = []) { // prepend the default provider to let users override it easily diff --git a/src/Symfony/Component/Security/Core/Authorization/Strategy/AffirmativeStrategy.php b/src/Symfony/Component/Security/Core/Authorization/Strategy/AffirmativeStrategy.php index 3d6a5df37b4e6..ecd74b208616c 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Strategy/AffirmativeStrategy.php +++ b/src/Symfony/Component/Security/Core/Authorization/Strategy/AffirmativeStrategy.php @@ -31,9 +31,6 @@ public function __construct(bool $allowIfAllAbstainDecisions = false) $this->allowIfAllAbstainDecisions = $allowIfAllAbstainDecisions; } - /** - * {@inheritdoc} - */ public function decide(\Traversable $results): bool { $deny = 0; diff --git a/src/Symfony/Component/Security/Core/Authorization/Strategy/PriorityStrategy.php b/src/Symfony/Component/Security/Core/Authorization/Strategy/PriorityStrategy.php index d1942ede58f4d..9599950c7fdbb 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Strategy/PriorityStrategy.php +++ b/src/Symfony/Component/Security/Core/Authorization/Strategy/PriorityStrategy.php @@ -32,9 +32,6 @@ public function __construct(bool $allowIfAllAbstainDecisions = false) $this->allowIfAllAbstainDecisions = $allowIfAllAbstainDecisions; } - /** - * {@inheritdoc} - */ public function decide(\Traversable $results): bool { foreach ($results as $result) { diff --git a/src/Symfony/Component/Security/Core/Authorization/Strategy/UnanimousStrategy.php b/src/Symfony/Component/Security/Core/Authorization/Strategy/UnanimousStrategy.php index 092fe3a0425c1..1f3b85c548fbf 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Strategy/UnanimousStrategy.php +++ b/src/Symfony/Component/Security/Core/Authorization/Strategy/UnanimousStrategy.php @@ -31,9 +31,6 @@ public function __construct(bool $allowIfAllAbstainDecisions = false) $this->allowIfAllAbstainDecisions = $allowIfAllAbstainDecisions; } - /** - * {@inheritdoc} - */ public function decide(\Traversable $results): bool { $grant = 0; diff --git a/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php index 30d5de8f01771..c07297eac48ab 100644 --- a/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php @@ -45,9 +45,6 @@ public function __construct(AccessDecisionManagerInterface $manager) } } - /** - * {@inheritdoc} - */ public function decide(TokenInterface $token, array $attributes, mixed $object = null, bool $allowMultipleAttributes = false): bool { $currentDecisionLog = [ diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php index bc72bb811b53c..d7b2b22431b04 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php @@ -40,9 +40,6 @@ public function __construct(AuthenticationTrustResolverInterface $authentication $this->authenticationTrustResolver = $authenticationTrustResolver; } - /** - * {@inheritdoc} - */ public function vote(TokenInterface $token, mixed $subject, array $attributes): int { if ($attributes === [self::PUBLIC_ACCESS]) { diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php index 3f50dccca47ac..87f191d8badd7 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php @@ -49,9 +49,6 @@ public function supportsType(string $subjectType): bool return true; } - /** - * {@inheritdoc} - */ public function vote(TokenInterface $token, mixed $subject, array $attributes): int { $result = VoterInterface::ACCESS_ABSTAIN; diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php index 11c44138c81bb..18ef2413f95c6 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php @@ -31,9 +31,6 @@ public function __construct(RoleHierarchyInterface $roleHierarchy, string $prefi parent::__construct($prefix); } - /** - * {@inheritdoc} - */ protected function extractRoles(TokenInterface $token) { return $this->roleHierarchy->getReachableRoleNames($token->getRoleNames()); diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php index b751a31e57fa2..8e8d7181ae934 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php @@ -27,9 +27,6 @@ public function __construct(string $prefix = 'ROLE_') $this->prefix = $prefix; } - /** - * {@inheritdoc} - */ public function vote(TokenInterface $token, mixed $subject, array $attributes): int { $result = VoterInterface::ACCESS_ABSTAIN; diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php index 2382b72f419e3..6ac75993101ff 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php @@ -21,9 +21,6 @@ */ abstract class Voter implements VoterInterface, CacheableVoterInterface { - /** - * {@inheritdoc} - */ public function vote(TokenInterface $token, mixed $subject, array $attributes): int { // abstain vote by default in case none of the attributes are supported diff --git a/src/Symfony/Component/Security/Core/Exception/AccountExpiredException.php b/src/Symfony/Component/Security/Core/Exception/AccountExpiredException.php index b344d6613ed0a..91ea122e7627a 100644 --- a/src/Symfony/Component/Security/Core/Exception/AccountExpiredException.php +++ b/src/Symfony/Component/Security/Core/Exception/AccountExpiredException.php @@ -19,9 +19,6 @@ */ class AccountExpiredException extends AccountStatusException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Account has expired.'; diff --git a/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php b/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php index 76878f9ff2916..58053905758cc 100644 --- a/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php +++ b/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php @@ -37,17 +37,11 @@ public function setUser(UserInterface $user) $this->user = $user; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [$this->user, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [$this->user, $parentData] = $data; diff --git a/src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php b/src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php index 55e44424827a3..fc28e4e50e07e 100644 --- a/src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php +++ b/src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php @@ -20,9 +20,6 @@ */ class AuthenticationCredentialsNotFoundException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Authentication credentials could not be found.'; diff --git a/src/Symfony/Component/Security/Core/Exception/AuthenticationExpiredException.php b/src/Symfony/Component/Security/Core/Exception/AuthenticationExpiredException.php index a1a26fb1f06ac..1d04c5e86fe9c 100644 --- a/src/Symfony/Component/Security/Core/Exception/AuthenticationExpiredException.php +++ b/src/Symfony/Component/Security/Core/Exception/AuthenticationExpiredException.php @@ -21,9 +21,6 @@ */ class AuthenticationExpiredException extends AccountStatusException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Authentication expired because your account information has changed.'; diff --git a/src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php b/src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php index c57a969ffbe2a..fa5042e15f65c 100644 --- a/src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php +++ b/src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php @@ -19,9 +19,6 @@ */ class AuthenticationServiceException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Authentication request could not be processed due to a system problem.'; diff --git a/src/Symfony/Component/Security/Core/Exception/BadCredentialsException.php b/src/Symfony/Component/Security/Core/Exception/BadCredentialsException.php index e89598eb2b957..6aeed7b00e8e1 100644 --- a/src/Symfony/Component/Security/Core/Exception/BadCredentialsException.php +++ b/src/Symfony/Component/Security/Core/Exception/BadCredentialsException.php @@ -19,9 +19,6 @@ */ class BadCredentialsException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Invalid credentials.'; diff --git a/src/Symfony/Component/Security/Core/Exception/CookieTheftException.php b/src/Symfony/Component/Security/Core/Exception/CookieTheftException.php index 4b8ebcf110fce..a32f30d545879 100644 --- a/src/Symfony/Component/Security/Core/Exception/CookieTheftException.php +++ b/src/Symfony/Component/Security/Core/Exception/CookieTheftException.php @@ -20,9 +20,6 @@ */ class CookieTheftException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Cookie has already been used by someone else.'; diff --git a/src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php b/src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php index f21fcf8d189bb..50183772920ab 100644 --- a/src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php +++ b/src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php @@ -19,9 +19,6 @@ */ class CredentialsExpiredException extends AccountStatusException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Credentials have expired.'; diff --git a/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAccountStatusException.php b/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAccountStatusException.php index 569cfa0d0d984..0c59a954a7ce3 100644 --- a/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAccountStatusException.php +++ b/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAccountStatusException.php @@ -55,17 +55,11 @@ public function getMessageData(): array return $this->messageData; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [parent::__serialize(), $this->messageKey, $this->messageData]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [$parentData, $this->messageKey, $this->messageData] = $data; diff --git a/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php b/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php index 42f9c4df984a7..b935df3a3c1ba 100644 --- a/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php +++ b/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php @@ -54,17 +54,11 @@ public function getMessageData(): array return $this->messageData; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [parent::__serialize(), $this->messageKey, $this->messageData]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [$parentData, $this->messageKey, $this->messageData] = $data; diff --git a/src/Symfony/Component/Security/Core/Exception/DisabledException.php b/src/Symfony/Component/Security/Core/Exception/DisabledException.php index f598a16b28559..b82067cc42027 100644 --- a/src/Symfony/Component/Security/Core/Exception/DisabledException.php +++ b/src/Symfony/Component/Security/Core/Exception/DisabledException.php @@ -19,9 +19,6 @@ */ class DisabledException extends AccountStatusException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Account is disabled.'; diff --git a/src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php b/src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php index 9d26a30450f76..0221dfd22a548 100644 --- a/src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php +++ b/src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php @@ -21,9 +21,6 @@ */ class InsufficientAuthenticationException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Not privileged to request the resource.'; diff --git a/src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php b/src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php index 7a90f0efd4031..2041cf6b8a8d3 100644 --- a/src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php +++ b/src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php @@ -19,9 +19,6 @@ */ class InvalidCsrfTokenException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Invalid CSRF token.'; diff --git a/src/Symfony/Component/Security/Core/Exception/LockedException.php b/src/Symfony/Component/Security/Core/Exception/LockedException.php index 8943aee747fc1..fb81cb0545183 100644 --- a/src/Symfony/Component/Security/Core/Exception/LockedException.php +++ b/src/Symfony/Component/Security/Core/Exception/LockedException.php @@ -19,9 +19,6 @@ */ class LockedException extends AccountStatusException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Account is locked.'; diff --git a/src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php b/src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php index 584a592e6d8d7..e4daf4ef345f6 100644 --- a/src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php +++ b/src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php @@ -20,9 +20,6 @@ */ class ProviderNotFoundException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'No authentication provider found to support the authentication token.'; diff --git a/src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php b/src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php index 1d55cb1e82008..eec069c5d5301 100644 --- a/src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php +++ b/src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php @@ -25,9 +25,6 @@ */ class SessionUnavailableException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'No session available, it either timed out or cookies are not enabled.'; diff --git a/src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php b/src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php index 290b4f5662374..a18f0d080af25 100644 --- a/src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php +++ b/src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php @@ -19,9 +19,6 @@ */ class TokenNotFoundException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'No token could be found.'; diff --git a/src/Symfony/Component/Security/Core/Exception/TooManyLoginAttemptsAuthenticationException.php b/src/Symfony/Component/Security/Core/Exception/TooManyLoginAttemptsAuthenticationException.php index ffd7114945d20..eab1d5062264f 100644 --- a/src/Symfony/Component/Security/Core/Exception/TooManyLoginAttemptsAuthenticationException.php +++ b/src/Symfony/Component/Security/Core/Exception/TooManyLoginAttemptsAuthenticationException.php @@ -26,9 +26,6 @@ public function __construct(int $threshold = null) $this->threshold = $threshold; } - /** - * {@inheritdoc} - */ public function getMessageData(): array { return [ @@ -37,25 +34,16 @@ public function getMessageData(): array ]; } - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Too many failed login attempts, please try again '.($this->threshold ? 'in %minutes% minute'.($this->threshold > 1 ? 's' : '').'.' : 'later.'); } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [$this->threshold, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [$this->threshold, $parentData] = $data; diff --git a/src/Symfony/Component/Security/Core/Exception/UserNotFoundException.php b/src/Symfony/Component/Security/Core/Exception/UserNotFoundException.php index 17f488b6dd0ec..6cd9b7127553b 100644 --- a/src/Symfony/Component/Security/Core/Exception/UserNotFoundException.php +++ b/src/Symfony/Component/Security/Core/Exception/UserNotFoundException.php @@ -21,9 +21,6 @@ class UserNotFoundException extends AuthenticationException { private ?string $identifier = null; - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Username could not be found.'; @@ -45,25 +42,16 @@ public function setUserIdentifier(string $identifier): void $this->identifier = $identifier; } - /** - * {@inheritdoc} - */ public function getMessageData(): array { return ['{{ username }}' => $this->identifier, '{{ user_identifier }}' => $this->identifier]; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [$this->identifier, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [$this->identifier, $parentData] = $data; diff --git a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php index f7b4b0942a613..080647c8b34ba 100644 --- a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php +++ b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -32,9 +32,6 @@ public function __construct(array $hierarchy) $this->buildRoleMap(); } - /** - * {@inheritdoc} - */ public function getReachableRoleNames(array $roles): array { $reachableRoles = $roles; diff --git a/src/Symfony/Component/Security/Core/User/ChainUserProvider.php b/src/Symfony/Component/Security/Core/User/ChainUserProvider.php index 29a6c4b67e8ff..47ebbc1a8e339 100644 --- a/src/Symfony/Component/Security/Core/User/ChainUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/ChainUserProvider.php @@ -69,9 +69,6 @@ public function loadUserByIdentifier(string $identifier): UserInterface throw $ex; } - /** - * {@inheritdoc} - */ public function refreshUser(UserInterface $user): UserInterface { $supportedUserFound = false; @@ -101,9 +98,6 @@ public function refreshUser(UserInterface $user): UserInterface } } - /** - * {@inheritdoc} - */ public function supportsClass(string $class): bool { foreach ($this->providers as $provider) { @@ -115,9 +109,6 @@ public function supportsClass(string $class): bool return false; } - /** - * {@inheritdoc} - */ public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void { foreach ($this->providers as $provider) { diff --git a/src/Symfony/Component/Security/Core/User/InMemoryUser.php b/src/Symfony/Component/Security/Core/User/InMemoryUser.php index 1a5067492067d..ca9884174f10f 100644 --- a/src/Symfony/Component/Security/Core/User/InMemoryUser.php +++ b/src/Symfony/Component/Security/Core/User/InMemoryUser.php @@ -43,17 +43,11 @@ public function __toString(): string return $this->getUserIdentifier(); } - /** - * {@inheritdoc} - */ public function getRoles(): array { return $this->roles; } - /** - * {@inheritdoc} - */ public function getPassword(): ?string { return $this->password; @@ -82,16 +76,10 @@ public function isEnabled(): bool return $this->enabled; } - /** - * {@inheritdoc} - */ public function eraseCredentials() { } - /** - * {@inheritdoc} - */ public function isEqualTo(UserInterface $user): bool { if (!$user instanceof self) { diff --git a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php index b7e24813edc24..dcf25c7c84f18 100644 --- a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php @@ -69,9 +69,6 @@ public function loadUserByIdentifier(string $identifier): UserInterface return new InMemoryUser($user->getUserIdentifier(), $user->getPassword(), $user->getRoles(), $user->isEnabled()); } - /** - * {@inheritdoc} - */ public function refreshUser(UserInterface $user): UserInterface { if (!$user instanceof InMemoryUser) { @@ -84,9 +81,6 @@ public function refreshUser(UserInterface $user): UserInterface return new InMemoryUser($userIdentifier, $storedUser->getPassword(), $storedUser->getRoles(), $storedUser->isEnabled()); } - /** - * {@inheritdoc} - */ public function supportsClass(string $class): bool { return InMemoryUser::class == $class; diff --git a/src/Symfony/Component/Security/Core/User/MissingUserProvider.php b/src/Symfony/Component/Security/Core/User/MissingUserProvider.php index 02df05169e9b8..4d389ffcf56ca 100644 --- a/src/Symfony/Component/Security/Core/User/MissingUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/MissingUserProvider.php @@ -29,9 +29,6 @@ public function __construct(string $firewall) throw new InvalidConfigurationException(sprintf('"%s" firewall requires a user provider but none was defined.', $firewall)); } - /** - * {@inheritdoc} - */ public function loadUserByUsername(string $username): UserInterface { throw new \BadMethodCallException(); @@ -42,17 +39,11 @@ public function loadUserByIdentifier(string $identifier): UserInterface throw new \BadMethodCallException(); } - /** - * {@inheritdoc} - */ public function refreshUser(UserInterface $user): UserInterface { throw new \BadMethodCallException(); } - /** - * {@inheritdoc} - */ public function supportsClass(string $class): bool { throw new \BadMethodCallException(); diff --git a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php index ba37598e688e8..f7be4bb6e8ab1 100644 --- a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php +++ b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php @@ -31,9 +31,6 @@ public function __construct(array $options = null, string $message = null, strin $this->service = $service ?? $this->service; } - /** - * {@inheritdoc} - */ public function validatedBy(): string { return $this->service; diff --git a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php index 178cf771aa6db..56e7d35c8b9eb 100644 --- a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php +++ b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php @@ -31,9 +31,6 @@ public function __construct(TokenStorageInterface $tokenStorage, PasswordHasherF $this->hasherFactory = $hasherFactory; } - /** - * {@inheritdoc} - */ public function validate(mixed $password, Constraint $constraint) { if (!$constraint instanceof UserPassword) { diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php index ad376593d65f5..7d6dbda5489f4 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php @@ -65,9 +65,6 @@ public function __construct(TokenGeneratorInterface $generator = null, TokenStor } } - /** - * {@inheritdoc} - */ public function getToken(string $tokenId): CsrfToken { $namespacedId = $this->getNamespace().$tokenId; @@ -82,9 +79,6 @@ public function getToken(string $tokenId): CsrfToken return new CsrfToken($tokenId, $this->randomize($value)); } - /** - * {@inheritdoc} - */ public function refreshToken(#[\SensitiveParameter] string $tokenId): CsrfToken { $namespacedId = $this->getNamespace().$tokenId; @@ -95,17 +89,11 @@ public function refreshToken(#[\SensitiveParameter] string $tokenId): CsrfToken return new CsrfToken($tokenId, $this->randomize($value)); } - /** - * {@inheritdoc} - */ public function removeToken(string $tokenId): ?string { return $this->storage->removeToken($this->getNamespace().$tokenId); } - /** - * {@inheritdoc} - */ public function isTokenValid(CsrfToken $token): bool { $namespacedId = $this->getNamespace().$token->getId(); diff --git a/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php b/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php index 071bbed1bd36f..242598527b478 100644 --- a/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php +++ b/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php @@ -30,9 +30,6 @@ public function __construct(int $entropy = 256) $this->entropy = $entropy; } - /** - * {@inheritdoc} - */ public function generateToken(): string { // Generate an URI safe base64 encoded string that does not contain "+", diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php index bec3b406098f0..15bdaaf82046e 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php @@ -38,9 +38,6 @@ public function __construct(string $namespace = self::SESSION_NAMESPACE) $this->namespace = $namespace; } - /** - * {@inheritdoc} - */ public function getToken(string $tokenId): string { if (!$this->sessionStarted) { @@ -54,9 +51,6 @@ public function getToken(string $tokenId): string return (string) $_SESSION[$this->namespace][$tokenId]; } - /** - * {@inheritdoc} - */ public function setToken(string $tokenId, string $token) { if (!$this->sessionStarted) { @@ -66,9 +60,6 @@ public function setToken(string $tokenId, string $token) $_SESSION[$this->namespace][$tokenId] = $token; } - /** - * {@inheritdoc} - */ public function hasToken(string $tokenId): bool { if (!$this->sessionStarted) { @@ -78,9 +69,6 @@ public function hasToken(string $tokenId): bool return isset($_SESSION[$this->namespace][$tokenId]); } - /** - * {@inheritdoc} - */ public function removeToken(string $tokenId): ?string { if (!$this->sessionStarted) { @@ -102,9 +90,6 @@ public function removeToken(string $tokenId): ?string return $token; } - /** - * {@inheritdoc} - */ public function clear() { unset($_SESSION[$this->namespace]); diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php b/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php index a2e4ea86ab126..bed96fa4c2960 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php @@ -42,9 +42,6 @@ public function __construct(RequestStack $requestStack, string $namespace = self $this->namespace = $namespace; } - /** - * {@inheritdoc} - */ public function getToken(string $tokenId): string { $session = $this->getSession(); @@ -59,9 +56,6 @@ public function getToken(string $tokenId): string return (string) $session->get($this->namespace.'/'.$tokenId); } - /** - * {@inheritdoc} - */ public function setToken(string $tokenId, string $token) { $session = $this->getSession(); @@ -72,9 +66,6 @@ public function setToken(string $tokenId, string $token) $session->set($this->namespace.'/'.$tokenId, $token); } - /** - * {@inheritdoc} - */ public function hasToken(string $tokenId): bool { $session = $this->getSession(); @@ -85,9 +76,6 @@ public function hasToken(string $tokenId): bool return $session->has($this->namespace.'/'.$tokenId); } - /** - * {@inheritdoc} - */ public function removeToken(string $tokenId): ?string { $session = $this->getSession(); @@ -98,9 +86,6 @@ public function removeToken(string $tokenId): ?string return $session->remove($this->namespace.'/'.$tokenId); } - /** - * {@inheritdoc} - */ public function clear() { $session = $this->getSession(); diff --git a/src/Symfony/Component/Security/Http/AccessMap.php b/src/Symfony/Component/Security/Http/AccessMap.php index 0abaeb06d4e30..701428783795a 100644 --- a/src/Symfony/Component/Security/Http/AccessMap.php +++ b/src/Symfony/Component/Security/Http/AccessMap.php @@ -33,9 +33,6 @@ public function add(RequestMatcherInterface $requestMatcher, array $attributes = $this->map[] = [$requestMatcher, $attributes, $channel]; } - /** - * {@inheritdoc} - */ public function getPatterns(Request $request): array { foreach ($this->map as $elements) { diff --git a/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.php b/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.php index 7046acda1214f..8fc4ba30ccb68 100644 --- a/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.php @@ -33,9 +33,6 @@ public function __construct(AuthenticationFailureHandlerInterface $handler, arra } } - /** - * {@inheritdoc} - */ public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response { return $this->handler->onAuthenticationFailure($request, $exception); diff --git a/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php b/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php index 86d32efe694ab..5340b9ec2ff0e 100644 --- a/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php @@ -37,9 +37,6 @@ public function __construct(AuthenticationSuccessHandlerInterface $handler, arra } } - /** - * {@inheritdoc} - */ public function onAuthenticationSuccess(Request $request, TokenInterface $token): Response { return $this->handler->onAuthenticationSuccess($request, $token); diff --git a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php index f7537e0c947f7..6903005be2b68 100644 --- a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -64,9 +64,6 @@ public function setOptions(array $options) $this->options = array_merge($this->defaultOptions, $options); } - /** - * {@inheritdoc} - */ public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response { $options = $this->options; diff --git a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 734c650d99a9a..a6eeffcd2668f 100644 --- a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -52,9 +52,6 @@ public function __construct(HttpUtils $httpUtils, array $options = [], LoggerInt $this->setOptions($options); } - /** - * {@inheritdoc} - */ public function onAuthenticationSuccess(Request $request, TokenInterface $token): Response { return $this->httpUtils->createRedirectResponse($request, $this->determineTargetUrl($request)); diff --git a/src/Symfony/Component/Security/Http/Authenticator/AbstractLoginFormAuthenticator.php b/src/Symfony/Component/Security/Http/Authenticator/AbstractLoginFormAuthenticator.php index 18670f759a67c..efdeb470268fe 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/AbstractLoginFormAuthenticator.php +++ b/src/Symfony/Component/Security/Http/Authenticator/AbstractLoginFormAuthenticator.php @@ -31,8 +31,6 @@ abstract class AbstractLoginFormAuthenticator extends AbstractAuthenticator impl abstract protected function getLoginUrl(Request $request): string; /** - * {@inheritdoc} - * * Override to change the request conditions that have to be * matched in order to handle the login form submit. * diff --git a/src/Symfony/Component/Security/Http/Authenticator/Token/PostAuthenticationToken.php b/src/Symfony/Component/Security/Http/Authenticator/Token/PostAuthenticationToken.php index 633f719e8eb66..5421301ef2fbe 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/Token/PostAuthenticationToken.php +++ b/src/Symfony/Component/Security/Http/Authenticator/Token/PostAuthenticationToken.php @@ -44,8 +44,6 @@ public function __construct(UserInterface $user, string $firewallName, array $ro /** * This is meant to be only a token, where credentials * have already been used and are thus cleared. - * - * {@inheritdoc} */ public function getCredentials(): mixed { @@ -57,17 +55,11 @@ public function getFirewallName(): string return $this->firewallName; } - /** - * {@inheritdoc} - */ public function __serialize(): array { return [$this->firewallName, parent::__serialize()]; } - /** - * {@inheritdoc} - */ public function __unserialize(array $data): void { [$this->firewallName, $parentData] = $data; diff --git a/src/Symfony/Component/Security/Http/Event/LazyResponseEvent.php b/src/Symfony/Component/Security/Http/Event/LazyResponseEvent.php index 73049c28b1578..46a25eed0725a 100644 --- a/src/Symfony/Component/Security/Http/Event/LazyResponseEvent.php +++ b/src/Symfony/Component/Security/Http/Event/LazyResponseEvent.php @@ -31,9 +31,6 @@ public function __construct(parent $event) $this->event = $event; } - /** - * {@inheritdoc} - */ public function setResponse(Response $response) { $this->stopPropagation(); @@ -42,33 +39,21 @@ public function setResponse(Response $response) throw new LazyResponseException($response); } - /** - * {@inheritdoc} - */ public function getKernel(): HttpKernelInterface { return $this->event->getKernel(); } - /** - * {@inheritdoc} - */ public function getRequest(): Request { return $this->event->getRequest(); } - /** - * {@inheritdoc} - */ public function getRequestType(): int { return $this->event->getRequestType(); } - /** - * {@inheritdoc} - */ public function isMainRequest(): bool { return $this->event->isMainRequest(); diff --git a/src/Symfony/Component/Security/Http/Firewall.php b/src/Symfony/Component/Security/Http/Firewall.php index 0c313f8f09b5e..69be98678545a 100644 --- a/src/Symfony/Component/Security/Http/Firewall.php +++ b/src/Symfony/Component/Security/Http/Firewall.php @@ -102,9 +102,6 @@ public function onKernelFinishRequest(FinishRequestEvent $event) } } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents() { return [ diff --git a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php index efa27495b5806..8a258698ec3a8 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php @@ -45,9 +45,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AccessDecisionM $this->map = $map; } - /** - * {@inheritdoc} - */ public function supports(Request $request): ?bool { [$attributes] = $this->map->getPatterns($request); diff --git a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php index a28ccd860071e..873434ee7120c 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php @@ -71,9 +71,6 @@ public function __construct(TokenStorageInterface $tokenStorage, iterable $userP $this->sessionTrackerEnabler = null === $sessionTrackerEnabler ? null : $sessionTrackerEnabler(...); } - /** - * {@inheritdoc} - */ public function supports(Request $request): ?bool { return null; // always run authenticate() lazily with lazy firewalls diff --git a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php index a25200b3be702..f7768998abdca 100644 --- a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php @@ -54,9 +54,6 @@ public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $http $this->eventDispatcher = $eventDispatcher; } - /** - * {@inheritdoc} - */ public function supports(Request $request): ?bool { return $this->requiresLogout($request); diff --git a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index 1ce9276d43bc7..d4478ed17879d 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -72,9 +72,6 @@ public function __construct(TokenStorageInterface $tokenStorage, UserProviderInt $this->targetUrl = $targetUrl; } - /** - * {@inheritdoc} - */ public function supports(Request $request): ?bool { // usernames can be falsy diff --git a/src/Symfony/Component/Security/Http/FirewallMap.php b/src/Symfony/Component/Security/Http/FirewallMap.php index 3e7a98765b51d..de6c4ac9231f6 100644 --- a/src/Symfony/Component/Security/Http/FirewallMap.php +++ b/src/Symfony/Component/Security/Http/FirewallMap.php @@ -37,9 +37,6 @@ public function add(RequestMatcherInterface $requestMatcher = null, array $liste $this->map[] = [$requestMatcher, $listeners, $exceptionListener, $logoutListener]; } - /** - * {@inheritdoc} - */ public function getListeners(Request $request): array { foreach ($this->map as $elements) { diff --git a/src/Symfony/Component/Security/Http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php b/src/Symfony/Component/Security/Http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php index bd43ba6982071..f2debd9823048 100644 --- a/src/Symfony/Component/Security/Http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php +++ b/src/Symfony/Component/Security/Http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php @@ -20,9 +20,6 @@ */ class InvalidLoginLinkAuthenticationException extends AuthenticationException { - /** - * {@inheritdoc} - */ public function getMessageKey(): string { return 'Invalid or expired login link.'; diff --git a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php index 67e637fe36649..725986ef65b33 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php +++ b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php @@ -57,9 +57,6 @@ public function __construct(UserProviderInterface $userProvider, RequestStack $r */ abstract protected function processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user): void; - /** - * {@inheritdoc} - */ public function consumeRememberMeCookie(RememberMeDetails $rememberMeDetails): UserInterface { try { @@ -79,9 +76,6 @@ public function consumeRememberMeCookie(RememberMeDetails $rememberMeDetails): U return $user; } - /** - * {@inheritdoc} - */ public function clearRememberMeCookie(): void { $this->logger?->debug('Clearing remember-me cookie.', ['name' => $this->options['name']]); diff --git a/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php b/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php index d8565084b79e4..9f439561e703b 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php +++ b/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php @@ -48,9 +48,6 @@ public function __construct(TokenProviderInterface $tokenProvider, #[\SensitiveP $this->secret = $secret; } - /** - * {@inheritdoc} - */ public function createRememberMeCookie(UserInterface $user): void { $series = base64_encode(random_bytes(64)); @@ -61,9 +58,6 @@ public function createRememberMeCookie(UserInterface $user): void $this->createCookie(RememberMeDetails::fromPersistentToken($token, time() + $this->options['lifetime'])); } - /** - * {@inheritdoc} - */ public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user): void { if (!str_contains($rememberMeDetails->getValue(), ':')) { @@ -99,9 +93,6 @@ public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInte $this->createCookie($rememberMeDetails->withValue($series.':'.$tokenValue)); } - /** - * {@inheritdoc} - */ public function clearRememberMeCookie(): void { parent::clearRememberMeCookie(); diff --git a/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php b/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php index 82eab6969fc5f..ecdbaf7383c93 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php +++ b/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php @@ -44,9 +44,6 @@ public function onKernelResponse(ResponseEvent $event) } } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [KernelEvents::RESPONSE => 'onKernelResponse']; diff --git a/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php b/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php index cab305788a07d..5f6edcb28c604 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php +++ b/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php @@ -41,9 +41,6 @@ public function __construct(SignatureHasher $signatureHasher, UserProviderInterf $this->signatureHasher = $signatureHasher; } - /** - * {@inheritdoc} - */ public function createRememberMeCookie(UserInterface $user): void { $expires = time() + $this->options['lifetime']; @@ -53,9 +50,6 @@ public function createRememberMeCookie(UserInterface $user): void $this->createCookie($details); } - /** - * {@inheritdoc} - */ public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user): void { try { diff --git a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php index 97cf136999977..0d4a310f3ddb8 100644 --- a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php +++ b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php @@ -37,9 +37,6 @@ public function __construct(string $strategy) $this->strategy = $strategy; } - /** - * {@inheritdoc} - */ public function onAuthentication(Request $request, TokenInterface $token) { switch ($this->strategy) { diff --git a/src/Symfony/Component/Semaphore/Semaphore.php b/src/Symfony/Component/Semaphore/Semaphore.php index 7820e21533bf6..51e2f78c4ff2a 100644 --- a/src/Symfony/Component/Semaphore/Semaphore.php +++ b/src/Symfony/Component/Semaphore/Semaphore.php @@ -68,9 +68,6 @@ public function __destruct() $this->release(); } - /** - * {@inheritdoc} - */ public function acquire(): bool { try { @@ -93,9 +90,6 @@ public function acquire(): bool } } - /** - * {@inheritdoc} - */ public function refresh(float $ttlInSecond = null) { if (null === $ttlInSecond) { @@ -125,17 +119,11 @@ public function refresh(float $ttlInSecond = null) } } - /** - * {@inheritdoc} - */ public function isAcquired(): bool { return $this->dirty = $this->store->exists($this->key); } - /** - * {@inheritdoc} - */ public function release() { try { @@ -150,17 +138,11 @@ public function release() } } - /** - * {@inheritdoc} - */ public function isExpired(): bool { return $this->key->isExpired(); } - /** - * {@inheritdoc} - */ public function getRemainingLifetime(): ?float { return $this->key->getRemainingLifetime(); diff --git a/src/Symfony/Component/Semaphore/Store/RedisStore.php b/src/Symfony/Component/Semaphore/Store/RedisStore.php index 153a39bb5182c..db5a2ef16d209 100644 --- a/src/Symfony/Component/Semaphore/Store/RedisStore.php +++ b/src/Symfony/Component/Semaphore/Store/RedisStore.php @@ -34,9 +34,6 @@ public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInter $this->redis = $redis; } - /** - * {@inheritdoc} - */ public function save(Key $key, float $ttlInSecond) { if (0 > $ttlInSecond) { @@ -100,9 +97,6 @@ public function save(Key $key, float $ttlInSecond) } } - /** - * {@inheritdoc} - */ public function putOffExpiration(Key $key, float $ttlInSecond) { if (0 > $ttlInSecond) { @@ -145,9 +139,6 @@ public function putOffExpiration(Key $key, float $ttlInSecond) } } - /** - * {@inheritdoc} - */ public function delete(Key $key) { $script = ' @@ -163,9 +154,6 @@ public function delete(Key $key) $this->evaluate($script, sprintf('{%s}', $key), [$this->getUniqueToken($key)]); } - /** - * {@inheritdoc} - */ public function exists(Key $key): bool { return (bool) $this->redis->zScore(sprintf('{%s}:weight', $key), $this->getUniqueToken($key)); diff --git a/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php index a71f17555a824..4952f880f6a32 100644 --- a/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php +++ b/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php @@ -21,9 +21,6 @@ abstract class AbstractRedisStoreTest extends AbstractStoreTest { abstract protected function getRedisConnection(): \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface; - /** - * {@inheritdoc} - */ public function getStore(): PersistingStoreInterface { return new RedisStore($this->getRedisConnection()); diff --git a/src/Symfony/Component/Serializer/CacheWarmer/CompiledClassMetadataCacheWarmer.php b/src/Symfony/Component/Serializer/CacheWarmer/CompiledClassMetadataCacheWarmer.php index 39a85aeebbedf..565320af97b69 100644 --- a/src/Symfony/Component/Serializer/CacheWarmer/CompiledClassMetadataCacheWarmer.php +++ b/src/Symfony/Component/Serializer/CacheWarmer/CompiledClassMetadataCacheWarmer.php @@ -37,9 +37,6 @@ public function __construct(array $classesToCompile, ClassMetadataFactoryInterfa $this->filesystem = $filesystem; } - /** - * {@inheritdoc} - */ public function warmUp(string $cacheDir): array { $metadatas = []; @@ -55,9 +52,6 @@ public function warmUp(string $cacheDir): array return []; } - /** - * {@inheritdoc} - */ public function isOptional(): bool { return true; diff --git a/src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php b/src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php index 6067ece88f661..9dd1752fad1e7 100644 --- a/src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php +++ b/src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php @@ -33,17 +33,11 @@ public function reset(): void $this->collected = []; } - /** - * {@inheritDoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null): void { // Everything is collected during the request, and formatted on kernel terminate. } - /** - * {@inheritDoc} - */ public function getName(): string { return 'serializer'; @@ -164,9 +158,6 @@ public function collectDecoding(string $traceId, string $encoder, float $time): $this->collected[$traceId]['encoding'][] = compact('encoder', 'method', 'time'); } - /** - * {@inheritDoc} - */ public function lateCollect(): void { $this->data = [ diff --git a/src/Symfony/Component/Serializer/Debug/TraceableEncoder.php b/src/Symfony/Component/Serializer/Debug/TraceableEncoder.php index 8105ba7b364c5..73c645c6c9e42 100644 --- a/src/Symfony/Component/Serializer/Debug/TraceableEncoder.php +++ b/src/Symfony/Component/Serializer/Debug/TraceableEncoder.php @@ -33,9 +33,6 @@ public function __construct( ) { } - /** - * {@inheritDoc} - */ public function encode(mixed $data, string $format, array $context = []): string { if (!$this->encoder instanceof EncoderInterface) { @@ -53,9 +50,6 @@ public function encode(mixed $data, string $format, array $context = []): string return $encoded; } - /** - * {@inheritDoc} - */ public function supportsEncoding(string $format, array $context = []): bool { if (!$this->encoder instanceof EncoderInterface) { @@ -65,9 +59,6 @@ public function supportsEncoding(string $format, array $context = []): bool return $this->encoder->supportsEncoding($format, $context); } - /** - * {@inheritDoc} - */ public function decode(string $data, string $format, array $context = []): mixed { if (!$this->encoder instanceof DecoderInterface) { @@ -85,9 +76,6 @@ public function decode(string $data, string $format, array $context = []): mixed return $encoded; } - /** - * {@inheritDoc} - */ public function supportsDecoding(string $format, array $context = []): bool { if (!$this->encoder instanceof DecoderInterface) { @@ -97,9 +85,6 @@ public function supportsDecoding(string $format, array $context = []): bool return $this->encoder->supportsDecoding($format, $context); } - /** - * {@inheritDoc} - */ public function setSerializer(SerializerInterface $serializer) { if (!$this->encoder instanceof SerializerAwareInterface) { diff --git a/src/Symfony/Component/Serializer/Debug/TraceableNormalizer.php b/src/Symfony/Component/Serializer/Debug/TraceableNormalizer.php index 8e430e55d4351..be214ce695ae5 100644 --- a/src/Symfony/Component/Serializer/Debug/TraceableNormalizer.php +++ b/src/Symfony/Component/Serializer/Debug/TraceableNormalizer.php @@ -35,9 +35,6 @@ public function __construct( ) { } - /** - * {@inheritDoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { if (!$this->normalizer instanceof NormalizerInterface) { @@ -55,9 +52,6 @@ public function normalize(mixed $object, string $format = null, array $context = return $normalized; } - /** - * {@inheritDoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { if (!$this->normalizer instanceof NormalizerInterface) { @@ -67,9 +61,6 @@ public function supportsNormalization(mixed $data, string $format = null, array return $this->normalizer->supportsNormalization($data, $format, $context); } - /** - * {@inheritDoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { if (!$this->normalizer instanceof DenormalizerInterface) { @@ -87,9 +78,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $denormalized; } - /** - * {@inheritDoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { if (!$this->normalizer instanceof DenormalizerInterface) { @@ -99,9 +87,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return $this->normalizer->supportsDenormalization($data, $type, $format, $context); } - /** - * {@inheritDoc} - */ public function setSerializer(SerializerInterface $serializer) { if (!$this->normalizer instanceof SerializerAwareInterface) { @@ -111,9 +96,6 @@ public function setSerializer(SerializerInterface $serializer) $this->normalizer->setSerializer($serializer); } - /** - * {@inheritDoc} - */ public function setNormalizer(NormalizerInterface $normalizer) { if (!$this->normalizer instanceof NormalizerAwareInterface) { @@ -123,9 +105,6 @@ public function setNormalizer(NormalizerInterface $normalizer) $this->normalizer->setNormalizer($normalizer); } - /** - * {@inheritDoc} - */ public function setDenormalizer(DenormalizerInterface $denormalizer) { if (!$this->normalizer instanceof DenormalizerAwareInterface) { @@ -135,9 +114,6 @@ public function setDenormalizer(DenormalizerInterface $denormalizer) $this->normalizer->setDenormalizer($denormalizer); } - /** - * {@inheritDoc} - */ public function hasCacheableSupportsMethod(): bool { return $this->normalizer instanceof CacheableSupportsMethodInterface && $this->normalizer->hasCacheableSupportsMethod(); diff --git a/src/Symfony/Component/Serializer/Debug/TraceableSerializer.php b/src/Symfony/Component/Serializer/Debug/TraceableSerializer.php index bcc1f71a6d305..01ae795841937 100644 --- a/src/Symfony/Component/Serializer/Debug/TraceableSerializer.php +++ b/src/Symfony/Component/Serializer/Debug/TraceableSerializer.php @@ -38,9 +38,6 @@ public function __construct( ) { } - /** - * {@inheritdoc} - */ public function serialize(mixed $data, string $format, array $context = []): string { $context[self::DEBUG_TRACE_ID] = $traceId = uniqid(); @@ -56,9 +53,6 @@ public function serialize(mixed $data, string $format, array $context = []): str return $result; } - /** - * {@inheritdoc} - */ public function deserialize(mixed $data, string $type, string $format, array $context = []): mixed { $context[self::DEBUG_TRACE_ID] = $traceId = uniqid(); @@ -74,9 +68,6 @@ public function deserialize(mixed $data, string $type, string $format, array $co return $result; } - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $context[self::DEBUG_TRACE_ID] = $traceId = uniqid(); @@ -92,9 +83,6 @@ public function normalize(mixed $object, string $format = null, array $context = return $result; } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { $context[self::DEBUG_TRACE_ID] = $traceId = uniqid(); @@ -110,9 +98,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $result; } - /** - * {@inheritdoc} - */ public function encode(mixed $data, string $format, array $context = []): string { $context[self::DEBUG_TRACE_ID] = $traceId = uniqid(); @@ -128,9 +113,6 @@ public function encode(mixed $data, string $format, array $context = []): string return $result; } - /** - * {@inheritdoc} - */ public function decode(string $data, string $format, array $context = []): mixed { $context[self::DEBUG_TRACE_ID] = $traceId = uniqid(); @@ -146,33 +128,21 @@ public function decode(string $data, string $format, array $context = []): mixed return $result; } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return $this->serializer->supportsNormalization($data, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return $this->serializer->supportsDenormalization($data, $type, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsEncoding(string $format, array $context = []): bool { return $this->serializer->supportsEncoding($format, $context); } - /** - * {@inheritdoc} - */ public function supportsDecoding(string $format, array $context = []): bool { return $this->serializer->supportsDecoding($format, $context); diff --git a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php index 0f7f94fad8842..dc998fcbaed99 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php @@ -32,17 +32,11 @@ public function __construct(array $decoders = []) $this->decoders = $decoders; } - /** - * {@inheritdoc} - */ final public function decode(string $data, string $format, array $context = []): mixed { return $this->getDecoder($format, $context)->decode($data, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsDecoding(string $format, array $context = []): bool { try { diff --git a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php index 70d7c9fd10645..132061aa12b6c 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php @@ -33,17 +33,11 @@ public function __construct(array $encoders = []) $this->encoders = $encoders; } - /** - * {@inheritdoc} - */ final public function encode(mixed $data, string $format, array $context = []): string { return $this->getEncoder($format, $context)->encode($data, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsEncoding(string $format, array $context = []): bool { try { diff --git a/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php index 910b26bac1fc8..6fc81c1247161 100644 --- a/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/ContextAwareDecoderInterface.php @@ -21,8 +21,6 @@ interface ContextAwareDecoderInterface extends DecoderInterface { /** - * {@inheritdoc} - * * @param array $context options that decoders have access to */ public function supportsDecoding(string $format, array $context = []): bool; diff --git a/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php b/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php index f828f87a4f82f..f5b313f41dc26 100644 --- a/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/ContextAwareEncoderInterface.php @@ -21,8 +21,6 @@ interface ContextAwareEncoderInterface extends EncoderInterface { /** - * {@inheritdoc} - * * @param array $context options that encoders have access to */ public function supportsEncoding(string $format, array $context = []): bool; diff --git a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php index b2c6fcd81d4ae..68d11c84bb1e1 100644 --- a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php @@ -56,9 +56,6 @@ public function __construct(array $defaultContext = []) $this->defaultContext = array_merge($this->defaultContext, $defaultContext); } - /** - * {@inheritdoc} - */ public function encode(mixed $data, string $format, array $context = []): string { $handle = fopen('php://temp,', 'w+'); @@ -123,8 +120,6 @@ public function encode(mixed $data, string $format, array $context = []): string } /** - * {@inheritdoc} - * * @param array $context */ public function supportsEncoding(string $format /* , array $context = [] */): bool @@ -132,9 +127,6 @@ public function supportsEncoding(string $format /* , array $context = [] */): bo return self::FORMAT === $format; } - /** - * {@inheritdoc} - */ public function decode(string $data, string $format, array $context = []): mixed { $handle = fopen('php://temp', 'r+'); @@ -211,8 +203,6 @@ public function decode(string $data, string $format, array $context = []): mixed } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDecoding(string $format /* , array $context = [] */): bool diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 50d2d2e3f266f..9c307bb316552 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -94,8 +94,6 @@ public function decode(string $data, string $format, array $context = []): mixed } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDecoding(string $format /* , array $context = [] */): bool diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index 898b69db8977d..da61e01c092c9 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -31,9 +31,6 @@ public function __construct(array $defaultContext = []) $this->defaultContext = array_merge($this->defaultContext, $defaultContext); } - /** - * {@inheritdoc} - */ public function encode(mixed $data, string $format, array $context = []): string { $options = $context[self::OPTIONS] ?? $this->defaultContext[self::OPTIONS]; @@ -56,8 +53,6 @@ public function encode(mixed $data, string $format, array $context = []): string } /** - * {@inheritdoc} - * * @param array $context */ public function supportsEncoding(string $format /* , array $context = [] */): bool diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php index e6ccbfba50b2b..82ea08125d554 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -29,25 +29,17 @@ public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodin $this->decodingImpl = $decodingImpl ?? new JsonDecode([JsonDecode::ASSOCIATIVE => true]); } - /** - * {@inheritdoc} - */ public function encode(mixed $data, string $format, array $context = []): string { return $this->encodingImpl->encode($data, self::FORMAT, $context); } - /** - * {@inheritdoc} - */ public function decode(string $data, string $format, array $context = []): mixed { return $this->decodingImpl->decode($data, self::FORMAT, $context); } /** - * {@inheritdoc} - * * @param array $context */ public function supportsEncoding(string $format /* , array $context = [] */): bool @@ -56,8 +48,6 @@ public function supportsEncoding(string $format /* , array $context = [] */): bo } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDecoding(string $format /* , array $context = [] */): bool diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index a47e6d69583f3..e64441ffc4bc8 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -68,9 +68,6 @@ public function __construct(array $defaultContext = []) $this->defaultContext = array_merge($this->defaultContext, $defaultContext); } - /** - * {@inheritdoc} - */ public function encode(mixed $data, string $format, array $context = []): string { $encoderIgnoredNodeTypes = $context[self::ENCODER_IGNORED_NODE_TYPES] ?? $this->defaultContext[self::ENCODER_IGNORED_NODE_TYPES]; @@ -94,9 +91,6 @@ public function encode(mixed $data, string $format, array $context = []): string return $dom->saveXML($ignorePiNode ? $dom->documentElement : null); } - /** - * {@inheritdoc} - */ public function decode(string $data, string $format, array $context = []): mixed { if ('' === trim($data)) { @@ -165,8 +159,6 @@ public function decode(string $data, string $format, array $context = []): mixed } /** - * {@inheritdoc} - * * @param array $context */ public function supportsEncoding(string $format /* , array $context = [] */): bool @@ -175,8 +167,6 @@ public function supportsEncoding(string $format /* , array $context = [] */): bo } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDecoding(string $format /* , array $context = [] */): bool diff --git a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php index ecb9815eee553..0ee1845601c89 100644 --- a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php @@ -51,9 +51,6 @@ public function __construct(Dumper $dumper = null, Parser $parser = null, array $this->defaultContext = array_merge($this->defaultContext, $defaultContext); } - /** - * {@inheritdoc} - */ public function encode(mixed $data, string $format, array $context = []): string { $context = array_merge($this->defaultContext, $context); @@ -66,8 +63,6 @@ public function encode(mixed $data, string $format, array $context = []): string } /** - * {@inheritdoc} - * * @param array $context */ public function supportsEncoding(string $format /* , array $context = [] */): bool @@ -75,9 +70,6 @@ public function supportsEncoding(string $format /* , array $context = [] */): bo return self::FORMAT === $format || self::ALTERNATIVE_FORMAT === $format; } - /** - * {@inheritdoc} - */ public function decode(string $data, string $format, array $context = []): mixed { $context = array_merge($this->defaultContext, $context); @@ -86,8 +78,6 @@ public function decode(string $data, string $format, array $context = []): mixed } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDecoding(string $format /* , array $context = [] */): bool diff --git a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php index 1f9fc6f7c15ba..0524b03806272 100644 --- a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php +++ b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php @@ -27,9 +27,6 @@ public function __construct(PropertyListExtractorInterface $propertyListExtracto $this->objectClassResolver = $objectClassResolver; } - /** - * {@inheritdoc} - */ public function getProperties(object $object, array $context = []): ?array { $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); diff --git a/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php b/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php index 3097b52c4c840..7c644c272f53b 100644 --- a/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php +++ b/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer\Mapping; /** - * {@inheritdoc} - * * @author Kévin Dunglas */ class AttributeMetadata implements AttributeMetadataInterface @@ -82,17 +80,11 @@ public function __construct(string $name) $this->name = $name; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; } - /** - * {@inheritdoc} - */ public function addGroup(string $group) { if (!\in_array($group, $this->groups)) { @@ -100,73 +92,46 @@ public function addGroup(string $group) } } - /** - * {@inheritdoc} - */ public function getGroups(): array { return $this->groups; } - /** - * {@inheritdoc} - */ public function setMaxDepth(?int $maxDepth) { $this->maxDepth = $maxDepth; } - /** - * {@inheritdoc} - */ public function getMaxDepth(): ?int { return $this->maxDepth; } - /** - * {@inheritdoc} - */ public function setSerializedName(string $serializedName = null) { $this->serializedName = $serializedName; } - /** - * {@inheritdoc} - */ public function getSerializedName(): ?string { return $this->serializedName; } - /** - * {@inheritdoc} - */ public function setIgnore(bool $ignore) { $this->ignore = $ignore; } - /** - * {@inheritdoc} - */ public function isIgnored(): bool { return $this->ignore; } - /** - * {@inheritdoc} - */ public function getNormalizationContexts(): array { return $this->normalizationContexts; } - /** - * {@inheritdoc} - */ public function getNormalizationContextForGroups(array $groups): array { $contexts = []; @@ -177,9 +142,6 @@ public function getNormalizationContextForGroups(array $groups): array return array_merge($this->normalizationContexts['*'] ?? [], ...$contexts); } - /** - * {@inheritdoc} - */ public function setNormalizationContextForGroups(array $context, array $groups = []): void { if (!$groups) { @@ -191,17 +153,11 @@ public function setNormalizationContextForGroups(array $context, array $groups = } } - /** - * {@inheritdoc} - */ public function getDenormalizationContexts(): array { return $this->denormalizationContexts; } - /** - * {@inheritdoc} - */ public function getDenormalizationContextForGroups(array $groups): array { $contexts = []; @@ -212,9 +168,6 @@ public function getDenormalizationContextForGroups(array $groups): array return array_merge($this->denormalizationContexts['*'] ?? [], ...$contexts); } - /** - * {@inheritdoc} - */ public function setDenormalizationContextForGroups(array $context, array $groups = []): void { if (!$groups) { @@ -226,9 +179,6 @@ public function setDenormalizationContextForGroups(array $context, array $groups } } - /** - * {@inheritdoc} - */ public function merge(AttributeMetadataInterface $attributeMetadata) { foreach ($attributeMetadata->getGroups() as $group) { diff --git a/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php b/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php index 2e46fecc87e70..8b9b02896c338 100644 --- a/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php +++ b/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php @@ -29,9 +29,6 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory) $this->classMetadataFactory = $classMetadataFactory; } - /** - * {@inheritdoc} - */ public function getMappingForClass(string $class): ?ClassDiscriminatorMapping { if ($this->classMetadataFactory->hasMetadataFor($class)) { @@ -41,9 +38,6 @@ public function getMappingForClass(string $class): ?ClassDiscriminatorMapping return null; } - /** - * {@inheritdoc} - */ public function getMappingForMappedObject(object|string $object): ?ClassDiscriminatorMapping { if ($this->classMetadataFactory->hasMetadataFor($object)) { @@ -62,9 +56,6 @@ public function getMappingForMappedObject(object|string $object): ?ClassDiscrimi return $this->mappingForMappedObjectCache[$cacheKey]; } - /** - * {@inheritdoc} - */ public function getTypeForMappedObject(object|string $object): ?string { if (null === $mapping = $this->getMappingForMappedObject($object)) { diff --git a/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php b/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php index ace7ba329a4e1..d27ee31a35920 100644 --- a/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer\Mapping; /** - * {@inheritdoc} - * * @author Kévin Dunglas */ class ClassMetadata implements ClassMetadataInterface @@ -57,33 +55,21 @@ public function __construct(string $class, ClassDiscriminatorMapping $classDiscr $this->classDiscriminatorMapping = $classDiscriminatorMapping; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; } - /** - * {@inheritdoc} - */ public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata) { $this->attributesMetadata[$attributeMetadata->getName()] = $attributeMetadata; } - /** - * {@inheritdoc} - */ public function getAttributesMetadata(): array { return $this->attributesMetadata; } - /** - * {@inheritdoc} - */ public function merge(ClassMetadataInterface $classMetadata) { foreach ($classMetadata->getAttributesMetadata() as $attributeMetadata) { @@ -95,9 +81,6 @@ public function merge(ClassMetadataInterface $classMetadata) } } - /** - * {@inheritdoc} - */ public function getReflectionClass(): \ReflectionClass { if (!$this->reflClass) { @@ -107,17 +90,11 @@ public function getReflectionClass(): \ReflectionClass return $this->reflClass; } - /** - * {@inheritdoc} - */ public function getClassDiscriminatorMapping(): ?ClassDiscriminatorMapping { return $this->classDiscriminatorMapping; } - /** - * {@inheritdoc} - */ public function setClassDiscriminatorMapping(ClassDiscriminatorMapping $mapping = null) { $this->classDiscriminatorMapping = $mapping; diff --git a/src/Symfony/Component/Serializer/Mapping/Factory/CacheClassMetadataFactory.php b/src/Symfony/Component/Serializer/Mapping/Factory/CacheClassMetadataFactory.php index e7edc4d37aa06..c3adbeec136d8 100644 --- a/src/Symfony/Component/Serializer/Mapping/Factory/CacheClassMetadataFactory.php +++ b/src/Symfony/Component/Serializer/Mapping/Factory/CacheClassMetadataFactory.php @@ -41,9 +41,6 @@ public function __construct(ClassMetadataFactoryInterface $decorated, CacheItemP $this->cacheItemPool = $cacheItemPool; } - /** - * {@inheritdoc} - */ public function getMetadataFor(string|object $value): ClassMetadataInterface { $class = $this->getClass($value); @@ -65,9 +62,6 @@ public function getMetadataFor(string|object $value): ClassMetadataInterface return $this->loadedClasses[$class] = $metadata; } - /** - * {@inheritdoc} - */ public function hasMetadataFor(mixed $value): bool { return $this->decorated->hasMetadataFor($value); diff --git a/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php b/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php index 59fb589f0fbb4..9b2cf1cb7cbaa 100644 --- a/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php +++ b/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php @@ -36,9 +36,6 @@ public function __construct(LoaderInterface $loader) $this->loader = $loader; } - /** - * {@inheritdoc} - */ public function getMetadataFor(string|object $value): ClassMetadataInterface { $class = $this->getClass($value); @@ -65,9 +62,6 @@ public function getMetadataFor(string|object $value): ClassMetadataInterface return $this->loadedClasses[$class] = $classMetadata; } - /** - * {@inheritdoc} - */ public function hasMetadataFor(mixed $value): bool { return \is_object($value) || (\is_string($value) && (class_exists($value) || interface_exists($value, false))); diff --git a/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php b/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php index 8b0f0aeff960f..5bac97581caa2 100644 --- a/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php +++ b/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php @@ -42,9 +42,6 @@ public function __construct(string $compiledClassMetadataFile, ClassMetadataFact $this->classMetadataFactory = $classMetadataFactory; } - /** - * {@inheritdoc} - */ public function getMetadataFor(string|object $value): ClassMetadataInterface { $className = \is_object($value) ? \get_class($value) : $value; @@ -70,9 +67,6 @@ public function getMetadataFor(string|object $value): ClassMetadataInterface return $this->loadedClasses[$className]; } - /** - * {@inheritdoc} - */ public function hasMetadataFor(mixed $value): bool { $className = \is_object($value) ? \get_class($value) : $value; diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php index 0e534a4809f76..25d4beaf699f6 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php @@ -48,9 +48,6 @@ public function __construct(Reader $reader = null) $this->reader = $reader; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool { $reflectionClass = $classMetadata->getReflectionClass(); diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php b/src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php index c2b3423c85c2d..c25f5fa967d9d 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php @@ -47,9 +47,6 @@ public function __construct(array $loaders) $this->loaders = $loaders; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadataInterface $metadata): bool { $success = false; diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php index 8f7e7cf553b33..6d6ae16a9957c 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php @@ -31,9 +31,6 @@ class XmlFileLoader extends FileLoader */ private $classes; - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool { if (null === $this->classes) { diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php index 6e77a989de0ae..907d3384411c3 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php @@ -34,9 +34,6 @@ class YamlFileLoader extends FileLoader */ private $classes; - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool { if (null === $this->classes) { diff --git a/src/Symfony/Component/Serializer/NameConverter/AdvancedNameConverterInterface.php b/src/Symfony/Component/Serializer/NameConverter/AdvancedNameConverterInterface.php index 208d649f743e7..4e7ed504fa3df 100644 --- a/src/Symfony/Component/Serializer/NameConverter/AdvancedNameConverterInterface.php +++ b/src/Symfony/Component/Serializer/NameConverter/AdvancedNameConverterInterface.php @@ -18,13 +18,7 @@ */ interface AdvancedNameConverterInterface extends NameConverterInterface { - /** - * {@inheritdoc} - */ public function normalize(string $propertyName, string $class = null, string $format = null, array $context = []): string; - /** - * {@inheritdoc} - */ public function denormalize(string $propertyName, string $class = null, string $format = null, array $context = []): string; } diff --git a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php index 84f3f5c8cb273..14c2e8a28ca7d 100644 --- a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php +++ b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php @@ -31,9 +31,6 @@ public function __construct(array $attributes = null, bool $lowerCamelCase = tru $this->lowerCamelCase = $lowerCamelCase; } - /** - * {@inheritdoc} - */ public function normalize(string $propertyName): string { if (null === $this->attributes || \in_array($propertyName, $this->attributes)) { @@ -43,9 +40,6 @@ public function normalize(string $propertyName): string return $propertyName; } - /** - * {@inheritdoc} - */ public function denormalize(string $propertyName): string { $camelCasedName = preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { diff --git a/src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php b/src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php index 7ce17cc399374..24c9991e10581 100644 --- a/src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php +++ b/src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php @@ -38,9 +38,6 @@ public function __construct(ClassMetadataFactoryInterface $metadataFactory, Name $this->fallbackNameConverter = $fallbackNameConverter; } - /** - * {@inheritdoc} - */ public function normalize(string $propertyName, string $class = null, string $format = null, array $context = []): string { if (null === $class) { @@ -54,9 +51,6 @@ public function normalize(string $propertyName, string $class = null, string $fo return self::$normalizeCache[$class][$propertyName] ?? $this->normalizeFallback($propertyName, $class, $format, $context); } - /** - * {@inheritdoc} - */ public function denormalize(string $propertyName, string $class = null, string $format = null, array $context = []): string { if (null === $class) { diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index e426d8707690b..cb6890d3cf1c7 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -150,9 +150,6 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory } } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return false; diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 714fb10e304ed..1a499a04908dc 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -134,8 +134,6 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */) @@ -143,9 +141,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar return \is_object($data) && !$data instanceof \Traversable; } - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []) { if (!isset($context['cache_key'])) { @@ -226,9 +221,6 @@ public function normalize(mixed $object, string $format = null, array $context = return $data; } - /** - * {@inheritdoc} - */ protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes, string $format = null) { if ($this->classDiscriminatorResolver && $mapping = $this->classDiscriminatorResolver->getMappingForClass($class)) { @@ -301,8 +293,6 @@ abstract protected function extractAttributes(object $object, string $format = n abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []); /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */) @@ -310,9 +300,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return class_exists($type) || (interface_exists($type, false) && $this->classDiscriminatorResolver && null !== $this->classDiscriminatorResolver->getMappingForClass($type)); } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []) { if (!isset($context['cache_key'])) { @@ -688,8 +675,6 @@ private function isMaxDepthReached(array $attributesMetadata, string $class, str * * We must not mix up the attribute cache between parent and children. * - * {@inheritdoc} - * * @internal */ protected function createChildContext(array $parentContext, string $attribute, ?string $format): array diff --git a/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php index 8fa797487a456..a88beba7ab6c6 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php @@ -28,8 +28,6 @@ class ArrayDenormalizer implements ContextAwareDenormalizerInterface, Denormaliz use DenormalizerAwareTrait; /** - * {@inheritdoc} - * * @throws NotNormalizableValueException */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): array @@ -61,9 +59,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $data; } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { if (null === $this->denormalizer) { @@ -74,9 +69,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma && $this->denormalizer->supportsDenormalization($data, substr($type, 0, -2), $format, $context); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return $this->denormalizer instanceof CacheableSupportsMethodInterface && $this->denormalizer->hasCacheableSupportsMethod(); diff --git a/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php index 8aa242d67d5df..26943377b654a 100644 --- a/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php @@ -22,9 +22,6 @@ */ final class BackedEnumNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface { - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): int|string { if (!$object instanceof \BackedEnum) { @@ -34,17 +31,12 @@ public function normalize(mixed $object, string $format = null, array $context = return $object->value; } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return $data instanceof \BackedEnum; } /** - * {@inheritdoc} - * * @throws NotNormalizableValueException */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed @@ -64,17 +56,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar } } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return is_subclass_of($type, \BackedEnum::class); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return true; diff --git a/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php index 8af6fd7cd2272..0300bd8478750 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php @@ -39,9 +39,6 @@ public function __construct(array $defaultContext = [], NameConverterInterface $ $this->nameConverter = $nameConverter; } - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array { if (\array_key_exists(self::PAYLOAD_FIELDS, $context)) { @@ -105,8 +102,6 @@ public function normalize(mixed $object, string $format = null, array $context = } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -114,9 +109,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar return $data instanceof ConstraintViolationListInterface; } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php index 38c07a2682c92..a02951093e56b 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/ContextAwareDenormalizerInterface.php @@ -21,8 +21,6 @@ interface ContextAwareDenormalizerInterface extends DenormalizerInterface { /** - * {@inheritdoc} - * * @param array $context options that denormalizers have access to */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool; diff --git a/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php index 6f85225bd3487..44f2f02190f1b 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/ContextAwareNormalizerInterface.php @@ -21,8 +21,6 @@ interface ContextAwareNormalizerInterface extends NormalizerInterface { /** - * {@inheritdoc} - * * @param array $context options that normalizers have access to */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool; diff --git a/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php index 7714af3139a12..63e7dbc5cc226 100644 --- a/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php @@ -22,17 +22,11 @@ class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, Se use ObjectToPopulateTrait; use SerializerAwareTrait; - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { return $object->normalize($this->serializer, $format, $context); } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { $object = $this->extractObjectToPopulate($type, $context) ?? new $type(); @@ -66,9 +60,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return is_subclass_of($type, DenormalizableInterface::class); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php index ccfab6dbc4687..b0cecd9e87785 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php @@ -45,9 +45,6 @@ public function __construct(MimeTypeGuesserInterface $mimeTypeGuesser = null) $this->mimeTypeGuesser = $mimeTypeGuesser; } - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): string { if (!$object instanceof \SplFileInfo) { @@ -72,8 +69,6 @@ public function normalize(mixed $object, string $format = null, array $context = } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -82,8 +77,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar } /** - * {@inheritdoc} - * * Regex adapted from Brian Grinstead code. * * @see https://gist.github.com/bgrins/6194623 @@ -118,8 +111,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool @@ -127,9 +118,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return isset(self::SUPPORTED_TYPES[$type]); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php index 2c97eb30e56c2..bff7bcabbd2c3 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php @@ -34,8 +34,6 @@ public function __construct(array $defaultContext = []) } /** - * {@inheritdoc} - * * @throws InvalidArgumentException */ public function normalize(mixed $object, string $format = null, array $context = []): string @@ -48,8 +46,6 @@ public function normalize(mixed $object, string $format = null, array $context = } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -57,17 +53,12 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar return $data instanceof \DateInterval; } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; } /** - * {@inheritdoc} - * * @throws InvalidArgumentException * @throws UnexpectedValueException */ @@ -118,8 +109,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool diff --git a/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php index 140dddbc29ef0..715a56d5b3626 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php @@ -48,8 +48,6 @@ public function setDefaultContext(array $defaultContext): void } /** - * {@inheritdoc} - * * @throws InvalidArgumentException */ public function normalize(mixed $object, string $format = null, array $context = []): string @@ -70,8 +68,6 @@ public function normalize(mixed $object, string $format = null, array $context = } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -80,8 +76,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar } /** - * {@inheritdoc} - * * @throws NotNormalizableValueException */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): \DateTimeInterface @@ -123,8 +117,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool @@ -132,9 +124,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return isset(self::SUPPORTED_TYPES[$type]); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php index 62d5c9e0b97c1..6309ce335b71a 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php @@ -23,8 +23,6 @@ class DateTimeZoneNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface { /** - * {@inheritdoc} - * * @throws InvalidArgumentException */ public function normalize(mixed $object, string $format = null, array $context = []): string @@ -37,8 +35,6 @@ public function normalize(mixed $object, string $format = null, array $context = } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -47,8 +43,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar } /** - * {@inheritdoc} - * * @throws NotNormalizableValueException */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): \DateTimeZone @@ -65,8 +59,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool @@ -74,9 +66,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return \DateTimeZone::class === $type; } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php index 0ffa9f072a2c1..637baa47d23d1 100644 --- a/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php @@ -22,9 +22,6 @@ final class FormErrorNormalizer implements NormalizerInterface, CacheableSupport public const TYPE = 'type'; public const CODE = 'status_code'; - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array { $data = [ @@ -41,9 +38,6 @@ public function normalize(mixed $object, string $format = null, array $context = return $data; } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return $data instanceof FormInterface && $data->isSubmitted() && !$data->isValid(); @@ -82,9 +76,6 @@ private function convertFormChildrenToArray(FormInterface $data): array return $children; } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index edbf08e296962..a0b6ee78037f3 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -37,8 +37,6 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer private static $setterAccessibleCache = []; /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -47,8 +45,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool @@ -56,9 +52,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return parent::supportsDenormalization($data, $type, $format) && $this->supports($type); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; @@ -98,9 +91,6 @@ private function isGetMethod(\ReflectionMethod $method): bool ; } - /** - * {@inheritdoc} - */ protected function extractAttributes(object $object, string $format = null, array $context = []): array { $reflectionObject = new \ReflectionObject($object); @@ -122,9 +112,6 @@ protected function extractAttributes(object $object, string $format = null, arra return $attributes; } - /** - * {@inheritdoc} - */ protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed { $ucfirsted = ucfirst($attribute); @@ -147,9 +134,6 @@ protected function getAttributeValue(object $object, string $attribute, string $ return null; } - /** - * {@inheritdoc} - */ protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []) { $setter = 'set'.ucfirst($attribute); diff --git a/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php index cc50e898b0482..b81385bc8eb75 100644 --- a/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php @@ -21,9 +21,6 @@ */ class JsonSerializableNormalizer extends AbstractNormalizer { - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { if ($this->isCircularReference($object, $context)) { @@ -42,8 +39,6 @@ public function normalize(mixed $object, string $format = null, array $context = } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -52,8 +47,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool @@ -61,17 +54,11 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return false; } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { throw new LogicException(sprintf('Cannot denormalize with "%s".', \JsonSerializable::class)); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php index fea86e8634e72..1a31558186b1a 100644 --- a/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php @@ -48,9 +48,6 @@ public function setSerializer(SerializerInterface $serializer) $this->normalizer->setSerializer($serializer); } - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { if ($object instanceof Headers) { @@ -72,9 +69,6 @@ public function normalize(mixed $object, string $format = null, array $context = return $this->normalizer->normalize($object, $format, $context); } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { if (Headers::class === $type) { @@ -96,25 +90,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $this->normalizer->denormalize($data, $type, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return $data instanceof Message || $data instanceof Headers || $data instanceof HeaderInterface || $data instanceof Address || $data instanceof AbstractPart; } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return is_a($type, Message::class, true) || Headers::class === $type || AbstractPart::class === $type; } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 263959c1d6e79..5851bfe9a89a5 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -49,17 +49,11 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory }; } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; } - /** - * {@inheritdoc} - */ protected function extractAttributes(object $object, string $format = null, array $context = []): array { if (\stdClass::class === \get_class($object)) { @@ -123,9 +117,6 @@ protected function extractAttributes(object $object, string $format = null, arra return array_keys($attributes); } - /** - * {@inheritdoc} - */ protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed { $cacheKey = \get_class($object); @@ -140,9 +131,6 @@ protected function getAttributeValue(object $object, string $attribute, string $ return $attribute === $this->discriminatorCache[$cacheKey] ? $this->classDiscriminatorResolver->getTypeForMappedObject($object) : $this->propertyAccessor->getValue($object, $attribute); } - /** - * {@inheritdoc} - */ protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []) { try { @@ -152,9 +140,6 @@ protected function setAttributeValue(object $object, string $attribute, mixed $v } } - /** - * {@inheritdoc} - */ protected function getAllowedAttributes(string|object $classOrObject, array $context, bool $attributesAsString = false): array|bool { if (false === $allowedAttributes = parent::getAllowedAttributes($classOrObject, $context, $attributesAsString)) { diff --git a/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php index 7898d991ff189..59b8427ab781f 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php @@ -40,9 +40,6 @@ public function __construct(bool $debug = false, array $defaultContext = []) $this->defaultContext = $defaultContext + $this->defaultContext; } - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array { if (!$object instanceof FlattenException) { @@ -67,8 +64,6 @@ public function normalize(mixed $object, string $format = null, array $context = } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -76,9 +71,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar return $data instanceof FlattenException; } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return true; diff --git a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php index bd537a1b1d44f..365b9f56c36fd 100644 --- a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php @@ -55,8 +55,6 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory } /** - * {@inheritdoc} - * * @param array $context */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool @@ -65,8 +63,6 @@ public function supportsNormalization(mixed $data, string $format = null /* , ar } /** - * {@inheritdoc} - * * @param array $context */ public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool @@ -74,9 +70,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return parent::supportsDenormalization($data, $type, $format) && $this->supports($type); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; @@ -101,9 +94,6 @@ private function supports(string $class): bool return false; } - /** - * {@inheritdoc} - */ protected function isAllowedAttribute(object|string $classOrObject, string $attribute, string $format = null, array $context = []): bool { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { @@ -137,9 +127,6 @@ protected function isAllowedAttribute(object|string $classOrObject, string $attr return false; } - /** - * {@inheritdoc} - */ protected function extractAttributes(object $object, string $format = null, array $context = []): array { $reflectionObject = new \ReflectionObject($object); @@ -158,9 +145,6 @@ protected function extractAttributes(object $object, string $format = null, arra return array_unique($attributes); } - /** - * {@inheritdoc} - */ protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed { try { @@ -187,9 +171,6 @@ protected function getAttributeValue(object $object, string $attribute, string $ return $reflectionProperty->getValue($object); } - /** - * {@inheritdoc} - */ protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []) { try { diff --git a/src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php index 264ddd801ad0c..5ab7427afa9fb 100644 --- a/src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php @@ -42,8 +42,6 @@ public function __construct(array $defaultContext = []) } /** - * {@inheritdoc} - * * @param AbstractUid $object */ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -62,17 +60,11 @@ public function normalize(mixed $object, string $format = null, array $context = throw new LogicException(sprintf('The "%s" format is not valid.', $context[self::NORMALIZATION_FORMAT_KEY] ?? $this->defaultContext[self::NORMALIZATION_FORMAT_KEY])); } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return $data instanceof AbstractUid; } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { try { @@ -94,9 +86,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar } } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { if (AbstractUid::class === $type) { @@ -108,9 +97,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma return is_subclass_of($type, AbstractUid::class, true); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return __CLASS__ === static::class; diff --git a/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php b/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php index 152cfa08053fa..2eff8b77594d4 100644 --- a/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php @@ -32,9 +32,6 @@ public function __construct(PropertyAccessorInterface $propertyAccessor = null) $this->propertyAccessor = $propertyAccessor ?? PropertyAccess::createPropertyAccessor(); } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $class, string $format = null, array $context = []): mixed { $propertyPath = $context[self::UNWRAP_PATH]; @@ -51,17 +48,11 @@ public function denormalize(mixed $data, string $class, string $format = null, a return $this->serializer->denormalize($data, $class, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return \array_key_exists(self::UNWRAP_PATH, $context) && !isset($context['unwrapped']); } - /** - * {@inheritdoc} - */ public function hasCacheableSupportsMethod(): bool { return $this->serializer instanceof CacheableSupportsMethodInterface && $this->serializer->hasCacheableSupportsMethod(); diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index 5962fdd69bb0d..7896129b24323 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -121,9 +121,6 @@ public function __construct(array $normalizers = [], array $encoders = []) $this->decoder = new ChainDecoder($decoders); } - /** - * {@inheritdoc} - */ final public function serialize(mixed $data, string $format, array $context = []): string { if (!$this->supportsEncoding($format, $context)) { @@ -137,9 +134,6 @@ final public function serialize(mixed $data, string $format, array $context = [] return $this->encode($data, $format, $context); } - /** - * {@inheritdoc} - */ final public function deserialize(mixed $data, string $type, string $format, array $context = []): mixed { if (!$this->supportsDecoding($format, $context)) { @@ -151,9 +145,6 @@ final public function deserialize(mixed $data, string $type, string $format, arr return $this->denormalize($data, $type, $format, $context); } - /** - * {@inheritdoc} - */ public function normalize(mixed $data, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { // If a normalizer supports the given data, use it @@ -194,8 +185,6 @@ public function normalize(mixed $data, string $format = null, array $context = [ } /** - * {@inheritdoc} - * * @throws NotNormalizableValueException */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed @@ -238,17 +227,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $normalizer->denormalize($data, $type, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return null !== $this->getNormalizer($data, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return isset(self::SCALAR_TYPES[$type]) || null !== $this->getDenormalizer($data, $type, $format, $context); @@ -329,33 +312,21 @@ private function getDenormalizer(mixed $data, string $class, ?string $format, ar return null; } - /** - * {@inheritdoc} - */ final public function encode(mixed $data, string $format, array $context = []): string { return $this->encoder->encode($data, $format, $context); } - /** - * {@inheritdoc} - */ final public function decode(string $data, string $format, array $context = []): mixed { return $this->decoder->decode($data, $format, $context); } - /** - * {@inheritdoc} - */ public function supportsEncoding(string $format, array $context = []): bool { return $this->encoder->supportsEncoding($format, $context); } - /** - * {@inheritdoc} - */ public function supportsDecoding(string $format, array $context = []): bool { return $this->decoder->supportsDecoding($format, $context); diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php index afdfdec1604ee..82586062bf94f 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php @@ -20,39 +20,24 @@ */ class AbstractNormalizerDummy extends AbstractNormalizer { - /** - * {@inheritdoc} - */ public function getAllowedAttributes(string|object $classOrObject, array $context, bool $attributesAsString = false): array|bool { return parent::getAllowedAttributes($classOrObject, $context, $attributesAsString); } - /** - * {@inheritdoc} - */ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { } - /** - * {@inheritdoc} - */ public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { return true; } - /** - * {@inheritdoc} - */ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { } - /** - * {@inheritdoc} - */ public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return true; diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorNormalizer.php b/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorNormalizer.php index 209a07d2c2fb8..44a367e92ff49 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorNormalizer.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorNormalizer.php @@ -18,9 +18,6 @@ */ class StaticConstructorNormalizer extends ObjectNormalizer { - /** - * {@inheritdoc} - */ protected function getConstructor(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes): ?\ReflectionMethod { if (is_a($class, StaticConstructorDummy::class, true)) { diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index fe006c1878e78..b34d40d692b8b 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -592,8 +592,6 @@ class ArrayDenormalizerDummy implements DenormalizerInterface, SerializerAwareIn private $serializer; /** - * {@inheritdoc} - * * @throws NotNormalizableValueException */ public function denormalize($data, string $type, string $format = null, array $context = []): mixed @@ -608,18 +606,12 @@ public function denormalize($data, string $type, string $format = null, array $c return $data; } - /** - * {@inheritdoc} - */ public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool { return str_ends_with($type, '[]') && $this->serializer->supportsDenormalization($data, substr($type, 0, -2), $format, $context); } - /** - * {@inheritdoc} - */ public function setSerializer(SerializerInterface $serializer) { $this->serializer = $serializer; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php b/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php index cef09715d9ede..ee9f2da0ecc09 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php @@ -20,16 +20,10 @@ */ class TestDenormalizer implements DenormalizerInterface { - /** - * {@inheritdoc} - */ public function denormalize($data, string $type, string $format = null, array $context = []): mixed { } - /** - * {@inheritdoc} - */ public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool { return true; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php b/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php index f3b604bfe063f..5d941e7a52915 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php @@ -20,17 +20,11 @@ */ class TestNormalizer implements NormalizerInterface { - /** - * {@inheritdoc} - */ public function normalize($object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { return null; } - /** - * {@inheritdoc} - */ public function supportsNormalization($data, string $format = null, array $context = []): bool { return true; diff --git a/src/Symfony/Component/String/Inflector/EnglishInflector.php b/src/Symfony/Component/String/Inflector/EnglishInflector.php index d9cc8e3d0a4d1..4474736a40a68 100644 --- a/src/Symfony/Component/String/Inflector/EnglishInflector.php +++ b/src/Symfony/Component/String/Inflector/EnglishInflector.php @@ -350,9 +350,6 @@ final class EnglishInflector implements InflectorInterface 'seiceps', ]; - /** - * {@inheritdoc} - */ public function singularize(string $plural): array { $pluralRev = strrev($plural); @@ -429,9 +426,6 @@ public function singularize(string $plural): array return [$plural]; } - /** - * {@inheritdoc} - */ public function pluralize(string $singular): array { $singularRev = strrev($singular); diff --git a/src/Symfony/Component/String/Inflector/FrenchInflector.php b/src/Symfony/Component/String/Inflector/FrenchInflector.php index 612c8f2e0df1d..955abbf46494f 100644 --- a/src/Symfony/Component/String/Inflector/FrenchInflector.php +++ b/src/Symfony/Component/String/Inflector/FrenchInflector.php @@ -110,9 +110,6 @@ final class FrenchInflector implements InflectorInterface */ private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i'; - /** - * {@inheritdoc} - */ public function singularize(string $plural): array { if ($this->isInflectedWord($plural)) { @@ -130,9 +127,6 @@ public function singularize(string $plural): array return [$plural]; } - /** - * {@inheritdoc} - */ public function pluralize(string $singular): array { if ($this->isInflectedWord($singular)) { diff --git a/src/Symfony/Component/String/Slugger/AsciiSlugger.php b/src/Symfony/Component/String/Slugger/AsciiSlugger.php index d72b4e52a8d50..f4b44d3ac432b 100644 --- a/src/Symfony/Component/String/Slugger/AsciiSlugger.php +++ b/src/Symfony/Component/String/Slugger/AsciiSlugger.php @@ -74,17 +74,11 @@ public function __construct(string $defaultLocale = null, array|\Closure $symbol $this->symbolsMap = $symbolsMap ?? $this->symbolsMap; } - /** - * {@inheritdoc} - */ public function setLocale(string $locale) { $this->defaultLocale = $locale; } - /** - * {@inheritdoc} - */ public function getLocale(): string { return $this->defaultLocale; @@ -107,9 +101,6 @@ public function withEmoji(bool|string $emoji = true): static return $new; } - /** - * {@inheritdoc} - */ public function slug(string $string, string $separator = '-', string $locale = null): AbstractUnicodeString { $locale ??= $this->defaultLocale; diff --git a/src/Symfony/Component/Templating/DelegatingEngine.php b/src/Symfony/Component/Templating/DelegatingEngine.php index 4412c9aa2776b..38d7c733c26b2 100644 --- a/src/Symfony/Component/Templating/DelegatingEngine.php +++ b/src/Symfony/Component/Templating/DelegatingEngine.php @@ -33,17 +33,11 @@ public function __construct(array $engines = []) } } - /** - * {@inheritdoc} - */ public function render(string|TemplateReferenceInterface $name, array $parameters = []): string { return $this->getEngine($name)->render($name, $parameters); } - /** - * {@inheritdoc} - */ public function stream(string|TemplateReferenceInterface $name, array $parameters = []) { $engine = $this->getEngine($name); @@ -54,9 +48,6 @@ public function stream(string|TemplateReferenceInterface $name, array $parameter $engine->stream($name, $parameters); } - /** - * {@inheritdoc} - */ public function exists(string|TemplateReferenceInterface $name): bool { return $this->getEngine($name)->exists($name); @@ -67,9 +58,6 @@ public function addEngine(EngineInterface $engine) $this->engines[] = $engine; } - /** - * {@inheritdoc} - */ public function supports(string|TemplateReferenceInterface $name): bool { try { diff --git a/src/Symfony/Component/Templating/Loader/CacheLoader.php b/src/Symfony/Component/Templating/Loader/CacheLoader.php index 088b5f4e8294d..c3b4613ed3d06 100644 --- a/src/Symfony/Component/Templating/Loader/CacheLoader.php +++ b/src/Symfony/Component/Templating/Loader/CacheLoader.php @@ -38,9 +38,6 @@ public function __construct(LoaderInterface $loader, string $dir) $this->dir = $dir; } - /** - * {@inheritdoc} - */ public function load(TemplateReferenceInterface $template): Storage|false { $key = hash('sha256', $template->getLogicalName()); @@ -71,9 +68,6 @@ public function load(TemplateReferenceInterface $template): Storage|false return new FileStorage($path); } - /** - * {@inheritdoc} - */ public function isFresh(TemplateReferenceInterface $template, int $time): bool { return $this->loader->isFresh($template, $time); diff --git a/src/Symfony/Component/Templating/Loader/ChainLoader.php b/src/Symfony/Component/Templating/Loader/ChainLoader.php index 3961c54a61d81..1c033a7b25d6b 100644 --- a/src/Symfony/Component/Templating/Loader/ChainLoader.php +++ b/src/Symfony/Component/Templating/Loader/ChainLoader.php @@ -38,9 +38,6 @@ public function addLoader(LoaderInterface $loader) $this->loaders[] = $loader; } - /** - * {@inheritdoc} - */ public function load(TemplateReferenceInterface $template): Storage|false { foreach ($this->loaders as $loader) { @@ -52,9 +49,6 @@ public function load(TemplateReferenceInterface $template): Storage|false return false; } - /** - * {@inheritdoc} - */ public function isFresh(TemplateReferenceInterface $template, int $time): bool { foreach ($this->loaders as $loader) { diff --git a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php index 88cbafc0c44d5..6c06ed85c2a9e 100644 --- a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php +++ b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php @@ -32,9 +32,6 @@ public function __construct(string|array $templatePathPatterns) $this->templatePathPatterns = (array) $templatePathPatterns; } - /** - * {@inheritdoc} - */ public function load(TemplateReferenceInterface $template): Storage|false { $file = $template->get('name'); @@ -69,9 +66,6 @@ public function load(TemplateReferenceInterface $template): Storage|false return false; } - /** - * {@inheritdoc} - */ public function isFresh(TemplateReferenceInterface $template, int $time): bool { if (false === $storage = $this->load($template)) { diff --git a/src/Symfony/Component/Templating/PhpEngine.php b/src/Symfony/Component/Templating/PhpEngine.php index 726ff54daa1fe..15dfdb5e1e4d4 100644 --- a/src/Symfony/Component/Templating/PhpEngine.php +++ b/src/Symfony/Component/Templating/PhpEngine.php @@ -61,8 +61,6 @@ public function __construct(TemplateNameParserInterface $parser, LoaderInterface } /** - * {@inheritdoc} - * * @throws \InvalidArgumentException if the template does not exist */ public function render(string|TemplateReferenceInterface $name, array $parameters = []): string @@ -93,9 +91,6 @@ public function render(string|TemplateReferenceInterface $name, array $parameter return $content; } - /** - * {@inheritdoc} - */ public function exists(string|TemplateReferenceInterface $name): bool { try { @@ -107,9 +102,6 @@ public function exists(string|TemplateReferenceInterface $name): bool return true; } - /** - * {@inheritdoc} - */ public function supports(string|TemplateReferenceInterface $name): bool { $template = $this->parser->parse($name); diff --git a/src/Symfony/Component/Templating/TemplateNameParser.php b/src/Symfony/Component/Templating/TemplateNameParser.php index 660b7e0b73fd0..dd68e4099181e 100644 --- a/src/Symfony/Component/Templating/TemplateNameParser.php +++ b/src/Symfony/Component/Templating/TemplateNameParser.php @@ -21,9 +21,6 @@ */ class TemplateNameParser implements TemplateNameParserInterface { - /** - * {@inheritdoc} - */ public function parse(string|TemplateReferenceInterface $name): TemplateReferenceInterface { if ($name instanceof TemplateReferenceInterface) { diff --git a/src/Symfony/Component/Templating/TemplateReference.php b/src/Symfony/Component/Templating/TemplateReference.php index 71526ad5852c7..e42f49a55460a 100644 --- a/src/Symfony/Component/Templating/TemplateReference.php +++ b/src/Symfony/Component/Templating/TemplateReference.php @@ -33,9 +33,6 @@ public function __toString(): string return $this->getLogicalName(); } - /** - * {@inheritdoc} - */ public function set(string $name, string $value): static { if (\array_key_exists($name, $this->parameters)) { @@ -47,9 +44,6 @@ public function set(string $name, string $value): static return $this; } - /** - * {@inheritdoc} - */ public function get(string $name): string { if (\array_key_exists($name, $this->parameters)) { @@ -59,25 +53,16 @@ public function get(string $name): string throw new \InvalidArgumentException(sprintf('The template does not support the "%s" parameter.', $name)); } - /** - * {@inheritdoc} - */ public function all(): array { return $this->parameters; } - /** - * {@inheritdoc} - */ public function getPath(): string { return $this->parameters['name']; } - /** - * {@inheritdoc} - */ public function getLogicalName(): string { return $this->parameters['name']; diff --git a/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProvider.php b/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProvider.php index 35220d7385e7e..680a25dc76ee1 100644 --- a/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProvider.php +++ b/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProvider.php @@ -53,9 +53,6 @@ public function __toString(): string return sprintf('crowdin://%s', $this->endpoint); } - /** - * {@inheritdoc} - */ public function write(TranslatorBagInterface $translatorBag): void { $fileList = $this->getFileList(); diff --git a/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php b/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php index e3117fb8ada57..e3ac122497189 100644 --- a/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php +++ b/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php @@ -53,8 +53,6 @@ public function __toString(): string } /** - * {@inheritdoc} - * * Lokalise API recommends sending payload in chunks of up to 500 keys per request. * * @see https://app.lokalise.com/api2docs/curl/#transition-create-keys-post diff --git a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php index 0691bf78508d8..419ba95e6667d 100644 --- a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php @@ -77,9 +77,6 @@ public function __construct(MessageCatalogueInterface $source, MessageCatalogueI $this->messages = []; } - /** - * {@inheritdoc} - */ public function getDomains(): array { if (null === $this->domains) { @@ -100,9 +97,6 @@ public function getDomains(): array return $this->domains; } - /** - * {@inheritdoc} - */ public function getMessages(string $domain): array { if (!\in_array($domain, $this->getDomains())) { @@ -116,9 +110,6 @@ public function getMessages(string $domain): array return $this->messages[$domain][self::ALL_BATCH]; } - /** - * {@inheritdoc} - */ public function getNewMessages(string $domain): array { if (!\in_array($domain, $this->getDomains())) { @@ -132,9 +123,6 @@ public function getNewMessages(string $domain): array return $this->messages[$domain][self::NEW_BATCH]; } - /** - * {@inheritdoc} - */ public function getObsoleteMessages(string $domain): array { if (!\in_array($domain, $this->getDomains())) { @@ -148,9 +136,6 @@ public function getObsoleteMessages(string $domain): array return $this->messages[$domain][self::OBSOLETE_BATCH]; } - /** - * {@inheritdoc} - */ public function getResult(): MessageCatalogueInterface { foreach ($this->getDomains() as $domain) { diff --git a/src/Symfony/Component/Translation/Catalogue/MergeOperation.php b/src/Symfony/Component/Translation/Catalogue/MergeOperation.php index 7a67fdf7c44ab..7a0ce2341d1a3 100644 --- a/src/Symfony/Component/Translation/Catalogue/MergeOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/MergeOperation.php @@ -24,9 +24,6 @@ */ class MergeOperation extends AbstractOperation { - /** - * {@inheritdoc} - */ protected function processDomain(string $domain) { $this->messages[$domain] = [ diff --git a/src/Symfony/Component/Translation/Catalogue/TargetOperation.php b/src/Symfony/Component/Translation/Catalogue/TargetOperation.php index d42cfc346d5bb..6ab60c336330e 100644 --- a/src/Symfony/Component/Translation/Catalogue/TargetOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/TargetOperation.php @@ -25,9 +25,6 @@ */ class TargetOperation extends AbstractOperation { - /** - * {@inheritdoc} - */ protected function processDomain(string $domain) { $this->messages[$domain] = [ diff --git a/src/Symfony/Component/Translation/Command/TranslationPullCommand.php b/src/Symfony/Component/Translation/Command/TranslationPullCommand.php index c6c1208a45e86..225deba9822e7 100644 --- a/src/Symfony/Component/Translation/Command/TranslationPullCommand.php +++ b/src/Symfony/Component/Translation/Command/TranslationPullCommand.php @@ -82,9 +82,6 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti } } - /** - * {@inheritdoc} - */ protected function configure() { $keys = $this->providerCollection->keys(); @@ -119,9 +116,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Symfony/Component/Translation/Command/TranslationPushCommand.php b/src/Symfony/Component/Translation/Command/TranslationPushCommand.php index d36cc4b05f71e..42799e006224d 100644 --- a/src/Symfony/Component/Translation/Command/TranslationPushCommand.php +++ b/src/Symfony/Component/Translation/Command/TranslationPushCommand.php @@ -73,9 +73,6 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti } } - /** - * {@inheritdoc} - */ protected function configure() { $keys = $this->providers->keys(); @@ -113,9 +110,6 @@ protected function configure() ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $provider = $this->providers->get($input->getArgument('provider')); diff --git a/src/Symfony/Component/Translation/Command/XliffLintCommand.php b/src/Symfony/Component/Translation/Command/XliffLintCommand.php index 88057db42e0bb..1e5f26c618503 100644 --- a/src/Symfony/Component/Translation/Command/XliffLintCommand.php +++ b/src/Symfony/Component/Translation/Command/XliffLintCommand.php @@ -50,9 +50,6 @@ public function __construct(string $name = null, callable $directoryIteratorProv $this->requireStrictFileNames = $requireStrictFileNames; } - /** - * {@inheritdoc} - */ protected function configure() { $this diff --git a/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php b/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php index 4244511e46afa..064140a63e648 100644 --- a/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php +++ b/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php @@ -32,9 +32,6 @@ public function __construct(DataCollectorTranslator $translator) $this->translator = $translator; } - /** - * {@inheritdoc} - */ public function lateCollect() { $messages = $this->sanitizeCollectedMessages($this->translator->getCollectedMessages()); @@ -45,18 +42,12 @@ public function lateCollect() $this->data = $this->cloneVar($this->data); } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { $this->data['locale'] = $this->translator->getLocale(); $this->data['fallback_locales'] = $this->translator->getFallbackLocales(); } - /** - * {@inheritdoc} - */ public function reset() { $this->data = []; @@ -95,9 +86,6 @@ public function getFallbackLocales() return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : []; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'translation'; diff --git a/src/Symfony/Component/Translation/DataCollectorTranslator.php b/src/Symfony/Component/Translation/DataCollectorTranslator.php index cab9874608db1..ac33edd7f3c94 100644 --- a/src/Symfony/Component/Translation/DataCollectorTranslator.php +++ b/src/Symfony/Component/Translation/DataCollectorTranslator.php @@ -40,9 +40,6 @@ public function __construct(TranslatorInterface $translator) $this->translator = $translator; } - /** - * {@inheritdoc} - */ public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string { $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); @@ -51,41 +48,27 @@ public function trans(?string $id, array $parameters = [], string $domain = null return $trans; } - /** - * {@inheritdoc} - */ public function setLocale(string $locale) { $this->translator->setLocale($locale); } - /** - * {@inheritdoc} - */ public function getLocale(): string { return $this->translator->getLocale(); } - /** - * {@inheritdoc} - */ public function getCatalogue(string $locale = null): MessageCatalogueInterface { return $this->translator->getCatalogue($locale); } - /** - * {@inheritdoc} - */ public function getCatalogues(): array { return $this->translator->getCatalogues(); } /** - * {@inheritdoc} - * * @return string[] */ public function warmUp(string $cacheDir): array diff --git a/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php b/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php index 0bd3f5e0f1115..df2c2a8b1a9dc 100644 --- a/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php @@ -23,9 +23,6 @@ class CsvFileDumper extends FileDumper private string $delimiter = ';'; private string $enclosure = '"'; - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $handle = fopen('php://memory', 'r+'); @@ -50,9 +47,6 @@ public function setCsvControl(string $delimiter = ';', string $enclosure = '"') $this->enclosure = $enclosure; } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'csv'; diff --git a/src/Symfony/Component/Translation/Dumper/FileDumper.php b/src/Symfony/Component/Translation/Dumper/FileDumper.php index 6bad4ff323ee9..b2db0f30779a9 100644 --- a/src/Symfony/Component/Translation/Dumper/FileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/FileDumper.php @@ -42,9 +42,6 @@ public function setRelativePathTemplate(string $relativePathTemplate) $this->relativePathTemplate = $relativePathTemplate; } - /** - * {@inheritdoc} - */ public function dump(MessageCatalogue $messages, array $options = []) { if (!\array_key_exists('path', $options)) { diff --git a/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php index f13f86c801cfe..50ef82d03064b 100644 --- a/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -20,14 +20,8 @@ */ class IcuResFileDumper extends FileDumper { - /** - * {@inheritdoc} - */ protected $relativePathTemplate = '%domain%/%locale%.%extension%'; - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $data = $indexes = $resources = ''; @@ -94,9 +88,6 @@ private function getPosition(string $data) return (\strlen($data) + 28) / 4; } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'res'; diff --git a/src/Symfony/Component/Translation/Dumper/IniFileDumper.php b/src/Symfony/Component/Translation/Dumper/IniFileDumper.php index 75032be145289..6cbdef606761a 100644 --- a/src/Symfony/Component/Translation/Dumper/IniFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/IniFileDumper.php @@ -20,9 +20,6 @@ */ class IniFileDumper extends FileDumper { - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $output = ''; @@ -35,9 +32,6 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra return $output; } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'ini'; diff --git a/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php b/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php index 11027303a17e0..e5035397f7c6c 100644 --- a/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php @@ -20,9 +20,6 @@ */ class JsonFileDumper extends FileDumper { - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $flags = $options['json_encoding'] ?? \JSON_PRETTY_PRINT; @@ -30,9 +27,6 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra return json_encode($messages->all($domain), $flags); } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'json'; diff --git a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php index c0880101428f9..9ded5f4ef3855 100644 --- a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -21,9 +21,6 @@ */ class MoFileDumper extends FileDumper { - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $sources = $targets = $sourceOffsets = $targetOffsets = ''; @@ -67,9 +64,6 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra return $output; } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'mo'; diff --git a/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php b/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php index 565d893754250..51e90665d75fa 100644 --- a/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php @@ -20,17 +20,11 @@ */ class PhpFileDumper extends FileDumper { - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { return "all($domain), true).";\n"; } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'php'; diff --git a/src/Symfony/Component/Translation/Dumper/PoFileDumper.php b/src/Symfony/Component/Translation/Dumper/PoFileDumper.php index 313e5045875a5..c026672d312b8 100644 --- a/src/Symfony/Component/Translation/Dumper/PoFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/PoFileDumper.php @@ -20,9 +20,6 @@ */ class PoFileDumper extends FileDumper { - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $output = 'msgid ""'."\n"; @@ -111,9 +108,6 @@ private function getStandardRules(string $id) return $standardRules; } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'po'; diff --git a/src/Symfony/Component/Translation/Dumper/QtFileDumper.php b/src/Symfony/Component/Translation/Dumper/QtFileDumper.php index 819409fc07453..0373e9c109542 100644 --- a/src/Symfony/Component/Translation/Dumper/QtFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/QtFileDumper.php @@ -20,9 +20,6 @@ */ class QtFileDumper extends FileDumper { - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $dom = new \DOMDocument('1.0', 'utf-8'); @@ -51,9 +48,6 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra return $dom->saveXML(); } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return 'ts'; diff --git a/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php b/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php index d03d8146dc2bd..53847193050b0 100644 --- a/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php @@ -26,9 +26,6 @@ public function __construct( ) { } - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $xliffVersion = '1.2'; @@ -52,9 +49,6 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra throw new InvalidArgumentException(sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion)); } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return $this->extension; diff --git a/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php b/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php index d0cfbefaa9f81..d2670331e6602 100644 --- a/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php @@ -30,9 +30,6 @@ public function __construct(string $extension = 'yml') $this->extension = $extension; } - /** - * {@inheritdoc} - */ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { if (!class_exists(Yaml::class)) { @@ -52,9 +49,6 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra return Yaml::dump($data); } - /** - * {@inheritdoc} - */ protected function getExtension(): string { return $this->extension; diff --git a/src/Symfony/Component/Translation/Extractor/ChainExtractor.php b/src/Symfony/Component/Translation/Extractor/ChainExtractor.php index e58e82f056f4f..0d2132f73c626 100644 --- a/src/Symfony/Component/Translation/Extractor/ChainExtractor.php +++ b/src/Symfony/Component/Translation/Extractor/ChainExtractor.php @@ -35,9 +35,6 @@ public function addExtractor(string $format, ExtractorInterface $extractor) $this->extractors[$format] = $extractor; } - /** - * {@inheritdoc} - */ public function setPrefix(string $prefix) { foreach ($this->extractors as $extractor) { @@ -45,9 +42,6 @@ public function setPrefix(string $prefix) } } - /** - * {@inheritdoc} - */ public function extract(string|iterable $directory, MessageCatalogue $catalogue) { foreach ($this->extractors as $extractor) { diff --git a/src/Symfony/Component/Translation/Extractor/PhpExtractor.php b/src/Symfony/Component/Translation/Extractor/PhpExtractor.php index 1b86cc5913933..1e24d6a6600e9 100644 --- a/src/Symfony/Component/Translation/Extractor/PhpExtractor.php +++ b/src/Symfony/Component/Translation/Extractor/PhpExtractor.php @@ -128,9 +128,6 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface ], ]; - /** - * {@inheritdoc} - */ public function extract(string|iterable $resource, MessageCatalogue $catalog) { $files = $this->extractFiles($resource); @@ -141,9 +138,6 @@ public function extract(string|iterable $resource, MessageCatalogue $catalog) } } - /** - * {@inheritdoc} - */ public function setPrefix(string $prefix) { $this->prefix = $prefix; @@ -314,9 +308,6 @@ protected function canBeExtracted(string $file): bool return $this->isFile($file) && 'php' === pathinfo($file, \PATHINFO_EXTENSION); } - /** - * {@inheritdoc} - */ protected function extractFromDirectory(string|array $directory): iterable { if (!class_exists(Finder::class)) { diff --git a/src/Symfony/Component/Translation/Formatter/IntlFormatter.php b/src/Symfony/Component/Translation/Formatter/IntlFormatter.php index 546c992a2c6a4..30873cc584a9b 100644 --- a/src/Symfony/Component/Translation/Formatter/IntlFormatter.php +++ b/src/Symfony/Component/Translation/Formatter/IntlFormatter.php @@ -23,9 +23,6 @@ class IntlFormatter implements IntlFormatterInterface private $hasMessageFormatter; private $cache = []; - /** - * {@inheritdoc} - */ public function formatIntl(string $message, string $locale, array $parameters = []): string { // MessageFormatter constructor throws an exception if the message is empty diff --git a/src/Symfony/Component/Translation/Formatter/MessageFormatter.php b/src/Symfony/Component/Translation/Formatter/MessageFormatter.php index 013ed852b16f6..29ad574ee12e3 100644 --- a/src/Symfony/Component/Translation/Formatter/MessageFormatter.php +++ b/src/Symfony/Component/Translation/Formatter/MessageFormatter.php @@ -34,9 +34,6 @@ public function __construct(TranslatorInterface $translator = null, IntlFormatte $this->intlFormatter = $intlFormatter ?? new IntlFormatter(); } - /** - * {@inheritdoc} - */ public function format(string $message, string $locale, array $parameters = []): string { if ($this->translator instanceof TranslatorInterface) { @@ -46,9 +43,6 @@ public function format(string $message, string $locale, array $parameters = []): return strtr($message, $parameters); } - /** - * {@inheritdoc} - */ public function formatIntl(string $message, string $locale, array $parameters = []): string { return $this->intlFormatter->formatIntl($message, $locale, $parameters); diff --git a/src/Symfony/Component/Translation/Loader/ArrayLoader.php b/src/Symfony/Component/Translation/Loader/ArrayLoader.php index 35de9ef547e69..e240493953731 100644 --- a/src/Symfony/Component/Translation/Loader/ArrayLoader.php +++ b/src/Symfony/Component/Translation/Loader/ArrayLoader.php @@ -20,9 +20,6 @@ */ class ArrayLoader implements LoaderInterface { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { $resource = $this->flatten($resource); diff --git a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php index 6f14fd39bfa44..7620b72d6c38e 100644 --- a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php @@ -24,9 +24,6 @@ class CsvFileLoader extends FileLoader private string $enclosure = '"'; private string $escape = '\\'; - /** - * {@inheritdoc} - */ protected function loadResource(string $resource): array { $messages = []; diff --git a/src/Symfony/Component/Translation/Loader/FileLoader.php b/src/Symfony/Component/Translation/Loader/FileLoader.php index e170d761708bc..7a5bca314ad2e 100644 --- a/src/Symfony/Component/Translation/Loader/FileLoader.php +++ b/src/Symfony/Component/Translation/Loader/FileLoader.php @@ -21,9 +21,6 @@ */ abstract class FileLoader extends ArrayLoader { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!stream_is_local($resource)) { diff --git a/src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php b/src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php index e589ab1742b24..76e4e7f02ba9e 100644 --- a/src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php @@ -23,9 +23,6 @@ */ class IcuDatFileLoader extends IcuResFileLoader { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!stream_is_local($resource.'.dat')) { diff --git a/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php b/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php index 555b2a39f2e5c..a5fa4fb46587f 100644 --- a/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php @@ -23,9 +23,6 @@ */ class IcuResFileLoader implements LoaderInterface { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!stream_is_local($resource)) { diff --git a/src/Symfony/Component/Translation/Loader/IniFileLoader.php b/src/Symfony/Component/Translation/Loader/IniFileLoader.php index 04e294d119905..3126896c84788 100644 --- a/src/Symfony/Component/Translation/Loader/IniFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/IniFileLoader.php @@ -18,9 +18,6 @@ */ class IniFileLoader extends FileLoader { - /** - * {@inheritdoc} - */ protected function loadResource(string $resource): array { return parse_ini_file($resource, true); diff --git a/src/Symfony/Component/Translation/Loader/JsonFileLoader.php b/src/Symfony/Component/Translation/Loader/JsonFileLoader.php index c70dfde046390..385553ef64b2b 100644 --- a/src/Symfony/Component/Translation/Loader/JsonFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/JsonFileLoader.php @@ -20,9 +20,6 @@ */ class JsonFileLoader extends FileLoader { - /** - * {@inheritdoc} - */ protected function loadResource(string $resource): array { $messages = []; diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php index b0c891387cfc8..8427c393e139d 100644 --- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -38,8 +38,6 @@ class MoFileLoader extends FileLoader /** * Parses machine object (MO) format, independent of the machine's endian it * was created on. Both 32bit and 64bit systems are supported. - * - * {@inheritdoc} */ protected function loadResource(string $resource): array { diff --git a/src/Symfony/Component/Translation/Loader/PhpFileLoader.php b/src/Symfony/Component/Translation/Loader/PhpFileLoader.php index ae299c2ac5234..17d8bfcce0881 100644 --- a/src/Symfony/Component/Translation/Loader/PhpFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/PhpFileLoader.php @@ -20,9 +20,6 @@ class PhpFileLoader extends FileLoader { private static ?array $cache = []; - /** - * {@inheritdoc} - */ protected function loadResource(string $resource): array { if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { diff --git a/src/Symfony/Component/Translation/Loader/PoFileLoader.php b/src/Symfony/Component/Translation/Loader/PoFileLoader.php index 01fc8d4fb0318..9f7f125d4d8e2 100644 --- a/src/Symfony/Component/Translation/Loader/PoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/PoFileLoader.php @@ -57,8 +57,6 @@ class PoFileLoader extends FileLoader * - Message IDs are allowed to have other encodings as just US-ASCII. * * Items with an empty id are ignored. - * - * {@inheritdoc} */ protected function loadResource(string $resource): array { diff --git a/src/Symfony/Component/Translation/Loader/QtFileLoader.php b/src/Symfony/Component/Translation/Loader/QtFileLoader.php index 6d5582d662adc..d91e0a1f477d6 100644 --- a/src/Symfony/Component/Translation/Loader/QtFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/QtFileLoader.php @@ -25,9 +25,6 @@ */ class QtFileLoader implements LoaderInterface { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!class_exists(XmlUtils::class)) { diff --git a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index 971bfd50f7f8d..0ce3af5338fda 100644 --- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -28,9 +28,6 @@ */ class XliffFileLoader implements LoaderInterface { - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue { if (!class_exists(XmlUtils::class)) { diff --git a/src/Symfony/Component/Translation/Loader/YamlFileLoader.php b/src/Symfony/Component/Translation/Loader/YamlFileLoader.php index 5eccf99de0d8e..598d98c647d1c 100644 --- a/src/Symfony/Component/Translation/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/YamlFileLoader.php @@ -26,9 +26,6 @@ class YamlFileLoader extends FileLoader { private $yamlParser; - /** - * {@inheritdoc} - */ protected function loadResource(string $resource): array { if (null === $this->yamlParser) { diff --git a/src/Symfony/Component/Translation/LoggingTranslator.php b/src/Symfony/Component/Translation/LoggingTranslator.php index 8dd8ecf96be29..5a0d3a6cce71e 100644 --- a/src/Symfony/Component/Translation/LoggingTranslator.php +++ b/src/Symfony/Component/Translation/LoggingTranslator.php @@ -37,9 +37,6 @@ public function __construct(TranslatorInterface $translator, LoggerInterface $lo $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string { $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); @@ -48,9 +45,6 @@ public function trans(?string $id, array $parameters = [], string $domain = null return $trans; } - /** - * {@inheritdoc} - */ public function setLocale(string $locale) { $prev = $this->translator->getLocale(); @@ -62,25 +56,16 @@ public function setLocale(string $locale) $this->logger->debug(sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale)); } - /** - * {@inheritdoc} - */ public function getLocale(): string { return $this->translator->getLocale(); } - /** - * {@inheritdoc} - */ public function getCatalogue(string $locale = null): MessageCatalogueInterface { return $this->translator->getCatalogue($locale); } - /** - * {@inheritdoc} - */ public function getCatalogues(): array { return $this->translator->getCatalogues(); diff --git a/src/Symfony/Component/Translation/MessageCatalogue.php b/src/Symfony/Component/Translation/MessageCatalogue.php index 4b8fc58d51343..605f28174e4e1 100644 --- a/src/Symfony/Component/Translation/MessageCatalogue.php +++ b/src/Symfony/Component/Translation/MessageCatalogue.php @@ -36,17 +36,11 @@ public function __construct(string $locale, array $messages = []) $this->messages = $messages; } - /** - * {@inheritdoc} - */ public function getLocale(): string { return $this->locale; } - /** - * {@inheritdoc} - */ public function getDomains(): array { $domains = []; @@ -61,9 +55,6 @@ public function getDomains(): array return array_values($domains); } - /** - * {@inheritdoc} - */ public function all(string $domain = null): array { if (null !== $domain) { @@ -89,17 +80,11 @@ public function all(string $domain = null): array return $allMessages; } - /** - * {@inheritdoc} - */ public function set(string $id, string $translation, string $domain = 'messages') { $this->add([$id => $translation], $domain); } - /** - * {@inheritdoc} - */ public function has(string $id, string $domain = 'messages'): bool { if (isset($this->messages[$domain][$id]) || isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id])) { @@ -113,17 +98,11 @@ public function has(string $id, string $domain = 'messages'): bool return false; } - /** - * {@inheritdoc} - */ public function defines(string $id, string $domain = 'messages'): bool { return isset($this->messages[$domain][$id]) || isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id]); } - /** - * {@inheritdoc} - */ public function get(string $id, string $domain = 'messages'): string { if (isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id])) { @@ -141,9 +120,6 @@ public function get(string $id, string $domain = 'messages'): string return $id; } - /** - * {@inheritdoc} - */ public function replace(array $messages, string $domain = 'messages') { unset($this->messages[$domain], $this->messages[$domain.self::INTL_DOMAIN_SUFFIX]); @@ -151,9 +127,6 @@ public function replace(array $messages, string $domain = 'messages') $this->add($messages, $domain); } - /** - * {@inheritdoc} - */ public function add(array $messages, string $domain = 'messages') { $altDomain = str_ends_with($domain, self::INTL_DOMAIN_SUFFIX) ? substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)) : $domain.self::INTL_DOMAIN_SUFFIX; @@ -167,9 +140,6 @@ public function add(array $messages, string $domain = 'messages') } } - /** - * {@inheritdoc} - */ public function addCatalogue(MessageCatalogueInterface $catalogue) { if ($catalogue->getLocale() !== $this->locale) { @@ -199,9 +169,6 @@ public function addCatalogue(MessageCatalogueInterface $catalogue) } } - /** - * {@inheritdoc} - */ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue) { // detect circular references @@ -231,33 +198,21 @@ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue) } } - /** - * {@inheritdoc} - */ public function getFallbackCatalogue(): ?MessageCatalogueInterface { return $this->fallbackCatalogue; } - /** - * {@inheritdoc} - */ public function getResources(): array { return array_values($this->resources); } - /** - * {@inheritdoc} - */ public function addResource(ResourceInterface $resource) { $this->resources[$resource->__toString()] = $resource; } - /** - * {@inheritdoc} - */ public function getMetadata(string $key = '', string $domain = 'messages'): mixed { if ('' == $domain) { @@ -277,17 +232,11 @@ public function getMetadata(string $key = '', string $domain = 'messages'): mixe return null; } - /** - * {@inheritdoc} - */ public function setMetadata(string $key, mixed $value, string $domain = 'messages') { $this->metadata[$domain][$key] = $value; } - /** - * {@inheritdoc} - */ public function deleteMetadata(string $key = '', string $domain = 'messages') { if ('' == $domain) { @@ -299,9 +248,6 @@ public function deleteMetadata(string $key = '', string $domain = 'messages') } } - /** - * {@inheritdoc} - */ public function getCatalogueMetadata(string $key = '', string $domain = 'messages'): mixed { if (!$domain) { @@ -321,17 +267,11 @@ public function getCatalogueMetadata(string $key = '', string $domain = 'message return null; } - /** - * {@inheritdoc} - */ public function setCatalogueMetadata(string $key, mixed $value, string $domain = 'messages') { $this->catalogueMetadata[$domain][$key] = $value; } - /** - * {@inheritdoc} - */ public function deleteCatalogueMetadata(string $key = '', string $domain = 'messages') { if (!$domain) { diff --git a/src/Symfony/Component/Translation/Provider/FilteringProvider.php b/src/Symfony/Component/Translation/Provider/FilteringProvider.php index db02b6adaecc5..d4465b9fd62cd 100644 --- a/src/Symfony/Component/Translation/Provider/FilteringProvider.php +++ b/src/Symfony/Component/Translation/Provider/FilteringProvider.php @@ -37,9 +37,6 @@ public function __toString(): string return (string) $this->provider; } - /** - * {@inheritdoc} - */ public function write(TranslatorBagInterface $translatorBag): void { $this->provider->write($translatorBag); diff --git a/src/Symfony/Component/Translation/PseudoLocalizationTranslator.php b/src/Symfony/Component/Translation/PseudoLocalizationTranslator.php index dfcfe43a4c57d..0207e9997ad0e 100644 --- a/src/Symfony/Component/Translation/PseudoLocalizationTranslator.php +++ b/src/Symfony/Component/Translation/PseudoLocalizationTranslator.php @@ -83,9 +83,6 @@ public function __construct(TranslatorInterface $translator, array $options = [] $this->localizableHTMLAttributes = $options['localizable_html_attributes'] ?? []; } - /** - * {@inheritdoc} - */ public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string { $trans = ''; diff --git a/src/Symfony/Component/Translation/Reader/TranslationReader.php b/src/Symfony/Component/Translation/Reader/TranslationReader.php index bbc687e1391f9..fd2ee66959201 100644 --- a/src/Symfony/Component/Translation/Reader/TranslationReader.php +++ b/src/Symfony/Component/Translation/Reader/TranslationReader.php @@ -39,9 +39,6 @@ public function addLoader(string $format, LoaderInterface $loader) $this->loaders[$format] = $loader; } - /** - * {@inheritdoc} - */ public function read(string $directory, MessageCatalogue $catalogue) { if (!is_dir($directory)) { diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index d2e5c73f24a70..a6ec7cc8e190f 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -125,18 +125,12 @@ public function addResource(string $format, mixed $resource, string $locale, str } } - /** - * {@inheritdoc} - */ public function setLocale(string $locale) { $this->assertValidLocale($locale); $this->locale = $locale; } - /** - * {@inheritdoc} - */ public function getLocale(): string { return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); @@ -171,9 +165,6 @@ public function getFallbackLocales(): array return $this->fallbackLocales; } - /** - * {@inheritdoc} - */ public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string { if (null === $id || '' === $id) { @@ -210,9 +201,6 @@ public function trans(?string $id, array $parameters = [], string $domain = null return $this->formatter->format($catalogue->get($id, $domain), $locale, $parameters); } - /** - * {@inheritdoc} - */ public function getCatalogue(string $locale = null): MessageCatalogueInterface { if (!$locale) { @@ -228,9 +216,6 @@ public function getCatalogue(string $locale = null): MessageCatalogueInterface return $this->catalogues[$locale]; } - /** - * {@inheritdoc} - */ public function getCatalogues(): array { return array_values($this->catalogues); diff --git a/src/Symfony/Component/Translation/TranslatorBag.php b/src/Symfony/Component/Translation/TranslatorBag.php index 9be3458c158ae..fb8ede8721a65 100644 --- a/src/Symfony/Component/Translation/TranslatorBag.php +++ b/src/Symfony/Component/Translation/TranslatorBag.php @@ -35,9 +35,6 @@ public function addBag(TranslatorBagInterface $bag): void } } - /** - * {@inheritdoc} - */ public function getCatalogue(string $locale = null): MessageCatalogueInterface { if (null === $locale || !isset($this->catalogues[$locale])) { @@ -47,9 +44,6 @@ public function getCatalogue(string $locale = null): MessageCatalogueInterface return $this->catalogues[$locale]; } - /** - * {@inheritdoc} - */ public function getCatalogues(): array { return array_values($this->catalogues); diff --git a/src/Symfony/Component/Uid/Command/GenerateUlidCommand.php b/src/Symfony/Component/Uid/Command/GenerateUlidCommand.php index 1b22a0843132d..9930b6397fa2c 100644 --- a/src/Symfony/Component/Uid/Command/GenerateUlidCommand.php +++ b/src/Symfony/Component/Uid/Command/GenerateUlidCommand.php @@ -40,9 +40,6 @@ public function __construct(UlidFactory $factory = null) parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -72,9 +69,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Uid/Command/GenerateUuidCommand.php b/src/Symfony/Component/Uid/Command/GenerateUuidCommand.php index 67a1b4cb5ac3d..eed0e5109346b 100644 --- a/src/Symfony/Component/Uid/Command/GenerateUuidCommand.php +++ b/src/Symfony/Component/Uid/Command/GenerateUuidCommand.php @@ -35,9 +35,6 @@ public function __construct(UuidFactory $factory = null) parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -87,9 +84,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Uid/Command/InspectUlidCommand.php b/src/Symfony/Component/Uid/Command/InspectUlidCommand.php index ae45d45f44eab..b3a1b024abc3f 100644 --- a/src/Symfony/Component/Uid/Command/InspectUlidCommand.php +++ b/src/Symfony/Component/Uid/Command/InspectUlidCommand.php @@ -24,9 +24,6 @@ #[AsCommand(name: 'ulid:inspect', description: 'Inspect a ULID')] class InspectUlidCommand extends Command { - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -44,9 +41,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Uid/Command/InspectUuidCommand.php b/src/Symfony/Component/Uid/Command/InspectUuidCommand.php index 5118b6462e020..25a7b6fda3025 100644 --- a/src/Symfony/Component/Uid/Command/InspectUuidCommand.php +++ b/src/Symfony/Component/Uid/Command/InspectUuidCommand.php @@ -26,9 +26,6 @@ #[AsCommand(name: 'uuid:inspect', description: 'Inspect a UUID')] class InspectUuidCommand extends Command { - /** - * {@inheritdoc} - */ protected function configure(): void { $this @@ -46,9 +43,6 @@ protected function configure(): void ; } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); diff --git a/src/Symfony/Component/Uid/Ulid.php b/src/Symfony/Component/Uid/Ulid.php index 27b7fa4f9c9f4..3bd7e2bca3d25 100644 --- a/src/Symfony/Component/Uid/Ulid.php +++ b/src/Symfony/Component/Uid/Ulid.php @@ -59,9 +59,6 @@ public static function isValid(string $ulid): bool return $ulid[0] <= '7'; } - /** - * {@inheritdoc} - */ public static function fromString(string $ulid): static { if (36 === \strlen($ulid) && Uuid::isValid($ulid)) { diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index f7a677bbdc7be..03ae15673eb93 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -36,9 +36,6 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface */ protected $context; - /** - * {@inheritdoc} - */ public function initialize(ExecutionContextInterface $context) { $this->context = $context; diff --git a/src/Symfony/Component/Validator/ConstraintValidatorFactory.php b/src/Symfony/Component/Validator/ConstraintValidatorFactory.php index 12f9821290779..8152ad0dece11 100644 --- a/src/Symfony/Component/Validator/ConstraintValidatorFactory.php +++ b/src/Symfony/Component/Validator/ConstraintValidatorFactory.php @@ -30,9 +30,6 @@ public function __construct() { } - /** - * {@inheritdoc} - */ public function getInstance(Constraint $constraint): ConstraintValidatorInterface { $className = $constraint->validatedBy(); diff --git a/src/Symfony/Component/Validator/ConstraintViolation.php b/src/Symfony/Component/Validator/ConstraintViolation.php index 4fb8b0a7cac77..776bad6dc7d16 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -63,9 +63,6 @@ public function __construct(string|\Stringable $message, ?string $messageTemplat $this->cause = $cause; } - /** - * {@inheritdoc} - */ public function __toString(): string { if (\is_object($this->root)) { @@ -89,57 +86,36 @@ public function __toString(): string return $class.$propertyPath.":\n ".$this->getMessage().$code; } - /** - * {@inheritdoc} - */ public function getMessageTemplate(): string { return (string) $this->messageTemplate; } - /** - * {@inheritdoc} - */ public function getParameters(): array { return $this->parameters; } - /** - * {@inheritdoc} - */ public function getPlural(): ?int { return $this->plural; } - /** - * {@inheritdoc} - */ public function getMessage(): string|\Stringable { return $this->message; } - /** - * {@inheritdoc} - */ public function getRoot(): mixed { return $this->root; } - /** - * {@inheritdoc} - */ public function getPropertyPath(): string { return (string) $this->propertyPath; } - /** - * {@inheritdoc} - */ public function getInvalidValue(): mixed { return $this->invalidValue; @@ -161,9 +137,6 @@ public function getCause(): mixed return $this->cause; } - /** - * {@inheritdoc} - */ public function getCode(): ?string { return $this->code; diff --git a/src/Symfony/Component/Validator/ConstraintViolationList.php b/src/Symfony/Component/Validator/ConstraintViolationList.php index a0b157ea0034c..c3c0b413e37b5 100644 --- a/src/Symfony/Component/Validator/ConstraintViolationList.php +++ b/src/Symfony/Component/Validator/ConstraintViolationList.php @@ -45,9 +45,6 @@ public static function createFromMessage(string $message): self return $self; } - /** - * {@inheritdoc} - */ public function __toString(): string { $string = ''; @@ -59,17 +56,11 @@ public function __toString(): string return $string; } - /** - * {@inheritdoc} - */ public function add(ConstraintViolationInterface $violation) { $this->violations[] = $violation; } - /** - * {@inheritdoc} - */ public function addAll(ConstraintViolationListInterface $otherList) { foreach ($otherList as $violation) { @@ -77,9 +68,6 @@ public function addAll(ConstraintViolationListInterface $otherList) } } - /** - * {@inheritdoc} - */ public function get(int $offset): ConstraintViolationInterface { if (!isset($this->violations[$offset])) { @@ -89,33 +77,22 @@ public function get(int $offset): ConstraintViolationInterface return $this->violations[$offset]; } - /** - * {@inheritdoc} - */ public function has(int $offset): bool { return isset($this->violations[$offset]); } - /** - * {@inheritdoc} - */ public function set(int $offset, ConstraintViolationInterface $violation) { $this->violations[$offset] = $violation; } - /** - * {@inheritdoc} - */ public function remove(int $offset) { unset($this->violations[$offset]); } /** - * {@inheritdoc} - * * @return \ArrayIterator */ public function getIterator(): \ArrayIterator diff --git a/src/Symfony/Component/Validator/Constraints/AbstractComparison.php b/src/Symfony/Component/Validator/Constraints/AbstractComparison.php index d0ec1b60b4adf..a249d0ebddf20 100644 --- a/src/Symfony/Component/Validator/Constraints/AbstractComparison.php +++ b/src/Symfony/Component/Validator/Constraints/AbstractComparison.php @@ -54,9 +54,6 @@ public function __construct(mixed $value = null, string $propertyPath = null, st } } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'value'; diff --git a/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php b/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php index 3412dc324dd35..9343034b0d3c8 100644 --- a/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php +++ b/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php @@ -34,9 +34,6 @@ public function __construct(PropertyAccessorInterface $propertyAccessor = null) $this->propertyAccessor = $propertyAccessor; } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof AbstractComparison) { diff --git a/src/Symfony/Component/Validator/Constraints/AllValidator.php b/src/Symfony/Component/Validator/Constraints/AllValidator.php index 4a5657486a01d..dec93db3edc8a 100644 --- a/src/Symfony/Component/Validator/Constraints/AllValidator.php +++ b/src/Symfony/Component/Validator/Constraints/AllValidator.php @@ -21,9 +21,6 @@ */ class AllValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof All) { diff --git a/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php b/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php index 9ef05753cc0a5..99de0a50d3847 100644 --- a/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php +++ b/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php @@ -20,9 +20,6 @@ */ class AtLeastOneOfValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof AtLeastOneOf) { diff --git a/src/Symfony/Component/Validator/Constraints/Bic.php b/src/Symfony/Component/Validator/Constraints/Bic.php index 36ec3436df34f..dad4258dc0b60 100644 --- a/src/Symfony/Component/Validator/Constraints/Bic.php +++ b/src/Symfony/Component/Validator/Constraints/Bic.php @@ -51,9 +51,6 @@ class Bic extends Constraint public $iban; public $ibanPropertyPath; - /** - * {@inheritdoc} - */ public function __construct(array $options = null, string $message = null, string $iban = null, string $ibanPropertyPath = null, string $ibanMessage = null, array $groups = null, mixed $payload = null) { if (!class_exists(Countries::class)) { diff --git a/src/Symfony/Component/Validator/Constraints/BicValidator.php b/src/Symfony/Component/Validator/Constraints/BicValidator.php index a11ec1360bdc3..dcb1a90c019f8 100644 --- a/src/Symfony/Component/Validator/Constraints/BicValidator.php +++ b/src/Symfony/Component/Validator/Constraints/BicValidator.php @@ -55,9 +55,6 @@ public function __construct(PropertyAccessor $propertyAccessor = null) $this->propertyAccessor = $propertyAccessor; } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Bic) { diff --git a/src/Symfony/Component/Validator/Constraints/BlankValidator.php b/src/Symfony/Component/Validator/Constraints/BlankValidator.php index d0639a2ab6ebb..850c3e5dd1181 100644 --- a/src/Symfony/Component/Validator/Constraints/BlankValidator.php +++ b/src/Symfony/Component/Validator/Constraints/BlankValidator.php @@ -20,9 +20,6 @@ */ class BlankValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Blank) { diff --git a/src/Symfony/Component/Validator/Constraints/Callback.php b/src/Symfony/Component/Validator/Constraints/Callback.php index 1b3a54fcb6113..82f67962b2572 100644 --- a/src/Symfony/Component/Validator/Constraints/Callback.php +++ b/src/Symfony/Component/Validator/Constraints/Callback.php @@ -43,17 +43,11 @@ public function __construct(array|string|callable $callback = null, array $group parent::__construct($options, $groups, $payload); } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'callback'; } - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; diff --git a/src/Symfony/Component/Validator/Constraints/CallbackValidator.php b/src/Symfony/Component/Validator/Constraints/CallbackValidator.php index 88873b0cd73d0..24cb121e2b109 100644 --- a/src/Symfony/Component/Validator/Constraints/CallbackValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CallbackValidator.php @@ -23,9 +23,6 @@ */ class CallbackValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $object, Constraint $constraint) { if (!$constraint instanceof Callback) { diff --git a/src/Symfony/Component/Validator/Constraints/Cascade.php b/src/Symfony/Component/Validator/Constraints/Cascade.php index c44a902da09be..f3bb3cf929fad 100644 --- a/src/Symfony/Component/Validator/Constraints/Cascade.php +++ b/src/Symfony/Component/Validator/Constraints/Cascade.php @@ -32,9 +32,6 @@ public function __construct(array $options = null) parent::__construct($options); } - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return self::CLASS_CONSTRAINT; diff --git a/src/Symfony/Component/Validator/Constraints/Choice.php b/src/Symfony/Component/Validator/Constraints/Choice.php index 226a08d6e6479..5544688d0baf6 100644 --- a/src/Symfony/Component/Validator/Constraints/Choice.php +++ b/src/Symfony/Component/Validator/Constraints/Choice.php @@ -49,9 +49,6 @@ class Choice extends Constraint public $maxMessage = 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.'; public bool $match = true; - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'choices'; diff --git a/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php b/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php index 0be50f96e9c4b..ace179a9faf08 100644 --- a/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php +++ b/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php @@ -26,9 +26,6 @@ */ class ChoiceValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Choice) { diff --git a/src/Symfony/Component/Validator/Constraints/Collection.php b/src/Symfony/Component/Validator/Constraints/Collection.php index 89515960324b8..e02bd1457d235 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection.php +++ b/src/Symfony/Component/Validator/Constraints/Collection.php @@ -41,9 +41,6 @@ class Collection extends Composite public $extraFieldsMessage = 'This field was not expected.'; public $missingFieldsMessage = 'This field is missing.'; - /** - * {@inheritdoc} - */ public function __construct(mixed $fields = null, array $groups = null, mixed $payload = null, bool $allowExtraFields = null, bool $allowMissingFields = null, string $extraFieldsMessage = null, string $missingFieldsMessage = null) { // no known options set? $fields is the fields array @@ -60,9 +57,6 @@ public function __construct(mixed $fields = null, array $groups = null, mixed $p $this->missingFieldsMessage = $missingFieldsMessage ?? $this->missingFieldsMessage; } - /** - * {@inheritdoc} - */ protected function initializeNestedConstraints() { parent::initializeNestedConstraints(); diff --git a/src/Symfony/Component/Validator/Constraints/CollectionValidator.php b/src/Symfony/Component/Validator/Constraints/CollectionValidator.php index 131b396e250f6..a8bda3fddc8a4 100644 --- a/src/Symfony/Component/Validator/Constraints/CollectionValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CollectionValidator.php @@ -21,9 +21,6 @@ */ class CollectionValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Collection) { diff --git a/src/Symfony/Component/Validator/Constraints/Composite.php b/src/Symfony/Component/Validator/Constraints/Composite.php index 840ba9b5fec9f..53d69968af28e 100644 --- a/src/Symfony/Component/Validator/Constraints/Composite.php +++ b/src/Symfony/Component/Validator/Constraints/Composite.php @@ -29,8 +29,6 @@ abstract class Composite extends Constraint { /** - * {@inheritdoc} - * * The groups of the composite and its nested constraints are made * consistent using the following strategy: * @@ -111,8 +109,6 @@ public function __construct(mixed $options = null, array $groups = null, mixed $ } /** - * {@inheritdoc} - * * Implicit group names are forwarded to nested constraints. */ public function addImplicitGroupName(string $group) diff --git a/src/Symfony/Component/Validator/Constraints/CountValidator.php b/src/Symfony/Component/Validator/Constraints/CountValidator.php index 758dc41c41f38..65a814002f72f 100644 --- a/src/Symfony/Component/Validator/Constraints/CountValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CountValidator.php @@ -21,9 +21,6 @@ */ class CountValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Count) { diff --git a/src/Symfony/Component/Validator/Constraints/CountryValidator.php b/src/Symfony/Component/Validator/Constraints/CountryValidator.php index 3b87236444664..0874b517a873e 100644 --- a/src/Symfony/Component/Validator/Constraints/CountryValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CountryValidator.php @@ -24,9 +24,6 @@ */ class CountryValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Country) { diff --git a/src/Symfony/Component/Validator/Constraints/CssColorValidator.php b/src/Symfony/Component/Validator/Constraints/CssColorValidator.php index b34ef9303fc49..9e8b1b55c194c 100644 --- a/src/Symfony/Component/Validator/Constraints/CssColorValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CssColorValidator.php @@ -52,9 +52,6 @@ class CssColorValidator extends ConstraintValidator CssColor::HSLA => self::PATTERN_HSLA, ]; - /** - * {@inheritdoc} - */ public function validate($value, Constraint $constraint): void { if (!$constraint instanceof CssColor) { diff --git a/src/Symfony/Component/Validator/Constraints/CurrencyValidator.php b/src/Symfony/Component/Validator/Constraints/CurrencyValidator.php index 8d3d8b111bee2..cfbcd5c5fd1e7 100644 --- a/src/Symfony/Component/Validator/Constraints/CurrencyValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CurrencyValidator.php @@ -25,9 +25,6 @@ */ class CurrencyValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Currency) { diff --git a/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php b/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php index 697f0dad95646..ebc20827a3279 100644 --- a/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php @@ -21,9 +21,6 @@ */ class DateTimeValidator extends DateValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof DateTime) { diff --git a/src/Symfony/Component/Validator/Constraints/DateValidator.php b/src/Symfony/Component/Validator/Constraints/DateValidator.php index 5189f2e28964b..cf34c41380d7f 100644 --- a/src/Symfony/Component/Validator/Constraints/DateValidator.php +++ b/src/Symfony/Component/Validator/Constraints/DateValidator.php @@ -33,9 +33,6 @@ public static function checkDate(int $year, int $month, int $day): bool return checkdate($month, $day, $year); } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Date) { diff --git a/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php b/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php index 5ba966cb35020..1c09123d03685 100644 --- a/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php +++ b/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php @@ -36,9 +36,6 @@ public function __construct(array $options = null) parent::__construct($options); } - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; diff --git a/src/Symfony/Component/Validator/Constraints/DivisibleByValidator.php b/src/Symfony/Component/Validator/Constraints/DivisibleByValidator.php index 077f28f52285d..03c0a95b07c32 100644 --- a/src/Symfony/Component/Validator/Constraints/DivisibleByValidator.php +++ b/src/Symfony/Component/Validator/Constraints/DivisibleByValidator.php @@ -20,9 +20,6 @@ */ class DivisibleByValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { if (!is_numeric($value1)) { @@ -52,9 +49,6 @@ protected function compareValues(mixed $value1, mixed $value2): bool return sprintf('%.12e', $value2) === sprintf('%.12e', $remainder); } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return DivisibleBy::NOT_DIVISIBLE_BY; diff --git a/src/Symfony/Component/Validator/Constraints/EmailValidator.php b/src/Symfony/Component/Validator/Constraints/EmailValidator.php index ea4b6fc313293..44dc30b171d3e 100644 --- a/src/Symfony/Component/Validator/Constraints/EmailValidator.php +++ b/src/Symfony/Component/Validator/Constraints/EmailValidator.php @@ -47,9 +47,6 @@ public function __construct(string $defaultMode = Email::VALIDATION_MODE_LOOSE) $this->defaultMode = $defaultMode; } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Email) { diff --git a/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php b/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php index 873b2e85dcfe1..1adefda29584c 100644 --- a/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php +++ b/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php @@ -36,9 +36,6 @@ public function __construct(array $options = null) parent::__construct($options); } - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; diff --git a/src/Symfony/Component/Validator/Constraints/EqualToValidator.php b/src/Symfony/Component/Validator/Constraints/EqualToValidator.php index 7ae22c39c6469..a8b5bad9dabf7 100644 --- a/src/Symfony/Component/Validator/Constraints/EqualToValidator.php +++ b/src/Symfony/Component/Validator/Constraints/EqualToValidator.php @@ -19,17 +19,11 @@ */ class EqualToValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return $value1 == $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return EqualTo::NOT_EQUAL_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/Expression.php b/src/Symfony/Component/Validator/Constraints/Expression.php index 392953d261905..089b4f8903e57 100644 --- a/src/Symfony/Component/Validator/Constraints/Expression.php +++ b/src/Symfony/Component/Validator/Constraints/Expression.php @@ -68,33 +68,21 @@ public function __construct( $this->negate = $negate ?? $this->negate; } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'expression'; } - /** - * {@inheritdoc} - */ public function getRequiredOptions(): array { return ['expression']; } - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; } - /** - * {@inheritdoc} - */ public function validatedBy(): string { return 'validator.expression'; diff --git a/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php b/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php index f9068f0880b0a..bbbb5ebe26157 100644 --- a/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php +++ b/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php @@ -50,9 +50,6 @@ public function __construct(array $options = null, string $message = null, strin $this->allowedVariables = $allowedVariables ?? $this->allowedVariables; } - /** - * {@inheritdoc} - */ public function validatedBy(): string { return $this->service ?? static::class.'Validator'; diff --git a/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntaxValidator.php b/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntaxValidator.php index 3628db69cf76f..69bd03cc36bb8 100644 --- a/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntaxValidator.php +++ b/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntaxValidator.php @@ -38,9 +38,6 @@ public function __construct(ExpressionLanguage $expressionLanguage = null) $this->expressionLanguage = $expressionLanguage; } - /** - * {@inheritdoc} - */ public function validate(mixed $expression, Constraint $constraint): void { if (!$constraint instanceof ExpressionLanguageSyntax) { diff --git a/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php b/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php index 0177ab96b4cfb..a614ae43fc6ff 100644 --- a/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php +++ b/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php @@ -41,9 +41,6 @@ public function __construct(array $options = null, string $message = null, strin $this->allowedVariables = $allowedVariables ?? $this->allowedVariables; } - /** - * {@inheritdoc} - */ public function validatedBy(): string { return $this->service ?? static::class.'Validator'; diff --git a/src/Symfony/Component/Validator/Constraints/ExpressionSyntaxValidator.php b/src/Symfony/Component/Validator/Constraints/ExpressionSyntaxValidator.php index 67c374e325c3a..31263f3b4e15c 100644 --- a/src/Symfony/Component/Validator/Constraints/ExpressionSyntaxValidator.php +++ b/src/Symfony/Component/Validator/Constraints/ExpressionSyntaxValidator.php @@ -30,9 +30,6 @@ public function __construct(ExpressionLanguage $expressionLanguage = null) $this->expressionLanguage = $expressionLanguage; } - /** - * {@inheritdoc} - */ public function validate(mixed $expression, Constraint $constraint): void { if (!$constraint instanceof ExpressionSyntax) { diff --git a/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php b/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php index 0e8ecac6b0093..0740c202edf54 100644 --- a/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php +++ b/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php @@ -29,9 +29,6 @@ public function __construct(ExpressionLanguage $expressionLanguage = null) $this->expressionLanguage = $expressionLanguage; } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Expression) { diff --git a/src/Symfony/Component/Validator/Constraints/FileValidator.php b/src/Symfony/Component/Validator/Constraints/FileValidator.php index a88191df2155e..d7c23e502f8d1 100644 --- a/src/Symfony/Component/Validator/Constraints/FileValidator.php +++ b/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -38,9 +38,6 @@ class FileValidator extends ConstraintValidator self::MIB_BYTES => 'MiB', ]; - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof File) { diff --git a/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php b/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php index ea9b7da660046..bcf80a82d4ac5 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php @@ -19,17 +19,11 @@ */ class GreaterThanOrEqualValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return null === $value2 || $value1 >= $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return GreaterThanOrEqual::TOO_LOW_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php b/src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php index 8a57dd9f9ede5..1e8734fab3e21 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php @@ -19,17 +19,11 @@ */ class GreaterThanValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return null === $value2 || $value1 > $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return GreaterThan::TOO_LOW_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/IbanValidator.php b/src/Symfony/Component/Validator/Constraints/IbanValidator.php index 3e9c15f7e115a..d80bf36794de6 100644 --- a/src/Symfony/Component/Validator/Constraints/IbanValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IbanValidator.php @@ -137,9 +137,6 @@ class IbanValidator extends ConstraintValidator 'YT' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Mayotte ]; - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Iban) { diff --git a/src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php b/src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php index b9ed34a141eeb..0f5d506780242 100644 --- a/src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php @@ -19,17 +19,11 @@ */ class IdenticalToValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return $value1 === $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return IdenticalTo::NOT_IDENTICAL_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/Image.php b/src/Symfony/Component/Validator/Constraints/Image.php index 9938aa588bc0a..0a569c7102481 100644 --- a/src/Symfony/Component/Validator/Constraints/Image.php +++ b/src/Symfony/Component/Validator/Constraints/Image.php @@ -93,9 +93,6 @@ class Image extends File public $allowPortraitMessage = 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.'; public $corruptedMessage = 'The image file is corrupted.'; - /** - * {@inheritdoc} - */ public function __construct( array $options = null, int|string $maxSize = null, diff --git a/src/Symfony/Component/Validator/Constraints/ImageValidator.php b/src/Symfony/Component/Validator/Constraints/ImageValidator.php index 3246215fef53a..28aaa89558418 100644 --- a/src/Symfony/Component/Validator/Constraints/ImageValidator.php +++ b/src/Symfony/Component/Validator/Constraints/ImageValidator.php @@ -25,9 +25,6 @@ */ class ImageValidator extends FileValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Image) { diff --git a/src/Symfony/Component/Validator/Constraints/Ip.php b/src/Symfony/Component/Validator/Constraints/Ip.php index 69a73a700e770..94c4ca4847663 100644 --- a/src/Symfony/Component/Validator/Constraints/Ip.php +++ b/src/Symfony/Component/Validator/Constraints/Ip.php @@ -86,9 +86,6 @@ class Ip extends Constraint public $normalizer; - /** - * {@inheritdoc} - */ public function __construct( array $options = null, string $version = null, diff --git a/src/Symfony/Component/Validator/Constraints/IpValidator.php b/src/Symfony/Component/Validator/Constraints/IpValidator.php index ce8f7c654b484..0ed8240a25ee6 100644 --- a/src/Symfony/Component/Validator/Constraints/IpValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IpValidator.php @@ -24,9 +24,6 @@ */ class IpValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Ip) { diff --git a/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php b/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php index 7b37918b6912b..8ada67f7cd827 100644 --- a/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php @@ -20,9 +20,6 @@ */ class IsFalseValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof IsFalse) { diff --git a/src/Symfony/Component/Validator/Constraints/IsNullValidator.php b/src/Symfony/Component/Validator/Constraints/IsNullValidator.php index 84043a54c67e4..000821abd6c10 100644 --- a/src/Symfony/Component/Validator/Constraints/IsNullValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsNullValidator.php @@ -20,9 +20,6 @@ */ class IsNullValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof IsNull) { diff --git a/src/Symfony/Component/Validator/Constraints/IsTrueValidator.php b/src/Symfony/Component/Validator/Constraints/IsTrueValidator.php index ecdf305d9815b..e7e5e98dd1e2c 100644 --- a/src/Symfony/Component/Validator/Constraints/IsTrueValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsTrueValidator.php @@ -20,9 +20,6 @@ */ class IsTrueValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof IsTrue) { diff --git a/src/Symfony/Component/Validator/Constraints/Isbn.php b/src/Symfony/Component/Validator/Constraints/Isbn.php index 41110da1b4e02..5b70c6fcbdc44 100644 --- a/src/Symfony/Component/Validator/Constraints/Isbn.php +++ b/src/Symfony/Component/Validator/Constraints/Isbn.php @@ -76,9 +76,6 @@ public function __construct( $this->bothIsbnMessage = $bothIsbnMessage ?? $this->bothIsbnMessage; } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'type'; diff --git a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php index 768bda85a30d8..29c2979ec0c8c 100644 --- a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php @@ -27,9 +27,6 @@ */ class IsbnValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Isbn) { diff --git a/src/Symfony/Component/Validator/Constraints/IsinValidator.php b/src/Symfony/Component/Validator/Constraints/IsinValidator.php index f509a341b2cae..3a3fc76f051ce 100644 --- a/src/Symfony/Component/Validator/Constraints/IsinValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsinValidator.php @@ -23,9 +23,6 @@ */ class IsinValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Isin) { diff --git a/src/Symfony/Component/Validator/Constraints/IssnValidator.php b/src/Symfony/Component/Validator/Constraints/IssnValidator.php index ec3ee8461497a..3006d587ebed1 100644 --- a/src/Symfony/Component/Validator/Constraints/IssnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IssnValidator.php @@ -26,9 +26,6 @@ */ class IssnValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Issn) { diff --git a/src/Symfony/Component/Validator/Constraints/JsonValidator.php b/src/Symfony/Component/Validator/Constraints/JsonValidator.php index 2b45846e97f8d..32807a12ec59c 100644 --- a/src/Symfony/Component/Validator/Constraints/JsonValidator.php +++ b/src/Symfony/Component/Validator/Constraints/JsonValidator.php @@ -20,9 +20,6 @@ */ class JsonValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Json) { diff --git a/src/Symfony/Component/Validator/Constraints/LanguageValidator.php b/src/Symfony/Component/Validator/Constraints/LanguageValidator.php index bed1f65dde790..e62c4b3d2634e 100644 --- a/src/Symfony/Component/Validator/Constraints/LanguageValidator.php +++ b/src/Symfony/Component/Validator/Constraints/LanguageValidator.php @@ -24,9 +24,6 @@ */ class LanguageValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Language) { diff --git a/src/Symfony/Component/Validator/Constraints/LengthValidator.php b/src/Symfony/Component/Validator/Constraints/LengthValidator.php index 9a0ce486fef75..d488d88c778c7 100644 --- a/src/Symfony/Component/Validator/Constraints/LengthValidator.php +++ b/src/Symfony/Component/Validator/Constraints/LengthValidator.php @@ -21,9 +21,6 @@ */ class LengthValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Length) { diff --git a/src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php b/src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php index c91e551b18533..55b3b0a12b89e 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php +++ b/src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php @@ -19,17 +19,11 @@ */ class LessThanOrEqualValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return null === $value2 || $value1 <= $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return LessThanOrEqual::TOO_HIGH_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/LessThanValidator.php b/src/Symfony/Component/Validator/Constraints/LessThanValidator.php index 54796c9d6889c..b6cbae18bdd21 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThanValidator.php +++ b/src/Symfony/Component/Validator/Constraints/LessThanValidator.php @@ -19,17 +19,11 @@ */ class LessThanValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return null === $value2 || $value1 < $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return LessThan::TOO_HIGH_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/LocaleValidator.php b/src/Symfony/Component/Validator/Constraints/LocaleValidator.php index 0769fcbb35d32..461df3396ef0b 100644 --- a/src/Symfony/Component/Validator/Constraints/LocaleValidator.php +++ b/src/Symfony/Component/Validator/Constraints/LocaleValidator.php @@ -24,9 +24,6 @@ */ class LocaleValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Locale) { diff --git a/src/Symfony/Component/Validator/Constraints/LuhnValidator.php b/src/Symfony/Component/Validator/Constraints/LuhnValidator.php index 12d6a36dd398c..781d3bda70108 100644 --- a/src/Symfony/Component/Validator/Constraints/LuhnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/LuhnValidator.php @@ -30,9 +30,6 @@ */ class LuhnValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Luhn) { diff --git a/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php b/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php index 20c4f75b3aad3..828780ba1b277 100644 --- a/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php +++ b/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php @@ -21,9 +21,6 @@ */ class NotBlankValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof NotBlank) { diff --git a/src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php b/src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php index 2b36602e2c28f..018e91548e435 100644 --- a/src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php +++ b/src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php @@ -49,8 +49,6 @@ public function __construct(HttpClientInterface $httpClient = null, string $char } /** - * {@inheritdoc} - * * @throws ExceptionInterface */ public function validate(mixed $value, Constraint $constraint) diff --git a/src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php b/src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php index 5ec329a85167b..9b5413a598da5 100644 --- a/src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php +++ b/src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php @@ -19,17 +19,11 @@ */ class NotEqualToValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return $value1 != $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return NotEqualTo::IS_EQUAL_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php b/src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php index b9e27cd53a4ab..ef7d2f43a5958 100644 --- a/src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php +++ b/src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php @@ -19,17 +19,11 @@ */ class NotIdenticalToValidator extends AbstractComparisonValidator { - /** - * {@inheritdoc} - */ protected function compareValues(mixed $value1, mixed $value2): bool { return $value1 !== $value2; } - /** - * {@inheritdoc} - */ protected function getErrorCode(): ?string { return NotIdenticalTo::IS_IDENTICAL_ERROR; diff --git a/src/Symfony/Component/Validator/Constraints/NotNullValidator.php b/src/Symfony/Component/Validator/Constraints/NotNullValidator.php index cc1ee55900ac8..235efabc109aa 100644 --- a/src/Symfony/Component/Validator/Constraints/NotNullValidator.php +++ b/src/Symfony/Component/Validator/Constraints/NotNullValidator.php @@ -20,9 +20,6 @@ */ class NotNullValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof NotNull) { diff --git a/src/Symfony/Component/Validator/Constraints/RangeValidator.php b/src/Symfony/Component/Validator/Constraints/RangeValidator.php index ab3cefe03405e..008b8b019c1ae 100644 --- a/src/Symfony/Component/Validator/Constraints/RangeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/RangeValidator.php @@ -31,9 +31,6 @@ public function __construct(PropertyAccessorInterface $propertyAccessor = null) $this->propertyAccessor = $propertyAccessor; } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Range) { diff --git a/src/Symfony/Component/Validator/Constraints/Regex.php b/src/Symfony/Component/Validator/Constraints/Regex.php index 74381eaf71a7f..67dc8b37c67ff 100644 --- a/src/Symfony/Component/Validator/Constraints/Regex.php +++ b/src/Symfony/Component/Validator/Constraints/Regex.php @@ -68,17 +68,11 @@ public function __construct( } } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'pattern'; } - /** - * {@inheritdoc} - */ public function getRequiredOptions(): array { return ['pattern']; diff --git a/src/Symfony/Component/Validator/Constraints/RegexValidator.php b/src/Symfony/Component/Validator/Constraints/RegexValidator.php index 6a7ad1672c256..177fcb69cd107 100644 --- a/src/Symfony/Component/Validator/Constraints/RegexValidator.php +++ b/src/Symfony/Component/Validator/Constraints/RegexValidator.php @@ -24,9 +24,6 @@ */ class RegexValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Regex) { diff --git a/src/Symfony/Component/Validator/Constraints/SequentiallyValidator.php b/src/Symfony/Component/Validator/Constraints/SequentiallyValidator.php index 73d88915389c5..709897da7422b 100644 --- a/src/Symfony/Component/Validator/Constraints/SequentiallyValidator.php +++ b/src/Symfony/Component/Validator/Constraints/SequentiallyValidator.php @@ -20,9 +20,6 @@ */ class SequentiallyValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Sequentially) { diff --git a/src/Symfony/Component/Validator/Constraints/TimeValidator.php b/src/Symfony/Component/Validator/Constraints/TimeValidator.php index 8f8d37d296ebe..f1ebccaa262c1 100644 --- a/src/Symfony/Component/Validator/Constraints/TimeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TimeValidator.php @@ -33,9 +33,6 @@ public static function checkTime(int $hour, int $minute, float $second): bool return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60; } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Time) { diff --git a/src/Symfony/Component/Validator/Constraints/Timezone.php b/src/Symfony/Component/Validator/Constraints/Timezone.php index c9279a9cdb319..03bc19e7cc66a 100644 --- a/src/Symfony/Component/Validator/Constraints/Timezone.php +++ b/src/Symfony/Component/Validator/Constraints/Timezone.php @@ -79,9 +79,6 @@ public function __construct( } } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'zone'; diff --git a/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php b/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php index 92566b0d3fc47..7427a5042593d 100644 --- a/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php @@ -26,9 +26,6 @@ */ class TimezoneValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Timezone) { diff --git a/src/Symfony/Component/Validator/Constraints/Traverse.php b/src/Symfony/Component/Validator/Constraints/Traverse.php index 87ad25bdda964..2b9930661bb98 100644 --- a/src/Symfony/Component/Validator/Constraints/Traverse.php +++ b/src/Symfony/Component/Validator/Constraints/Traverse.php @@ -33,17 +33,11 @@ public function __construct(bool|array $traverse = null) parent::__construct($traverse); } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'traverse'; } - /** - * {@inheritdoc} - */ public function getTargets(): string|array { return self::CLASS_CONSTRAINT; diff --git a/src/Symfony/Component/Validator/Constraints/Type.php b/src/Symfony/Component/Validator/Constraints/Type.php index 5d8aa1b21b707..97a5ef939d3fb 100644 --- a/src/Symfony/Component/Validator/Constraints/Type.php +++ b/src/Symfony/Component/Validator/Constraints/Type.php @@ -49,17 +49,11 @@ public function __construct(string|array|null $type, string $message = null, arr $this->message = $message ?? $this->message; } - /** - * {@inheritdoc} - */ public function getDefaultOption(): ?string { return 'type'; } - /** - * {@inheritdoc} - */ public function getRequiredOptions(): array { return ['type']; diff --git a/src/Symfony/Component/Validator/Constraints/TypeValidator.php b/src/Symfony/Component/Validator/Constraints/TypeValidator.php index ee25a2eb1259c..67bbbb1cc2fd5 100644 --- a/src/Symfony/Component/Validator/Constraints/TypeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TypeValidator.php @@ -52,9 +52,6 @@ class TypeValidator extends ConstraintValidator 'xdigit' => 'ctype_xdigit', ]; - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Type) { diff --git a/src/Symfony/Component/Validator/Constraints/UlidValidator.php b/src/Symfony/Component/Validator/Constraints/UlidValidator.php index b1f58e6ad3290..ba8085f21d8d6 100644 --- a/src/Symfony/Component/Validator/Constraints/UlidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UlidValidator.php @@ -24,9 +24,6 @@ */ class UlidValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Ulid) { diff --git a/src/Symfony/Component/Validator/Constraints/Unique.php b/src/Symfony/Component/Validator/Constraints/Unique.php index 83c961d6174bf..6db31c0e41236 100644 --- a/src/Symfony/Component/Validator/Constraints/Unique.php +++ b/src/Symfony/Component/Validator/Constraints/Unique.php @@ -40,8 +40,6 @@ class Unique extends Constraint public $normalizer; /** - * {@inheritdoc} - * * @param array|string $fields the combination of fields that must contain unique values or a set of options */ public function __construct( diff --git a/src/Symfony/Component/Validator/Constraints/UniqueValidator.php b/src/Symfony/Component/Validator/Constraints/UniqueValidator.php index c47c63bb6e6a8..de2edce631837 100644 --- a/src/Symfony/Component/Validator/Constraints/UniqueValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UniqueValidator.php @@ -21,9 +21,6 @@ */ class UniqueValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Unique) { diff --git a/src/Symfony/Component/Validator/Constraints/UrlValidator.php b/src/Symfony/Component/Validator/Constraints/UrlValidator.php index 7d38012cda879..18776a9ca438d 100644 --- a/src/Symfony/Component/Validator/Constraints/UrlValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UrlValidator.php @@ -45,9 +45,6 @@ class UrlValidator extends ConstraintValidator (?:\# (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional) $~ixu'; - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Url) { diff --git a/src/Symfony/Component/Validator/Constraints/Uuid.php b/src/Symfony/Component/Validator/Constraints/Uuid.php index b805e5e90cf74..82b790578378d 100644 --- a/src/Symfony/Component/Validator/Constraints/Uuid.php +++ b/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -89,8 +89,6 @@ class Uuid extends Constraint public $normalizer; /** - * {@inheritdoc} - * * @param int[]|null $versions */ public function __construct( diff --git a/src/Symfony/Component/Validator/Constraints/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/UuidValidator.php index 93c2b016a2507..af4ae413a9b9c 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -59,9 +59,6 @@ class UuidValidator extends ConstraintValidator public const LOOSE_MAX_LENGTH = 39; public const LOOSE_FIRST_HYPHEN_POSITION = 4; - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint $constraint) { if (!$constraint instanceof Uuid) { diff --git a/src/Symfony/Component/Validator/Constraints/Valid.php b/src/Symfony/Component/Validator/Constraints/Valid.php index 6ae81243c3947..fef8b2da92371 100644 --- a/src/Symfony/Component/Validator/Constraints/Valid.php +++ b/src/Symfony/Component/Validator/Constraints/Valid.php @@ -41,9 +41,6 @@ public function __get(string $option): mixed return parent::__get($option); } - /** - * {@inheritdoc} - */ public function addImplicitGroupName(string $group) { if (null !== $this->groups) { diff --git a/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php b/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php index a609f3eb7dfc3..44d1412c6cee2 100644 --- a/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php +++ b/src/Symfony/Component/Validator/ContainerConstraintValidatorFactory.php @@ -32,8 +32,6 @@ public function __construct(ContainerInterface $container) } /** - * {@inheritdoc} - * * @throws ValidatorException When the validator class does not exist * @throws UnexpectedTypeException When the validator is not an instance of ConstraintValidatorInterface */ diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index b9cd83822b160..f595758c8253d 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -121,9 +121,6 @@ public function __construct(ValidatorInterface $validator, mixed $root, Translat $this->cachedObjectsRefs = new \SplObjectStorage(); } - /** - * {@inheritdoc} - */ public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath) { $this->value = $value; @@ -132,25 +129,16 @@ public function setNode(mixed $value, ?object $object, MetadataInterface $metada $this->propertyPath = $propertyPath; } - /** - * {@inheritdoc} - */ public function setGroup(?string $group) { $this->group = $group; } - /** - * {@inheritdoc} - */ public function setConstraint(Constraint $constraint) { $this->constraint = $constraint; } - /** - * {@inheritdoc} - */ public function addViolation(string $message, array $parameters = []) { $this->violations->add(new ConstraintViolation( @@ -166,9 +154,6 @@ public function addViolation(string $message, array $parameters = []) )); } - /** - * {@inheritdoc} - */ public function buildViolation(string $message, array $parameters = []): ConstraintViolationBuilderInterface { return new ConstraintViolationBuilder( @@ -184,33 +169,21 @@ public function buildViolation(string $message, array $parameters = []): Constra ); } - /** - * {@inheritdoc} - */ public function getViolations(): ConstraintViolationListInterface { return $this->violations; } - /** - * {@inheritdoc} - */ public function getValidator(): ValidatorInterface { return $this->validator; } - /** - * {@inheritdoc} - */ public function getRoot(): mixed { return $this->root; } - /** - * {@inheritdoc} - */ public function getValue(): mixed { if ($this->value instanceof LazyProperty) { @@ -220,25 +193,16 @@ public function getValue(): mixed return $this->value; } - /** - * {@inheritdoc} - */ public function getObject(): ?object { return $this->object; } - /** - * {@inheritdoc} - */ public function getMetadata(): ?MetadataInterface { return $this->metadata; } - /** - * {@inheritdoc} - */ public function getGroup(): ?string { return $this->group; @@ -249,33 +213,21 @@ public function getConstraint(): ?Constraint return $this->constraint; } - /** - * {@inheritdoc} - */ public function getClassName(): ?string { return $this->metadata instanceof MemberMetadata || $this->metadata instanceof ClassMetadataInterface ? $this->metadata->getClassName() : null; } - /** - * {@inheritdoc} - */ public function getPropertyName(): ?string { return $this->metadata instanceof PropertyMetadataInterface ? $this->metadata->getPropertyName() : null; } - /** - * {@inheritdoc} - */ public function getPropertyPath(string $subPath = ''): string { return PropertyPath::append($this->propertyPath, $subPath); } - /** - * {@inheritdoc} - */ public function markGroupAsValidated(string $cacheKey, string $groupHash) { if (!isset($this->validatedObjects[$cacheKey])) { @@ -285,41 +237,26 @@ public function markGroupAsValidated(string $cacheKey, string $groupHash) $this->validatedObjects[$cacheKey][$groupHash] = true; } - /** - * {@inheritdoc} - */ public function isGroupValidated(string $cacheKey, string $groupHash): bool { return isset($this->validatedObjects[$cacheKey][$groupHash]); } - /** - * {@inheritdoc} - */ public function markConstraintAsValidated(string $cacheKey, string $constraintHash) { $this->validatedConstraints[$cacheKey.':'.$constraintHash] = true; } - /** - * {@inheritdoc} - */ public function isConstraintValidated(string $cacheKey, string $constraintHash): bool { return isset($this->validatedConstraints[$cacheKey.':'.$constraintHash]); } - /** - * {@inheritdoc} - */ public function markObjectAsInitialized(string $cacheKey) { $this->initializedObjects[$cacheKey] = true; } - /** - * {@inheritdoc} - */ public function isObjectInitialized(string $cacheKey): bool { return isset($this->initializedObjects[$cacheKey]); diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php index 4a20eefb3465c..bcad7c20eac92 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php @@ -32,9 +32,6 @@ public function __construct(TranslatorInterface $translator, string $translation $this->translationDomain = $translationDomain; } - /** - * {@inheritdoc} - */ public function createContext(ValidatorInterface $validator, mixed $root): ExecutionContextInterface { return new ExecutionContext( diff --git a/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php b/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php index 519cd4cc9437e..4b3f791692fb6 100644 --- a/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php +++ b/src/Symfony/Component/Validator/DataCollector/ValidatorDataCollector.php @@ -37,9 +37,6 @@ public function __construct(TraceableValidator $validator) $this->reset(); } - /** - * {@inheritdoc} - */ public function collect(Request $request, Response $response, \Throwable $exception = null) { // Everything is collected once, on kernel terminate. @@ -53,9 +50,6 @@ public function reset() ]; } - /** - * {@inheritdoc} - */ public function lateCollect() { $collected = $this->validator->getCollectedData(); @@ -75,9 +69,6 @@ public function getViolationsCount(): int return $this->data['violations_count']; } - /** - * {@inheritdoc} - */ public function getName(): string { return 'validator'; diff --git a/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php b/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php index 4d23b2ebb79df..e0607111a41c6 100644 --- a/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php +++ b/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php @@ -22,9 +22,6 @@ */ class AddAutoMappingConfigurationPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container) { if (!$container->hasParameter('validator.auto_mapping') || !$container->hasDefinition('validator.builder')) { diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index f7f76b7f3fae9..5d958985d312c 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -120,9 +120,6 @@ public function __construct(string $class) } } - /** - * {@inheritdoc} - */ public function __sleep(): array { $parentProperties = parent::__sleep(); @@ -141,9 +138,6 @@ public function __sleep(): array ]); } - /** - * {@inheritdoc} - */ public function getClassName(): string { return $this->name; @@ -168,8 +162,6 @@ public function getDefaultGroup(): string } /** - * {@inheritdoc} - * * If the constraint {@link Cascade} is added, the cascading strategy will be * changed to {@link CascadingStrategy::CASCADE}. * @@ -363,25 +355,16 @@ public function mergeConstraints(self $source) } } - /** - * {@inheritdoc} - */ public function hasPropertyMetadata(string $property): bool { return \array_key_exists($property, $this->members); } - /** - * {@inheritdoc} - */ public function getPropertyMetadata(string $property): array { return $this->members[$property] ?? []; } - /** - * {@inheritdoc} - */ public function getConstrainedProperties(): array { return array_keys($this->members); @@ -419,17 +402,11 @@ public function setGroupSequence(array|GroupSequence $groupSequence): static return $this; } - /** - * {@inheritdoc} - */ public function hasGroupSequence(): bool { return isset($this->groupSequence) && \count($this->groupSequence->groups) > 0; } - /** - * {@inheritdoc} - */ public function getGroupSequence(): ?GroupSequence { return $this->groupSequence; @@ -461,17 +438,11 @@ public function setGroupSequenceProvider(bool $active) $this->groupSequenceProvider = $active; } - /** - * {@inheritdoc} - */ public function isGroupSequenceProvider(): bool { return $this->groupSequenceProvider; } - /** - * {@inheritdoc} - */ public function getCascadingStrategy(): int { return $this->cascadingStrategy; diff --git a/src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php index 21a70abfdd74f..d46dccc66db14 100644 --- a/src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php @@ -25,17 +25,11 @@ */ class BlackHoleMetadataFactory implements MetadataFactoryInterface { - /** - * {@inheritdoc} - */ public function getMetadataFor(mixed $value): MetadataInterface { throw new LogicException('This class does not support metadata.'); } - /** - * {@inheritdoc} - */ public function hasMetadataFor(mixed $value): bool { return false; diff --git a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php index 61f5e009cfe9b..732befd000363 100644 --- a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -56,8 +56,6 @@ public function __construct(LoaderInterface $loader = null, CacheItemPoolInterfa } /** - * {@inheritdoc} - * * If the method was called with the same class name (or an object of that * class) before, the same metadata instance is returned. * @@ -135,9 +133,6 @@ private function mergeConstraints(ClassMetadata $metadata) } } - /** - * {@inheritdoc} - */ public function hasMetadataFor(mixed $value): bool { if (!\is_object($value) && !\is_string($value)) { diff --git a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index 815acb8ba697f..f05e402609d5d 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -186,9 +186,6 @@ public function addConstraints(array $constraints): static return $this; } - /** - * {@inheritdoc} - */ public function getConstraints(): array { return $this->constraints; @@ -203,8 +200,6 @@ public function hasConstraints(): bool } /** - * {@inheritdoc} - * * Aware of the global group (* group). */ public function findConstraints(string $group): array @@ -212,17 +207,11 @@ public function findConstraints(string $group): array return $this->constraintsByGroup[$group] ?? []; } - /** - * {@inheritdoc} - */ public function getCascadingStrategy(): int { return $this->cascadingStrategy; } - /** - * {@inheritdoc} - */ public function getTraversalStrategy(): int { return $this->traversalStrategy; diff --git a/src/Symfony/Component/Validator/Mapping/GetterMetadata.php b/src/Symfony/Component/Validator/Mapping/GetterMetadata.php index 7ab2acb462639..6964c5130b95f 100644 --- a/src/Symfony/Component/Validator/Mapping/GetterMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GetterMetadata.php @@ -62,17 +62,11 @@ public function __construct(string $class, string $property, string $method = nu parent::__construct($class, $method, $property); } - /** - * {@inheritdoc} - */ public function getPropertyValue(mixed $object): mixed { return $this->newReflectionMember($object)->invoke($object); } - /** - * {@inheritdoc} - */ protected function newReflectionMember(object|string $objectOrClassName): \ReflectionMethod|\ReflectionProperty { return new \ReflectionMethod($objectOrClassName, $this->getName()); diff --git a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php index abc13bdd89f41..a2842343f2be0 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php @@ -34,9 +34,6 @@ public function __construct(Reader $reader = null) $this->reader = $reader; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadata $metadata): bool { $reflClass = $metadata->getReflectionClass(); diff --git a/src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php b/src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php index b40b8935e5ed6..d9721483af749 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php @@ -43,9 +43,6 @@ public function __construct(array $loaders) $this->loaders = $loaders; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadata $metadata): bool { $success = false; diff --git a/src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php index 0ace5756c74a0..9975364d2c30e 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php @@ -44,9 +44,6 @@ public function __construct(PropertyListExtractorInterface $listExtractor, Prope $this->classValidatorRegexp = $classValidatorRegexp; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadata $metadata): bool { $className = $metadata->getClassName(); diff --git a/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php index c70ea268c9f31..0d15e5f6ec557 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php @@ -33,9 +33,6 @@ public function __construct(string $methodName = 'loadValidatorMetadata') $this->methodName = $methodName; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadata $metadata): bool { /** @var \ReflectionClass $reflClass */ diff --git a/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php index 8ce785eeff1fc..b999452cf1b79 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php @@ -35,9 +35,6 @@ public function __construct(string $file) $this->file = $file; } - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadata $metadata): bool { if (null === $this->classes) { diff --git a/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php index 9198c5e490b9e..aab15762da41f 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php @@ -21,9 +21,6 @@ */ class XmlFilesLoader extends FilesLoader { - /** - * {@inheritdoc} - */ public function getFileLoaderInstance(string $file): LoaderInterface { return new XmlFileLoader($file); diff --git a/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php index 6c1b1adb77264..4a2a8ee873b26 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php @@ -41,9 +41,6 @@ public function __construct(string $file) */ private YamlParser $yamlParser; - /** - * {@inheritdoc} - */ public function loadClassMetadata(ClassMetadata $metadata): bool { if (null === $this->classes) { diff --git a/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php index b5c67ef296a95..b6e4d5990a8a6 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php @@ -21,9 +21,6 @@ */ class YamlFilesLoader extends FilesLoader { - /** - * {@inheritdoc} - */ public function getFileLoaderInstance(string $file): LoaderInterface { return new YamlFileLoader($file); diff --git a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index 428e16a46d775..cf2a0f8f8d212 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -67,9 +67,6 @@ public function __construct(string $class, string $name, string $property) $this->property = $property; } - /** - * {@inheritdoc} - */ public function addConstraint(Constraint $constraint): static { $this->checkConstraint($constraint); @@ -79,9 +76,6 @@ public function addConstraint(Constraint $constraint): static return $this; } - /** - * {@inheritdoc} - */ public function __sleep(): array { return array_merge(parent::__sleep(), [ @@ -99,17 +93,11 @@ public function getName(): string return $this->name; } - /** - * {@inheritdoc} - */ public function getClassName() { return $this->class; } - /** - * {@inheritdoc} - */ public function getPropertyName(): string { return $this->property; diff --git a/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php b/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php index 17361aeac51b1..292b6fe586ef7 100644 --- a/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php @@ -43,9 +43,6 @@ public function __construct(string $class, string $name) parent::__construct($class, $name, $name); } - /** - * {@inheritdoc} - */ public function getPropertyValue(mixed $object): mixed { $reflProperty = $this->getReflectionMember($object); @@ -70,9 +67,6 @@ public function getPropertyValue(mixed $object): mixed return $reflProperty->getValue($object); } - /** - * {@inheritdoc} - */ protected function newReflectionMember(object|string $objectOrClassName): \ReflectionMethod|\ReflectionProperty { $originalClass = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php index 4ce2723c0d845..cb7cded1e4c51 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php @@ -36,9 +36,6 @@ protected function getErrorCode(): ?string return DivisibleBy::NOT_DIVISIBLE_BY; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -65,9 +62,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -75,9 +69,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php index db825543fb075..619ef14f22157 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php @@ -35,9 +35,6 @@ protected function getErrorCode(): ?string return EqualTo::NOT_EQUAL_ERROR; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -52,9 +49,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -62,9 +56,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php index 7484e9ff5d050..30c345128edb9 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php @@ -35,9 +35,6 @@ protected function getErrorCode(): ?string return GreaterThanOrEqual::TOO_LOW_ERROR; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -55,9 +52,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -66,9 +60,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php index 3aea5554dafb6..c505e4c9ed074 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php @@ -26,9 +26,6 @@ protected function createConstraint(array $options = null): Constraint return new PositiveOrZero(); } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -42,9 +39,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php index 7c6b693d326e5..8010f74c39cfe 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php @@ -35,9 +35,6 @@ protected function getErrorCode(): ?string return GreaterThan::TOO_LOW_ERROR; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -51,9 +48,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -61,9 +55,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php index a16320c0044a4..03fe28ffb321d 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php @@ -26,9 +26,6 @@ protected function createConstraint(array $options = null): Constraint return new Positive(); } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -39,9 +36,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php index 98c467bc7627e..b99433d171406 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php @@ -48,9 +48,6 @@ public function provideAllValidComparisons(): array return $comparisons; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { $date = new \DateTime('2000-01-01'); @@ -70,9 +67,6 @@ public function provideValidComparisons(): array return $comparisons; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -80,9 +74,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php index 73c9a1d154f17..1909409cf9cdb 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php @@ -35,9 +35,6 @@ protected function getErrorCode(): ?string return LessThanOrEqual::TOO_HIGH_ERROR; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -57,9 +54,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -68,9 +62,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php index 24a2a3c9c53e9..303f5ed788af9 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php @@ -26,9 +26,6 @@ protected function createConstraint(array $options = null): Constraint return new NegativeOrZero(); } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -40,9 +37,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php index 7241203fcb3d7..46e9eb51fce3b 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php @@ -35,9 +35,6 @@ protected function getErrorCode(): ?string return LessThan::TOO_HIGH_ERROR; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -51,9 +48,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -61,9 +55,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php index aba9f78c4b8e3..c8c9fe6a8d315 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php @@ -26,9 +26,6 @@ protected function createConstraint(array $options = null): Constraint return new Negative(); } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -39,9 +36,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php index 47cdcac966b62..afa54aa2fe002 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php @@ -35,9 +35,6 @@ protected function getErrorCode(): ?string return NotEqualTo::IS_EQUAL_ERROR; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -51,9 +48,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -61,9 +55,6 @@ public function provideValidComparisonsToPropertyPath(): array ]; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { return [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php index 41660bda517a8..2523eb44e73c7 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php @@ -35,9 +35,6 @@ protected function getErrorCode(): ?string return NotIdenticalTo::IS_IDENTICAL_ERROR; } - /** - * {@inheritdoc} - */ public function provideValidComparisons(): array { return [ @@ -54,9 +51,6 @@ public function provideValidComparisons(): array ]; } - /** - * {@inheritdoc} - */ public function provideValidComparisonsToPropertyPath(): array { return [ @@ -77,9 +71,6 @@ public function provideAllInvalidComparisons(): array return $comparisons; } - /** - * {@inheritdoc} - */ public function provideInvalidComparisons(): array { $date = new \DateTime('2000-01-01'); diff --git a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php index accff2ab83357..cd0d2fdc5aa33 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php @@ -2362,9 +2362,6 @@ final class TestConstraintHashesDoNotCollide extends Constraint final class TestConstraintHashesDoNotCollideValidator extends ConstraintValidator { - /** - * {@inheritdoc} - */ public function validate($value, Constraint $constraint) { if (!$value instanceof Entity) { diff --git a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index 7644664c1be38..4fc8ca2f00286 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -66,9 +66,6 @@ public function __construct(ExecutionContextInterface $context, MetadataFactoryI $this->objectInitializers = $objectInitializers; } - /** - * {@inheritdoc} - */ public function atPath(string $path): static { $this->defaultPropertyPath = $this->context->getPropertyPath($path); @@ -76,9 +73,6 @@ public function atPath(string $path): static return $this; } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint|array $constraints = null, string|GroupSequence|array $groups = null): static { $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; @@ -164,9 +158,6 @@ public function validate(mixed $value, Constraint|array $constraints = null, str throw new RuntimeException(sprintf('Cannot validate values of type "%s" automatically. Please provide a constraint.', get_debug_type($value))); } - /** - * {@inheritdoc} - */ public function validateProperty(object $object, string $propertyName, string|GroupSequence|array $groups = null): static { $classMetadata = $this->metadataFactory->getMetadataFor($object); @@ -208,9 +199,6 @@ public function validateProperty(object $object, string $propertyName, string|Gr return $this; } - /** - * {@inheritdoc} - */ public function validatePropertyValue(object|string $objectOrClass, string $propertyName, mixed $value, string|GroupSequence|array $groups = null): static { $classMetadata = $this->metadataFactory->getMetadataFor($objectOrClass); @@ -261,9 +249,6 @@ public function validatePropertyValue(object|string $objectOrClass, string $prop return $this; } - /** - * {@inheritdoc} - */ public function getViolations(): ConstraintViolationListInterface { return $this->context->getViolations(); diff --git a/src/Symfony/Component/Validator/Validator/RecursiveValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveValidator.php index fb4dd9aa8705a..a6897c85a735d 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveValidator.php @@ -46,9 +46,6 @@ public function __construct(ExecutionContextFactoryInterface $contextFactory, Me $this->objectInitializers = $objectInitializers; } - /** - * {@inheritdoc} - */ public function startContext(mixed $root = null): ContextualValidatorInterface { return new RecursiveContextualValidator( @@ -59,9 +56,6 @@ public function startContext(mixed $root = null): ContextualValidatorInterface ); } - /** - * {@inheritdoc} - */ public function inContext(ExecutionContextInterface $context): ContextualValidatorInterface { return new RecursiveContextualValidator( @@ -72,25 +66,16 @@ public function inContext(ExecutionContextInterface $context): ContextualValidat ); } - /** - * {@inheritdoc} - */ public function getMetadataFor(mixed $object): MetadataInterface { return $this->metadataFactory->getMetadataFor($object); } - /** - * {@inheritdoc} - */ public function hasMetadataFor(mixed $object): bool { return $this->metadataFactory->hasMetadataFor($object); } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint|array $constraints = null, string|GroupSequence|array $groups = null): ConstraintViolationListInterface { return $this->startContext($value) @@ -98,9 +83,6 @@ public function validate(mixed $value, Constraint|array $constraints = null, str ->getViolations(); } - /** - * {@inheritdoc} - */ public function validateProperty(object $object, string $propertyName, string|GroupSequence|array $groups = null): ConstraintViolationListInterface { return $this->startContext($object) @@ -108,9 +90,6 @@ public function validateProperty(object $object, string $propertyName, string|Gr ->getViolations(); } - /** - * {@inheritdoc} - */ public function validatePropertyValue(object|string $objectOrClass, string $propertyName, mixed $value, string|GroupSequence|array $groups = null): ConstraintViolationListInterface { // If a class name is passed, take $value as root diff --git a/src/Symfony/Component/Validator/Validator/TraceableValidator.php b/src/Symfony/Component/Validator/Validator/TraceableValidator.php index c266405e49422..cfcff1fa29d06 100644 --- a/src/Symfony/Component/Validator/Validator/TraceableValidator.php +++ b/src/Symfony/Component/Validator/Validator/TraceableValidator.php @@ -43,25 +43,16 @@ public function reset() $this->collectedData = []; } - /** - * {@inheritdoc} - */ public function getMetadataFor(mixed $value): MetadataInterface { return $this->validator->getMetadataFor($value); } - /** - * {@inheritdoc} - */ public function hasMetadataFor(mixed $value): bool { return $this->validator->hasMetadataFor($value); } - /** - * {@inheritdoc} - */ public function validate(mixed $value, Constraint|array $constraints = null, string|GroupSequence|array $groups = null): ConstraintViolationListInterface { $violations = $this->validator->validate($value, $constraints, $groups); @@ -103,33 +94,21 @@ public function validate(mixed $value, Constraint|array $constraints = null, str return $violations; } - /** - * {@inheritdoc} - */ public function validateProperty(object $object, string $propertyName, string|GroupSequence|array $groups = null): ConstraintViolationListInterface { return $this->validator->validateProperty($object, $propertyName, $groups); } - /** - * {@inheritdoc} - */ public function validatePropertyValue(object|string $objectOrClass, string $propertyName, mixed $value, string|GroupSequence|array $groups = null): ConstraintViolationListInterface { return $this->validator->validatePropertyValue($objectOrClass, $propertyName, $value, $groups); } - /** - * {@inheritdoc} - */ public function startContext(): ContextualValidatorInterface { return $this->validator->startContext(); } - /** - * {@inheritdoc} - */ public function inContext(ExecutionContextInterface $context): ContextualValidatorInterface { return $this->validator->inContext($context); diff --git a/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php b/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php index 76c0212bfc7b2..849d52ae28581 100644 --- a/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php +++ b/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php @@ -52,9 +52,6 @@ public function __construct(ConstraintViolationList $violations, ?Constraint $co $this->constraint = $constraint; } - /** - * {@inheritdoc} - */ public function atPath(string $path): static { $this->propertyPath = PropertyPath::append($this->propertyPath, $path); @@ -62,9 +59,6 @@ public function atPath(string $path): static return $this; } - /** - * {@inheritdoc} - */ public function setParameter(string $key, string $value): static { $this->parameters[$key] = $value; @@ -72,9 +66,6 @@ public function setParameter(string $key, string $value): static return $this; } - /** - * {@inheritdoc} - */ public function setParameters(array $parameters): static { $this->parameters = $parameters; @@ -82,9 +73,6 @@ public function setParameters(array $parameters): static return $this; } - /** - * {@inheritdoc} - */ public function setTranslationDomain(string $translationDomain): static { $this->translationDomain = $translationDomain; @@ -92,9 +80,6 @@ public function setTranslationDomain(string $translationDomain): static return $this; } - /** - * {@inheritdoc} - */ public function setInvalidValue(mixed $invalidValue): static { $this->invalidValue = $invalidValue; @@ -102,9 +87,6 @@ public function setInvalidValue(mixed $invalidValue): static return $this; } - /** - * {@inheritdoc} - */ public function setPlural(int $number): static { $this->plural = $number; @@ -112,9 +94,6 @@ public function setPlural(int $number): static return $this; } - /** - * {@inheritdoc} - */ public function setCode(?string $code): static { $this->code = $code; @@ -122,9 +101,6 @@ public function setCode(?string $code): static return $this; } - /** - * {@inheritdoc} - */ public function setCause(mixed $cause): static { $this->cause = $cause; @@ -132,9 +108,6 @@ public function setCause(mixed $cause): static return $this; } - /** - * {@inheritdoc} - */ public function addViolation() { if (null === $this->plural) { diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index 2f5283877a10f..ec5f989062559 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -19,9 +19,6 @@ class VarCloner extends AbstractCloner private static string $gid; private static array $arrayCache = []; - /** - * {@inheritdoc} - */ protected function doClone(mixed $var): array { $len = 1; // Length of $queue diff --git a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php index b2a3812d62574..c0ab500e1eba1 100644 --- a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php @@ -61,9 +61,6 @@ class CliDumper extends AbstractDumper private bool $handlesHrefGracefully; - /** - * {@inheritdoc} - */ public function __construct($output = null, string $charset = null, int $flags = 0) { parent::__construct($output, $charset, $flags); @@ -122,9 +119,6 @@ public function setDisplayOptions(array $displayOptions) $this->displayOptions = $displayOptions + $this->displayOptions; } - /** - * {@inheritdoc} - */ public function dumpScalar(Cursor $cursor, string $type, string|int|float|bool|null $value) { $this->dumpKey($cursor); @@ -185,9 +179,6 @@ public function dumpScalar(Cursor $cursor, string $type, string|int|float|bool|n $this->endValue($cursor); } - /** - * {@inheritdoc} - */ public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) { $this->dumpKey($cursor); @@ -273,9 +264,6 @@ public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) } } - /** - * {@inheritdoc} - */ public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild) { if (null === $this->colors) { @@ -314,9 +302,6 @@ public function enterHash(Cursor $cursor, int $type, string|int|null $class, boo } } - /** - * {@inheritdoc} - */ public function leaveHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild, int $cut) { if (empty($cursor->attr['cut_hash'])) { @@ -545,9 +530,6 @@ protected function supportsColors(): bool return static::$defaultColors = $this->hasColorSupport($h); } - /** - * {@inheritdoc} - */ protected function dumpLine(int $depth, bool $endOfValue = false) { if ($this->colors) { diff --git a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php index 22401e62dd158..843df10da8ee8 100644 --- a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php @@ -74,9 +74,6 @@ class HtmlDumper extends CliDumper ]; private array $extraDisplayOptions = []; - /** - * {@inheritdoc} - */ public function __construct($output = null, string $charset = null, int $flags = 0) { AbstractDumper::__construct($output, $charset, $flags); @@ -85,9 +82,6 @@ public function __construct($output = null, string $charset = null, int $flags = $this->styles = static::$themes['dark'] ?? self::$themes['dark']; } - /** - * {@inheritdoc} - */ public function setStyles(array $styles) { $this->headerIsDumped = false; @@ -131,9 +125,6 @@ public function setDumpBoundaries(string $prefix, string $suffix) $this->dumpSuffix = $suffix; } - /** - * {@inheritdoc} - */ public function dump(Data $data, $output = null, array $extraDisplayOptions = []): ?string { $this->extraDisplayOptions = $extraDisplayOptions; @@ -782,9 +773,6 @@ function showCurrent(state) return $this->dumpHeader = preg_replace('/\s+/', ' ', $line).''.$this->dumpHeader; } - /** - * {@inheritdoc} - */ public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) { if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) { @@ -800,9 +788,6 @@ public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) } } - /** - * {@inheritdoc} - */ public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild) { if (Cursor::HASH_OBJECT === $type) { @@ -831,9 +816,6 @@ public function enterHash(Cursor $cursor, int $type, string|int|null $class, boo } } - /** - * {@inheritdoc} - */ public function leaveHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild, int $cut) { $this->dumpEllipsis($cursor, $hasChild, $cut); @@ -843,9 +825,6 @@ public function leaveHash(Cursor $cursor, int $type, string|int|null $class, boo parent::leaveHash($cursor, $type, $class, $hasChild, 0); } - /** - * {@inheritdoc} - */ protected function style(string $style, string $value, array $attr = []): string { if ('' === $value) { @@ -938,9 +917,6 @@ protected function style(string $style, string $value, array $attr = []): string return $v; } - /** - * {@inheritdoc} - */ protected function dumpLine(int $depth, bool $endOfValue = false) { if (-1 === $this->lastDepth) { diff --git a/src/Symfony/Component/VarDumper/Dumper/ServerDumper.php b/src/Symfony/Component/VarDumper/Dumper/ServerDumper.php index 2baca3187723d..f2c891b6a12c0 100644 --- a/src/Symfony/Component/VarDumper/Dumper/ServerDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/ServerDumper.php @@ -41,9 +41,6 @@ public function getContextProviders(): array return $this->connection->getContextProviders(); } - /** - * {@inheritdoc} - */ public function dump(Data $data) { if (!$this->connection->write($data) && $this->wrappedDumper) { diff --git a/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php b/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php index 9a7b4e9cd30ea..6af81a2e66da7 100644 --- a/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php +++ b/src/Symfony/Component/WebLink/EventListener/AddLinkHeaderListener.php @@ -50,9 +50,6 @@ public function onKernelResponse(ResponseEvent $event) $event->getResponse()->headers->set('Link', $this->serializer->serialize($links), false); } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [KernelEvents::RESPONSE => 'onKernelResponse']; diff --git a/src/Symfony/Component/WebLink/GenericLinkProvider.php b/src/Symfony/Component/WebLink/GenericLinkProvider.php index a986c69142dff..3df2f981b533c 100644 --- a/src/Symfony/Component/WebLink/GenericLinkProvider.php +++ b/src/Symfony/Component/WebLink/GenericLinkProvider.php @@ -35,17 +35,11 @@ public function __construct(array $links = []) $this->links = $that->links; } - /** - * {@inheritdoc} - */ public function getLinks(): array { return array_values($this->links); } - /** - * {@inheritdoc} - */ public function getLinksByRel(string $rel): array { $links = []; @@ -59,9 +53,6 @@ public function getLinksByRel(string $rel): array return $links; } - /** - * {@inheritdoc} - */ public function withLink(LinkInterface $link): static { $that = clone $this; @@ -70,9 +61,6 @@ public function withLink(LinkInterface $link): static return $that; } - /** - * {@inheritdoc} - */ public function withoutLink(LinkInterface $link): static { $that = clone $this; diff --git a/src/Symfony/Component/WebLink/Link.php b/src/Symfony/Component/WebLink/Link.php index 955efd5081f22..97a931b36823b 100644 --- a/src/Symfony/Component/WebLink/Link.php +++ b/src/Symfony/Component/WebLink/Link.php @@ -58,41 +58,26 @@ public function __construct(string $rel = null, string $href = '') $this->href = $href; } - /** - * {@inheritdoc} - */ public function getHref(): string { return $this->href; } - /** - * {@inheritdoc} - */ public function isTemplated(): bool { return $this->hrefIsTemplated($this->href); } - /** - * {@inheritdoc} - */ public function getRels(): array { return array_values($this->rel); } - /** - * {@inheritdoc} - */ public function getAttributes(): array { return $this->attributes; } - /** - * {@inheritdoc} - */ public function withHref(string|\Stringable $href): static { $that = clone $this; @@ -101,9 +86,6 @@ public function withHref(string|\Stringable $href): static return $that; } - /** - * {@inheritdoc} - */ public function withRel(string $rel): static { $that = clone $this; @@ -112,9 +94,6 @@ public function withRel(string $rel): static return $that; } - /** - * {@inheritdoc} - */ public function withoutRel(string $rel): static { $that = clone $this; @@ -123,9 +102,6 @@ public function withoutRel(string $rel): static return $that; } - /** - * {@inheritdoc} - */ public function withAttribute(string $attribute, string|\Stringable|int|float|bool|array $value): static { $that = clone $this; @@ -134,9 +110,6 @@ public function withAttribute(string $attribute, string|\Stringable|int|float|bo return $that; } - /** - * {@inheritdoc} - */ public function withoutAttribute(string $attribute): static { $that = clone $this; diff --git a/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php b/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php index 18d892f2fe6a0..01a5b365910e5 100644 --- a/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php +++ b/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php @@ -34,8 +34,6 @@ class GraphvizDumper implements DumperInterface ]; /** - * {@inheritdoc} - * * Dumps the workflow as a graphviz graph. * * Available options: diff --git a/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php b/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php index 95b19c497c632..ac90b61d0f362 100644 --- a/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php +++ b/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php @@ -17,8 +17,6 @@ class StateMachineGraphvizDumper extends GraphvizDumper { /** - * {@inheritdoc} - * * Dumps the workflow as a graphviz graph. * * Available options: diff --git a/src/Symfony/Component/Workflow/Event/GuardEvent.php b/src/Symfony/Component/Workflow/Event/GuardEvent.php index a3c0521e72427..9409da2059664 100644 --- a/src/Symfony/Component/Workflow/Event/GuardEvent.php +++ b/src/Symfony/Component/Workflow/Event/GuardEvent.php @@ -25,9 +25,6 @@ final class GuardEvent extends Event { private TransitionBlockerList $transitionBlockerList; - /** - * {@inheritdoc} - */ public function __construct(object $subject, Marking $marking, Transition $transition, WorkflowInterface $workflow = null) { parent::__construct($subject, $marking, $transition, $workflow); diff --git a/src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php b/src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php index 9790bce94010f..b1602dc72e459 100644 --- a/src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php +++ b/src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php @@ -43,9 +43,6 @@ public function __construct(bool $singleState = false, string $property = 'marki $this->property = $property; } - /** - * {@inheritdoc} - */ public function getMarking(object $subject): Marking { $method = 'get'.ucfirst($this->property); @@ -77,9 +74,6 @@ public function getMarking(object $subject): Marking return new Marking($marking); } - /** - * {@inheritdoc} - */ public function setMarking(object $subject, Marking $marking, array $context = []) { $marking = $marking->getPlaces(); diff --git a/src/Symfony/Component/Workflow/SupportStrategy/InstanceOfSupportStrategy.php b/src/Symfony/Component/Workflow/SupportStrategy/InstanceOfSupportStrategy.php index a00aba5c96cf4..86bd107050272 100644 --- a/src/Symfony/Component/Workflow/SupportStrategy/InstanceOfSupportStrategy.php +++ b/src/Symfony/Component/Workflow/SupportStrategy/InstanceOfSupportStrategy.php @@ -26,9 +26,6 @@ public function __construct(string $className) $this->className = $className; } - /** - * {@inheritdoc} - */ public function supports(WorkflowInterface $workflow, object $subject): bool { return $subject instanceof $this->className; diff --git a/src/Symfony/Component/Workflow/Workflow.php b/src/Symfony/Component/Workflow/Workflow.php index 2901878284e13..3d4e8563bf5fb 100644 --- a/src/Symfony/Component/Workflow/Workflow.php +++ b/src/Symfony/Component/Workflow/Workflow.php @@ -76,9 +76,6 @@ public function __construct(Definition $definition, MarkingStoreInterface $marki $this->eventsToDispatch = $eventsToDispatch; } - /** - * {@inheritdoc} - */ public function getMarking(object $subject, array $context = []): Marking { $marking = $this->markingStore->getMarking($subject); @@ -118,9 +115,6 @@ public function getMarking(object $subject, array $context = []): Marking return $marking; } - /** - * {@inheritdoc} - */ public function can(object $subject, string $transitionName): bool { $transitions = $this->definition->getTransitions(); @@ -141,9 +135,6 @@ public function can(object $subject, string $transitionName): bool return false; } - /** - * {@inheritdoc} - */ public function buildTransitionBlockerList(object $subject, string $transitionName): TransitionBlockerList { $transitions = $this->definition->getTransitions(); @@ -177,9 +168,6 @@ public function buildTransitionBlockerList(object $subject, string $transitionNa return $transitionBlockerList; } - /** - * {@inheritdoc} - */ public function apply(object $subject, string $transitionName, array $context = []): Marking { $marking = $this->getMarking($subject, $context); @@ -245,9 +233,6 @@ public function apply(object $subject, string $transitionName, array $context = return $marking; } - /** - * {@inheritdoc} - */ public function getEnabledTransitions(object $subject): array { $enabledTransitions = []; @@ -282,33 +267,21 @@ public function getEnabledTransition(object $subject, string $name): ?Transition return null; } - /** - * {@inheritdoc} - */ public function getName(): string { return $this->name; } - /** - * {@inheritdoc} - */ public function getDefinition(): Definition { return $this->definition; } - /** - * {@inheritdoc} - */ public function getMarkingStore(): MarkingStoreInterface { return $this->markingStore; } - /** - * {@inheritdoc} - */ public function getMetadataStore(): MetadataStoreInterface { return $this->definition->getMetadataStore(); diff --git a/src/Symfony/Component/Yaml/Command/LintCommand.php b/src/Symfony/Component/Yaml/Command/LintCommand.php index 66eb25021a8ae..19a0af08c11f0 100644 --- a/src/Symfony/Component/Yaml/Command/LintCommand.php +++ b/src/Symfony/Component/Yaml/Command/LintCommand.php @@ -50,9 +50,6 @@ public function __construct(string $name = null, callable $directoryIteratorProv $this->isReadableProvider = null === $isReadableProvider ? null : $isReadableProvider(...); } - /** - * {@inheritdoc} - */ protected function configure() { $this diff --git a/src/Symfony/Contracts/Cache/CacheTrait.php b/src/Symfony/Contracts/Cache/CacheTrait.php index 9ac5a6df38f53..b4fddfa98dc7e 100644 --- a/src/Symfony/Contracts/Cache/CacheTrait.php +++ b/src/Symfony/Contracts/Cache/CacheTrait.php @@ -25,17 +25,11 @@ class_exists(InvalidArgumentException::class); */ trait CacheTrait { - /** - * {@inheritdoc} - */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { return $this->doGet($this, $key, $callback, $beta, $metadata); } - /** - * {@inheritdoc} - */ public function delete(string $key): bool { return $this->deleteItem($key); diff --git a/src/Symfony/Contracts/EventDispatcher/Event.php b/src/Symfony/Contracts/EventDispatcher/Event.php index 384a650b8a4b3..2e7f9989036e3 100644 --- a/src/Symfony/Contracts/EventDispatcher/Event.php +++ b/src/Symfony/Contracts/EventDispatcher/Event.php @@ -32,9 +32,6 @@ class Event implements StoppableEventInterface { private bool $propagationStopped = false; - /** - * {@inheritdoc} - */ public function isPropagationStopped(): bool { return $this->propagationStopped; diff --git a/src/Symfony/Contracts/Service/ServiceLocatorTrait.php b/src/Symfony/Contracts/Service/ServiceLocatorTrait.php index 19d3e80ff9aa9..45c8d910df594 100644 --- a/src/Symfony/Contracts/Service/ServiceLocatorTrait.php +++ b/src/Symfony/Contracts/Service/ServiceLocatorTrait.php @@ -38,17 +38,11 @@ public function __construct(array $factories) $this->factories = $factories; } - /** - * {@inheritdoc} - */ public function has(string $id): bool { return isset($this->factories[$id]); } - /** - * {@inheritdoc} - */ public function get(string $id): mixed { if (!isset($this->factories[$id])) { @@ -71,9 +65,6 @@ public function get(string $id): mixed } } - /** - * {@inheritdoc} - */ public function getProvidedServices(): array { if (!isset($this->providedTypes)) { diff --git a/src/Symfony/Contracts/Service/ServiceProviderInterface.php b/src/Symfony/Contracts/Service/ServiceProviderInterface.php index e78827ca4a2a0..a28fd82ea49a4 100644 --- a/src/Symfony/Contracts/Service/ServiceProviderInterface.php +++ b/src/Symfony/Contracts/Service/ServiceProviderInterface.php @@ -24,15 +24,10 @@ interface ServiceProviderInterface extends ContainerInterface { /** - * {@inheritdoc} - * * @return T */ public function get(string $id): mixed; - /** - * {@inheritdoc} - */ public function has(string $id): bool; /** diff --git a/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php b/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php index 53012986e5133..f7cd3a94158c1 100644 --- a/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php +++ b/src/Symfony/Contracts/Service/ServiceSubscriberTrait.php @@ -26,9 +26,6 @@ trait ServiceSubscriberTrait /** @var ContainerInterface */ protected $container; - /** - * {@inheritdoc} - */ public static function getSubscribedServices(): array { $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : []; diff --git a/src/Symfony/Contracts/Translation/TranslatorTrait.php b/src/Symfony/Contracts/Translation/TranslatorTrait.php index 99a639ce69ff3..46e9170742059 100644 --- a/src/Symfony/Contracts/Translation/TranslatorTrait.php +++ b/src/Symfony/Contracts/Translation/TranslatorTrait.php @@ -22,25 +22,16 @@ trait TranslatorTrait { private ?string $locale = null; - /** - * {@inheritdoc} - */ public function setLocale(string $locale) { $this->locale = $locale; } - /** - * {@inheritdoc} - */ public function getLocale(): string { return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); } - /** - * {@inheritdoc} - */ public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string { if (null === $id || '' === $id) { From c4f651e9fc2188e52d68b75491691146338b77de Mon Sep 17 00:00:00 2001 From: Radek Wionczek Date: Fri, 26 Aug 2022 00:15:48 +0200 Subject: [PATCH 0023/1170] [LokaliseBridge] Fix push command --delete-missing options when there are no missing messages --- .../Translation/Bridge/Lokalise/LokaliseProvider.php | 8 +++++--- .../Bridge/Lokalise/Tests/LokaliseProviderTest.php | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php b/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php index ab9594c8ee860..aeada30847cea 100644 --- a/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php +++ b/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php @@ -120,10 +120,12 @@ public function delete(TranslatorBagInterface $translatorBag): void $keysIds = []; foreach ($catalogue->getDomains() as $domain) { - $keysToDelete = []; - foreach (array_keys($catalogue->all($domain)) as $key) { - $keysToDelete[] = $key; + $keysToDelete = array_keys($catalogue->all($domain)); + + if (!$keysToDelete) { + continue; } + $keysIds += $this->getKeysIds($keysToDelete, $domain); } diff --git a/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php b/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php index 06e3df223482c..5df996e94327b 100644 --- a/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php +++ b/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php @@ -699,10 +699,12 @@ public function testDeleteProcess() $translatorBag->addCatalogue(new MessageCatalogue('en', [ 'messages' => ['a' => 'trans_en_a'], 'validators' => ['post.num_comments' => '{count, plural, one {# comment} other {# comments}}'], + 'domain_without_missing_messages' => [], ])); $translatorBag->addCatalogue(new MessageCatalogue('fr', [ 'messages' => ['a' => 'trans_fr_a'], 'validators' => ['post.num_comments' => '{count, plural, one {# commentaire} other {# commentaires}}'], + 'domain_without_missing_messages' => [], ])); $provider = $this->createProvider( From 026edbe6014fe7bd013f30acd5ae57b21e0826e2 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Tue, 23 Aug 2022 21:46:41 +0200 Subject: [PATCH 0024/1170] Remove usage of empty function when possible --- psalm.xml | 4 ++++ src/Symfony/Bridge/Monolog/Handler/MailerHandler.php | 2 +- .../Bundle/FrameworkBundle/Command/ContainerDebugCommand.php | 2 +- .../Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php | 2 +- .../FrameworkBundle/Command/TranslationDebugCommand.php | 2 +- .../FrameworkBundle/Console/Descriptor/TextDescriptor.php | 2 +- .../DependencyInjection/Compiler/UnusedTagsPass.php | 2 +- .../FrameworkBundle/DependencyInjection/Configuration.php | 2 +- .../DependencyInjection/Compiler/TwigEnvironmentPass.php | 2 +- src/Symfony/Component/BrowserKit/HttpBrowser.php | 2 +- .../Component/Cache/Adapter/AbstractTagAwareAdapter.php | 2 +- .../Config/Definition/Builder/EnumNodeDefinition.php | 2 +- src/Symfony/Component/Config/Definition/EnumNode.php | 2 +- src/Symfony/Component/Config/Util/XmlUtils.php | 2 +- .../Component/Console/Formatter/OutputFormatterStyleStack.php | 4 ++-- src/Symfony/Component/Console/Helper/Table.php | 2 +- src/Symfony/Component/CssSelector/Parser/Parser.php | 2 +- src/Symfony/Component/CssSelector/Parser/Token.php | 2 +- src/Symfony/Component/CssSelector/XPath/Translator.php | 2 +- src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php | 2 +- src/Symfony/Component/ExpressionLanguage/Lexer.php | 4 ++-- src/Symfony/Component/ExpressionLanguage/Parser.php | 2 +- .../Form/ChoiceList/Factory/DefaultChoiceListFactory.php | 2 +- .../Core/DataTransformer/ArrayToPartsTransformer.php | 2 +- src/Symfony/Component/Form/FormRegistry.php | 2 +- src/Symfony/Component/HttpFoundation/AcceptHeader.php | 2 +- src/Symfony/Component/HttpFoundation/Request.php | 2 +- .../HttpKernel/EventListener/AbstractSessionListener.php | 2 +- .../Messenger/Bridge/AmazonSqs/Transport/Connection.php | 2 +- .../Component/Security/Http/Logout/LogoutUrlGenerator.php | 2 +- src/Symfony/Component/Serializer/Annotation/Groups.php | 2 +- .../Component/Serializer/Normalizer/FormErrorNormalizer.php | 2 +- 32 files changed, 37 insertions(+), 33 deletions(-) diff --git a/psalm.xml b/psalm.xml index 1544a71346c41..7a895615e7457 100644 --- a/psalm.xml +++ b/psalm.xml @@ -43,4 +43,8 @@ + + + + diff --git a/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php b/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php index b75accae76a84..75356255862a2 100644 --- a/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/MailerHandler.php @@ -65,7 +65,7 @@ public function handleBatch(array $records): void } } - if (!empty($messages)) { + if ($messages) { $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index a0f484db7b268..3199c93cce308 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -276,7 +276,7 @@ private function findProperServiceName(InputInterface $input, SymfonyStyle $io, } $matchingServices = $this->findServiceIdsContaining($builder, $name, $showHidden); - if (empty($matchingServices)) { + if (!$matchingServices) { throw new InvalidArgumentException(sprintf('No services found that match "%s".', $name)); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php index ecd507127c00c..bb14ab1b58d35 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php @@ -87,7 +87,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return false !== stripos(str_replace('\\', '', $serviceId), $searchNormalized) && !str_starts_with($serviceId, '.'); }); - if (empty($serviceIds)) { + if (!$serviceIds) { $errorIo->error(sprintf('No autowirable classes or interfaces found matching "%s"', $search)); return 1; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index c2cfae702863b..ecf6ade2c2f17 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -186,7 +186,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } // No defined or extracted messages - if (empty($allMessages) || null !== $domain && empty($allMessages[$domain])) { + if (!$allMessages || null !== $domain && empty($allMessages[$domain])) { $outputMessage = sprintf('No defined or extracted messages for locale "%s"', $locale); if (null !== $domain) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 67d09b7a65b9d..13a8a8b955ef7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -530,7 +530,7 @@ private function renderEventListenerTable(EventDispatcherInterface $eventDispatc private function formatRouterConfig(array $config): string { - if (empty($config)) { + if (!$config) { return 'NONE'; } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php index 02b59afad5e61..80c9d728a9e79 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php @@ -124,7 +124,7 @@ public function process(ContainerBuilder $container) $services = array_keys($container->findTaggedServiceIds($tag)); $message = sprintf('Tag "%s" was defined on service(s) "%s", but was never used.', $tag, implode('", "', $services)); - if (!empty($candidates)) { + if ($candidates) { $message .= sprintf(' Did you mean "%s"?', implode('", "', $candidates)); } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index d67ef55cacb16..357b416e18591 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -350,7 +350,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode) $workflows = []; } - if (1 === \count($workflows) && isset($workflows['workflows']) && !array_is_list($workflows['workflows']) && !empty(array_diff(array_keys($workflows['workflows']), ['audit_trail', 'type', 'marking_store', 'supports', 'support_strategy', 'initial_marking', 'places', 'transitions']))) { + if (1 === \count($workflows) && isset($workflows['workflows']) && !array_is_list($workflows['workflows']) && array_diff(array_keys($workflows['workflows']), ['audit_trail', 'type', 'marking_store', 'supports', 'support_strategy', 'initial_marking', 'places', 'transitions'])) { $workflows = $workflows['workflows']; } diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php index 45413dc93253d..3a90bce15ffaa 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php @@ -50,7 +50,7 @@ public function process(ContainerBuilder $container) } } - if (!empty($twigBridgeExtensionsMethodCalls) || !empty($othersExtensionsMethodCalls)) { + if ($twigBridgeExtensionsMethodCalls || $othersExtensionsMethodCalls) { $definition->setMethodCalls(array_merge($twigBridgeExtensionsMethodCalls, $othersExtensionsMethodCalls, $currentMethodCalls)); } } diff --git a/src/Symfony/Component/BrowserKit/HttpBrowser.php b/src/Symfony/Component/BrowserKit/HttpBrowser.php index 78915815317cc..1e49b33163c53 100644 --- a/src/Symfony/Component/BrowserKit/HttpBrowser.php +++ b/src/Symfony/Component/BrowserKit/HttpBrowser.php @@ -87,7 +87,7 @@ private function getBodyAndExtraHeaders(Request $request, array $headers): array return [$part->bodyToIterable(), $part->getPreparedHeaders()->toArray()]; } - if (empty($fields)) { + if (!$fields) { return ['', []]; } diff --git a/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php index e775bbf15f9e4..6cc4bb635a8c5 100644 --- a/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php @@ -286,7 +286,7 @@ public function deleteItems(array $keys): bool */ public function invalidateTags(array $tags): bool { - if (empty($tags)) { + if (!$tags) { return false; } diff --git a/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php index 4ad47c2831583..6df62d30ab8b3 100644 --- a/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php @@ -29,7 +29,7 @@ public function values(array $values): static { $values = array_unique($values); - if (empty($values)) { + if (!$values) { throw new \InvalidArgumentException('->values() must be called with at least one value.'); } diff --git a/src/Symfony/Component/Config/Definition/EnumNode.php b/src/Symfony/Component/Config/Definition/EnumNode.php index 3a777119171f7..e0079bcf80a59 100644 --- a/src/Symfony/Component/Config/Definition/EnumNode.php +++ b/src/Symfony/Component/Config/Definition/EnumNode.php @@ -25,7 +25,7 @@ class EnumNode extends ScalarNode public function __construct(?string $name, NodeInterface $parent = null, array $values = [], string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR) { $values = array_unique($values); - if (empty($values)) { + if (!$values) { throw new \InvalidArgumentException('$values must contain at least one element.'); } diff --git a/src/Symfony/Component/Config/Util/XmlUtils.php b/src/Symfony/Component/Config/Util/XmlUtils.php index 7d1644b701d0a..a1b1d29e60ca8 100644 --- a/src/Symfony/Component/Config/Util/XmlUtils.php +++ b/src/Symfony/Component/Config/Util/XmlUtils.php @@ -89,7 +89,7 @@ public static function parse(string $content, string|callable $schemaOrCallable if (!$valid) { $messages = static::getXmlErrors($internalErrors); - if (empty($messages)) { + if (!$messages) { throw new InvalidXmlException('The XML is not valid.', 0, $e); } throw new XmlParsingException(implode("\n", $messages), 0, $e); diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php index e72b641bae6f9..ff2e60040747c 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php @@ -55,7 +55,7 @@ public function push(OutputFormatterStyleInterface $style) */ public function pop(OutputFormatterStyleInterface $style = null): OutputFormatterStyleInterface { - if (empty($this->styles)) { + if (!$this->styles) { return $this->emptyStyle; } @@ -79,7 +79,7 @@ public function pop(OutputFormatterStyleInterface $style = null): OutputFormatte */ public function getCurrent(): OutputFormatterStyle { - if (empty($this->styles)) { + if (!$this->styles) { return $this->emptyStyle; } diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index dcae7e7115276..81598dfb49929 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -180,7 +180,7 @@ public function setColumnMaxWidth(int $columnIndex, int $width): static public function setHeaders(array $headers): static { $headers = array_values($headers); - if (!empty($headers) && !\is_array($headers[0])) { + if ($headers && !\is_array($headers[0])) { $headers = [$headers]; } diff --git a/src/Symfony/Component/CssSelector/Parser/Parser.php b/src/Symfony/Component/CssSelector/Parser/Parser.php index df77e2ce4a19c..aef60e7bf022c 100644 --- a/src/Symfony/Component/CssSelector/Parser/Parser.php +++ b/src/Symfony/Component/CssSelector/Parser/Parser.php @@ -242,7 +242,7 @@ private function parseSimpleSelector(TokenStream $stream, bool $insideNegation = } } - if (empty($arguments)) { + if (!$arguments) { throw SyntaxErrorException::unexpectedToken('at least one argument', $next); } diff --git a/src/Symfony/Component/CssSelector/Parser/Token.php b/src/Symfony/Component/CssSelector/Parser/Token.php index a538d07f07aaf..b50441a8e611c 100644 --- a/src/Symfony/Component/CssSelector/Parser/Token.php +++ b/src/Symfony/Component/CssSelector/Parser/Token.php @@ -68,7 +68,7 @@ public function isDelimiter(array $values = []): bool return false; } - if (empty($values)) { + if (!$values) { return true; } diff --git a/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/Symfony/Component/CssSelector/XPath/Translator.php index 128a4a9397ac3..2d6d466b353f0 100644 --- a/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -220,7 +220,7 @@ private function parseSelectors(string $css): array foreach ($this->shortcutParsers as $shortcut) { $tokens = $shortcut->parse($css); - if (!empty($tokens)) { + if ($tokens) { return $tokens; } } diff --git a/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php b/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php index 918a18e2f0ef9..e16e81bb516af 100644 --- a/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php +++ b/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php @@ -222,7 +222,7 @@ protected function initialize() } // if no option is selected and if it is a simple select box, take the first option as the value - if (!$found && !$this->multiple && !empty($this->options)) { + if (!$found && !$this->multiple && $this->options) { $this->value = $this->options[0]['value']; } } diff --git a/src/Symfony/Component/ExpressionLanguage/Lexer.php b/src/Symfony/Component/ExpressionLanguage/Lexer.php index aca652958984e..ab32342844cdf 100644 --- a/src/Symfony/Component/ExpressionLanguage/Lexer.php +++ b/src/Symfony/Component/ExpressionLanguage/Lexer.php @@ -54,7 +54,7 @@ public function tokenize(string $expression): TokenStream ++$cursor; } elseif (str_contains(')]}', $expression[$cursor])) { // closing bracket - if (empty($brackets)) { + if (!$brackets) { throw new SyntaxError(sprintf('Unexpected "%s".', $expression[$cursor]), $cursor, $expression); } @@ -97,7 +97,7 @@ public function tokenize(string $expression): TokenStream $tokens[] = new Token(Token::EOF_TYPE, null, $cursor + 1); - if (!empty($brackets)) { + if ($brackets) { [$expect, $cur] = array_pop($brackets); throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $cur, $expression); } diff --git a/src/Symfony/Component/ExpressionLanguage/Parser.php b/src/Symfony/Component/ExpressionLanguage/Parser.php index 92849b960d8fa..0580b55d46e5b 100644 --- a/src/Symfony/Component/ExpressionLanguage/Parser.php +++ b/src/Symfony/Component/ExpressionLanguage/Parser.php @@ -404,7 +404,7 @@ public function parseArguments() $args = []; $this->stream->expect(Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis'); while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ')')) { - if (!empty($args)) { + if ($args) { $this->stream->expect(Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma'); } diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php b/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php index 9ab806cbc573c..132ac300bddeb 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php @@ -71,7 +71,7 @@ public function createView(ChoiceListInterface $list, array|callable $preferredC $keys = $list->getOriginalKeys(); if (!\is_callable($preferredChoices)) { - if (empty($preferredChoices)) { + if (!$preferredChoices) { $preferredChoices = null; } else { // make sure we have keys that reflect order diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php index 4dbb8272a88cc..c02b46dc10ec3 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php @@ -39,7 +39,7 @@ public function transform(mixed $array): mixed $result = []; foreach ($this->partMapping as $partKey => $originalKeys) { - if (empty($array)) { + if (!$array) { $result[$partKey] = null; } else { $result[$partKey] = array_intersect_key($array, array_flip($originalKeys)); diff --git a/src/Symfony/Component/Form/FormRegistry.php b/src/Symfony/Component/Form/FormRegistry.php index 5453c6d35677e..84912de3013aa 100644 --- a/src/Symfony/Component/Form/FormRegistry.php +++ b/src/Symfony/Component/Form/FormRegistry.php @@ -152,7 +152,7 @@ public function getTypeGuesser(): ?FormTypeGuesserInterface } } - $this->guesser = !empty($guessers) ? new FormTypeGuesserChain($guessers) : null; + $this->guesser = $guessers ? new FormTypeGuesserChain($guessers) : null; } return $this->guesser; diff --git a/src/Symfony/Component/HttpFoundation/AcceptHeader.php b/src/Symfony/Component/HttpFoundation/AcceptHeader.php index b15ba61d49379..180e9604c7fad 100644 --- a/src/Symfony/Component/HttpFoundation/AcceptHeader.php +++ b/src/Symfony/Component/HttpFoundation/AcceptHeader.php @@ -127,7 +127,7 @@ public function first(): ?AcceptHeaderItem { $this->sort(); - return !empty($this->items) ? reset($this->items) : null; + return $this->items ? reset($this->items) : null; } /** diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index c7ec775c5e9d4..fa412e99d639e 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -505,7 +505,7 @@ public function __toString(): string $cookies[] = $k.'='.$v; } - if (!empty($cookies)) { + if ($cookies) { $cookieHeader = 'Cookie: '.implode('; ', $cookies)."\r\n"; } diff --git a/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php b/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php index 05be006e1722a..cf491379eacc4 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php @@ -151,7 +151,7 @@ public function onKernelResponse(ResponseEvent $event) $request = $event->getRequest(); $requestSessionCookieId = $request->cookies->get($sessionName); - $isSessionEmpty = ($session instanceof Session ? $session->isEmpty() : empty($session->all())) && empty($_SESSION); // checking $_SESSION to keep compatibility with native sessions + $isSessionEmpty = ($session instanceof Session ? $session->isEmpty() : !$session->all()) && empty($_SESSION); // checking $_SESSION to keep compatibility with native sessions if ($requestSessionCookieId && $isSessionEmpty) { // PHP internally sets the session cookie value to "deleted" when setcookie() is called with empty string $value argument // which happens in \Symfony\Component\HttpFoundation\Session\Storage\Handler\AbstractSessionHandler::destroy diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php index e5f992d4ce4d9..aee43ac76d41e 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php @@ -342,7 +342,7 @@ public function send(string $body, array $headers, int $delay = 0, string $messa ]); } - if (!empty($specialHeaders)) { + if ($specialHeaders) { $parameters['MessageAttributes'][self::MESSAGE_ATTRIBUTE_NAME] = new MessageAttributeValue([ 'DataType' => 'String', 'StringValue' => json_encode($specialHeaders), diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php b/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php index 66b8df5fcbd7d..865537c06f23e 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php @@ -96,7 +96,7 @@ private function generateLogoutUrl(?string $key, int $referenceType): string $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath; - if (!empty($parameters)) { + if ($parameters) { $url .= '?'.http_build_query($parameters, '', '&'); } } else { diff --git a/src/Symfony/Component/Serializer/Annotation/Groups.php b/src/Symfony/Component/Serializer/Annotation/Groups.php index 7f377c8fb9458..2069d678c91b2 100644 --- a/src/Symfony/Component/Serializer/Annotation/Groups.php +++ b/src/Symfony/Component/Serializer/Annotation/Groups.php @@ -37,7 +37,7 @@ public function __construct(string|array $groups) { $this->groups = (array) $groups; - if (empty($this->groups)) { + if (!$this->groups) { throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', static::class)); } diff --git a/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php index 0ffa9f072a2c1..d6dad602e0e23 100644 --- a/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php @@ -72,7 +72,7 @@ private function convertFormChildrenToArray(FormInterface $data): array 'errors' => $this->convertFormErrorsToArray($child), ]; - if (!empty($child->all())) { + if ($child->all()) { $childData['children'] = $this->convertFormChildrenToArray($child); } From 6dcab51f3f2900581b8597c5deaea0771fcdb693 Mon Sep 17 00:00:00 2001 From: Ippei Sumida Date: Wed, 24 Aug 2022 15:27:07 +0900 Subject: [PATCH 0025/1170] [Notifier] Add Chatwork Notifier Bridge --- .../FrameworkExtension.php | 2 + .../Resources/config/notifier_transports.php | 6 ++ .../Notifier/Bridge/Chatwork/.gitattributes | 4 + .../Notifier/Bridge/Chatwork/.gitignore | 3 + .../Notifier/Bridge/Chatwork/CHANGELOG.md | 7 ++ .../Chatwork/ChatworkMessageBodyBuilder.php | 61 ++++++++++++ .../Bridge/Chatwork/ChatworkOptions.php | 51 ++++++++++ .../Bridge/Chatwork/ChatworkTransport.php | 96 +++++++++++++++++++ .../Chatwork/ChatworkTransportFactory.php | 44 +++++++++ .../Notifier/Bridge/Chatwork/LICENSE | 19 ++++ .../Notifier/Bridge/Chatwork/README.md | 19 ++++ .../Tests/ChatworkMessageBodyBuilderTest.php | 68 +++++++++++++ .../Chatwork/Tests/ChatworkOptionsTest.php | 35 +++++++ .../Tests/ChatworkTransportFactoryTest.php | 54 +++++++++++ .../Chatwork/Tests/ChatworkTransportTest.php | 69 +++++++++++++ .../Notifier/Bridge/Chatwork/composer.json | 30 ++++++ .../Notifier/Bridge/Chatwork/phpunit.xml.dist | 31 ++++++ src/Symfony/Component/Notifier/Transport.php | 2 + 18 files changed, 601 insertions(+) create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/.gitattributes create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/.gitignore create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/CHANGELOG.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkMessageBodyBuilder.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkOptions.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransport.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransportFactory.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/LICENSE create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/README.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkMessageBodyBuilderTest.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkOptionsTest.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportFactoryTest.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportTest.php create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/composer.json create mode 100644 src/Symfony/Component/Notifier/Bridge/Chatwork/phpunit.xml.dist diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index ea76107b01440..fe46f022de7e1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -124,6 +124,7 @@ use Symfony\Component\Mime\MimeTypes; use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; +use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkTransportFactory; use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; use Symfony\Component\Notifier\Bridge\ContactEveryone\ContactEveryoneTransportFactory; use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; @@ -2564,6 +2565,7 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $ $classToServices = [ AllMySmsTransportFactory::class => 'notifier.transport_factory.all-my-sms', AmazonSnsTransportFactory::class => 'notifier.transport_factory.amazon-sns', + ChatworkTransportFactory::class => 'notifier.transport_factory.chatwork', ClickatellTransportFactory::class => 'notifier.transport_factory.clickatell', ContactEveryoneTransportFactory::class => 'notifier.transport_factory.contact-everyone', DiscordTransportFactory::class => 'notifier.transport_factory.discord', diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier_transports.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier_transports.php index 691588d730d92..237ae18a59eb7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier_transports.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier_transports.php @@ -13,6 +13,7 @@ use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; +use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkTransportFactory; use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; use Symfony\Component\Notifier\Bridge\ContactEveryone\ContactEveryoneTransportFactory; use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; @@ -281,5 +282,10 @@ ->set('notifier.transport_factory.zendesk', ZendeskTransportFactory::class) ->parent('notifier.transport_factory.abstract') ->tag('chatter.transport_factory') + + ->set('notifier.transport_factory.chatwork', ChatworkTransportFactory::class) + ->parent('notifier.transport_factory.abstract') + ->tag('chatter.transport_factory') + ; }; diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Chatwork/.gitattributes new file mode 100644 index 0000000000000..84c7add058fb5 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/.gitattributes @@ -0,0 +1,4 @@ +/Tests export-ignore +/phpunit.xml.dist export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/.gitignore b/src/Symfony/Component/Notifier/Bridge/Chatwork/.gitignore new file mode 100644 index 0000000000000..c49a5d8df5c65 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/.gitignore @@ -0,0 +1,3 @@ +vendor/ +composer.lock +phpunit.xml diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/CHANGELOG.md b/src/Symfony/Component/Notifier/Bridge/Chatwork/CHANGELOG.md new file mode 100644 index 0000000000000..fc914543b6158 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/CHANGELOG.md @@ -0,0 +1,7 @@ +CHANGELOG +========= + +6.2 +--- + +* Add the bridge diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkMessageBodyBuilder.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkMessageBodyBuilder.php new file mode 100644 index 0000000000000..c0d45ef98bb90 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkMessageBodyBuilder.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork; + +/** + * @author Ippei Sumida + */ +class ChatworkMessageBodyBuilder +{ + private array $to = []; + private string $body = ''; + private bool $selfUnread = false; + + public function to(array|string $userIds): self + { + if (\is_array($userIds)) { + $this->to = $userIds; + } else { + $this->to = [$userIds]; + } + + return $this; + } + + public function body(string $body): self + { + $this->body = $body; + + return $this; + } + + public function selfUnread(bool $selfUnread): self + { + $this->selfUnread = $selfUnread; + + return $this; + } + + public function getMessageBody(): array + { + $content = ''; + foreach ($this->to as $to) { + $content .= sprintf("[To:%s]\n", $to); + } + $content .= $this->body; + + return [ + 'body' => $content, + 'self_unread' => $this->selfUnread, + ]; + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkOptions.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkOptions.php new file mode 100644 index 0000000000000..7c6c0e164f975 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkOptions.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork; + +use Symfony\Component\Notifier\Message\MessageOptionsInterface; + +/** + * @author Ippei Sumida + */ +class ChatworkOptions implements MessageOptionsInterface +{ + private array $options; + + public function __construct(array $options = []) + { + $this->options = $options; + } + + public function toArray(): array + { + return $this->options; + } + + public function getRecipientId(): ?string + { + return ''; + } + + public function to(array|string $userIds): static + { + $this->options['to'] = $userIds; + + return $this; + } + + public function selfUnread(bool $selfUnread): static + { + $this->options['selfUnread'] = $selfUnread; + + return $this; + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransport.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransport.php new file mode 100644 index 0000000000000..2d6f61c871aa8 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransport.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork; + +use Symfony\Component\Notifier\Exception\TransportException; +use Symfony\Component\Notifier\Exception\TransportExceptionInterface; +use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException; +use Symfony\Component\Notifier\Message\ChatMessage; +use Symfony\Component\Notifier\Message\MessageInterface; +use Symfony\Component\Notifier\Message\SentMessage; +use Symfony\Component\Notifier\Transport\AbstractTransport; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; +use Symfony\Contracts\HttpClient\HttpClientInterface; + +/** + * @author Ippei Sumida + */ +class ChatworkTransport extends AbstractTransport +{ + protected const HOST = 'api.chatwork.com'; + + private string $apiToken; + private string $roomId; + + public function __construct(string $apiToken, string $roomId, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null) + { + $this->apiToken = $apiToken; + $this->roomId = $roomId; + parent::__construct($client, $dispatcher); + } + + public function __toString(): string + { + return sprintf('chatwork://%s?room_id=%s', $this->getEndpoint(), $this->roomId); + } + + public function supports(MessageInterface $message): bool + { + return $message instanceof ChatMessage && (null === $message->getOptions() || $message->getOptions() instanceof ChatworkOptions); + } + + protected function doSend(MessageInterface $message): SentMessage + { + if (!$message instanceof ChatMessage) { + throw new UnsupportedMessageTypeException(__CLASS__, ChatMessage::class, $message); + } + + $messageOptions = $message->getOptions(); + $options = $messageOptions ? $messageOptions->toArray() : []; + + $bodyBuilder = new ChatworkMessageBodyBuilder(); + if (\array_key_exists('to', $options)) { + $bodyBuilder->to($options['to']); + } + if (\array_key_exists('selfUnread', $options)) { + $bodyBuilder->selfUnread($options['selfUnread']); + } + + $messageBody = $bodyBuilder + ->body($message->getSubject()) + ->getMessageBody(); + + $endpoint = sprintf('https://%s/v2/rooms/%s/messages', $this->getEndpoint(), $this->roomId); + $response = $this->client->request('POST', $endpoint, [ + 'body' => $messageBody, + 'headers' => [ + 'X-ChatWorkToken' => $this->apiToken, + 'Content-Type' => 'application/x-www-form-urlencoded', + ], + ]); + + try { + $statusCode = $response->getStatusCode(); + } catch (TransportExceptionInterface $e) { + throw new TransportException('Could not reach the remote Chatwork server.', $response, 0, $e); + } + + if (200 !== $statusCode) { + $originalContent = $message->getSubject(); + $result = $response->toArray(false); + $errors = $result['errors']; + throw new TransportException(sprintf('Unable to post the Chatwork message: "%s" (%d: %s).', $originalContent, $statusCode, implode(', ', $errors)), $response); + } + + return new SentMessage($message, (string) $this); + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransportFactory.php new file mode 100644 index 0000000000000..db7f17abb9ef2 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/ChatworkTransportFactory.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork; + +use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; +use Symfony\Component\Notifier\Transport\AbstractTransportFactory; +use Symfony\Component\Notifier\Transport\Dsn; + +/** + * @author Ippei Sumida getScheme(); + if (self::SCHEME !== $scheme) { + throw new UnsupportedSchemeException($dsn, self::SCHEME, $this->getSupportedSchemes()); + } + + $token = $this->getUser($dsn); + $roomId = $dsn->getRequiredOption('room_id'); + $host = 'default' === $dsn->getHost() ? null : $dsn->getHost(); + $port = $dsn->getPort(); + + return (new ChatworkTransport($token, $roomId, $this->client, $this->dispatcher))->setHost($host)->setPort($port); + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/LICENSE b/src/Symfony/Component/Notifier/Bridge/Chatwork/LICENSE new file mode 100644 index 0000000000000..0ece8964f767d --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2022 Fabien Potencier + +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. diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/README.md b/src/Symfony/Component/Notifier/Bridge/Chatwork/README.md new file mode 100644 index 0000000000000..6c61e1565a0d9 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/README.md @@ -0,0 +1,19 @@ +Chatwork Notifier +================= + +Provides [Chatwork](https://go.chatwork.com/) integration for Symfony Notifier. + +DSN example +----------- + +``` +CHATWORK_DSN=chatwork://API_TOKEN@default?room_id=ID +``` + +Resources +--------- + + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkMessageBodyBuilderTest.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkMessageBodyBuilderTest.php new file mode 100644 index 0000000000000..07e09150406db --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkMessageBodyBuilderTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkMessageBodyBuilder; + +class ChatworkMessageBodyBuilderTest extends TestCase +{ + public function testSetTo() + { + $builder = new ChatworkMessageBodyBuilder(); + $builder->to(['abc', 'def']); + $property = new \ReflectionProperty($builder, 'to'); + $property->setAccessible(true); + $this->assertSame(['abc', 'def'], $property->getValue($builder)); + $builder->to('ghi'); + $this->assertSame(['ghi'], $property->getValue($builder)); + } + + public function testSetSelfUnread() + { + $builder = new ChatworkMessageBodyBuilder(); + $builder->selfUnread(true); + $property = new \ReflectionProperty($builder, 'selfUnread'); + $property->setAccessible(true); + $this->assertTrue($property->getValue($builder)); + } + + public function testSetBody() + { + $builder = new ChatworkMessageBodyBuilder(); + $builder->body('test body'); + $property = new \ReflectionProperty($builder, 'body'); + $property->setAccessible(true); + $this->assertEquals('test body', $property->getValue($builder)); + } + + public function testGetMessageBody() + { + $builder = new ChatworkMessageBodyBuilder(); + $builder + ->to(['abc', 'def']) + ->selfUnread(true) + ->body('test body') + ; + + $expectedBody = << $expectedBody, + 'self_unread' => true, + ]; + $this->assertEquals($expected, $builder->getMessageBody()); + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkOptionsTest.php new file mode 100644 index 0000000000000..f194b37fb7f63 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkOptionsTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkOptions; + +class ChatworkOptionsTest extends TestCase +{ + public function testSetTo() + { + $options = new ChatworkOptions(); + $options->to(['abc', 'def']); + $this->assertSame(['to' => ['abc', 'def']], $options->toArray()); + + $options->to('ghi'); + $this->assertSame(['to' => 'ghi'], $options->toArray()); + } + + public function testSetSelfUnread() + { + $options = new ChatworkOptions(); + $options->selfUnread(true); + $this->assertSame(['selfUnread' => true], $options->toArray()); + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportFactoryTest.php new file mode 100644 index 0000000000000..421ccb4042f3f --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportFactoryTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork\Tests; + +use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkTransportFactory; +use Symfony\Component\Notifier\Test\TransportFactoryTestCase; +use Symfony\Component\Notifier\Transport\TransportFactoryInterface; + +class ChatworkTransportFactoryTest extends TransportFactoryTestCase +{ + public function createFactory(): TransportFactoryInterface + { + return new ChatworkTransportFactory(); + } + + public function supportsProvider(): iterable + { + yield [true, 'chatwork://host?room_id=testRoomId']; + yield [false, 'somethingElse://host?room_id=testRoomId']; + } + + public function createProvider(): iterable + { + yield [ + 'chatwork://host.test?room_id=testRoomId', + 'chatwork://token@host.test?room_id=testRoomId', + ]; + } + + public function incompleteDsnProvider(): iterable + { + yield 'missing token' => ['chatwork://host.test?room_id=testRoomId']; + } + + public function missingRequiredOptionProvider(): iterable + { + yield 'missing option: room_id' => ['chatwork://token@host']; + } + + public function unsupportedSchemeProvider(): iterable + { + yield ['somethingElse://token@host?room_id=testRoomId']; + yield ['somethingElse://token@host']; // missing "room_id" option + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportTest.php new file mode 100644 index 0000000000000..08db6b056bef4 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/Tests/ChatworkTransportTest.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Notifier\Bridge\Chatwork\Tests; + +use Symfony\Component\HttpClient\MockHttpClient; +use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkTransport; +use Symfony\Component\Notifier\Exception\TransportException; +use Symfony\Component\Notifier\Message\ChatMessage; +use Symfony\Component\Notifier\Message\MessageInterface; +use Symfony\Component\Notifier\Message\SmsMessage; +use Symfony\Component\Notifier\Test\TransportTestCase; +use Symfony\Component\Notifier\Transport\TransportInterface; +use Symfony\Contracts\HttpClient\HttpClientInterface; +use Symfony\Contracts\HttpClient\ResponseInterface; + +class ChatworkTransportTest extends TransportTestCase +{ + public function createTransport(HttpClientInterface $client = null): TransportInterface + { + return (new ChatworkTransport('testToken', 'testRoomId', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); + } + + public function toStringProvider(): iterable + { + yield ['chatwork://host.test?room_id=testRoomId', $this->createTransport()]; + } + + public function supportedMessagesProvider(): iterable + { + yield [new ChatMessage('Hello!')]; + } + + public function unsupportedMessagesProvider(): iterable + { + yield [new SmsMessage('0611223344', 'Hello!')]; + yield [$this->createMock(MessageInterface::class)]; + } + + public function testWithErrorResponseThrows() + { + $response = $this->createMock(ResponseInterface::class); + $response->expects($this->exactly(2)) + ->method('getStatusCode') + ->willReturn(400); + $response->expects($this->once()) + ->method('getContent') + ->willReturn(json_encode(['errors' => ['first error', 'second error']])); + + $client = new MockHttpClient(static function () use ($response): ResponseInterface { + return $response; + }); + + $transport = $this->createTransport($client); + + $this->expectException(TransportException::class); + $this->expectExceptionMessageMatches('/first error, second error/'); + + $transport->send(new ChatMessage('testMessage')); + } +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/composer.json b/src/Symfony/Component/Notifier/Bridge/Chatwork/composer.json new file mode 100644 index 0000000000000..fc152cf076937 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/composer.json @@ -0,0 +1,30 @@ +{ + "name": "symfony/chatwork-notifier", + "type": "symfony-notifier-bridge", + "description": "Provides Chatwork integration for Symfony Notifier.", + "keywords": ["chatwork", "notifier", "chat", "sms"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Ippei Sumida", + "email": "ippey.s@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=8.1", + "symfony/http-client": "^5.4|^6.0", + "symfony/notifier": "^6.2" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Notifier\\Bridge\\Chatwork\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev" +} diff --git a/src/Symfony/Component/Notifier/Bridge/Chatwork/phpunit.xml.dist b/src/Symfony/Component/Notifier/Bridge/Chatwork/phpunit.xml.dist new file mode 100644 index 0000000000000..155be9021e7b4 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Chatwork/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/src/Symfony/Component/Notifier/Transport.php b/src/Symfony/Component/Notifier/Transport.php index 8389474e1468c..b9829b8ebdf68 100644 --- a/src/Symfony/Component/Notifier/Transport.php +++ b/src/Symfony/Component/Notifier/Transport.php @@ -13,6 +13,7 @@ use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; +use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkTransportFactory; use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; use Symfony\Component\Notifier\Bridge\ContactEveryone\ContactEveryoneTransportFactory; use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; @@ -73,6 +74,7 @@ final class Transport private const FACTORY_CLASSES = [ AllMySmsTransportFactory::class, AmazonSnsTransportFactory::class, + ChatworkTransportFactory::class, ClickatellTransportFactory::class, ContactEveryoneTransportFactory::class, DiscordTransportFactory::class, From f90525ceda5b6716d14fccca76ad32e7a53838ed Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Tue, 23 Aug 2022 12:27:53 +0200 Subject: [PATCH 0026/1170] Handle INI arrays --- .../Component/DependencyInjection/Loader/IniFileLoader.php | 6 +++++- .../DependencyInjection/Tests/Fixtures/ini/types.ini | 4 ++++ .../DependencyInjection/Tests/Loader/IniFileLoaderTest.php | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php index 0a3e86b73399a..2115217909e8d 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php @@ -38,7 +38,11 @@ public function load(mixed $resource, string $type = null): mixed if (isset($result['parameters']) && \is_array($result['parameters'])) { foreach ($result['parameters'] as $key => $value) { - $this->container->setParameter($key, $this->phpize($value)); + if (\is_array($value)) { + $this->container->setParameter($key, array_map([$this, 'phpize'], $value)); + } else { + $this->container->setParameter($key, $this->phpize($value)); + } } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types.ini b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types.ini index 75840907d277a..a2868c8eecbff 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types.ini +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types.ini @@ -26,3 +26,7 @@ -120.0 = -1.2E2 -10100.1 = -10100.1 -10,100.1 = -10,100.1 + list[] = 1 + list[] = 2 + map[one] = 1 + map[two] = 2 diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php index 07f23f3137af5..e9c1ca3a76b1e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -88,6 +88,8 @@ public function getTypeConversions() ['-120.0', -1.2E2, false], // not supported by INI_SCANNER_TYPED ['-10100.1', -10100.1, false], // not supported by INI_SCANNER_TYPED ['-10,100.1', '-10,100.1', true], + ['list', [1, 2], true], + ['map', ['one' => 1, 'two' => 2], true], ]; } From cf0b56f18463e236bfa503178cbcebdf13aa414d Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 26 Aug 2022 15:50:20 +0200 Subject: [PATCH 0027/1170] Make bash completion run in non interactive mode --- src/Symfony/Component/Console/Resources/completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Resources/completion.bash b/src/Symfony/Component/Console/Resources/completion.bash index fba46070cdebe..bf3edf511b2cb 100644 --- a/src/Symfony/Component/Console/Resources/completion.bash +++ b/src/Symfony/Component/Console/Resources/completion.bash @@ -24,7 +24,7 @@ _sf_{{ COMMAND_NAME }}() { local cur prev words cword _get_comp_words_by_ref -n := cur prev words cword - local completecmd=("$sf_cmd" "_complete" "-sbash" "-c$cword" "-S{{ VERSION }}") + local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-S{{ VERSION }}") for w in ${words[@]}; do w=$(printf -- '%b' "$w") # remove quotes from typed values From 1b904ec781ecc60ba81cae5e588dbf1f3248b592 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:34:43 +0200 Subject: [PATCH 0028/1170] Update CHANGELOG for 4.4.45 --- CHANGELOG-4.4.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG-4.4.md b/CHANGELOG-4.4.md index 9e6451685ab5c..b3498d37227df 100644 --- a/CHANGELOG-4.4.md +++ b/CHANGELOG-4.4.md @@ -7,6 +7,24 @@ in 4.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.4.0...v4.4.1 +* 4.4.45 (2022-08-26) + + * bug #47358 Fix broken request stack state if throwable is thrown. (Warxcell) + * bug #47304 [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder (Guite) + * bug #47329 Email image parts: regex for single closing quote (rr-it) + * bug #47200 [Form] ignore missing keys when mapping DateTime objects to uninitialized arrays (xabbuh) + * bug #47189 [Validator] Add additional hint when `egulias/email-validator` needs to be installed (mpdude) + * bug #47195 [FrameworkBundle] fix writes to static $kernel property (xabbuh) + * bug #47175 [DowCrawler] Fix locale-sensitivity of whitespace normalization (nicolas-grekas) + * bug #47171 [TwigBridge] suggest to install the Twig bundle when the required component is already installed (xabbuh) + * bug #47161 [Mailer] Fix logic (fabpot) + * bug #47157 [Messenger] Fix Doctrine transport on MySQL (nicolas-grekas) + * bug #46190 [Translation] Fix translator overlapse (Xavier RENAUDIN) + * bug #47142 [Mailer] Fix error message in case of an STMP error (fabpot) + * bug #47145 [HttpClient] Fix shared connections not being freed on PHP < 8 (nicolas-grekas) + * bug #47143 [HttpClient] Fix memory leak when using StreamWrapper (nicolas-grekas) + * bug #47130 [HttpFoundation] Fix invalid ID not regenerated with native PHP file sessions (BrokenSourceCode) + * 4.4.44 (2022-07-29) * bug #47069 [Security] Allow redirect after login to absolute URLs (Tim Ward) From ce345c5469972594dcc7e7dc73710a3344c40101 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:34:47 +0200 Subject: [PATCH 0029/1170] Update CONTRIBUTORS for 4.4.45 --- CONTRIBUTORS.md | 68 +++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 99d8c121d9fce..167d559dc9e9f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -24,8 +24,8 @@ The Symfony Connect username in parenthesis allows to get more information - Yonel Ceruto (yonelceruto) - Tobias Nyholm (tobias) - Oskar Stark (oskarstark) - - Ryan Weaver (weaverryan) - Javier Eguiluz (javier.eguiluz) + - Ryan Weaver (weaverryan) - Johannes S (johannes) - Jakub Zalas (jakubzalas) - Kris Wallsmith (kriswallsmith) @@ -43,9 +43,9 @@ The Symfony Connect username in parenthesis allows to get more information - Martin Hasoň (hason) - Jérôme Tamarelle (gromnan) - Jeremy Mikola (jmikola) + - Kevin Bond (kbond) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) - - Kevin Bond (kbond) - Igor Wiedler - Valentin Udaltsov (vudaltsov) - Vasilij Duško (staff) @@ -84,8 +84,8 @@ The Symfony Connect username in parenthesis allows to get more information - Sarah Khalil (saro0h) - Konstantin Kudryashov (everzet) - Vincent Langlet (deviling) - - Bilal Amarni (bamarni) - Tomas Norkūnas (norkunas) + - Bilal Amarni (bamarni) - Eriksen Costa - Florin Patan (florinpatan) - Peter Rehm (rpet) @@ -95,14 +95,14 @@ The Symfony Connect username in parenthesis allows to get more information - Julien Falque (julienfalque) - Massimiliano Arione (garak) - Douglas Greenshields (shieldo) - - Christian Raue - David Buchmann (dbu) + - Christian Raue + - Jáchym Toušek (enumag) - Graham Campbell (graham) - Michel Weimerskirch (mweimerskirch) - Eric Clemmons (ericclemmons) - Issei Murasawa (issei_m) - Fran Moreno (franmomu) - - Jáchym Toušek (enumag) - Malte Schlüter (maltemaltesich) - Mathias Arlaud (mtarld) - Vasilij Dusko @@ -114,8 +114,8 @@ The Symfony Connect username in parenthesis allows to get more information - Dariusz Górecki (canni) - Maxime Helias (maxhelias) - Ener-Getick - - Sebastiaan Stok (sstok) - Ruud Kamphuis (ruudk) + - Sebastiaan Stok (sstok) - Jérôme Vasseur (jvasseur) - Ion Bazan (ionbazan) - Lee McDermott @@ -134,6 +134,7 @@ The Symfony Connect username in parenthesis allows to get more information - Konstantin.Myakshin - Rokas Mikalkėnas (rokasm) - Arman Hosseini (arman) + - Antoine Lamirault - Arnaud Le Blanc (arnaud-lb) - Maxime STEINHAUSSER - Peter Kokot (maastermedia) @@ -146,10 +147,10 @@ The Symfony Connect username in parenthesis allows to get more information - YaFou - Gary PEGEOT (gary-p) - Chris Wilkinson (thewilkybarkid) + - Mathieu Lechat (mat_the_cat) - Brice BERNARD (brikou) - Roman Martinuk (a2a4) - Gregor Harlan (gharlan) - - Antoine Lamirault - Baptiste Clavié (talus) - Adrien Brault (adrienbrault) - Michal Piotrowski @@ -161,7 +162,6 @@ The Symfony Connect username in parenthesis allows to get more information - Włodzimierz Gajda (gajdaw) - Christian Scheb - Guillaume (guill) - - Mathieu Lechat (mat_the_cat) - Tugdual Saunier (tucksaun) - Jacob Dreesen (jdreesen) - Joel Wurtz (brouznouf) @@ -173,6 +173,7 @@ The Symfony Connect username in parenthesis allows to get more information - Javier Spagnoletti (phansys) - excelwebzone - Jérôme Parmentier (lctrs) + - Jeroen Spee (jeroens) - HeahDude - Richard van Laak (rvanlaak) - Paráda József (paradajozsef) @@ -180,7 +181,6 @@ The Symfony Connect username in parenthesis allows to get more information - Alexander Schwenn (xelaris) - Fabien Pennequin (fabienpennequin) - Gordon Franke (gimler) - - Jeroen Spee (jeroens) - Christopher Hertel (chertel) - Gabriel Caruso - Anthony GRASSIOT (antograssiot) @@ -207,6 +207,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jhonny Lidfors (jhonne) - Martin Hujer (martinhujer) - Wouter J + - Guilliam Xavier - Timo Bakx (timobakx) - Juti Noppornpitak (shiroyuki) - Joe Bennett (kralos) @@ -215,6 +216,7 @@ The Symfony Connect username in parenthesis allows to get more information - Colin O'Dell (colinodell) - Sebastian Hörl (blogsh) - Ben Davies (bendavies) + - Andreas Schempp (aschempp) - François-Xavier de Guillebon (de-gui_f) - Daniel Gomes (danielcsgomes) - Michael Käfer (michael_kaefer) @@ -223,11 +225,10 @@ The Symfony Connect username in parenthesis allows to get more information - Arnaud Kleinpeter (nanocom) - Guilherme Blanco (guilhermeblanco) - Chi-teck - - Guilliam Xavier + - Antonio Pauletich (x-coder264) - Nate Wiebe (natewiebe13) - Michael Voříšek - SpacePossum - - Andreas Schempp (aschempp) - Pablo Godel (pgodel) - Romaric Drigon (romaricdrigon) - Andréia Bohner (andreia) @@ -239,7 +240,6 @@ The Symfony Connect username in parenthesis allows to get more information - jwdeitch - Jurica Vlahoviček (vjurica) - David Prévot - - Antonio Pauletich (x-coder264) - Vincent Touzet (vincenttouzet) - Fabien Bourigault (fbourigault) - Farhad Safarov (safarov) @@ -373,9 +373,11 @@ The Symfony Connect username in parenthesis allows to get more information - Emanuele Panzeri (thepanz) - Matthew Smeets - François Zaninotto (fzaninotto) + - Alexis Lefebvre - Dustin Whittle (dustinwhittle) - jeff - John Kary (johnkary) + - Bob van de Vijver (bobvandevijver) - smoench - Michele Orselli (orso) - Sven Paulus (subsven) @@ -397,8 +399,10 @@ The Symfony Connect username in parenthesis allows to get more information - Fabien S (bafs) - Victor Bocharsky (bocharsky_bw) - Sébastien Alfaiate (seb33300) + - Jan Sorgalla (jsor) - henrikbjorn - Alex Bowers + - Simon Podlipsky (simpod) - Marcel Beerta (mazen) - Phil Taylor (prazgod) - flack (flack) @@ -426,7 +430,6 @@ The Symfony Connect username in parenthesis allows to get more information - Iker Ibarguren (ikerib) - Manuel Reinhard (sprain) - Johann Pardanaud - - Alexis Lefebvre - Indra Gunawan (indragunawan) - Tim Goudriaan (codedmonkey) - Harm van Tilborg (hvt) @@ -444,7 +447,6 @@ The Symfony Connect username in parenthesis allows to get more information - Xavier Montaña Carreras (xmontana) - Tarmo Leppänen (tarlepp) - AnneKir - - Bob van de Vijver (bobvandevijver) - Tobias Weichart - Miro Michalicka - M. Vondano @@ -473,12 +475,10 @@ The Symfony Connect username in parenthesis allows to get more information - Félix Labrecque (woodspire) - GordonsLondon - Roman Anasal - - Jan Sorgalla (jsor) - Piotr Kugla (piku235) - Quynh Xuan Nguyen (seriquynh) - Ray - Philipp Cordes (corphi) - - Simon Podlipsky (simpod) - Chekote - bhavin (bhavin4u) - Pavel Popov (metaer) @@ -495,12 +495,14 @@ The Symfony Connect username in parenthesis allows to get more information - Thomas Schulz (king2500) - Benjamin Morel - Bernd Stellwag + - Romain Monteil (ker0x) - Frank de Jonge - Chris Tanaskoski - julien57 - Loïc Frémont (loic425) - Ben Ramsey (ramsey) - Matthieu Auger (matthieuauger) + - Kévin THERAGE (kevin_therage) - Josip Kruslin (jkruslin) - Giorgio Premi - renanbr @@ -526,6 +528,7 @@ The Symfony Connect username in parenthesis allows to get more information - Michael Holm (hollo) - Giso Stallenberg (gisostallenberg) - Blanchon Vincent (blanchonvincent) + - William Arslett (warslett) - Christian Schmidt - Gonzalo Vilaseca (gonzalovilaseca) - Vadim Borodavko (javer) @@ -575,7 +578,6 @@ The Symfony Connect username in parenthesis allows to get more information - Marko Kaznovac (kaznovac) - Emanuele Gaspari (inmarelibero) - Dariusz Rumiński - - Romain Monteil (ker0x) - Terje Bråten - Gennadi Janzen - James Hemery @@ -599,7 +601,6 @@ The Symfony Connect username in parenthesis allows to get more information - Fractal Zombie - Gunnstein Lye (glye) - Thomas Talbot (ioni) - - Kévin THERAGE (kevin_therage) - Noémi Salaün (noemi-salaun) - Michel Hunziker - Krystian Marcisz (simivar) @@ -623,6 +624,7 @@ The Symfony Connect username in parenthesis allows to get more information - Thomas Royer (cydonia7) - Gildas Quéméner (gquemener) - Nicolas LEFEVRE (nicoweb) + - Asmir Mustafic (goetas) - Martins Sipenko - Guilherme Augusto Henschel - Mardari Dorel (dorumd) @@ -662,7 +664,6 @@ The Symfony Connect username in parenthesis allows to get more information - “Filip - Simon Watiau (simonwatiau) - Ruben Jacobs (rubenj) - - William Arslett - Arkadius Stefanski (arkadius) - Jérémy M (th3mouk) - Terje Bråten @@ -700,6 +701,7 @@ The Symfony Connect username in parenthesis allows to get more information - Philipp Kräutli (pkraeutli) - Carl Casbolt (carlcasbolt) - battye + - BrokenSourceCode - Grzegorz (Greg) Zdanowski (kiler129) - Kirill chEbba Chebunin - kylekatarnls (kylekatarnls) @@ -850,7 +852,6 @@ The Symfony Connect username in parenthesis allows to get more information - Arturs Vonda - Xavier Briand (xavierbriand) - Daniel Badura - - Asmir Mustafic (goetas) - vagrant - Asier Illarramendi (doup) - AKeeman (akeeman) @@ -861,6 +862,7 @@ The Symfony Connect username in parenthesis allows to get more information - Chris Sedlmayr (catchamonkey) - Kamil Kokot (pamil) - Seb Koelen + - FORT Pierre-Louis (plfort) - Christoph Mewes (xrstf) - Vitaliy Tverdokhlib (vitaliytv) - Ariel Ferrandini (aferrandini) @@ -900,7 +902,6 @@ The Symfony Connect username in parenthesis allows to get more information - Pablo Díez (pablodip) - Damien Fa - Kevin McBride - - BrokenSourceCode - Sergio Santoro - Philipp Rieber (bicpi) - Dennis Væversted (srnzitcom) @@ -988,6 +989,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ziumin - Matthias Schmidt - Lenar Lõhmus + - Samaël Villette (samadu61) - Zach Badgett (zachbadgett) - Loïc Faugeron - Aurélien Fredouelle @@ -1049,6 +1051,7 @@ The Symfony Connect username in parenthesis allows to get more information - Simon DELICATA - Thibault Buathier (gwemox) - vitaliytv + - Andreas Hennings - Arnaud Frézet - Nicolas Martin (cocorambo) - luffy1727 @@ -1136,6 +1139,7 @@ The Symfony Connect username in parenthesis allows to get more information - David Fuhr - Evgeny Anisiforov - TristanPouliquen + - Gwendolen Lynch - mwos - Aurimas Niekis (gcds) - Volker Killesreiter (ol0lll) @@ -1189,7 +1193,6 @@ The Symfony Connect username in parenthesis allows to get more information - Chris Heng (gigablah) - Oleksii Svitiashchuk - Tristan Bessoussa (sf_tristanb) - - FORT Pierre-Louis (plfort) - Richard Bradley - Nathanaël Martel (nathanaelmartel) - Nicolas Jourdan (nicolasjc) @@ -1259,6 +1262,7 @@ The Symfony Connect username in parenthesis allows to get more information - Aleksandr Dankovtsev - Maciej Zgadzaj - David Legatt (dlegatt) + - Maarten de Boer (mdeboer) - Cameron Porter - Hossein Bukhamsin - Oliver Hoff @@ -1463,6 +1467,7 @@ The Symfony Connect username in parenthesis allows to get more information - bill moll - PaoRuby - Bizley + - Edvin Hultberg - Dominik Piekarski (dompie) - Rares Sebastian Moldovan (raresmldvn) - Felds Liscia (felds) @@ -1773,7 +1778,6 @@ The Symfony Connect username in parenthesis allows to get more information - Pierre-Olivier Vares (povares) - Ronny López (ronnylt) - Julius (sakalys) - - Samaël Villette (samadu61) - abdul malik ikhsan (samsonasik) - Dmitry (staratel) - Tito Miguel Costa (titomiguelcosta) @@ -1956,6 +1960,7 @@ The Symfony Connect username in parenthesis allows to get more information - Daniel Alejandro Castro Arellano (lexcast) - Aleksandar Dimitrov (netbull) - Gary Houbre (thegarious) + - Florent Morselli - Thomas Jarrand - Baptiste Leduc (bleduc) - Antoine Bluchet (soyuka) @@ -2053,6 +2058,7 @@ The Symfony Connect username in parenthesis allows to get more information - Pablo Borowicz - Máximo Cuadros (mcuadros) - Lukas Mencl + - EXT - THERAGE Kevin - tamirvs - gauss - julien.galenski @@ -2067,6 +2073,7 @@ The Symfony Connect username in parenthesis allows to get more information - Goran Juric - Laurent G. (laurentg) - Nicolas Macherey + - Asil Barkin Elik (asilelik) - Bhujagendra Ishaya - Guido Donnari - Mert Simsek (mrtsmsk0) @@ -2097,6 +2104,7 @@ The Symfony Connect username in parenthesis allows to get more information - Dan Finnie - Ken Marfilla (marfillaster) - Max Grigorian (maxakawizard) + - allison guilhem - benatespina (benatespina) - Denis Kop - Jean-Guilhem Rouel (jean-gui) @@ -2130,6 +2138,7 @@ The Symfony Connect username in parenthesis allows to get more information - Tadas Gliaubicas (tadcka) - Thanos Polymeneas (thanos) - Benoit Garret + - HellFirePvP - Maximilian Ruta (deltachaos) - Jakub Sacha - Olaf Klischat @@ -2194,6 +2203,7 @@ The Symfony Connect username in parenthesis allows to get more information - Philipp Kretzschmar - Ilya Vertakov - Brooks Boyd + - Axel Venet - Roger Webb - Dmitriy Simushev - Pawel Smolinski @@ -2201,7 +2211,6 @@ The Symfony Connect username in parenthesis allows to get more information - Oxan van Leeuwen - pkowalczyk - Soner Sayakci - - Andreas Hennings - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) - Raul Rodriguez (raul782) @@ -2238,6 +2247,7 @@ The Symfony Connect username in parenthesis allows to get more information - Dmitri Petmanson - heccjj - Alexandre Melard + - AlbinoDrought - Jay Klehr - Sergey Yuferev - Tobias Stöckler @@ -2247,6 +2257,7 @@ The Symfony Connect username in parenthesis allows to get more information - cilefen (cilefen) - Mo Di (modi) - Pablo Schläpfer + - Xavier RENAUDIN - Christian Wahler (christian) - Jelte Steijaert (jelte) - David Négrier (moufmouf) @@ -2268,6 +2279,7 @@ The Symfony Connect username in parenthesis allows to get more information - Malaney J. Hill - Patryk Kozłowski - Alexandre Pavy + - Tim Ward - Christian Flach (cmfcmf) - Lars Ambrosius Wallenborn (larsborn) - Oriol Mangas Abellan (oriolman) @@ -2282,6 +2294,7 @@ The Symfony Connect username in parenthesis allows to get more information - Mihai Nica (redecs) - Andrei Igna - azine + - Wojciech Zimoń - Pierre Tachoire - Dawid Sajdak - Ludek Stepan @@ -2363,6 +2376,7 @@ The Symfony Connect username in parenthesis allows to get more information - Daniel Kay (danielkay-cp) - Matt Daum (daum) - Alberto Pirovano (geezmo) + - Pascal Woerde (pascalwoerde) - Pete Mitchell (peterjmit) - Tom Corrigan (tomcorrigan) - Luis Galeas @@ -2479,6 +2493,7 @@ The Symfony Connect username in parenthesis allows to get more information - Keith Maika - Mephistofeles - Hoffmann András + - Cédric Anne - LubenZA - Flavian Sierk - Michael Bessolov @@ -2508,7 +2523,6 @@ The Symfony Connect username in parenthesis allows to get more information - Alex Teterin (errogaht) - Gunnar Lium (gunnarlium) - Malte Wunsch (maltewunsch) - - Maarten de Boer (mdeboer) - Tiago Garcia (tiagojsag) - Artiom - Jakub Simon @@ -2635,6 +2649,7 @@ The Symfony Connect username in parenthesis allows to get more information - Andy Stanberry - Felix Marezki - Normunds + - Walter Doekes - Thomas Rothe - Troy Crawford - nietonfir @@ -2952,7 +2967,6 @@ The Symfony Connect username in parenthesis allows to get more information - temperatur - Paul Andrieux - Cas - - Gwendolen Lynch - ghazy ben ahmed - Karolis - Myke79 @@ -3051,6 +3065,7 @@ The Symfony Connect username in parenthesis allows to get more information - Shude - Ondřej Führer - Sema + - Ayke Halder - Thorsten Hallwas - Brian Freytag - Alex Nostadt @@ -3062,7 +3077,6 @@ The Symfony Connect username in parenthesis allows to get more information - Yuriy Potemkin - Emilie Lorenzo - enomotodev - - Edvin Hultberg - Vincent - Benjamin Long - Ben Miller From 6ba69e892ff98236fd3c7cfc0e08cb02958b414a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:34:48 +0200 Subject: [PATCH 0030/1170] Update VERSION for 4.4.45 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 3a699112e1a5d..adb9a94727c5e 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - public const VERSION = '4.4.45-DEV'; + public const VERSION = '4.4.45'; public const VERSION_ID = 40445; public const MAJOR_VERSION = 4; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 45; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2022'; public const END_OF_LIFE = '11/2023'; From d82f7dfe83718d244067cd91268a6b529a508451 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:40:14 +0200 Subject: [PATCH 0031/1170] Bump Symfony version to 4.4.46 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index adb9a94727c5e..09c0f681629f6 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - public const VERSION = '4.4.45'; - public const VERSION_ID = 40445; + public const VERSION = '4.4.46-DEV'; + public const VERSION_ID = 40446; public const MAJOR_VERSION = 4; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 45; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 46; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2022'; public const END_OF_LIFE = '11/2023'; From 457c2b56f6d928e76892bfcb25a9abc9e519cbdb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:40:35 +0200 Subject: [PATCH 0032/1170] Update CHANGELOG for 5.4.12 --- CHANGELOG-5.4.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CHANGELOG-5.4.md b/CHANGELOG-5.4.md index 16ce00ef58d71..184bbd447c979 100644 --- a/CHANGELOG-5.4.md +++ b/CHANGELOG-5.4.md @@ -7,6 +7,40 @@ in 5.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v5.4.0...v5.4.1 +* 5.4.12 (2022-08-26) + + * bug #47391 [LokaliseBridge] Fix push command --delete-missing options when there are no missing messages (rwionczek) + * bug #47368 [Security] Count remember me cookie parts before accessing the second (MatTheCat) + * bug #47358 Fix broken request stack state if throwable is thrown. (Warxcell) + * bug #47304 [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder (Guite) + * bug #47329 Email image parts: regex for single closing quote (rr-it) + * bug #47283 [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones (MatTheCat) + * bug #47128 [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum (allison guilhem) + * bug #47273 [HttpFoundation] Do not send Set-Cookie header twice for deleted session cookie (X-Coder264) + * bug #47255 [Serializer] Fix get accessor regex in AnnotationLoader (jsor) + * bug #47238 [HttpKernel] Fix passing `null` to `\trim()` method in LoggerDataCollector (SVillette) + * bug #47216 [Translation] Crowdin provider throw Exception when status is 50x (alamirault) + * bug #47209 Always attempt to listen for notifications (goetas) + * bug #47211 [Validator] validate nested constraints only if they are in the same group (xabbuh) + * bug #47218 [Console] fix dispatch signal event check for compatibility with the contract interface (xabbuh) + * bug #47200 [Form] ignore missing keys when mapping DateTime objects to uninitialized arrays (xabbuh) + * bug #47189 [Validator] Add additional hint when `egulias/email-validator` needs to be installed (mpdude) + * bug #47195 [FrameworkBundle] fix writes to static $kernel property (xabbuh) + * bug #47185 [String] Fix snake conversion (simPod) + * bug #47175 [DowCrawler] Fix locale-sensitivity of whitespace normalization (nicolas-grekas) + * bug #47171 [TwigBridge] suggest to install the Twig bundle when the required component is already installed (xabbuh) + * bug #47169 [Serializer] Fix throwing right exception in ArrayDenormalizer with invalid type (norkunas) + * bug #47161 [Mailer] Fix logic (fabpot) + * bug #47157 [Messenger] Fix Doctrine transport on MySQL (nicolas-grekas) + * bug #47155 [Filesystem] Remove needless `mb_*` calls (HellFirePvP) + * bug #46190 [Translation] Fix translator overlapse (Xavier RENAUDIN) + * bug #47142 [Mailer] Fix error message in case of an STMP error (fabpot) + * bug #45333 [Console] Fix ConsoleEvents::SIGNAL subscriber dispatch (GwendolenLynch) + * bug #47145 [HttpClient] Fix shared connections not being freed on PHP < 8 (nicolas-grekas) + * bug #47143 [HttpClient] Fix memory leak when using StreamWrapper (nicolas-grekas) + * bug #47130 [HttpFoundation] Fix invalid ID not regenerated with native PHP file sessions (BrokenSourceCode) + * bug #47129 [FrameworkBundle] remove the ChatterInterface alias when the chatter service is removed (xabbuh) + * 5.4.11 (2022-07-29) * bug #47069 [Security] Allow redirect after login to absolute URLs (Tim Ward) From 9b54eb7ec65f3301477675d63888e897f1f1c756 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:40:40 +0200 Subject: [PATCH 0033/1170] Update VERSION for 5.4.12 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 266492171bf64..efedd884ad5e1 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.12-DEV'; + public const VERSION = '5.4.12'; public const VERSION_ID = 50412; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 12; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From 81a2a6c5711c4450be4866b7055e2680ee8773fb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:44:24 +0200 Subject: [PATCH 0034/1170] Bump Symfony version to 5.4.13 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index efedd884ad5e1..7a7e678a4f75c 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.12'; - public const VERSION_ID = 50412; + public const VERSION = '5.4.13-DEV'; + public const VERSION_ID = 50413; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 12; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 13; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From ac1678593e29058ea53f35492e0100f6bb999cfa Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:45:36 +0200 Subject: [PATCH 0035/1170] Update CHANGELOG for 6.0.12 --- CHANGELOG-6.0.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/CHANGELOG-6.0.md b/CHANGELOG-6.0.md index 54219602ca6bb..cc075a6faef9d 100644 --- a/CHANGELOG-6.0.md +++ b/CHANGELOG-6.0.md @@ -7,6 +7,42 @@ in 6.0 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.0.0...v6.0.1 +* 6.0.12 (2022-08-26) + + * bug #47372 [Console] Fix OutputFormatterStyleStack::getCurrent return type (alamirault) + * bug #47391 [LokaliseBridge] Fix push command --delete-missing options when there are no missing messages (rwionczek) + * bug #47368 [Security] Count remember me cookie parts before accessing the second (MatTheCat) + * bug #47358 Fix broken request stack state if throwable is thrown. (Warxcell) + * bug #47304 [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder (Guite) + * bug #47329 Email image parts: regex for single closing quote (rr-it) + * bug #47335 [Security] [AbstractToken] getUserIdentifier() must return a string (mpiot) + * bug #47283 [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones (MatTheCat) + * bug #47128 [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum (allison guilhem) + * bug #47273 [HttpFoundation] Do not send Set-Cookie header twice for deleted session cookie (X-Coder264) + * bug #47255 [Serializer] Fix get accessor regex in AnnotationLoader (jsor) + * bug #47238 [HttpKernel] Fix passing `null` to `\trim()` method in LoggerDataCollector (SVillette) + * bug #47216 [Translation] Crowdin provider throw Exception when status is 50x (alamirault) + * bug #47209 Always attempt to listen for notifications (goetas) + * bug #47211 [Validator] validate nested constraints only if they are in the same group (xabbuh) + * bug #47218 [Console] fix dispatch signal event check for compatibility with the contract interface (xabbuh) + * bug #47200 [Form] ignore missing keys when mapping DateTime objects to uninitialized arrays (xabbuh) + * bug #47189 [Validator] Add additional hint when `egulias/email-validator` needs to be installed (mpdude) + * bug #47195 [FrameworkBundle] fix writes to static $kernel property (xabbuh) + * bug #47185 [String] Fix snake conversion (simPod) + * bug #47175 [DowCrawler] Fix locale-sensitivity of whitespace normalization (nicolas-grekas) + * bug #47171 [TwigBridge] suggest to install the Twig bundle when the required component is already installed (xabbuh) + * bug #47169 [Serializer] Fix throwing right exception in ArrayDenormalizer with invalid type (norkunas) + * bug #47161 [Mailer] Fix logic (fabpot) + * bug #47157 [Messenger] Fix Doctrine transport on MySQL (nicolas-grekas) + * bug #47155 [Filesystem] Remove needless `mb_*` calls (HellFirePvP) + * bug #46190 [Translation] Fix translator overlapse (Xavier RENAUDIN) + * bug #47142 [Mailer] Fix error message in case of an STMP error (fabpot) + * bug #45333 [Console] Fix ConsoleEvents::SIGNAL subscriber dispatch (GwendolenLynch) + * bug #47145 [HttpClient] Fix shared connections not being freed on PHP < 8 (nicolas-grekas) + * bug #47143 [HttpClient] Fix memory leak when using StreamWrapper (nicolas-grekas) + * bug #47130 [HttpFoundation] Fix invalid ID not regenerated with native PHP file sessions (BrokenSourceCode) + * bug #47129 [FrameworkBundle] remove the ChatterInterface alias when the chatter service is removed (xabbuh) + * 6.0.11 (2022-07-29) * bug #47069 [Security] Allow redirect after login to absolute URLs (Tim Ward) From f48f8cd6531a339e0c571f63ce2942364026d404 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:45:39 +0200 Subject: [PATCH 0036/1170] Update VERSION for 6.0.12 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 8b3106f5b93da..697a69b4bce12 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.0.12-DEV'; + public const VERSION = '6.0.12'; public const VERSION_ID = 60012; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 0; public const RELEASE_VERSION = 12; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '01/2023'; public const END_OF_LIFE = '01/2023'; From 76727127eadb9a1d51c798032d9d9984b2e3dc8c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:49:37 +0200 Subject: [PATCH 0037/1170] Bump Symfony version to 6.0.13 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 697a69b4bce12..eb53328f2c66b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.0.12'; - public const VERSION_ID = 60012; + public const VERSION = '6.0.13-DEV'; + public const VERSION_ID = 60013; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 0; - public const RELEASE_VERSION = 12; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 13; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '01/2023'; public const END_OF_LIFE = '01/2023'; From 14b9f177e5ece16520692164533ab5cb395f60fa Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:50:25 +0200 Subject: [PATCH 0038/1170] Update CHANGELOG for 6.1.4 --- CHANGELOG-6.1.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/CHANGELOG-6.1.md b/CHANGELOG-6.1.md index c8755b2eab6fb..0b83806b53047 100644 --- a/CHANGELOG-6.1.md +++ b/CHANGELOG-6.1.md @@ -7,6 +7,45 @@ in 6.1 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.1.0...v6.1.1 +* 6.1.4 (2022-08-26) + + * bug #47372 [Console] Fix OutputFormatterStyleStack::getCurrent return type (alamirault) + * bug #47391 [LokaliseBridge] Fix push command --delete-missing options when there are no missing messages (rwionczek) + * bug #47368 [Security] Count remember me cookie parts before accessing the second (MatTheCat) + * bug #47358 Fix broken request stack state if throwable is thrown. (Warxcell) + * bug #47304 [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder (Guite) + * bug #47150 [Serializer] Revert deprecation of `ContextAwareEncoderInterface` and `ContextAwareDecoderInterface` (nicolas-grekas) + * bug #47329 Email image parts: regex for single closing quote (rr-it) + * bug #47335 [Security] [AbstractToken] getUserIdentifier() must return a string (mpiot) + * bug #47283 [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones (MatTheCat) + * bug #47128 [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum (allison guilhem) + * bug #47273 [HttpFoundation] Do not send Set-Cookie header twice for deleted session cookie (X-Coder264) + * bug #47255 [Serializer] Fix get accessor regex in AnnotationLoader (jsor) + * bug #47238 [HttpKernel] Fix passing `null` to `\trim()` method in LoggerDataCollector (SVillette) + * bug #47216 [Translation] Crowdin provider throw Exception when status is 50x (alamirault) + * bug #47209 Always attempt to listen for notifications (goetas) + * bug #47211 [Validator] validate nested constraints only if they are in the same group (xabbuh) + * bug #47218 [Console] fix dispatch signal event check for compatibility with the contract interface (xabbuh) + * bug #47200 [Form] ignore missing keys when mapping DateTime objects to uninitialized arrays (xabbuh) + * bug #47189 [Validator] Add additional hint when `egulias/email-validator` needs to be installed (mpdude) + * bug #47195 [FrameworkBundle] fix writes to static $kernel property (xabbuh) + * bug #47185 [String] Fix snake conversion (simPod) + * bug #47175 [DowCrawler] Fix locale-sensitivity of whitespace normalization (nicolas-grekas) + * bug #47172 [Translation] Fix reading intl-icu domains with LocoProvider (nicolas-grekas) + * bug #47171 [TwigBridge] suggest to install the Twig bundle when the required component is already installed (xabbuh) + * bug #47169 [Serializer] Fix throwing right exception in ArrayDenormalizer with invalid type (norkunas) + * bug #47162 [Mailer] Fix error message in case of an SMTP error (fabpot) + * bug #47161 [Mailer] Fix logic (fabpot) + * bug #47157 [Messenger] Fix Doctrine transport on MySQL (nicolas-grekas) + * bug #47155 [Filesystem] Remove needless `mb_*` calls (HellFirePvP) + * bug #46190 [Translation] Fix translator overlapse (Xavier RENAUDIN) + * bug #47142 [Mailer] Fix error message in case of an STMP error (fabpot) + * bug #45333 [Console] Fix ConsoleEvents::SIGNAL subscriber dispatch (GwendolenLynch) + * bug #47145 [HttpClient] Fix shared connections not being freed on PHP < 8 (nicolas-grekas) + * bug #47143 [HttpClient] Fix memory leak when using StreamWrapper (nicolas-grekas) + * bug #47130 [HttpFoundation] Fix invalid ID not regenerated with native PHP file sessions (BrokenSourceCode) + * bug #47129 [FrameworkBundle] remove the ChatterInterface alias when the chatter service is removed (xabbuh) + * 6.1.3 (2022-07-29) * bug #47069 [Security] Allow redirect after login to absolute URLs (Tim Ward) From a8165ab09526e964ccb683d8c6c90a55285876e7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:50:30 +0200 Subject: [PATCH 0039/1170] Update VERSION for 6.1.4 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index b36b18c3a6b00..ec49d1a018616 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.1.4-DEV'; + public const VERSION = '6.1.4'; public const VERSION_ID = 60104; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 1; public const RELEASE_VERSION = 4; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '01/2023'; public const END_OF_LIFE = '01/2023'; From dee1c73f652cbb2061ea11a329586218943ab673 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Aug 2022 16:54:57 +0200 Subject: [PATCH 0040/1170] Bump Symfony version to 6.1.5 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index ec49d1a018616..69d906ccd62cf 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.1.4'; - public const VERSION_ID = 60104; + public const VERSION = '6.1.5-DEV'; + public const VERSION_ID = 60105; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 1; - public const RELEASE_VERSION = 4; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 5; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '01/2023'; public const END_OF_LIFE = '01/2023'; From b78f26b5092853dc2c5b0368a6dedb85b8e1e34b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20de=20Guillebon?= Date: Fri, 26 Aug 2022 16:01:55 +0200 Subject: [PATCH 0041/1170] Replace FILTER_VALIDATE_BOOLEAN by FILTER_VALIDATE_BOOL --- .../Bundle/FrameworkBundle/Command/AboutCommand.php | 4 ++-- src/Symfony/Component/Cache/Adapter/AbstractAdapter.php | 2 +- src/Symfony/Component/Cache/Adapter/ApcuAdapter.php | 4 ++-- src/Symfony/Component/Cache/Adapter/ChainAdapter.php | 2 +- src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php | 2 +- .../Component/Cache/Tests/Adapter/ApcuAdapterTest.php | 4 ++-- .../Cache/Tests/Adapter/MemcachedAdapterTest.php | 4 ++-- .../Component/Config/ResourceCheckerConfigCache.php | 2 +- src/Symfony/Component/Console/Command/CompleteCommand.php | 2 +- .../Component/DependencyInjection/EnvVarProcessor.php | 2 +- src/Symfony/Component/Dotenv/Dotenv.php | 2 +- src/Symfony/Component/ErrorHandler/Debug.php | 2 +- src/Symfony/Component/HttpFoundation/ParameterBag.php | 2 +- .../Session/Storage/Handler/AbstractSessionHandler.php | 2 +- .../Session/Storage/Handler/PdoSessionHandler.php | 2 +- .../Session/Storage/NativeSessionStorage.php | 2 +- .../Tests/Fixtures/response-functional/common.inc | 2 +- .../Session/Storage/Handler/PdoSessionHandlerTest.php | 2 +- .../HttpKernel/DataCollector/ConfigDataCollector.php | 4 ++-- .../HttpKernel/EventListener/ProfilerListener.php | 2 +- .../Tests/DataCollector/ConfigDataCollectorTest.php | 8 ++++---- .../Bridge/Mailjet/Transport/MailjetApiTransport.php | 2 +- .../Mailer/Transport/Smtp/EsmtpTransportFactory.php | 2 +- .../Messenger/Bridge/AmazonSqs/Transport/Connection.php | 2 +- .../Messenger/Bridge/Amqp/Transport/Connection.php | 2 +- .../Messenger/Bridge/Doctrine/Transport/Connection.php | 2 +- .../Messenger/Bridge/Redis/Transport/Connection.php | 2 +- .../Messenger/Transport/InMemoryTransportFactory.php | 2 +- .../Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php | 2 +- .../Bridge/SmsBiuras/SmsBiurasTransportFactory.php | 2 +- .../Notifier/Bridge/Smsapi/SmsapiTransportFactory.php | 4 ++-- src/Symfony/Component/PropertyAccess/PropertyAccessor.php | 2 +- src/Symfony/Component/Routing/Router.php | 2 +- src/Symfony/Component/Runtime/GenericRuntime.php | 2 +- .../Component/Runtime/Internal/BasicErrorHandler.php | 2 +- .../Component/Translation/Loader/PhpFileLoader.php | 2 +- .../Component/VarDumper/Tests/Caster/FFICasterTest.php | 2 +- 37 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php index 4b2df917db7a1..3372b4c628079 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php @@ -81,8 +81,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int ['Architecture', (\PHP_INT_SIZE * 8).' bits'], ['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'], ['Timezone', date_default_timezone_get().' ('.(new \DateTime())->format(\DateTime::W3C).')'], - ['OPcache', \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'], - ['APCu', \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'], + ['OPcache', \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL) ? 'true' : 'false'], + ['APCu', \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL) ? 'true' : 'false'], ['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'], ]; diff --git a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php index f013eee6d2140..ffb944fedfa2b 100644 --- a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php @@ -98,7 +98,7 @@ public static function createSystemCache(string $namespace, int $defaultLifetime return $opcache; } - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { + if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) { return $opcache; } diff --git a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php index d6d0246d66b2a..bf336604d06bf 100644 --- a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php @@ -49,7 +49,7 @@ public function __construct(string $namespace = '', int $defaultLifetime = 0, st public static function isSupported() { - return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN); + return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL); } protected function doFetch(array $ids): iterable @@ -78,7 +78,7 @@ protected function doHave(string $id): bool protected function doClear(string $namespace): bool { - return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) + return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) ? apcu_delete(new \APCUIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY)) : apcu_clear_cache(); } diff --git a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php index 1b42849ef0355..9ffd0e38f5d59 100644 --- a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php @@ -53,7 +53,7 @@ public function __construct(array $adapters, int $defaultLifetime = 0) if (!$adapter instanceof CacheItemPoolInterface) { throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', get_debug_type($adapter), CacheItemPoolInterface::class)); } - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { + if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) { continue; // skip putting APCu in the chain when the backend is disabled } diff --git a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php index 23949f5b3f68d..ac00d455242db 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php @@ -58,7 +58,7 @@ public static function isSupported() { self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time(); - return \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN)); + return \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOL)); } public function prune(): bool diff --git a/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php index b92613e725ae1..78ab7790e0352 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php @@ -26,10 +26,10 @@ class ApcuAdapterTest extends AdapterTestCase public function createCachePool(int $defaultLifetime = 0): CacheItemPoolInterface { - if (!\function_exists('apcu_fetch') || !filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN)) { + if (!\function_exists('apcu_fetch') || !filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL)) { $this->markTestSkipped('APCu extension is required.'); } - if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { + if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) { if ('testWithCliSapi' !== $this->getName()) { $this->markTestSkipped('apc.enable_cli=1 is required.'); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php index 7bd46427377f5..0cbe628c75759 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php @@ -142,7 +142,7 @@ public function provideServersSetting(): iterable 'localhost', 11222, ]; - if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) { + if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOL)) { yield [ 'memcached://user:password@127.0.0.1?weight=50', '127.0.0.1', @@ -159,7 +159,7 @@ public function provideServersSetting(): iterable '/var/local/run/memcached.socket', 0, ]; - if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) { + if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOL)) { yield [ 'memcached://user:password@/var/local/run/memcached.socket?weight=25', '/var/local/run/memcached.socket', diff --git a/src/Symfony/Component/Config/ResourceCheckerConfigCache.php b/src/Symfony/Component/Config/ResourceCheckerConfigCache.php index 40be86e5ec9b0..3a3e6c52bb861 100644 --- a/src/Symfony/Component/Config/ResourceCheckerConfigCache.php +++ b/src/Symfony/Component/Config/ResourceCheckerConfigCache.php @@ -128,7 +128,7 @@ public function write(string $content, array $metadata = null) } } - if (\function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) { + if (\function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL)) { @opcache_invalidate($this->file, true); } } diff --git a/src/Symfony/Component/Console/Command/CompleteCommand.php b/src/Symfony/Component/Console/Command/CompleteCommand.php index e1eac7a34b7e5..e65b334ce89db 100644 --- a/src/Symfony/Component/Console/Command/CompleteCommand.php +++ b/src/Symfony/Component/Console/Command/CompleteCommand.php @@ -76,7 +76,7 @@ protected function configure(): void protected function initialize(InputInterface $input, OutputInterface $output) { - $this->isDebug = filter_var(getenv('SYMFONY_COMPLETION_DEBUG'), \FILTER_VALIDATE_BOOLEAN); + $this->isDebug = filter_var(getenv('SYMFONY_COMPLETION_DEBUG'), \FILTER_VALIDATE_BOOL); } protected function execute(InputInterface $input, OutputInterface $output): int diff --git a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php index 25207c386aa04..c1787edfd7d57 100644 --- a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php +++ b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php @@ -216,7 +216,7 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed } if (\in_array($prefix, ['bool', 'not'], true)) { - $env = (bool) (filter_var($env, \FILTER_VALIDATE_BOOLEAN) ?: filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)); + $env = (bool) (filter_var($env, \FILTER_VALIDATE_BOOL) ?: filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)); return 'not' === $prefix ? !$env : $env; } diff --git a/src/Symfony/Component/Dotenv/Dotenv.php b/src/Symfony/Component/Dotenv/Dotenv.php index ab177c31a2693..f25b2da2687bc 100644 --- a/src/Symfony/Component/Dotenv/Dotenv.php +++ b/src/Symfony/Component/Dotenv/Dotenv.php @@ -152,7 +152,7 @@ public function bootEnv(string $path, string $defaultEnv = 'dev', array $testEnv $k = $this->debugKey; $debug = $_SERVER[$k] ?? !\in_array($_SERVER[$this->envKey], $this->prodEnvs, true); - $_SERVER[$k] = $_ENV[$k] = (int) $debug || (!\is_bool($debug) && filter_var($debug, \FILTER_VALIDATE_BOOLEAN)) ? '1' : '0'; + $_SERVER[$k] = $_ENV[$k] = (int) $debug || (!\is_bool($debug) && filter_var($debug, \FILTER_VALIDATE_BOOL)) ? '1' : '0'; } /** diff --git a/src/Symfony/Component/ErrorHandler/Debug.php b/src/Symfony/Component/ErrorHandler/Debug.php index 343a35a77b11b..8bb460d274408 100644 --- a/src/Symfony/Component/ErrorHandler/Debug.php +++ b/src/Symfony/Component/ErrorHandler/Debug.php @@ -24,7 +24,7 @@ public static function enable(): ErrorHandler if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { ini_set('display_errors', 0); - } elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || \ini_get('error_log')) { + } elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOL) || \ini_get('error_log')) { // CLI - display errors only if they're not already logged to STDERR ini_set('display_errors', 1); } diff --git a/src/Symfony/Component/HttpFoundation/ParameterBag.php b/src/Symfony/Component/HttpFoundation/ParameterBag.php index 6044dac9fad7f..72c8f0949c5d4 100644 --- a/src/Symfony/Component/HttpFoundation/ParameterBag.php +++ b/src/Symfony/Component/HttpFoundation/ParameterBag.php @@ -138,7 +138,7 @@ public function getInt(string $key, int $default = 0): int */ public function getBoolean(string $key, bool $default = false): bool { - return $this->filter($key, $default, \FILTER_VALIDATE_BOOLEAN); + return $this->filter($key, $default, \FILTER_VALIDATE_BOOL); } /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php index cfaa6c81a0bba..88e513c5ddd3f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -86,7 +86,7 @@ public function write(string $sessionId, string $data): bool public function destroy(string $sessionId): bool { - if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) { + if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL)) { if (!isset($this->sessionName)) { throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class)); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 6efdb07ff002b..9e26ac56e1249 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -593,7 +593,7 @@ protected function doRead(string $sessionId): string throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.'); } - if (!filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { + if (!filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOL) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { // In strict mode, session fixation is not possible: new sessions always start with a unique // random id, so that concurrency is not possible and this code path can be skipped. // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index d80e7436191d8..99888ba1d79d1 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -128,7 +128,7 @@ public function start(): bool throw new \RuntimeException('Failed to start the session: already started by PHP.'); } - if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) { + if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL) && headers_sent($file, $line)) { throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Fixtures/response-functional/common.inc b/src/Symfony/Component/HttpFoundation/Tests/Fixtures/response-functional/common.inc index 0bdf9e4b75fdd..3be4e2fda9874 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Fixtures/response-functional/common.inc +++ b/src/Symfony/Component/HttpFoundation/Tests/Fixtures/response-functional/common.inc @@ -22,7 +22,7 @@ error_reporting(-1); ini_set('html_errors', 0); ini_set('display_errors', 1); -if (filter_var(ini_get('xdebug.default_enable'), FILTER_VALIDATE_BOOLEAN)) { +if (filter_var(ini_get('xdebug.default_enable'), FILTER_VALIDATE_BOOL)) { xdebug_disable(); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index fed367012449a..34dad9685d5f6 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -147,7 +147,7 @@ public function testReadConvertsStreamToString() public function testReadLockedConvertsStreamToString() { - if (filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN)) { + if (filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOL)) { $this->markTestSkipped('Strict mode needs no locking for new sessions.'); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 3b7ff410f6a31..67ecc7ac80d37 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -54,8 +54,8 @@ public function collect(Request $request, Response $response, \Throwable $except 'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', 'php_timezone' => date_default_timezone_get(), 'xdebug_enabled' => \extension_loaded('xdebug'), - 'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), - 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), + 'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL), + 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL), 'bundles' => [], 'sapi_name' => \PHP_SAPI, ]; diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index af90e9e265a34..51780ef5a4a6d 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -87,7 +87,7 @@ public function onKernelResponse(ResponseEvent $event) $request = $event->getRequest(); if (null !== $this->collectParameter && null !== $collectParameterValue = $request->get($this->collectParameter)) { - true === $collectParameterValue || filter_var($collectParameterValue, \FILTER_VALIDATE_BOOLEAN) ? $this->profiler->enable() : $this->profiler->disable(); + true === $collectParameterValue || filter_var($collectParameterValue, \FILTER_VALIDATE_BOOL) ? $this->profiler->enable() : $this->profiler->disable(); } $exception = $this->exception; diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php index cbcf5d36ebe98..f65262154ac31 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -39,8 +39,8 @@ public function testCollect() $this->assertSame(4 === Kernel::MINOR_VERSION, $c->isSymfonyLts()); $this->assertNull($c->getToken()); $this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug()); - $this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache()); - $this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu()); + $this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL), $c->hasZendOpcache()); + $this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL), $c->hasApcu()); $this->assertSame(sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), $c->getSymfonyMinorVersion()); $this->assertContains($c->getSymfonyState(), ['eol', 'eom', 'dev', 'stable']); @@ -67,8 +67,8 @@ public function testCollectWithoutKernel() $this->assertSame(4 === Kernel::MINOR_VERSION, $c->isSymfonyLts()); $this->assertNull($c->getToken()); $this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug()); - $this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache()); - $this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu()); + $this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL), $c->hasZendOpcache()); + $this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL), $c->hasApcu()); $this->assertSame(sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), $c->getSymfonyMinorVersion()); $this->assertContains($c->getSymfonyState(), ['eol', 'eom', 'dev', 'stable']); diff --git a/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetApiTransport.php b/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetApiTransport.php index edb7c8e8c589c..c35d519d82b0e 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetApiTransport.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetApiTransport.php @@ -199,7 +199,7 @@ private function getEndpoint(): ?string private function castCustomHeader(string $value, string $type) { return match ($type) { - 'bool' => filter_var($value, \FILTER_VALIDATE_BOOLEAN), + 'bool' => filter_var($value, \FILTER_VALIDATE_BOOL), 'int' => (int) $value, 'json' => json_decode($value, true, 2, \JSON_THROW_ON_ERROR), 'string' => $value, diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransportFactory.php b/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransportFactory.php index c0962f109c6cc..7dfa395f272ed 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransportFactory.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransportFactory.php @@ -29,7 +29,7 @@ public function create(Dsn $dsn): TransportInterface $transport = new EsmtpTransport($host, $port, $tls, $this->dispatcher, $this->logger); - if ('' !== $dsn->getOption('verify_peer') && !filter_var($dsn->getOption('verify_peer', true), \FILTER_VALIDATE_BOOLEAN)) { + if ('' !== $dsn->getOption('verify_peer') && !filter_var($dsn->getOption('verify_peer', true), \FILTER_VALIDATE_BOOL)) { /** @var SocketStream $stream */ $stream = $transport->getStream(); $streamOptions = $stream->getStreamOptions(); diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php index aee43ac76d41e..2b7da7ee0646e 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php @@ -128,7 +128,7 @@ public static function fromDsn(string $dsn, array $options = [], HttpClientInter 'wait_time' => (int) $options['wait_time'], 'poll_timeout' => $options['poll_timeout'], 'visibility_timeout' => $options['visibility_timeout'], - 'auto_setup' => filter_var($options['auto_setup'], \FILTER_VALIDATE_BOOLEAN), + 'auto_setup' => filter_var($options['auto_setup'], \FILTER_VALIDATE_BOOL), 'queue_name' => (string) $options['queue_name'], ]; diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php index 6b6d6f643337f..e485f24b4f1dc 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php @@ -199,7 +199,7 @@ public static function fromDsn(string $dsn, array $options = [], AmqpFactory $am $queuesOptions = $amqpOptions['queues']; unset($amqpOptions['queues'], $amqpOptions['exchange']); if (isset($amqpOptions['auto_setup'])) { - $amqpOptions['auto_setup'] = filter_var($amqpOptions['auto_setup'], \FILTER_VALIDATE_BOOLEAN); + $amqpOptions['auto_setup'] = filter_var($amqpOptions['auto_setup'], \FILTER_VALIDATE_BOOL); } $queuesOptions = array_map(function ($queueOptions) { diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index e7bf744d3100e..4538d18da76c6 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -98,7 +98,7 @@ public static function buildConfiguration(string $dsn, array $options = []): arr $configuration = ['connection' => $components['host']]; $configuration += $query + $options + static::DEFAULT_OPTIONS; - $configuration['auto_setup'] = filter_var($configuration['auto_setup'], \FILTER_VALIDATE_BOOLEAN); + $configuration['auto_setup'] = filter_var($configuration['auto_setup'], \FILTER_VALIDATE_BOOL); // check for extra keys in options $optionsExtraKeys = array_diff(array_keys($options), array_keys(static::DEFAULT_OPTIONS)); diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php index 8236b964e26a8..61cf31b6cf80e 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php @@ -197,7 +197,7 @@ public static function fromDsn(string $dsn, array $options = [], \Redis|\RedisCl foreach (self::DEFAULT_OPTIONS as $k => $v) { $options[$k] = match (\gettype($v)) { 'integer' => filter_var($options[$k] ?? $v, \FILTER_VALIDATE_INT), - 'boolean' => filter_var($options[$k] ?? $v, \FILTER_VALIDATE_BOOLEAN), + 'boolean' => filter_var($options[$k] ?? $v, \FILTER_VALIDATE_BOOL), 'double' => filter_var($options[$k] ?? $v, \FILTER_VALIDATE_FLOAT), default => $options[$k] ?? $v, }; diff --git a/src/Symfony/Component/Messenger/Transport/InMemoryTransportFactory.php b/src/Symfony/Component/Messenger/Transport/InMemoryTransportFactory.php index bbbbcb6012287..232b941c2970c 100644 --- a/src/Symfony/Component/Messenger/Transport/InMemoryTransportFactory.php +++ b/src/Symfony/Component/Messenger/Transport/InMemoryTransportFactory.php @@ -51,7 +51,7 @@ private function parseDsn(string $dsn): array } return [ - 'serialize' => filter_var($query['serialize'] ?? false, \FILTER_VALIDATE_BOOLEAN), + 'serialize' => filter_var($query['serialize'] ?? false, \FILTER_VALIDATE_BOOL), ]; } } diff --git a/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php index a76338ff69fda..a7943c4f0f2a6 100644 --- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php @@ -33,7 +33,7 @@ public function create(Dsn $dsn): OvhCloudTransport $consumerKey = $dsn->getRequiredOption('consumer_key'); $serviceName = $dsn->getRequiredOption('service_name'); $sender = $dsn->getOption('sender'); - $noStopClause = filter_var($dsn->getOption('no_stop_clause', false), \FILTER_VALIDATE_BOOLEAN); + $noStopClause = filter_var($dsn->getOption('no_stop_clause', false), \FILTER_VALIDATE_BOOL); $host = 'default' === $dsn->getHost() ? null : $dsn->getHost(); $port = $dsn->getPort(); diff --git a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php index 41b671ba8e780..a343216baf93c 100644 --- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php @@ -31,7 +31,7 @@ public function create(Dsn $dsn): SmsBiurasTransport $uid = $this->getUser($dsn); $apiKey = $this->getPassword($dsn); $from = $dsn->getRequiredOption('from'); - $testMode = filter_var($dsn->getOption('test_mode', false), \FILTER_VALIDATE_BOOLEAN); + $testMode = filter_var($dsn->getOption('test_mode', false), \FILTER_VALIDATE_BOOL); $host = 'default' === $dsn->getHost() ? null : $dsn->getHost(); $port = $dsn->getPort(); diff --git a/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php index 3f498ab8edf25..44be35a12f62b 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php @@ -31,8 +31,8 @@ public function create(Dsn $dsn): SmsapiTransport $authToken = $this->getUser($dsn); $from = $dsn->getRequiredOption('from'); $host = 'default' === $dsn->getHost() ? null : $dsn->getHost(); - $fast = filter_var($dsn->getOption('fast', false), \FILTER_VALIDATE_BOOLEAN); - $test = filter_var($dsn->getOption('test', false), \FILTER_VALIDATE_BOOLEAN); + $fast = filter_var($dsn->getOption('fast', false), \FILTER_VALIDATE_BOOL); + $test = filter_var($dsn->getOption('test', false), \FILTER_VALIDATE_BOOL); $port = $dsn->getPort(); return (new SmsapiTransport($authToken, $from, $this->client, $this->dispatcher))->setFast($fast)->setHost($host)->setPort($port)->setTest($test); diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index c076f572df616..0d56fd11e217b 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -654,7 +654,7 @@ public static function createCache(string $namespace, int $defaultLifetime, stri } $apcu = new ApcuAdapter($namespace, $defaultLifetime / 5, $version); - if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { + if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) { $apcu->setLogger(new NullLogger()); } elseif (null !== $logger) { $apcu->setLogger($logger); diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index b23166cc5ef8f..88e4e3f2ef5c3 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -334,7 +334,7 @@ private function getConfigCacheFactory(): ConfigCacheFactoryInterface private static function getCompiledRoutes(string $path): array { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { + if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOL))) { self::$cache = null; } diff --git a/src/Symfony/Component/Runtime/GenericRuntime.php b/src/Symfony/Component/Runtime/GenericRuntime.php index 0a31dd3d899f8..f3326a570f25e 100644 --- a/src/Symfony/Component/Runtime/GenericRuntime.php +++ b/src/Symfony/Component/Runtime/GenericRuntime.php @@ -65,7 +65,7 @@ public function __construct(array $options = []) $debug = $options['debug'] ?? $_SERVER[$debugKey] ?? $_ENV[$debugKey] ?? true; if (!\is_bool($debug)) { - $debug = filter_var($debug, \FILTER_VALIDATE_BOOLEAN); + $debug = filter_var($debug, \FILTER_VALIDATE_BOOL); } if ($debug) { diff --git a/src/Symfony/Component/Runtime/Internal/BasicErrorHandler.php b/src/Symfony/Component/Runtime/Internal/BasicErrorHandler.php index 3c97cba4baf8d..64eee635ec026 100644 --- a/src/Symfony/Component/Runtime/Internal/BasicErrorHandler.php +++ b/src/Symfony/Component/Runtime/Internal/BasicErrorHandler.php @@ -24,7 +24,7 @@ public static function register(bool $debug): void if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { ini_set('display_errors', $debug); - } elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || \ini_get('error_log')) { + } elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOL) || \ini_get('error_log')) { // CLI - display errors only if they're not already logged to STDERR ini_set('display_errors', 1); } diff --git a/src/Symfony/Component/Translation/Loader/PhpFileLoader.php b/src/Symfony/Component/Translation/Loader/PhpFileLoader.php index 17d8bfcce0881..a322f92c08afe 100644 --- a/src/Symfony/Component/Translation/Loader/PhpFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/PhpFileLoader.php @@ -22,7 +22,7 @@ class PhpFileLoader extends FileLoader protected function loadResource(string $resource): array { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { + if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOL))) { self::$cache = null; } diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php index fc751c79edbb9..9beb7dba2dfda 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php @@ -29,7 +29,7 @@ protected function setUp(): void if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && 'preload' === \ini_get('ffi.enable')) { return; } - if (!filter_var(\ini_get('ffi.enable'), \FILTER_VALIDATE_BOOLEAN)) { + if (!filter_var(\ini_get('ffi.enable'), \FILTER_VALIDATE_BOOL)) { $this->markTestSkipped('FFI not enabled for CLI SAPI'); } } From 15d66ef1b710030419cea714a2ee0219337d3ea4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 27 Aug 2022 07:42:54 +0200 Subject: [PATCH 0042/1170] [Mailer] Fix edge cases in STMP transports --- .../Transport/Smtp/SmtpTransportTest.php | 30 +++++++++++++++++++ .../Mailer/Transport/Smtp/EsmtpTransport.php | 6 +++- .../Mailer/Transport/Smtp/SmtpTransport.php | 3 +- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php index 5f8d3ba0d8180..c54b050b92963 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Mailer\Envelope; +use Symfony\Component\Mailer\Exception\LogicException; use Symfony\Component\Mailer\Exception\TransportException; use Symfony\Component\Mailer\Transport\Smtp\SmtpTransport; use Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream; @@ -133,6 +134,35 @@ public function testWriteEncodedRecipientAndSenderAddresses() $this->assertContains("RCPT TO:\r\n", $stream->getCommands()); $this->assertContains("RCPT TO:\r\n", $stream->getCommands()); } + + public function testAssertResponseCodeNoCodes() + { + $this->expectException(LogicException::class); + $this->invokeAssertResponseCode('response', []); + } + + public function testAssertResponseCodeWithEmptyResponse() + { + $this->expectException(TransportException::class); + $this->expectExceptionMessage('Expected response code "220" but got empty code.'); + $this->invokeAssertResponseCode('', [220]); + } + + public function testAssertResponseCodeWithNotValidCode() + { + $this->expectException(TransportException::class); + $this->expectExceptionMessage('Expected response code "220" but got code "550", with message "550 Access Denied".'); + $this->expectExceptionCode(550); + $this->invokeAssertResponseCode('550 Access Denied', [220]); + } + + private function invokeAssertResponseCode(string $response, array $codes): void + { + $transport = new SmtpTransport($this->getMockForAbstractClass(AbstractStream::class)); + $m = new \ReflectionMethod($transport, 'assertResponseCode'); + $m->setAccessible(true); + $m->invoke($transport, $response, $codes); + } } class DummyStream extends AbstractStream diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php b/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php index 25006fbb7d326..da2498aa0dc02 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php @@ -94,7 +94,9 @@ public function addAuthenticator(AuthenticatorInterface $authenticator): void protected function doHeloCommand(): void { - $capabilities = $this->callHeloCommand(); + if (!$capabilities = $this->callHeloCommand()) { + return; + } /** @var SocketStream $stream */ $stream = $this->getStream(); @@ -123,6 +125,8 @@ private function callHeloCommand(): array } catch (TransportExceptionInterface $e) { try { parent::doHeloCommand(); + + return []; } catch (TransportExceptionInterface $ex) { if (!$ex->getCode()) { throw $e; diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.php b/src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.php index 3c05e94e376d1..517aa0c31906a 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.php @@ -301,7 +301,8 @@ private function assertResponseCode(string $response, array $codes): void if (!$valid || !$response) { $codeStr = $code ? sprintf('code "%s"', $code) : 'empty code'; $responseStr = $response ? sprintf(', with message "%s"', trim($response)) : ''; - throw new TransportException(sprintf('Expected response code "%s" but got ', implode('/', $codes), $codeStr).$codeStr.$responseStr.'.', $code); + + throw new TransportException(sprintf('Expected response code "%s" but got ', implode('/', $codes)).$codeStr.$responseStr.'.', $code ?: 0); } } From c09e7a6b8e6cd48e108a1737ce0db280d6082af9 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Mon, 29 Aug 2022 01:24:00 +0200 Subject: [PATCH 0043/1170] [WebProfilerBundle] Fix profile search bar link query params --- .../WebProfilerBundle/Resources/views/Profiler/layout.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig index 379653cf93f3c..00c64cadf6aa0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig @@ -108,7 +108,7 @@ {{ include('@WebProfiler/Icon/search.svg') }} Search - {{ render(controller('web_profiler.controller.profiler::searchBarAction', request.query.all)) }} + {{ render(controller('web_profiler.controller.profiler::searchBarAction', query=request.query.all)) }} From b301d926866ddcc2d05a99a1bd839a427e918558 Mon Sep 17 00:00:00 2001 From: "v.shevelev" Date: Thu, 18 Aug 2022 12:02:40 +0700 Subject: [PATCH 0044/1170] [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags --- .../Command/ContainerDebugCommand.php | 32 +++++++++++++++++++ .../Functional/ContainerDebugCommandTest.php | 21 ++++++++++++ 2 files changed, 53 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index a0f484db7b268..fbe21d3ee6783 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -145,6 +145,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } elseif ($input->getOption('tags')) { $options = ['group_by' => 'tags']; } elseif ($tag = $input->getOption('tag')) { + $tag = $this->findProperTagName($input, $errorIo, $object, $tag); $options = ['tag' => $tag]; } elseif ($name = $input->getArgument('name')) { $name = $this->findProperServiceName($input, $errorIo, $object, $name, $input->getOption('show-hidden')); @@ -287,6 +288,24 @@ private function findProperServiceName(InputInterface $input, SymfonyStyle $io, return $io->choice('Select one of the following services to display its information', $matchingServices); } + private function findProperTagName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, string $tagName): string + { + if (\in_array($tagName, $builder->findTags(), true) || !$input->isInteractive()) { + return $tagName; + } + + $matchingTags = $this->findTagsContaining($builder, $tagName); + if (!$matchingTags) { + throw new InvalidArgumentException(sprintf('No tags found that match "%s".', $tagName)); + } + + if (1 === \count($matchingTags)) { + return $matchingTags[0]; + } + + return $io->choice('Select one of the following tags to display its information', $matchingTags); + } + private function findServiceIdsContaining(ContainerBuilder $builder, string $name, bool $showHidden): array { $serviceIds = $builder->getServiceIds(); @@ -306,6 +325,19 @@ private function findServiceIdsContaining(ContainerBuilder $builder, string $nam return $foundServiceIds ?: $foundServiceIdsIgnoringBackslashes; } + private function findTagsContaining(ContainerBuilder $builder, string $tagName): array + { + $tags = $builder->findTags(); + $foundTags = []; + foreach ($tags as $tag) { + if (str_contains($tag, $tagName)) { + $foundTags[] = $tag; + } + } + + return $foundTags; + } + /** * @internal */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index d546dc2c9cf64..b812bb781a2e8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -100,6 +100,27 @@ public function testIgnoreBackslashWhenFindingService(string $validServiceId) $this->assertStringNotContainsString('No services found', $tester->getDisplay()); } + public function testTagsPartialSearch() + { + static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']); + + $application = new Application(static::$kernel); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + $tester->setInputs(['0']); + $tester->run(['command' => 'debug:container', '--tag' => 'kernel.']); + + $this->assertStringContainsString('Select one of the following tags to display its information', $tester->getDisplay()); + $this->assertStringContainsString('[0] kernel.event_subscriber', $tester->getDisplay()); + $this->assertStringContainsString('[1] kernel.locale_aware', $tester->getDisplay()); + $this->assertStringContainsString('[2] kernel.cache_warmer', $tester->getDisplay()); + $this->assertStringContainsString('[3] kernel.fragment_renderer', $tester->getDisplay()); + $this->assertStringContainsString('[4] kernel.reset', $tester->getDisplay()); + $this->assertStringContainsString('[5] kernel.cache_clearer', $tester->getDisplay()); + $this->assertStringContainsString('Symfony Container Services Tagged with "kernel.event_subscriber" Tag', $tester->getDisplay()); + } + public function testDescribeEnvVars() { putenv('REAL=value'); From 39cd15b506d9c7cc93d1a8501e7d098b2509d922 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 30 Aug 2022 12:21:51 +0200 Subject: [PATCH 0045/1170] Fix checking result of DateTime::getLastErrors --- .../Core/DataTransformer/DateTimeToStringTransformer.php | 2 +- .../Component/Validator/Constraints/DateTimeValidator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php index 51d42494d1def..bae85a86fbec5 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php @@ -121,7 +121,7 @@ public function reverseTransform($value) $outputTz = new \DateTimeZone($this->outputTimezone); $dateTime = \DateTime::createFromFormat($this->parseFormat, $value, $outputTz); - $lastErrors = \DateTime::getLastErrors(); + $lastErrors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warning_count' => 0]; if (0 < $lastErrors['warning_count'] || 0 < $lastErrors['error_count']) { throw new TransformationFailedException(implode(', ', array_merge(array_values($lastErrors['warnings']), array_values($lastErrors['errors'])))); diff --git a/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php b/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php index 1a3ae3784b422..5f2c7a8ef140e 100644 --- a/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php @@ -48,7 +48,7 @@ public function validate($value, Constraint $constraint) \DateTime::createFromFormat($constraint->format, $value); - $errors = \DateTime::getLastErrors(); + $errors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warnings' => []]; if (0 < $errors['error_count']) { $this->context->buildViolation($constraint->message) From 34229af21e02496b3bcf93ede9e3279b7dd12916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 14 Dec 2020 17:09:04 +0100 Subject: [PATCH 0046/1170] [Messenger] Be able to get raw data when a message in not decodable by the PHP Serializer --- .../Resources/config/console.php | 3 + .../Command/AbstractFailedMessagesCommand.php | 14 +++- .../Command/FailedMessagesRemoveCommand.php | 8 ++- .../Command/FailedMessagesRetryCommand.php | 48 +++++++++---- .../Command/FailedMessagesShowCommand.php | 68 ++++++++++-------- .../Stamp/MessageDecodingFailedStamp.php | 19 +++++ .../Serialization/PhpSerializerTest.php | 19 +++-- ...SerializerWithClassNotFoundSupportTest.php | 72 +++++++++++++++++++ .../Transport/Serialization/PhpSerializer.php | 30 ++++++-- 9 files changed, 225 insertions(+), 56 deletions(-) create mode 100644 src/Symfony/Component/Messenger/Stamp/MessageDecodingFailedStamp.php create mode 100644 src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerWithClassNotFoundSupportTest.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php index 6407f3e244400..d64cd058e61f8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php @@ -191,6 +191,7 @@ service('messenger.routable_message_bus'), service('event_dispatcher'), service('logger'), + service('messenger.transport.native_php_serializer')->nullOnInvalid(), ]) ->tag('console.command') @@ -198,6 +199,7 @@ ->args([ abstract_arg('Default failure receiver name'), abstract_arg('Receivers'), + service('messenger.transport.native_php_serializer')->nullOnInvalid(), ]) ->tag('console.command') @@ -205,6 +207,7 @@ ->args([ abstract_arg('Default failure receiver name'), abstract_arg('Receivers'), + service('messenger.transport.native_php_serializer')->nullOnInvalid(), ]) ->tag('console.command') diff --git a/src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php b/src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php index 62f01fc03f051..3f502e78b215e 100644 --- a/src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php +++ b/src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php @@ -21,12 +21,14 @@ use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\Exception\InvalidArgumentException; use Symfony\Component\Messenger\Stamp\ErrorDetailsStamp; +use Symfony\Component\Messenger\Stamp\MessageDecodingFailedStamp; use Symfony\Component\Messenger\Stamp\RedeliveryStamp; use Symfony\Component\Messenger\Stamp\SentToFailureTransportStamp; use Symfony\Component\Messenger\Stamp\TransportMessageIdStamp; use Symfony\Component\Messenger\Transport\Receiver\ListableReceiverInterface; use Symfony\Component\Messenger\Transport\Receiver\MessageCountAwareInterface; use Symfony\Component\Messenger\Transport\Receiver\ReceiverInterface; +use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer; use Symfony\Component\VarDumper\Caster\Caster; use Symfony\Component\VarDumper\Caster\TraceStub; use Symfony\Component\VarDumper\Cloner\ClonerInterface; @@ -44,13 +46,15 @@ abstract class AbstractFailedMessagesCommand extends Command protected const DEFAULT_TRANSPORT_OPTION = 'choose'; protected $failureTransports; + protected ?PhpSerializer $phpSerializer; private ?string $globalFailureReceiverName; - public function __construct(?string $globalFailureReceiverName, ServiceProviderInterface $failureTransports) + public function __construct(?string $globalFailureReceiverName, ServiceProviderInterface $failureTransports, PhpSerializer $phpSerializer = null) { $this->failureTransports = $failureTransports; $this->globalFailureReceiverName = $globalFailureReceiverName; + $this->phpSerializer = $phpSerializer; parent::__construct(); } @@ -78,6 +82,8 @@ protected function displaySingleMessage(Envelope $envelope, SymfonyStyle $io) $lastRedeliveryStamp = $envelope->last(RedeliveryStamp::class); /** @var ErrorDetailsStamp|null $lastErrorDetailsStamp */ $lastErrorDetailsStamp = $envelope->last(ErrorDetailsStamp::class); + /** @var MessageDecodingFailedStamp|null $lastMessageDecodingFailedStamp */ + $lastMessageDecodingFailedStamp = $envelope->last(MessageDecodingFailedStamp::class); $rows = [ ['Class', \get_class($envelope->getMessage())], @@ -126,12 +132,18 @@ protected function displaySingleMessage(Envelope $envelope, SymfonyStyle $io) if ($io->isVeryVerbose()) { $io->title('Message:'); + if (null !== $lastMessageDecodingFailedStamp) { + $io->error('The message could not be decoded. See below an APPROXIMATIVE representation of the class.'); + } $dump = new Dumper($io, null, $this->createCloner()); $io->writeln($dump($envelope->getMessage())); $io->title('Exception:'); $flattenException = $lastErrorDetailsStamp?->getFlattenException(); $io->writeln(null === $flattenException ? '(no data)' : $dump($flattenException)); } else { + if (null !== $lastMessageDecodingFailedStamp) { + $io->error('The message could not be decoded.'); + } $io->writeln(' Re-run command with -vv to see more message & error details.'); } } diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php index 2b62af3ce4bb2..34243b3d35c0b 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php @@ -74,7 +74,13 @@ private function removeMessages(string $failureTransportName, array $ids, Receiv } foreach ($ids as $id) { - $envelope = $receiver->find($id); + $this->phpSerializer?->enableClassNotFoundCreation(); + try { + $envelope = $receiver->find($id); + } finally { + $this->phpSerializer?->enableClassNotFoundCreation(false); + } + if (null === $envelope) { $io->error(sprintf('The message with id "%s" was not found.', $id)); continue; diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php index abd9ab14e7300..af70141733cb9 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php @@ -23,11 +23,12 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Messenger\Event\WorkerMessageReceivedEvent; use Symfony\Component\Messenger\EventListener\StopWorkerOnMessageLimitListener; -use Symfony\Component\Messenger\Exception\LogicException; use Symfony\Component\Messenger\MessageBusInterface; +use Symfony\Component\Messenger\Stamp\MessageDecodingFailedStamp; use Symfony\Component\Messenger\Transport\Receiver\ListableReceiverInterface; use Symfony\Component\Messenger\Transport\Receiver\ReceiverInterface; use Symfony\Component\Messenger\Transport\Receiver\SingleMessageReceiver; +use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer; use Symfony\Component\Messenger\Worker; use Symfony\Contracts\Service\ServiceProviderInterface; @@ -41,13 +42,13 @@ class FailedMessagesRetryCommand extends AbstractFailedMessagesCommand private MessageBusInterface $messageBus; private ?LoggerInterface $logger; - public function __construct(?string $globalReceiverName, ServiceProviderInterface $failureTransports, MessageBusInterface $messageBus, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger = null) + public function __construct(?string $globalReceiverName, ServiceProviderInterface $failureTransports, MessageBusInterface $messageBus, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger = null, PhpSerializer $phpSerializer = null) { $this->eventDispatcher = $eventDispatcher; $this->messageBus = $messageBus; $this->logger = $logger; - parent::__construct($globalReceiverName, $failureTransports); + parent::__construct($globalReceiverName, $failureTransports, $phpSerializer); } protected function configure(): void @@ -133,23 +134,23 @@ private function runInteractive(string $failureTransportName, SymfonyStyle $io, // to be temporarily "acked", even if the user aborts // handling the message while (true) { - $ids = []; - foreach ($receiver->all(1) as $envelope) { - ++$count; - - $id = $this->getMessageId($envelope); - if (null === $id) { - throw new LogicException(sprintf('The "%s" receiver is able to list messages by id but the envelope is missing the TransportMessageIdStamp stamp.', $failureTransportName)); + $envelopes = []; + $this->phpSerializer?->enableClassNotFoundCreation(); + try { + foreach ($receiver->all(1) as $envelope) { + ++$count; + $envelopes[] = $envelope; } - $ids[] = $id; + } finally { + $this->phpSerializer?->enableClassNotFoundCreation(false); } // break the loop if all messages are consumed - if (0 === \count($ids)) { + if (0 === \count($envelopes)) { break; } - $this->retrySpecificIds($failureTransportName, $ids, $io, $shouldForce); + $this->retrySpecificEnvelops($envelopes, $failureTransportName, $io, $shouldForce); } } else { // get() and ask messages one-by-one @@ -171,6 +172,10 @@ private function runWorker(string $failureTransportName, ReceiverInterface $rece $this->displaySingleMessage($envelope, $io); + if ($envelope->last(MessageDecodingFailedStamp::class)) { + throw new \RuntimeException(sprintf('The message with id "%s" could not decoded, it can only be shown or removed.', $this->getMessageId($envelope) ?? '?')); + } + $shouldHandle = $shouldForce || $io->confirm('Do you want to retry (yes) or delete this message (no)?'); if ($shouldHandle) { @@ -207,7 +212,12 @@ private function retrySpecificIds(string $failureTransportName, array $ids, Symf } foreach ($ids as $id) { - $envelope = $receiver->find($id); + $this->phpSerializer?->enableClassNotFoundCreation(); + try { + $envelope = $receiver->find($id); + } finally { + $this->phpSerializer?->enableClassNotFoundCreation(false); + } if (null === $envelope) { throw new RuntimeException(sprintf('The message "%s" was not found.', $id)); } @@ -216,4 +226,14 @@ private function retrySpecificIds(string $failureTransportName, array $ids, Symf $this->runWorker($failureTransportName, $singleReceiver, $io, $shouldForce); } } + + private function retrySpecificEnvelops(array $envelopes, string $failureTransportName, SymfonyStyle $io, bool $shouldForce) + { + $receiver = $this->getReceiver($failureTransportName); + + foreach ($envelopes as $envelope) { + $singleReceiver = new SingleMessageReceiver($receiver, $envelope); + $this->runWorker($failureTransportName, $singleReceiver, $io, $shouldForce); + } + } } diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php index b8752d902e2c9..df9c308223e2c 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesShowCommand.php @@ -96,29 +96,29 @@ private function listMessages(?string $failedTransportName, SymfonyStyle $io, in $io->comment(sprintf('Displaying only \'%s\' messages', $classFilter)); } - foreach ($envelopes as $envelope) { - $currentClassName = \get_class($envelope->getMessage()); - - if ($classFilter && $classFilter !== $currentClassName) { - continue; - } - - /** @var RedeliveryStamp|null $lastRedeliveryStamp */ - $lastRedeliveryStamp = $envelope->last(RedeliveryStamp::class); - /** @var ErrorDetailsStamp|null $lastErrorDetailsStamp */ - $lastErrorDetailsStamp = $envelope->last(ErrorDetailsStamp::class); - - $errorMessage = ''; - if (null !== $lastErrorDetailsStamp) { - $errorMessage = $lastErrorDetailsStamp->getExceptionMessage(); + $this->phpSerializer?->enableClassNotFoundCreation(); + try { + foreach ($envelopes as $envelope) { + $currentClassName = \get_class($envelope->getMessage()); + + if ($classFilter && $classFilter !== $currentClassName) { + continue; + } + + /** @var RedeliveryStamp|null $lastRedeliveryStamp */ + $lastRedeliveryStamp = $envelope->last(RedeliveryStamp::class); + /** @var ErrorDetailsStamp|null $lastErrorDetailsStamp */ + $lastErrorDetailsStamp = $envelope->last(ErrorDetailsStamp::class); + + $rows[] = [ + $this->getMessageId($envelope), + $currentClassName, + null === $lastRedeliveryStamp ? '' : $lastRedeliveryStamp->getRedeliveredAt()->format('Y-m-d H:i:s'), + $lastErrorDetailsStamp?->getExceptionMessage() ?? '', + ]; } - - $rows[] = [ - $this->getMessageId($envelope), - $currentClassName, - null === $lastRedeliveryStamp ? '' : $lastRedeliveryStamp->getRedeliveredAt()->format('Y-m-d H:i:s'), - $errorMessage, - ]; + } finally { + $this->phpSerializer?->enableClassNotFoundCreation(false); } $rowsCount = \count($rows); @@ -148,14 +148,19 @@ private function listMessagesPerClass(?string $failedTransportName, SymfonyStyle $countPerClass = []; - foreach ($envelopes as $envelope) { - $c = \get_class($envelope->getMessage()); + $this->phpSerializer?->enableClassNotFoundCreation(); + try { + foreach ($envelopes as $envelope) { + $c = \get_class($envelope->getMessage()); - if (!isset($countPerClass[$c])) { - $countPerClass[$c] = [$c, 0]; - } + if (!isset($countPerClass[$c])) { + $countPerClass[$c] = [$c, 0]; + } - ++$countPerClass[$c][1]; + ++$countPerClass[$c][1]; + } + } finally { + $this->phpSerializer?->enableClassNotFoundCreation(false); } if (0 === \count($countPerClass)) { @@ -171,7 +176,12 @@ private function showMessage(?string $failedTransportName, string $id, SymfonySt { /** @var ListableReceiverInterface $receiver */ $receiver = $this->getReceiver($failedTransportName); - $envelope = $receiver->find($id); + $this->phpSerializer?->enableClassNotFoundCreation(); + try { + $envelope = $receiver->find($id); + } finally { + $this->phpSerializer?->enableClassNotFoundCreation(false); + } if (null === $envelope) { throw new RuntimeException(sprintf('The message "%s" was not found.', $id)); } diff --git a/src/Symfony/Component/Messenger/Stamp/MessageDecodingFailedStamp.php b/src/Symfony/Component/Messenger/Stamp/MessageDecodingFailedStamp.php new file mode 100644 index 0000000000000..66e4778fbd47a --- /dev/null +++ b/src/Symfony/Component/Messenger/Stamp/MessageDecodingFailedStamp.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Messenger\Stamp; + +/** + * @author Grégoire Pineau + */ +class MessageDecodingFailedStamp implements StampInterface +{ +} diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerTest.php index b31914a9b07f7..c83606a59fdb3 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerTest.php @@ -22,7 +22,7 @@ class PhpSerializerTest extends TestCase { public function testEncodedIsDecodable() { - $serializer = new PhpSerializer(); + $serializer = $this->createPhpSerializer(); $envelope = new Envelope(new DummyMessage('Hello')); @@ -36,7 +36,7 @@ public function testDecodingFailsWithMissingBodyKey() $this->expectException(MessageDecodingFailedException::class); $this->expectExceptionMessage('Encoded envelope should have at least a "body", or maybe you should implement your own serializer'); - $serializer = new PhpSerializer(); + $serializer = $this->createPhpSerializer(); $serializer->decode([]); } @@ -46,7 +46,7 @@ public function testDecodingFailsWithBadFormat() $this->expectException(MessageDecodingFailedException::class); $this->expectExceptionMessageMatches('/Could not decode/'); - $serializer = new PhpSerializer(); + $serializer = $this->createPhpSerializer(); $serializer->decode([ 'body' => '{"message": "bar"}', @@ -58,7 +58,7 @@ public function testDecodingFailsWithBadBase64Body() $this->expectException(MessageDecodingFailedException::class); $this->expectExceptionMessageMatches('/Could not decode/'); - $serializer = new PhpSerializer(); + $serializer = $this->createPhpSerializer(); $serializer->decode([ 'body' => 'x', @@ -70,7 +70,7 @@ public function testDecodingFailsWithBadClass() $this->expectException(MessageDecodingFailedException::class); $this->expectExceptionMessageMatches('/class "ReceivedSt0mp" not found/'); - $serializer = new PhpSerializer(); + $serializer = $this->createPhpSerializer(); $serializer->decode([ 'body' => 'O:13:"ReceivedSt0mp":0:{}', @@ -79,7 +79,7 @@ public function testDecodingFailsWithBadClass() public function testEncodedSkipsNonEncodeableStamps() { - $serializer = new PhpSerializer(); + $serializer = $this->createPhpSerializer(); $envelope = new Envelope(new DummyMessage('Hello'), [ new DummyPhpSerializerNonSendableStamp(), @@ -91,7 +91,7 @@ public function testEncodedSkipsNonEncodeableStamps() public function testNonUtf8IsBase64Encoded() { - $serializer = new PhpSerializer(); + $serializer = $this->createPhpSerializer(); $envelope = new Envelope(new DummyMessage("\xE9")); @@ -99,6 +99,11 @@ public function testNonUtf8IsBase64Encoded() $this->assertTrue((bool) preg_match('//u', $encoded['body']), 'Encodes non-UTF8 payloads'); $this->assertEquals($envelope, $serializer->decode($encoded)); } + + protected function createPhpSerializer(): PhpSerializer + { + return new PhpSerializer(); + } } class DummyPhpSerializerNonSendableStamp implements NonSendableStampInterface diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerWithClassNotFoundSupportTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerWithClassNotFoundSupportTest.php new file mode 100644 index 0000000000000..5c3f1fe48e24b --- /dev/null +++ b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerWithClassNotFoundSupportTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Messenger\Tests\Transport\Serialization; + +use Symfony\Component\Messenger\Envelope; +use Symfony\Component\Messenger\Exception\MessageDecodingFailedException; +use Symfony\Component\Messenger\Stamp\MessageDecodingFailedStamp; +use Symfony\Component\Messenger\Tests\Fixtures\DummyMessage; +use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer; + +class PhpSerializerWithClassNotFoundSupportTest extends PhpSerializerTest +{ + public function testDecodingFailsWithBadClass() + { + $this->expectException(MessageDecodingFailedException::class); + + $serializer = $this->createPhpSerializer(); + + $serializer->decode([ + 'body' => 'O:13:"ReceivedSt0mp":0:{}', + ]); + } + + public function testDecodingFailsButCreateClassNotFound() + { + $serializer = $this->createPhpSerializer(); + + $encodedEnvelope = $serializer->encode(new Envelope(new DummyMessage('Hello'))); + // Simulate a change in the code base + $encodedEnvelope['body'] = str_replace('DummyMessage', 'OupsyMessage', $encodedEnvelope['body']); + + $envelope = $serializer->decode($encodedEnvelope); + + $lastMessageDecodingFailedStamp = $envelope->last(MessageDecodingFailedStamp::class); + $this->assertInstanceOf(MessageDecodingFailedStamp::class, $lastMessageDecodingFailedStamp); + $message = $envelope->getMessage(); + // The class does not exist, so we cannot use anything else. The only + // purpose of this feature is to aim debugging (so dumping value) + ob_start(); + var_dump($message); + $content = ob_get_clean(); + // remove object ID + $content = preg_replace('/#\d+/', '', $content); + $expected = << + string(55) "Symfony\Component\Messenger\Tests\Fixtures\OupsyMessage" + ["message":"Symfony\Component\Messenger\Tests\Fixtures\OupsyMessage":private]=> + string(5) "Hello" + } + + EOT; + $this->assertEquals($expected, $content); + } + + protected function createPhpSerializer(): PhpSerializer + { + $serializer = new PhpSerializer(); + $serializer->enableClassNotFoundCreation(); + + return $serializer; + } +} diff --git a/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php b/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php index aecb98391429f..b9a4edb44f851 100644 --- a/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php +++ b/src/Symfony/Component/Messenger/Transport/Serialization/PhpSerializer.php @@ -13,6 +13,7 @@ use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\Exception\MessageDecodingFailedException; +use Symfony\Component\Messenger\Stamp\MessageDecodingFailedStamp; use Symfony\Component\Messenger\Stamp\NonSendableStampInterface; /** @@ -20,6 +21,13 @@ */ class PhpSerializer implements SerializerInterface { + private bool $createClassNotFound = false; + + public function enableClassNotFoundCreation(bool $enable = true): void + { + $this->createClassNotFound = $enable; + } + public function decode(array $encodedEnvelope): Envelope { if (empty($encodedEnvelope['body'])) { @@ -50,14 +58,19 @@ public function encode(Envelope $envelope): array ]; } - private function safelyUnserialize(string $contents) + private function safelyUnserialize(string $contents): Envelope { if ('' === $contents) { throw new MessageDecodingFailedException('Could not decode an empty message using PHP serialization.'); } $signalingException = new MessageDecodingFailedException(sprintf('Could not decode message using PHP serialization: %s.', $contents)); - $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback'); + + if ($this->createClassNotFound) { + $prevUnserializeHandler = ini_set('unserialize_callback_func', null); + } else { + $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback'); + } $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) { if (__FILE__ === $file) { throw $signalingException; @@ -67,13 +80,22 @@ private function safelyUnserialize(string $contents) }); try { - $meta = unserialize($contents); + /** @var Envelope */ + $envelope = unserialize($contents); } finally { restore_error_handler(); ini_set('unserialize_callback_func', $prevUnserializeHandler); } - return $meta; + if (!$envelope instanceof Envelope) { + throw $signalingException; + } + + if ($envelope->getMessage() instanceof \__PHP_Incomplete_Class) { + $envelope = $envelope->with(new MessageDecodingFailedStamp()); + } + + return $envelope; } /** From c0efe1a0880fcb2201b1f5966b775129c700e73b Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Sun, 21 Aug 2022 11:55:11 +0200 Subject: [PATCH 0047/1170] [FrameworkBundle] Do not throw when describing a factory definition --- .../Console/Descriptor/JsonDescriptor.php | 2 +- .../Console/Descriptor/MarkdownDescriptor.php | 2 +- .../Console/Descriptor/TextDescriptor.php | 2 +- .../Console/Descriptor/XmlDescriptor.php | 2 +- .../Console/Descriptor/ObjectsProvider.php | 4 ++++ .../Descriptor/builder_1_services.json | 14 ++++++++++++++ .../Fixtures/Descriptor/builder_1_services.md | 14 ++++++++++++++ .../Fixtures/Descriptor/builder_1_services.txt | 1 + .../Fixtures/Descriptor/builder_1_services.xml | 3 +++ .../Fixtures/Descriptor/definition_3.json | 14 ++++++++++++++ .../Tests/Fixtures/Descriptor/definition_3.md | 11 +++++++++++ .../Tests/Fixtures/Descriptor/definition_3.txt | 18 ++++++++++++++++++ .../Tests/Fixtures/Descriptor/definition_3.xml | 4 ++++ .../Descriptor/definition_arguments_3.json | 15 +++++++++++++++ .../Descriptor/definition_arguments_3.md | 12 ++++++++++++ .../Descriptor/definition_arguments_3.txt | 18 ++++++++++++++++++ .../Descriptor/definition_arguments_3.xml | 4 ++++ 17 files changed, 136 insertions(+), 4 deletions(-) create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index 64841b1a25d4e..f22e6f48b71fb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -219,7 +219,7 @@ private function getContainerDefinitionData(Definition $definition, bool $omitTa if ($factory[0] instanceof Reference) { $data['factory_service'] = (string) $factory[0]; } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); + $data['factory_class'] = $factory[0]->getClass() ?? 'not configured'; } else { $data['factory_class'] = $factory[0]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index a2360a094ee9a..bd3f8c78d67e5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -196,7 +196,7 @@ protected function describeContainerDefinition(Definition $definition, array $op if ($factory[0] instanceof Reference) { $output .= "\n".'- Factory Service: `'.$factory[0].'`'; } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); + $output .= "\n".'- Factory Class: `'.($factory[0]->getClass() ?? 'not configured').'`'; } else { $output .= "\n".'- Factory Class: `'.$factory[0].'`'; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 67669e5a3c3cc..e5bb80010ca7b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -309,7 +309,7 @@ protected function describeContainerDefinition(Definition $definition, array $op if ($factory[0] instanceof Reference) { $tableRows[] = ['Factory Service', $factory[0]]; } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); + $tableRows[] = ['Factory Class', $factory[0]->getClass() ?? 'not configured']; } else { $tableRows[] = ['Factory Class', $factory[0]]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 65e3dbc17b077..7d13cc35df0ae 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -294,7 +294,7 @@ private function getContainerDefinitionDocument(Definition $definition, string $ if ($factory[0] instanceof Reference) { $factoryXML->setAttribute('service', (string) $factory[0]); } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); + $factoryXML->setAttribute('class', $factory[0]->getClass() ?? 'not configured'); } else { $factoryXML->setAttribute('class', $factory[0]); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php index a097e058be7dd..4d96e90f0ef27 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -123,6 +123,7 @@ public static function getContainerDefinitions() { $definition1 = new Definition('Full\\Qualified\\Class1'); $definition2 = new Definition('Full\\Qualified\\Class2'); + $definition3 = new Definition('Full\\Qualified\\Class3'); return [ 'definition_1' => $definition1 @@ -154,6 +155,9 @@ public static function getContainerDefinitions() ->addTag('tag2') ->addMethodCall('setMailer', [new Reference('mailer')]) ->setFactory([new Reference('factory.service'), 'get']), + '.definition_3' => $definition3 + ->setFile('/path/to/file') + ->setFactory([new Definition('Full\\Qualified\\FactoryClass'), 'get']), 'definition_without_class' => new Definition(), ]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json index 0eda1932f7a15..31987c13f6c0c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json @@ -34,6 +34,20 @@ "parameters": [] } ] + }, + ".definition_3": { + "class": "Full\\Qualified\\Class3", + "public": false, + "synthetic": false, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autoconfigure": false, + "file": "\/path\/to\/file", + "factory_class": "Full\\Qualified\\FactoryClass", + "factory_method": "get", + "tags": [] } }, "aliases": { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md index 2d0edfd01952e..2bc9cfac9582d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md @@ -25,6 +25,20 @@ Definitions - Attr3: val3 - Tag: `tag2` +### .definition_3 + +- Class: `Full\Qualified\Class3` +- Public: no +- Synthetic: no +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- Autoconfigured: no +- File: `/path/to/file` +- Factory Class: `Full\Qualified\FactoryClass` +- Factory Method: `get` + Aliases ------- diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt index 82b4909242d84..daf47ddc39187 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt @@ -7,5 +7,6 @@ --------------- ------------------------ .alias_2 alias for ".service_2" .definition_2 Full\Qualified\Class2 + .definition_3 Full\Qualified\Class3 --------------- ------------------------ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml index a311a2e2bb991..fd450279000b2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml @@ -17,4 +17,7 @@ + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json new file mode 100644 index 0000000000000..1c9f6abbf1b0c --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json @@ -0,0 +1,14 @@ +{ + "class": "Full\\Qualified\\Class3", + "public": false, + "synthetic": false, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autoconfigure": false, + "file": "\/path\/to\/file", + "factory_class": "Full\\Qualified\\FactoryClass", + "factory_method": "get", + "tags": [] +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md new file mode 100644 index 0000000000000..7db01b0b02045 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md @@ -0,0 +1,11 @@ +- Class: `Full\Qualified\Class3` +- Public: no +- Synthetic: no +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- Autoconfigured: no +- File: `/path/to/file` +- Factory Class: `Full\Qualified\FactoryClass` +- Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt new file mode 100644 index 0000000000000..9a1de59a7e9a4 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt @@ -0,0 +1,18 @@ + ---------------- ----------------------------- +  Option   Value  + ---------------- ----------------------------- + Service ID - + Class Full\Qualified\Class3 + Tags - + Public no + Synthetic no + Lazy no + Shared yes + Abstract no + Autowired no + Autoconfigured no + Required File /path/to/file + Factory Class Full\Qualified\FactoryClass + Factory Method get + ---------------- ----------------------------- + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml new file mode 100644 index 0000000000000..4969b699e5763 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json new file mode 100644 index 0000000000000..9971492075ca9 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json @@ -0,0 +1,15 @@ +{ + "class": "Full\\Qualified\\Class3", + "public": false, + "synthetic": false, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autoconfigure": false, + "arguments": [], + "file": "\/path\/to\/file", + "factory_class": "Full\\Qualified\\FactoryClass", + "factory_method": "get", + "tags": [] +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md new file mode 100644 index 0000000000000..40051de909ef4 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md @@ -0,0 +1,12 @@ +- Class: `Full\Qualified\Class3` +- Public: no +- Synthetic: no +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- Autoconfigured: no +- Arguments: no +- File: `/path/to/file` +- Factory Class: `Full\Qualified\FactoryClass` +- Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt new file mode 100644 index 0000000000000..b3c6fd80560f2 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt @@ -0,0 +1,18 @@ + ---------------- ----------------------------- +  Option   Value  + ---------------- ----------------------------- + Service ID - + Class Full\Qualified\Class3 + Tags - + Public no + Synthetic no + Lazy no + Shared yes + Abstract no + Autowired no + Autoconfigured no + Required File /path/to/file + Factory Class Full\Qualified\FactoryClass + Factory Method get + ---------------- ----------------------------- + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml new file mode 100644 index 0000000000000..4969b699e5763 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml @@ -0,0 +1,4 @@ + + + + From 118acea77a24c20dc8fd13f6ddefba0f85c77ca8 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 30 Aug 2022 18:14:54 +0200 Subject: [PATCH 0048/1170] [HttpFoundation] move flushing outside of Response::closeOutputBuffers --- src/Symfony/Component/HttpFoundation/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index c14a7bbfdfcb5..75f64fa9eb907 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -384,6 +384,7 @@ public function send() fastcgi_finish_request(); } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { static::closeOutputBuffers(0, true); + flush(); } return $this; @@ -1236,7 +1237,6 @@ public static function closeOutputBuffers(int $targetLevel, bool $flush): void while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) { if ($flush) { ob_end_flush(); - flush(); } else { ob_end_clean(); } From d2370e525c6a34c4a5760d76d1dbec439cb44b22 Mon Sep 17 00:00:00 2001 From: Martin Komischke Date: Tue, 30 Aug 2022 17:05:50 +0200 Subject: [PATCH 0049/1170] fix typo --- src/Symfony/Component/DependencyInjection/Attribute/When.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Attribute/When.php b/src/Symfony/Component/DependencyInjection/Attribute/When.php index 60b7af04b6e21..302b7b0507737 100644 --- a/src/Symfony/Component/DependencyInjection/Attribute/When.php +++ b/src/Symfony/Component/DependencyInjection/Attribute/When.php @@ -12,7 +12,7 @@ namespace Symfony\Component\DependencyInjection\Attribute; /** - * An attribute to tell under which environement this class should be registered as a service. + * An attribute to tell under which environment this class should be registered as a service. * * @author Nicolas Grekas */ From be97af45d411daf532da9ade42fda76b02616063 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 30 Aug 2022 20:56:59 +0200 Subject: [PATCH 0050/1170] [Mime] Fix email rendering when having inlined parts that are not related to the content --- src/Symfony/Component/Mime/Email.php | 32 ++++++++++--------- .../Component/Mime/Tests/EmailTest.php | 29 +++++++++++++++++ 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/src/Symfony/Component/Mime/Email.php b/src/Symfony/Component/Mime/Email.php index 9cdde13e533c6..70ea745788e8a 100644 --- a/src/Symfony/Component/Mime/Email.php +++ b/src/Symfony/Component/Mime/Email.php @@ -463,7 +463,7 @@ private function generateBody(): AbstractPart $this->ensureValidity(); - [$htmlPart, $attachmentParts, $inlineParts] = $this->prepareParts(); + [$htmlPart, $otherParts, $relatedParts] = $this->prepareParts(); $part = null === $this->text ? null : new TextPart($this->text, $this->textCharset); if (null !== $htmlPart) { @@ -474,15 +474,15 @@ private function generateBody(): AbstractPart } } - if ($inlineParts) { - $part = new RelatedPart($part, ...$inlineParts); + if ($relatedParts) { + $part = new RelatedPart($part, ...$relatedParts); } - if ($attachmentParts) { + if ($otherParts) { if ($part) { - $part = new MixedPart($part, ...$attachmentParts); + $part = new MixedPart($part, ...$otherParts); } else { - $part = new MixedPart(...$attachmentParts); + $part = new MixedPart(...$otherParts); } } @@ -508,42 +508,44 @@ private function prepareParts(): ?array } // usage of reflection is a temporary workaround for missing getters that will be added in 6.2 - $dispositionRef = new \ReflectionProperty(TextPart::class, 'disposition'); - $dispositionRef->setAccessible(true); $nameRef = new \ReflectionProperty(TextPart::class, 'name'); $nameRef->setAccessible(true); - $attachmentParts = $inlineParts = []; + $otherParts = $relatedParts = []; foreach ($this->attachments as $attachment) { $part = $this->createDataPart($attachment); if (isset($attachment['part'])) { $attachment['name'] = $nameRef->getValue($part); } + $related = false; foreach ($names as $name) { if ($name !== $attachment['name']) { continue; } - if (isset($inlineParts[$name])) { + if (isset($relatedParts[$name])) { continue 2; } $part->setDisposition('inline'); - $html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html); + $html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html, $count); + if ($count) { + $related = true; + } $part->setName($part->getContentId()); break; } - if ('inline' === $dispositionRef->getValue($part)) { - $inlineParts[$attachment['name']] = $part; + if ($related) { + $relatedParts[$attachment['name']] = $part; } else { - $attachmentParts[] = $part; + $otherParts[] = $part; } } if (null !== $htmlPart) { $htmlPart = new TextPart($html, $this->htmlCharset, 'html'); } - return [$htmlPart, $attachmentParts, array_values($inlineParts)]; + return [$htmlPart, $otherParts, array_values($relatedParts)]; } private function createDataPart(array $attachment): DataPart diff --git a/src/Symfony/Component/Mime/Tests/EmailTest.php b/src/Symfony/Component/Mime/Tests/EmailTest.php index a79a785576361..2d03a8a9aeedd 100644 --- a/src/Symfony/Component/Mime/Tests/EmailTest.php +++ b/src/Symfony/Component/Mime/Tests/EmailTest.php @@ -302,6 +302,17 @@ public function testGenerateBodyWithHtmlContentAndAttachedFile() $this->assertEquals(new MixedPart($html, $filePart), $e->getBody()); } + public function testGenerateBodyWithHtmlContentAndInlineImageNotreferenced() + { + [$text, $html, $filePart, $file, $imagePart, $image] = $this->generateSomeParts(); + $imagePart = new DataPart($image = fopen(__DIR__.'/Fixtures/mimetypes/test.gif', 'r')); + $imagePart->asInline(); + $e = (new Email())->from('me@example.com')->to('you@example.com'); + $e->embed($image); + $e->html('html content'); + $this->assertEquals(new MixedPart($html, $imagePart), $e->getBody()); + } + public function testGenerateBodyWithAttachedFileOnly() { [$text, $html, $filePart, $file, $imagePart, $image] = $this->generateSomeParts(); @@ -310,6 +321,24 @@ public function testGenerateBodyWithAttachedFileOnly() $this->assertEquals(new MixedPart($filePart), $e->getBody()); } + public function testGenerateBodyWithInlineImageOnly() + { + $imagePart = new DataPart($image = fopen(__DIR__.'/Fixtures/mimetypes/test.gif', 'r')); + $imagePart->asInline(); + $e = (new Email())->from('me@example.com')->to('you@example.com'); + $e->embed($image); + $this->assertEquals(new MixedPart($imagePart), $e->getBody()); + } + + public function testGenerateBodyWithEmbeddedImageOnly() + { + $imagePart = new DataPart($image = fopen(__DIR__.'/Fixtures/mimetypes/test.gif', 'r')); + $e = (new Email())->from('me@example.com')->to('you@example.com'); + $e->embed($image); + $imagePart->asInline(); + $this->assertEquals(new MixedPart($imagePart), $e->getBody()); + } + public function testGenerateBodyWithTextAndHtmlContentAndAttachedFile() { [$text, $html, $filePart, $file, $imagePart, $image] = $this->generateSomeParts(); From d873a206c726858632202fca2cbeb7fd2401dc6a Mon Sep 17 00:00:00 2001 From: Guilherme Ferreira Date: Wed, 31 Aug 2022 00:05:24 +0200 Subject: [PATCH 0051/1170] Using identical comparison for path validation --- .../Component/Asset/VersionStrategy/StaticVersionStrategy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php b/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php index e7ce0ec218976..d752cd4c2f13d 100644 --- a/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php +++ b/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php @@ -46,7 +46,7 @@ public function applyVersion($path) { $versionized = sprintf($this->format, ltrim($path, '/'), $this->getVersion($path)); - if ($path && '/' == $path[0]) { + if ($path && '/' === $path[0]) { return '/'.$versionized; } From e65c54c18efc6f3ce4d3ed5d271c2a73c3a66828 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 30 Aug 2022 18:39:01 +0200 Subject: [PATCH 0052/1170] [HttpKernel] lock when writting profiles --- .../Profiler/FileProfilerStorage.php | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php index d729994c1f0cc..aa494691d1fc1 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php @@ -115,19 +115,7 @@ public function purge() */ public function read($token): ?Profile { - if (!$token || !file_exists($file = $this->getFilename($token))) { - return null; - } - - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - } - - if (!$data = unserialize(file_get_contents($file))) { - return null; - } - - return $this->createProfileFromData($token, $data); + return $this->doRead($token); } /** @@ -169,14 +157,13 @@ public function write(Profile $profile): bool 'status_code' => $profile->getStatusCode(), ]; - $context = stream_context_create(); + $data = serialize($data); - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - stream_context_set_option($context, 'zlib', 'level', 3); + if (\function_exists('gzencode')) { + $data = gzencode($data, 3); } - if (false === file_put_contents($file, serialize($data), 0, $context)) { + if (false === file_put_contents($file, $data, \LOCK_EX)) { return false; } @@ -293,21 +280,34 @@ protected function createProfileFromData($token, $data, $parent = null) } foreach ($data['children'] as $token) { - if (!$token || !file_exists($file = $this->getFilename($token))) { - continue; + if (null !== $childProfile = $this->doRead($token, $profile)) { + $profile->addChild($childProfile); } + } - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - } + return $profile; + } - if (!$childData = unserialize(file_get_contents($file))) { - continue; - } + private function doRead($token, Profile $profile = null): ?Profile + { + if (!$token || !file_exists($file = $this->getFilename($token))) { + return null; + } + + $h = fopen($file, 'r'); + flock($h, \LOCK_SH); + $data = stream_get_contents($h); + flock($h, \LOCK_UN); + fclose($h); - $profile->addChild($this->createProfileFromData($token, $childData, $profile)); + if (\function_exists('gzdecode')) { + $data = @gzdecode($data) ?: $data; } - return $profile; + if (!$data = unserialize($data)) { + return null; + } + + return $this->createProfileFromData($token, $data, $profile); } } From 1864eaa38ca692a4d80a2c2132260cfd6068c25b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 31 Aug 2022 10:40:26 +0200 Subject: [PATCH 0053/1170] [FrameworkBundle] fix test --- .../FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php index d47ca5a822139..1aa15d48daa69 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php @@ -101,7 +101,7 @@ public function testSecretLoadedFromExtension() public function testAnonymousMicroKernel() { - $kernel = new class('anonymous_kernel') extends MinimalKernel { + $kernel = $this->kernel = new class('anonymous_kernel') extends MinimalKernel { public function helloAction(): Response { return new Response('Hello World!'); From 83ab6cd693db74b1f3597ef9f24da7af9cdbc4bf Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 31 Aug 2022 10:56:54 +0200 Subject: [PATCH 0054/1170] [HttpKernel] fix merge --- .../Controller/ArgumentResolver/DateTimeValueResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php index 55007bef7bc87..d8953f564b440 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DateTimeValueResolver.php @@ -65,7 +65,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable if (null !== $format) { $date = $class::createFromFormat($format, $value); - if ($class::getLastErrors()['warning_count']) { + if (($class::getLastErrors() ?: ['warning_count' => 0])['warning_count']) { $date = false; } } else { From c3cae1f38c1b72c8d2d2dd4638d4d024fef968f7 Mon Sep 17 00:00:00 2001 From: Mathieu Piot Date: Mon, 29 Aug 2022 12:21:59 +0200 Subject: [PATCH 0055/1170] [String] CamelCase/SnakeCase on uppercase word --- src/Symfony/Component/String/AbstractUnicodeString.php | 2 +- src/Symfony/Component/String/ByteString.php | 5 ++++- src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/String/AbstractUnicodeString.php b/src/Symfony/Component/String/AbstractUnicodeString.php index 6fd418e65afe9..1bc6f88fdac22 100644 --- a/src/Symfony/Component/String/AbstractUnicodeString.php +++ b/src/Symfony/Component/String/AbstractUnicodeString.php @@ -162,7 +162,7 @@ public function ascii(array $rules = []): self public function camel(): parent { $str = clone $this; - $str->string = str_replace(' ', '', preg_replace_callback('/\b./u', static function ($m) use (&$i) { + $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?![A-Z]{2,})/u', static function ($m) use (&$i) { return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); }, preg_replace('/[^\pL0-9]++/u', ' ', $this->string))); diff --git a/src/Symfony/Component/String/ByteString.php b/src/Symfony/Component/String/ByteString.php index d9ee3edb52cb2..626d8c1bb31fe 100644 --- a/src/Symfony/Component/String/ByteString.php +++ b/src/Symfony/Component/String/ByteString.php @@ -103,7 +103,10 @@ public function append(string ...$suffix): parent public function camel(): parent { $str = clone $this; - $str->string = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); + + $parts = explode(' ', trim(ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); + $parts[0] = 1 !== \strlen($parts[0]) && ctype_upper($parts[0]) ? $parts[0] : lcfirst($parts[0]); + $str->string = implode('', $parts); return $str; } diff --git a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php index b3c3d9086e1e6..a0cf2068f9476 100644 --- a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php +++ b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php @@ -1042,11 +1042,13 @@ public static function provideCamel() return [ ['', ''], ['xY', 'x_y'], + ['xuYo', 'xu_yo'], ['symfonyIsGreat', 'symfony_is_great'], ['symfony5IsGreat', 'symfony_5_is_great'], ['symfonyIsGreat', 'Symfony is great'], ['symfonyIsAGreatFramework', 'Symfony is a great framework'], ['symfonyIsGREAT', '*Symfony* is GREAT!!'], + ['SYMFONY', 'SYMFONY'], ]; } @@ -1066,6 +1068,7 @@ public static function provideSnake() ['', ''], ['x_y', 'x_y'], ['x_y', 'X_Y'], + ['xu_yo', 'xu_yo'], ['symfony_is_great', 'symfonyIsGreat'], ['symfony5_is_great', 'symfony5IsGreat'], ['symfony5is_great', 'symfony5isGreat'], @@ -1073,6 +1076,7 @@ public static function provideSnake() ['symfony_is_a_great_framework', 'symfonyIsAGreatFramework'], ['symfony_is_great', 'symfonyIsGREAT'], ['symfony_is_really_great', 'symfonyIsREALLYGreat'], + ['symfony', 'SYMFONY'], ]; } From 675601b8f73364d5451ed6a61bc8c37e6f1f764a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20de=20Guillebon?= Date: Fri, 26 Aug 2022 16:19:22 +0200 Subject: [PATCH 0056/1170] Replace get_class() calls by ::class --- .php-cs-fixer.dist.php | 1 + .../DataCollector/ObjectParameter.php | 2 +- .../Security/User/EntityUserProviderTest.php | 2 +- .../Constraints/UniqueEntityValidator.php | 10 +++++----- .../Validator/DoctrineInitializer.php | 2 +- .../Bridge/Twig/Mime/NotificationEmail.php | 2 +- .../CacheWarmer/ConfigBuilderCacheWarmer.php | 2 +- .../FrameworkBundle/Command/AboutCommand.php | 2 +- .../Command/BuildDebugContainerTrait.php | 2 +- .../Command/ContainerLintCommand.php | 2 +- .../Console/Descriptor/Descriptor.php | 4 ++-- .../Console/Descriptor/JsonDescriptor.php | 8 ++++---- .../Console/Descriptor/MarkdownDescriptor.php | 8 ++++---- .../Console/Descriptor/TextDescriptor.php | 8 ++++---- .../Console/Descriptor/XmlDescriptor.php | 6 +++--- .../CacheClearCommandTest.php | 2 +- .../Compiler/ProfilerPassTest.php | 4 ++-- .../Controller/AnnotatedController.php | 2 +- .../Command/DebugFirewallCommand.php | 4 ++-- .../DataCollector/SecurityDataCollector.php | 4 ++-- .../SecurityDataCollectorTest.php | 20 +++++++++---------- .../Security/StaticTokenProvider.php | 4 ++-- .../Security/Core/User/ArrayUserProvider.php | 2 +- .../EventListener/WebDebugToolbarListener.php | 2 +- .../Cache/Adapter/DoctrineDbalAdapter.php | 2 +- .../Cache/Adapter/MemcachedAdapter.php | 2 +- .../Component/Cache/Tests/Psr16CacheTest.php | 2 +- .../Config/Builder/ConfigBuilderGenerator.php | 2 +- .../Definition/Dumper/XmlReferenceDumper.php | 2 +- .../Definition/Dumper/YamlReferenceDumper.php | 2 +- .../Config/Exception/LoaderLoadException.php | 2 +- .../Config/Tests/Definition/ArrayNodeTest.php | 2 +- .../Definition/Builder/NodeBuilderTest.php | 4 ++-- .../Console/Logger/ConsoleLogger.php | 2 +- .../Compiler/CheckTypeDeclarationsPass.php | 2 +- .../DependencyInjection/Compiler/Compiler.php | 4 ++-- .../MergeExtensionConfigurationPass.php | 2 +- .../ResolveInstanceofConditionalsPass.php | 2 +- .../DependencyInjection/Dumper/XmlDumper.php | 2 +- .../DependencyInjection/Dumper/YamlDumper.php | 2 +- .../RegisterServiceSubscribersPassTest.php | 4 ++-- .../ResolveChildDefinitionsPassTest.php | 2 +- .../Tests/ContainerBuilderTest.php | 2 +- .../Component/DomCrawler/Tests/FormTest.php | 2 +- .../ErrorHandler/Tests/ErrorHandlerTest.php | 4 ++-- .../Component/Form/AbstractExtension.php | 2 +- .../Component/Form/Command/DebugCommand.php | 2 +- .../Form/Console/Descriptor/Descriptor.php | 2 +- .../DependencyInjectionExtension.php | 2 +- .../Validator/ValidatorTypeGuesser.php | 8 ++++---- src/Symfony/Component/Form/FormRegistry.php | 2 +- .../Component/Form/PreloadedExtension.php | 2 +- .../Form/Tests/Command/DebugCommandTest.php | 2 +- .../Core/DataMapper/DataMapperTest.php | 2 +- .../Constraints/FormValidatorTest.php | 2 +- .../Type/FormTypeValidatorExtensionTest.php | 2 +- .../HttpClient/Tests/HttplugClientTest.php | 4 ++-- .../Component/HttpFoundation/JsonResponse.php | 2 +- .../Session/Storage/NativeSessionStorage.php | 2 +- .../ControllerMetadata/ArgumentMetadata.php | 2 +- .../DataCollector/ConfigDataCollector.php | 2 +- .../Component/HttpKernel/HttpKernel.php | 2 +- src/Symfony/Component/HttpKernel/Kernel.php | 2 +- .../ArgumentResolver/UidValueResolverTest.php | 2 +- .../Tests/EventListener/ErrorListenerTest.php | 4 ++-- .../Component/HttpKernel/Tests/KernelTest.php | 2 +- .../Component/Intl/Resources/bin/common.php | 2 +- src/Symfony/Component/Mailer/Envelope.php | 2 +- .../Component/Mailer/Transport/Transports.php | 2 +- .../DataCollector/MessengerDataCollector.php | 4 ++-- src/Symfony/Component/Messenger/Envelope.php | 4 ++-- .../SendFailedMessageForRetryListener.php | 6 +++--- ...ailedMessageToFailureTransportListener.php | 2 +- .../DelayedMessageHandlingException.php | 2 +- .../Middleware/HandleMessageMiddleware.php | 2 +- .../Middleware/SendMessageMiddleware.php | 4 ++-- .../Messenger/Stamp/ErrorDetailsStamp.php | 2 +- .../HandleMessageMiddlewareTest.php | 4 ++-- .../Middleware/SendMessageMiddlewareTest.php | 10 +++++----- .../Component/Messenger/Tests/WorkerTest.php | 2 +- src/Symfony/Component/Messenger/Worker.php | 2 +- .../Test/Constraint/EmailAddressContains.php | 2 +- .../Test/Constraint/EmailAttachmentCount.php | 2 +- .../Mime/Test/Constraint/EmailHasHeader.php | 2 +- .../Mime/Test/Constraint/EmailHeaderSame.php | 2 +- .../Test/Constraint/EmailHtmlBodyContains.php | 2 +- .../Test/Constraint/EmailTextBodyContains.php | 2 +- .../Notifier/Notification/Notification.php | 4 ++-- src/Symfony/Component/Notifier/Notifier.php | 2 +- .../OptionsResolver/OptionsResolver.php | 2 +- .../Command/UserPasswordHashCommand.php | 2 +- .../PropertyAccess/PropertyAccessor.php | 8 ++++---- .../Routing/Requirement/EnumRequirement.php | 2 +- .../Authorization/AccessDecisionManager.php | 2 +- .../Core/Signature/SignatureHasher.php | 2 +- .../Authentication/AuthenticatorManager.php | 6 +++--- .../TraceableAuthenticatorManagerListener.php | 2 +- .../Http/Authenticator/Passport/Passport.php | 2 +- .../PersistentRememberMeHandler.php | 2 +- .../RememberMe/SignatureRememberMeHandler.php | 2 +- .../Semaphore/Store/StoreFactory.php | 2 +- .../Extractor/ObjectPropertyListExtractor.php | 2 +- .../ClassDiscriminatorFromClassMetadata.php | 2 +- .../Mapping/Factory/ClassResolverTrait.php | 2 +- .../Factory/CompiledClassMetadataFactory.php | 4 ++-- .../Normalizer/AbstractObjectNormalizer.php | 6 +++--- .../Normalizer/GetSetMethodNormalizer.php | 2 +- .../Normalizer/MimeMessageNormalizer.php | 2 +- .../Normalizer/ObjectNormalizer.php | 8 ++++---- .../Normalizer/PropertyNormalizer.php | 4 ++-- .../Component/Serializer/Serializer.php | 2 +- .../Tests/Debug/TraceableEncoderTest.php | 4 ++-- .../Tests/Debug/TraceableNormalizerTest.php | 4 ++-- .../ObjectPropertyListExtractorTest.php | 2 +- .../Factory/CacheMetadataFactoryTest.php | 2 +- .../Features/CallbacksTestTrait.php | 4 ++-- .../Features/CircularReferenceTestTrait.php | 8 ++++---- .../Normalizer/PropertyNormalizerTest.php | 2 +- src/Symfony/Component/String/LazyString.php | 2 +- .../String/Resources/bin/update-data.php | 2 +- .../Validator/Command/DebugCommand.php | 4 ++-- .../Validator/Constraints/Composite.php | 2 +- .../Factory/LazyLoadingMetadataFactory.php | 4 ++-- .../Validator/Mapping/MemberMetadata.php | 2 +- .../Validator/Mapping/PropertyMetadata.php | 2 +- .../Test/ConstraintValidatorTestCase.php | 4 ++-- .../AbstractComparisonValidatorTestCase.php | 4 ++-- .../Tests/Constraints/BicValidatorTest.php | 2 +- .../Validator/RecursiveValidatorTest.php | 2 +- .../RecursiveContextualValidator.php | 6 +++--- .../Component/VarDumper/Caster/CutStub.php | 2 +- .../Component/VarDumper/Caster/SplCaster.php | 2 +- .../VarDumper/Caster/SymfonyCaster.php | 2 +- .../Component/VarDumper/Cloner/VarCloner.php | 2 +- .../VarDumper/Dumper/ContextualizedDumper.php | 2 +- .../Exception/ThrowingCasterException.php | 2 +- .../Component/VarExporter/Hydrator.php | 2 +- .../VarExporter/Internal/Exporter.php | 4 ++-- .../VarExporter/Internal/GhostObjectState.php | 4 ++-- src/Symfony/Component/Yaml/Inline.php | 2 +- .../HttpClient/Test/HttpClientTestCase.php | 2 +- 141 files changed, 216 insertions(+), 215 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 96b7d3020063c..35a6317290581 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -34,6 +34,7 @@ 'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true], 'header_comment' => ['header' => $fileHeaderComment], 'modernize_strpos' => true, + 'get_class_to_class_keyword' => true, ]) ->setRiskyAllowed(true) ->setFinder( diff --git a/src/Symfony/Bridge/Doctrine/DataCollector/ObjectParameter.php b/src/Symfony/Bridge/Doctrine/DataCollector/ObjectParameter.php index 549a6af8bb42a..384ba0efeb869 100644 --- a/src/Symfony/Bridge/Doctrine/DataCollector/ObjectParameter.php +++ b/src/Symfony/Bridge/Doctrine/DataCollector/ObjectParameter.php @@ -23,7 +23,7 @@ public function __construct(object $object, ?\Throwable $error) $this->object = $object; $this->error = $error; $this->stringable = \is_callable([$object, '__toString']); - $this->class = \get_class($object); + $this->class = $object::class; } public function getObject(): object diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php index 20d1e487a23d2..ca4f091b75f9f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php @@ -146,7 +146,7 @@ public function testSupportProxy() $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name'); $user2 = $em->getReference('Symfony\Bridge\Doctrine\Tests\Fixtures\User', ['id1' => 1, 'id2' => 1]); - $this->assertTrue($provider->supportsClass(\get_class($user2))); + $this->assertTrue($provider->supportsClass($user2::class)); } public function testLoadUserByUserNameShouldLoadUserWhenProperInterfaceProvided() diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php index 1274607287560..71d73d88a4a44 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php @@ -75,14 +75,14 @@ public function validate(mixed $entity, Constraint $constraint) throw new ConstraintDefinitionException(sprintf('Object manager "%s" does not exist.', $constraint->em)); } } else { - $em = $this->registry->getManagerForClass(\get_class($entity)); + $em = $this->registry->getManagerForClass($entity::class); if (!$em) { throw new ConstraintDefinitionException(sprintf('Unable to find the object manager associated with an entity of class "%s".', get_debug_type($entity))); } } - $class = $em->getClassMetadata(\get_class($entity)); + $class = $em->getClassMetadata($entity::class); $criteria = []; $hasNullValue = false; @@ -136,7 +136,7 @@ public function validate(mixed $entity, Constraint $constraint) throw new ConstraintDefinitionException(sprintf('The "%s" entity repository does not support the "%s" entity. The entity should be an instance of or extend "%s".', $constraint->entityClass, $class->getName(), $supportedClass)); } } else { - $repository = $em->getRepository(\get_class($entity)); + $repository = $em->getRepository($entity::class); } $arguments = [$criteria]; @@ -203,7 +203,7 @@ private function formatWithIdentifiers(ObjectManager $em, ClassMetadata $class, return (string) $value; } - if ($class->getName() !== $idClass = \get_class($value)) { + if ($class->getName() !== $idClass = $value::class) { // non unique value might be a composite PK that consists of other entity objects if ($em->getMetadataFactory()->hasMetadataFor($idClass)) { $identifiers = $em->getClassMetadata($idClass)->getIdentifierValues($value); @@ -224,7 +224,7 @@ private function formatWithIdentifiers(ObjectManager $em, ClassMetadata $class, if (!\is_object($id) || $id instanceof \DateTimeInterface) { $idAsString = $this->formatValue($id, self::PRETTY_DATE); } else { - $idAsString = sprintf('object("%s")', \get_class($id)); + $idAsString = sprintf('object("%s")', $id::class); } $id = sprintf('%s => %s', $field, $idAsString); diff --git a/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php b/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php index 3e7922ec79276..c50c6e98120ab 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php +++ b/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php @@ -30,6 +30,6 @@ public function __construct(ManagerRegistry $registry) public function initialize(object $object) { - $this->registry->getManagerForClass(\get_class($object))?->initializeObject($object); + $this->registry->getManagerForClass($object::class)?->initializeObject($object); } } diff --git a/src/Symfony/Bridge/Twig/Mime/NotificationEmail.php b/src/Symfony/Bridge/Twig/Mime/NotificationEmail.php index 60a29304c9b20..3148d60a8c851 100644 --- a/src/Symfony/Bridge/Twig/Mime/NotificationEmail.php +++ b/src/Symfony/Bridge/Twig/Mime/NotificationEmail.php @@ -208,7 +208,7 @@ private function getExceptionAsString(\Throwable|FlattenException $exception): s return $exception->getAsString(); } - $message = \get_class($exception); + $message = $exception::class; if ('' !== $exception->getMessage()) { $message .= ': '.$exception->getMessage(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php index 7b87e487e91fc..3f4a8057ed187 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php @@ -53,7 +53,7 @@ public function warmUp(string $cacheDir): array try { $this->dumpExtension($extension, $generator); } catch (\Exception $e) { - $this->logger?->warning('Failed to generate ConfigBuilder for extension {extensionClass}.', ['exception' => $e, 'extensionClass' => \get_class($extension)]); + $this->logger?->warning('Failed to generate ConfigBuilder for extension {extensionClass}.', ['exception' => $e, 'extensionClass' => $extension::class]); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php index 4b2df917db7a1..e7e6331b2fc92 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php @@ -67,7 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int new TableSeparator(), ['Kernel'], new TableSeparator(), - ['Type', \get_class($kernel)], + ['Type', $kernel::class], ['Environment', $kernel->getEnvironment()], ['Debug', $kernel->isDebug() ? 'true' : 'false'], ['Charset', $kernel->getCharset()], diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php b/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php index 785027dbc8d4e..5ac0c8cbc2cb1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php @@ -44,7 +44,7 @@ protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilde $this->initializeBundles(); return $this->buildContainer(); - }, $kernel, \get_class($kernel)); + }, $kernel, $kernel::class); $container = $buildContainer(); $container->getCompilerPassConfig()->setRemovingPasses([]); $container->getCompilerPassConfig()->setAfterRemovingPasses([]); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php index 1029dbc49d3c1..8100793faf3dc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php @@ -86,7 +86,7 @@ private function getContainerBuilder(): ContainerBuilder $this->initializeBundles(); return $this->buildContainer(); - }, $kernel, \get_class($kernel)); + }, $kernel, $kernel::class); $container = $buildContainer(); $skippedIds = []; diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index c110f2ea86483..28d1a7c73c8f6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -158,7 +158,7 @@ protected function formatValue(mixed $value): string } if (\is_object($value)) { - return sprintf('object(%s)', \get_class($value)); + return sprintf('object(%s)', $value::class); } if (\is_string($value)) { @@ -335,7 +335,7 @@ private function getContainerEnvVars(ContainerBuilder $container): array $getDefaultParameter = function (string $name) { return parent::get($name); }; - $getDefaultParameter = $getDefaultParameter->bindTo($bag, \get_class($bag)); + $getDefaultParameter = $getDefaultParameter->bindTo($bag, $bag::class); $getEnvReflection = new \ReflectionMethod($container, 'getEnv'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index 1c0cfa5c6d936..2a7c53fe52a46 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -78,7 +78,7 @@ protected function describeContainerService(object $service, array $options = [] } elseif ($service instanceof Definition) { $this->writeData($this->getContainerDefinitionData($service, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments'], $builder, $options['id']), $options); } else { - $this->writeData(\get_class($service), $options); + $this->writeData($service::class, $options); } } @@ -108,7 +108,7 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o } elseif ($service instanceof Definition) { $data['definitions'][$serviceId] = $this->getContainerDefinitionData($service, $omitTags, $showArguments, $builder, $serviceId); } else { - $data['services'][$serviceId] = \get_class($service); + $data['services'][$serviceId] = $service::class; } } @@ -204,7 +204,7 @@ protected function getRouteData(Route $route): array 'hostRegex' => '' !== $route->getHost() ? $route->compile()->getHostRegex() : '', 'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', 'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', - 'class' => \get_class($route), + 'class' => $route::class, 'defaults' => $route->getDefaults(), 'requirements' => $route->getRequirements() ?: 'NO CUSTOM', 'options' => $route->getOptions(), @@ -382,7 +382,7 @@ private function getCallableData(mixed $callable): array if (method_exists($callable, '__invoke')) { $data['type'] = 'object'; - $data['name'] = \get_class($callable); + $data['name'] = $callable::class; return $data; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 111578a84b1d2..2fc80103179e1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -51,7 +51,7 @@ protected function describeRoute(Route $route, array $options = []) ."\n".'- Host Regex: '.('' !== $route->getHost() ? $route->compile()->getHostRegex() : '') ."\n".'- Scheme: '.($route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY') ."\n".'- Method: '.($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY') - ."\n".'- Class: '.\get_class($route) + ."\n".'- Class: '.$route::class ."\n".'- Defaults: '.$this->formatRouterConfig($route->getDefaults()) ."\n".'- Requirements: '.($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM') ."\n".'- Options: '.$this->formatRouterConfig($route->getOptions()); @@ -101,7 +101,7 @@ protected function describeContainerService(object $service, array $options = [] } elseif ($service instanceof Definition) { $this->describeContainerDefinition($service, $childOptions, $builder); } else { - $this->write(sprintf('**`%s`:** `%s`', $options['id'], \get_class($service))); + $this->write(sprintf('**`%s`:** `%s`', $options['id'], $service::class)); } } @@ -188,7 +188,7 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o $this->write("\n\nServices\n--------\n"); foreach ($services['services'] as $id => $service) { $this->write("\n"); - $this->write(sprintf('- `%s`: `%s`', $id, \get_class($service))); + $this->write(sprintf('- `%s`: `%s`', $id, $service::class)); } } } @@ -399,7 +399,7 @@ protected function describeCallable(mixed $callable, array $options = []) if (method_exists($callable, '__invoke')) { $string .= "\n- Type: `object`"; - $string .= "\n".sprintf('- Name: `%s`', \get_class($callable)); + $string .= "\n".sprintf('- Name: `%s`', $callable::class); return $this->write($string."\n"); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 13a8a8b955ef7..b20c95a5a6d4c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -98,7 +98,7 @@ protected function describeRoute(Route $route, array $options = []) ['Scheme', $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY'], ['Method', $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY'], ['Requirements', $route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM'], - ['Class', \get_class($route)], + ['Class', $route::class], ['Defaults', $this->formatRouterConfig($defaults)], ['Options', $this->formatRouterConfig($route->getOptions())], ]; @@ -156,7 +156,7 @@ protected function describeContainerService(object $service, array $options = [] $options['output']->table( ['Service ID', 'Class'], [ - [$options['id'] ?? '-', \get_class($service)], + [$options['id'] ?? '-', $service::class], ] ); } @@ -244,7 +244,7 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o $alias = $definition; $tableRows[] = array_merge([$styledServiceId, sprintf('alias for "%s"', $alias)], $tagsCount ? array_fill(0, $tagsCount, '') : []); } else { - $tableRows[] = array_merge([$styledServiceId, \get_class($definition)], $tagsCount ? array_fill(0, $tagsCount, '') : []); + $tableRows[] = array_merge([$styledServiceId, $definition::class], $tagsCount ? array_fill(0, $tagsCount, '') : []); } } @@ -625,7 +625,7 @@ private function formatCallable(mixed $callable): string } if (method_exists($callable, '__invoke')) { - return sprintf('%s::__invoke()', \get_class($callable)); + return sprintf('%s::__invoke()', $callable::class); } throw new \InvalidArgumentException('Callable is not describable.'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 414c526603d6d..b95438eefba38 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -164,7 +164,7 @@ private function getRouteDocument(Route $route, string $name = null): \DOMDocume $routeXML->setAttribute('name', $name); } - $routeXML->setAttribute('class', \get_class($route)); + $routeXML->setAttribute('class', $route::class); $routeXML->appendChild($pathXML = $dom->createElement('path')); $pathXML->setAttribute('regex', $route->compile()->getRegex()); @@ -269,7 +269,7 @@ private function getContainerServiceDocument(object $service, string $id, Contai } else { $dom->appendChild($serviceXML = $dom->createElement('service')); $serviceXML->setAttribute('id', $id); - $serviceXML->setAttribute('class', \get_class($service)); + $serviceXML->setAttribute('class', $service::class); } return $dom; @@ -577,7 +577,7 @@ private function getCallableDocument(mixed $callable): \DOMDocument if (method_exists($callable, '__invoke')) { $callableXML->setAttribute('type', 'object'); - $callableXML->setAttribute('name', \get_class($callable)); + $callableXML->setAttribute('name', $callable::class); return $dom; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php index 8a5a023e3b7ac..d3f8e2c9be5a4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php @@ -126,7 +126,7 @@ public function testCacheIsWarmedWithOldContainer() \Closure::bind(function (Container $class) { unset($class->loadedDynamicParameters['kernel.build_dir']); unset($class->parameters['kernel.build_dir']); - }, null, \get_class($container))($container); + }, null, $container::class)($container); $input = new ArrayInput(['cache:clear']); $application = new Application($kernel); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php index 65f047426ae44..bb7d4f1f4ae4d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php @@ -105,12 +105,12 @@ public function testValidCollectorWithTemplateUsingAutoconfigure(TemplateAwareDa $profilerDefinition = $container->register('profiler', 'ProfilerClass'); $container->registerForAutoconfiguration(DataCollectorInterface::class)->addTag('data_collector'); - $container->register('mydatacollector', \get_class($dataCollector))->setAutoconfigured(true); + $container->register('mydatacollector', $dataCollector::class)->setAutoconfigured(true); (new ResolveInstanceofConditionalsPass())->process($container); (new ProfilerPass())->process($container); - $idForTemplate = \get_class($dataCollector); + $idForTemplate = $dataCollector::class; $this->assertSame(['mydatacollector' => [$idForTemplate, 'foo']], $container->getParameter('data_collector.templates')); // grab the method calls off of the "profiler" definition diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php index f2f077786f2b7..e6b917b63cc60 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php @@ -22,7 +22,7 @@ class AnnotatedController */ public function requestDefaultNullAction(Request $request = null) { - return new Response($request ? \get_class($request) : null); + return new Response($request ? $request::class : null); } /** diff --git a/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php index ea1e44018ea05..757f61629f6f5 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php @@ -218,7 +218,7 @@ private function displayAuthenticators(string $name, SymfonyStyle $io): void array_map( static function ($authenticator) { return [ - \get_class($authenticator), + $authenticator::class, ]; }, $authenticators @@ -253,7 +253,7 @@ private function formatCallable(mixed $callable): string } if (method_exists($callable, '__invoke')) { - return sprintf('%s::__invoke()', \get_class($callable)); + return sprintf('%s::__invoke()', $callable::class); } throw new \InvalidArgumentException('Callable is not describable.'); diff --git a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php index dd446208e39d2..96730d041c5fc 100644 --- a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php +++ b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php @@ -119,7 +119,7 @@ public function collect(Request $request, Response $response, \Throwable $except 'impersonator_user' => $impersonatorUser, 'impersonation_exit_path' => null, 'token' => $token, - 'token_class' => $this->hasVarDumper ? new ClassStub(\get_class($token)) : \get_class($token), + 'token_class' => $this->hasVarDumper ? new ClassStub($token::class) : $token::class, 'logout_url' => $logoutUrl, 'user' => $token->getUserIdentifier(), 'roles' => $assignedRoles, @@ -137,7 +137,7 @@ public function collect(Request $request, Response $response, \Throwable $except $voter = $voter->getDecoratedVoter(); } - $this->data['voters'][] = $this->hasVarDumper ? new ClassStub(\get_class($voter)) : \get_class($voter); + $this->data['voters'][] = $this->hasVarDumper ? new ClassStub($voter::class) : $voter::class; } // collect voter details diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php index c3283dae5cdd7..b5178dcde56a1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php @@ -239,14 +239,14 @@ public function providerCollectDecisionLog(): \Generator ], ]], [$decoratedVoter1, $decoratedVoter1], - [\get_class($voter1), \get_class($voter2)], + [$voter1::class, $voter2::class], [[ 'attributes' => ['view'], 'object' => new \stdClass(), 'result' => true, 'voter_details' => [ - ['class' => \get_class($voter1), 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], - ['class' => \get_class($voter2), 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], + ['class' => $voter1::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], + ['class' => $voter2::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_ABSTAIN], ], ]], ]; @@ -276,17 +276,17 @@ public function providerCollectDecisionLog(): \Generator ], ], [$decoratedVoter1, $decoratedVoter1], - [\get_class($voter1), \get_class($voter2)], + [$voter1::class, $voter2::class], [ [ 'attributes' => ['view', 'edit'], 'object' => new \stdClass(), 'result' => false, 'voter_details' => [ - ['class' => \get_class($voter1), 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_DENIED], - ['class' => \get_class($voter1), 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_DENIED], - ['class' => \get_class($voter2), 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_GRANTED], - ['class' => \get_class($voter2), 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_GRANTED], + ['class' => $voter1::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_DENIED], + ['class' => $voter1::class, 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_DENIED], + ['class' => $voter2::class, 'attributes' => ['view'], 'vote' => VoterInterface::ACCESS_GRANTED], + ['class' => $voter2::class, 'attributes' => ['edit'], 'vote' => VoterInterface::ACCESS_GRANTED], ], ], [ @@ -294,8 +294,8 @@ public function providerCollectDecisionLog(): \Generator 'object' => new \stdClass(), 'result' => true, 'voter_details' => [ - ['class' => \get_class($voter1), 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], - ['class' => \get_class($voter2), 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], + ['class' => $voter1::class, 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], + ['class' => $voter2::class, 'attributes' => ['update'], 'vote' => VoterInterface::ACCESS_GRANTED], ], ], ], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php index 24ff10a4d0199..8a669e99bc48d 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php @@ -23,8 +23,8 @@ class StaticTokenProvider implements TokenProviderInterface public function __construct($kernel) { // only reset the "internal db" for new tests - if (self::$kernelClass !== \get_class($kernel)) { - self::$kernelClass = \get_class($kernel); + if (self::$kernelClass !== $kernel::class) { + self::$kernelClass = $kernel::class; self::$db = []; } } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/SecuredPageBundle/Security/Core/User/ArrayUserProvider.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/SecuredPageBundle/Security/Core/User/ArrayUserProvider.php index 68f896bcc68b1..42f2df9e10043 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/SecuredPageBundle/Security/Core/User/ArrayUserProvider.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/SecuredPageBundle/Security/Core/User/ArrayUserProvider.php @@ -64,7 +64,7 @@ public function refreshUser(UserInterface $user): UserInterface } $storedUser = $this->getUser($user->getUserIdentifier()); - $class = \get_class($storedUser); + $class = $storedUser::class; return new $class($storedUser->getUserIdentifier(), $storedUser->getPassword(), $storedUser->getRoles(), $storedUser->isEnabled()); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index 5152223669c8d..8e0366e15340c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -85,7 +85,7 @@ public function onKernelResponse(ResponseEvent $event) $this->urlGenerator->generate('_profiler', ['token' => $response->headers->get('X-Debug-Token')], UrlGeneratorInterface::ABSOLUTE_URL) ); } catch (\Exception $e) { - $response->headers->set('X-Debug-Error', \get_class($e).': '.preg_replace('/\s+/', ' ', $e->getMessage())); + $response->headers->set('X-Debug-Error', $e::class.': '.preg_replace('/\s+/', ' ', $e->getMessage())); } } diff --git a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php index 15a711e370384..806eba40da8ca 100644 --- a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php @@ -326,7 +326,7 @@ private function getPlatformName(): string $platform instanceof \Doctrine\DBAL\Platforms\OraclePlatform => $this->platformName = 'oci', $platform instanceof \Doctrine\DBAL\Platforms\SQLServerPlatform, $platform instanceof \Doctrine\DBAL\Platforms\SQLServer2012Platform => $this->platformName = 'sqlsrv', - default => $this->platformName = \get_class($platform), + default => $this->platformName = $platform::class, }; } diff --git a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php index 06d9e286f9934..83e21da55fc48 100644 --- a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php @@ -58,7 +58,7 @@ public function __construct(\Memcached $client, string $namespace = '', int $def if (!static::isSupported()) { throw new CacheException('Memcached > 3.1.5 is required.'); } - if ('Memcached' === \get_class($client)) { + if ('Memcached' === $client::class) { $opt = $client->getOption(\Memcached::OPT_SERIALIZER); if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) { throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); diff --git a/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php b/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php index 562d6e11bf50b..264679aecc1b6 100644 --- a/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php @@ -163,7 +163,7 @@ public function testPrune() protected function isPruned(CacheInterface $cache, string $name): bool { - if (Psr16Cache::class !== \get_class($cache)) { + if (Psr16Cache::class !== $cache::class) { $this->fail('Test classes for pruneable caches must implement `isPruned($cache, $name)` method.'); } diff --git a/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php b/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php index e67e86679594a..c8ce7252e7835 100644 --- a/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php +++ b/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php @@ -123,7 +123,7 @@ private function buildNode(NodeInterface $node, ClassBuilder $class, string $nam $this->handleArrayNode($child, $class, $namespace); break; default: - throw new \RuntimeException(sprintf('Unknown node "%s".', \get_class($child))); + throw new \RuntimeException(sprintf('Unknown node "%s".', $child::class)); } } } diff --git a/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php b/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php index 1ad8522e00d4d..8dee2d394aeb9 100644 --- a/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php @@ -104,7 +104,7 @@ private function writeNode(NodeInterface $node, int $depth = 0, bool $root = fal if ($prototype->hasDefaultValue()) { $prototypeValue = $prototype->getDefaultValue(); } else { - $prototypeValue = match (\get_class($prototype)) { + $prototypeValue = match ($prototype::class) { ScalarNode::class => 'scalar value', FloatNode::class, IntegerNode::class => 'numeric value', diff --git a/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php b/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php index e19e05cfdaf6a..bb629d332e507 100644 --- a/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php @@ -100,7 +100,7 @@ private function writeNode(NodeInterface $node, NodeInterface $parentNode = null } elseif ($node instanceof EnumNode) { $comments[] = 'One of '.implode('; ', array_map('json_encode', $node->getValues())); $default = $node->hasDefaultValue() ? Inline::dump($node->getDefaultValue()) : '~'; - } elseif (VariableNode::class === \get_class($node) && \is_array($example)) { + } elseif (VariableNode::class === $node::class && \is_array($example)) { // If there is an array example, we are sure we dont need to print a default value $default = ''; } else { diff --git a/src/Symfony/Component/Config/Exception/LoaderLoadException.php b/src/Symfony/Component/Config/Exception/LoaderLoadException.php index 7ef6be83a1dc7..9b5ffeb40c724 100644 --- a/src/Symfony/Component/Config/Exception/LoaderLoadException.php +++ b/src/Symfony/Component/Config/Exception/LoaderLoadException.php @@ -71,7 +71,7 @@ public function __construct(string $resource, string $sourceResource = null, int protected function varToString(mixed $var) { if (\is_object($var)) { - return sprintf('Object(%s)', \get_class($var)); + return sprintf('Object(%s)', $var::class); } if (\is_array($var)) { diff --git a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php index 354ba5a97dbc8..538ba06dbaa23 100644 --- a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -73,7 +73,7 @@ public function ignoreAndRemoveMatrixProvider(): array public function testIgnoreAndRemoveBehaviors(bool $ignore, bool $remove, array|\Exception $expected, string $message = '') { if ($expected instanceof \Exception) { - $this->expectException(\get_class($expected)); + $this->expectException($expected::class); $this->expectExceptionMessage($expected->getMessage()); } $node = new ArrayNode('root'); diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php index b272008fedf25..1338c58a68721 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php @@ -66,14 +66,14 @@ public function testNodeTypesAreNotCaseSensitive() $node1 = $builder->node('', 'VaRiAbLe'); $node2 = $builder->node('', 'variable'); - $this->assertInstanceOf(\get_class($node1), $node2); + $this->assertInstanceOf($node1::class, $node2); $builder->setNodeClass('CuStOm', SomeNodeDefinition::class); $node1 = $builder->node('', 'CUSTOM'); $node2 = $builder->node('', 'custom'); - $this->assertInstanceOf(\get_class($node1), $node2); + $this->assertInstanceOf($node1::class, $node2); } public function testNumericNodeCreation() diff --git a/src/Symfony/Component/Console/Logger/ConsoleLogger.php b/src/Symfony/Component/Console/Logger/ConsoleLogger.php index 5e2e6c14428a4..098c56185c011 100644 --- a/src/Symfony/Component/Console/Logger/ConsoleLogger.php +++ b/src/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -108,7 +108,7 @@ private function interpolate(string $message, array $context): string } elseif ($val instanceof \DateTimeInterface) { $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); } elseif (\is_object($val)) { - $replacements["{{$key}}"] = '[object '.\get_class($val).']'; + $replacements["{{$key}}"] = '[object '.$val::class.']'; } else { $replacements["{{$key}}"] = '['.\gettype($val).']'; } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php index a8b3c7d9fac9f..26e89a9b9a26a 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php @@ -258,7 +258,7 @@ private function checkType(Definition $checkedDefinition, mixed $value, \Reflect } elseif ($value instanceof ServiceLocatorArgument) { $class = ServiceLocator::class; } elseif (\is_object($value)) { - $class = \get_class($value); + $class = $value::class; } else { $class = \gettype($value); $class = ['integer' => 'int', 'double' => 'float', 'boolean' => 'bool'][$class] ?? $class; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php index 4102d8039d53d..43f6348c32e13 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php @@ -52,10 +52,10 @@ public function addPass(CompilerPassInterface $pass, string $type = PassConfig:: public function log(CompilerPassInterface $pass, string $message) { if (str_contains($message, "\n")) { - $message = str_replace("\n", "\n".\get_class($pass).': ', trim($message)); + $message = str_replace("\n", "\n".$pass::class.': ', trim($message)); } - $this->log[] = \get_class($pass).': '.$message; + $this->log[] = $pass::class.': '.$message; } public function getLog(): array diff --git a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php index 4afff8f78939c..a0a896458fc57 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php @@ -151,7 +151,7 @@ public function __construct(ExtensionInterface $extension, ParameterBagInterface { parent::__construct($parameterBag); - $this->extensionClass = \get_class($extension); + $this->extensionClass = $extension::class; } public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): static diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php index 59acd67607e7a..c8217154741c9 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php @@ -107,7 +107,7 @@ private function processDefinition(ContainerBuilder $container, string $id, Defi $definition->setBindings([]); $definition = serialize($definition); - if (Definition::class === \get_class($abstract)) { + if (Definition::class === $abstract::class) { // cast Definition to ChildDefinition $definition = substr_replace($definition, '53', 2, 2); $definition = substr_replace($definition, 'Child', 44, 0); diff --git a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php index 874f263ced4b2..d384c4c08927c 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -381,7 +381,7 @@ public static function phpToXml(mixed $value): string case $value instanceof Parameter: return '%'.$value.'%'; case $value instanceof \UnitEnum: - return sprintf('%s::%s', \get_class($value), $value->name); + return sprintf('%s::%s', $value::class, $value->name); case \is_object($value) || \is_resource($value): throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); default: diff --git a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index 798043c7d5f22..dd1fa0628945e 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -297,7 +297,7 @@ private function dumpValue(mixed $value): mixed } elseif ($value instanceof Definition) { return new TaggedValue('service', (new Parser())->parse("_:\n".$this->addService('_', $value), Yaml::PARSE_CUSTOM_TAGS)['_']['_']); } elseif ($value instanceof \UnitEnum) { - return new TaggedValue('php/const', sprintf('%s::%s', \get_class($value), $value->name)); + return new TaggedValue('php/const', sprintf('%s::%s', $value::class, $value->name)); } elseif ($value instanceof AbstractArgument) { return new TaggedValue('abstract', $value->getText()); } elseif (\is_object($value) || \is_resource($value)) { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php index c2ecdf2f9f5ec..0f8fff4eed26f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php @@ -382,7 +382,7 @@ public static function getSubscribedServices(): array $container->setAlias('stdClass $someService', 'some.service'); $container->setAlias('stdClass $some_service', 'some.service'); $container->setAlias('stdClass $anotherService', 'some.service'); - $container->register('foo', \get_class($subscriber)) + $container->register('foo', $subscriber::class) ->addMethodCall('setContainer', [new Reference(PsrContainerInterface::class)]) ->addTag('container.service_subscriber'); @@ -433,7 +433,7 @@ public static function getSubscribedServices(): array }; $container->setParameter('parameter.1', 'foobar'); - $container->register('foo', \get_class($subscriber)) + $container->register('foo', $subscriber::class) ->addMethodCall('setContainer', [new Reference(PsrContainerInterface::class)]) ->addTag('container.service_subscriber'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php index d6b1013c31af3..0c137a39a03ba 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php @@ -293,7 +293,7 @@ public function testDeepDefinitionsResolving() $this->assertSame('parentClass', $factory[0]->getClass()); $argument = $container->getDefinition('sibling')->getArgument(0); - $this->assertSame('Symfony\Component\DependencyInjection\Definition', \get_class($argument)); + $this->assertSame('Symfony\Component\DependencyInjection\Definition', $argument::class); $this->assertSame('parentClass', $argument->getClass()); $properties = $container->getDefinition('sibling')->getProperties(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index f719442fbd9bb..5f48b68e2c046 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -381,7 +381,7 @@ public function testCreateProxyWithRealServiceInstantiator() $foo1 = $builder->get('foo1'); $this->assertSame($foo1, $builder->get('foo1'), 'The same proxy is retrieved on multiple subsequent calls'); - $this->assertSame('Bar\FooClass', \get_class($foo1)); + $this->assertSame('Bar\FooClass', $foo1::class); } public function testCreateLazyProxy() diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 3b29b0f588ffe..cded9781c1f4c 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -207,7 +207,7 @@ public function testConstructor($message, $form, $values) $values, array_map( function ($field) { - $class = \get_class($field); + $class = $field::class; return [substr($class, strrpos($class, '\\') + 1), $field->getValue()]; }, diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php index 4ae6b3fcb7a7d..a45e8e1c7887e 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php @@ -327,7 +327,7 @@ public function testHandleErrorWithAnonymousClass() $handler = ErrorHandler::register(); try { - trigger_error('foo '.\get_class($anonymousObject).' bar', \E_USER_WARNING); + trigger_error('foo '.$anonymousObject::class.' bar', \E_USER_WARNING); $this->fail('Exception expected.'); } catch (\ErrorException $e) { } finally { @@ -372,7 +372,7 @@ public function testHandleException(string $expectedMessage, \Throwable $excepti $logArgCheck = function ($level, $message, $context) use ($expectedMessage, $exception) { $this->assertSame($expectedMessage, $message); $this->assertArrayHasKey('exception', $context); - $this->assertInstanceOf(\get_class($exception), $context['exception']); + $this->assertInstanceOf($exception::class, $context['exception']); }; $logger diff --git a/src/Symfony/Component/Form/AbstractExtension.php b/src/Symfony/Component/Form/AbstractExtension.php index 6ba5624bd9dfa..5d3c1a8480345 100644 --- a/src/Symfony/Component/Form/AbstractExtension.php +++ b/src/Symfony/Component/Form/AbstractExtension.php @@ -137,7 +137,7 @@ private function initTypes() throw new UnexpectedTypeException($type, FormTypeInterface::class); } - $this->types[\get_class($type)] = $type; + $this->types[$type::class] = $type; } } diff --git a/src/Symfony/Component/Form/Command/DebugCommand.php b/src/Symfony/Component/Form/Command/DebugCommand.php index 159051046f35f..afa283bbd5f15 100644 --- a/src/Symfony/Component/Form/Command/DebugCommand.php +++ b/src/Symfony/Component/Form/Command/DebugCommand.php @@ -204,7 +204,7 @@ private function getCoreTypes(): array $coreExtension = new CoreExtension(); $loadTypesRefMethod = (new \ReflectionObject($coreExtension))->getMethod('loadTypes'); $coreTypes = $loadTypesRefMethod->invoke($coreExtension); - $coreTypes = array_map(function (FormTypeInterface $type) { return \get_class($type); }, $coreTypes); + $coreTypes = array_map(function (FormTypeInterface $type) { return $type::class; }, $coreTypes); sort($coreTypes); return $coreTypes; diff --git a/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php b/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php index f6b09c26929a5..ad28cb67dedbe 100644 --- a/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Component/Form/Console/Descriptor/Descriptor.php @@ -198,7 +198,7 @@ private function collectTypeExtensionsOptions(ResolvedFormTypeInterface $type, O foreach ($type->getTypeExtensions() as $extension) { $inheritedOptions = $optionsResolver->getDefinedOptions(); $extension->configureOptions($optionsResolver); - $this->extensions[\get_class($extension)] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions); + $this->extensions[$extension::class] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions); } } } diff --git a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php index 0b978d693de91..d7c93468892b3 100644 --- a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php +++ b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php @@ -65,7 +65,7 @@ public function getTypeExtensions(string $name): array // validate the result of getExtendedTypes() to ensure it is consistent with the service definition if (!\in_array($name, $extendedTypes, true)) { - throw new InvalidArgumentException(sprintf('The extended type "%s" specified for the type extension class "%s" does not match any of the actual extended types (["%s"]).', $name, \get_class($extension), implode('", "', $extendedTypes))); + throw new InvalidArgumentException(sprintf('The extended type "%s" specified for the type extension class "%s" does not match any of the actual extended types (["%s"]).', $name, $extension::class, implode('", "', $extendedTypes))); } } } diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php index 46738b401e544..6fb47884d2e21 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php @@ -99,7 +99,7 @@ public function guessPattern(string $class, string $property): ?ValueGuess */ public function guessTypeForConstraint(Constraint $constraint): ?TypeGuess { - switch (\get_class($constraint)) { + switch ($constraint::class) { case Type::class: switch ($constraint->type) { case 'array': @@ -190,7 +190,7 @@ public function guessTypeForConstraint(Constraint $constraint): ?TypeGuess */ public function guessRequiredForConstraint(Constraint $constraint): ?ValueGuess { - return match (\get_class($constraint)) { + return match ($constraint::class) { NotNull::class, NotBlank::class, IsTrue::class => new ValueGuess(true, Guess::HIGH_CONFIDENCE), @@ -203,7 +203,7 @@ public function guessRequiredForConstraint(Constraint $constraint): ?ValueGuess */ public function guessMaxLengthForConstraint(Constraint $constraint): ?ValueGuess { - switch (\get_class($constraint)) { + switch ($constraint::class) { case Length::class: if (is_numeric($constraint->max)) { return new ValueGuess($constraint->max, Guess::HIGH_CONFIDENCE); @@ -231,7 +231,7 @@ public function guessMaxLengthForConstraint(Constraint $constraint): ?ValueGuess */ public function guessPatternForConstraint(Constraint $constraint): ?ValueGuess { - switch (\get_class($constraint)) { + switch ($constraint::class) { case Length::class: if (is_numeric($constraint->min)) { return new ValueGuess(sprintf('.{%s,}', (string) $constraint->min), Guess::LOW_CONFIDENCE); diff --git a/src/Symfony/Component/Form/FormRegistry.php b/src/Symfony/Component/Form/FormRegistry.php index a22624f3675ca..ab3f55f9fb908 100644 --- a/src/Symfony/Component/Form/FormRegistry.php +++ b/src/Symfony/Component/Form/FormRegistry.php @@ -90,7 +90,7 @@ public function getType(string $name): ResolvedFormTypeInterface private function resolveType(FormTypeInterface $type): ResolvedFormTypeInterface { $parentType = $type->getParent(); - $fqcn = \get_class($type); + $fqcn = $type::class; if (isset($this->checkedTypes[$fqcn])) { $types = implode(' > ', array_merge(array_keys($this->checkedTypes), [$fqcn])); diff --git a/src/Symfony/Component/Form/PreloadedExtension.php b/src/Symfony/Component/Form/PreloadedExtension.php index 5590eda3706f7..c8e628d2d20e9 100644 --- a/src/Symfony/Component/Form/PreloadedExtension.php +++ b/src/Symfony/Component/Form/PreloadedExtension.php @@ -36,7 +36,7 @@ public function __construct(array $types, array $typeExtensions, FormTypeGuesser $this->typeGuesser = $typeGuesser; foreach ($types as $type) { - $this->types[\get_class($type)] = $type; + $this->types[$type::class] = $type; } } diff --git a/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php b/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php index 6a4c8552befed..d0037bbfbda37 100644 --- a/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php +++ b/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php @@ -263,7 +263,7 @@ private function getCoreTypes(): array $coreExtension = new CoreExtension(); $loadTypesRefMethod = (new \ReflectionObject($coreExtension))->getMethod('loadTypes'); $coreTypes = $loadTypesRefMethod->invoke($coreExtension); - $coreTypes = array_map(function (FormTypeInterface $type) { return \get_class($type); }, $coreTypes); + $coreTypes = array_map(function (FormTypeInterface $type) { return $type::class; }, $coreTypes); sort($coreTypes); return $coreTypes; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php index 1b625dc139adc..b39572ed808a5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php @@ -334,7 +334,7 @@ public function testMapFormsToDataDoesNotChangeEqualDateTimeInstance($date) $article['publishedAt'] = $publishedAtValue; $propertyPath = new PropertyPath('[publishedAt]'); - $config = new FormConfigBuilder('publishedAt', \get_class($publishedAt), $this->dispatcher); + $config = new FormConfigBuilder('publishedAt', $publishedAt::class, $this->dispatcher); $config->setByReference(false); $config->setPropertyPath($propertyPath); $config->setData($publishedAt); diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php index af8f048e5404c..e5b0d736b0672 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php @@ -736,7 +736,7 @@ private function getForm($name = 'name', $dataClass = null, array $options = []) private function getCompoundForm($data, array $options = []) { - return $this->getBuilder('name', \is_object($data) ? \get_class($data) : null, $options) + return $this->getBuilder('name', \is_object($data) ? $data::class : null, $options) ->setData($data) ->setCompound(true) ->setDataMapper(new DataMapper()) diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php index 9b0c9d1481437..30db508520260 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php @@ -113,7 +113,7 @@ public function testManyFieldsGroupSequenceWithConstraintsOption() return $formMetadata; } - return new ClassMetadata(\is_string($classOrObject) ? $classOrObject : \get_class($classOrObject)); + return new ClassMetadata(\is_string($classOrObject) ? $classOrObject : $classOrObject::class); }) ; diff --git a/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php b/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php index 1f48be5c574c2..23dc7b6d9f0b0 100644 --- a/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php @@ -203,7 +203,7 @@ public function testRetryNetworkError() return $response; }, function (\Exception $exception) use (&$failureCallableCalled, $client) { - $this->assertSame(NetworkException::class, \get_class($exception)); + $this->assertSame(NetworkException::class, $exception::class); $this->assertSame(TransportException::class, \get_class($exception->getPrevious())); $failureCallableCalled = true; @@ -246,7 +246,7 @@ function (ResponseInterface $response) use (&$successCallableCalled) { return $response; }, function (\Exception $exception) use ($errorMessage, &$failureCallableCalled, $client, $request) { - $this->assertSame(NetworkException::class, \get_class($exception)); + $this->assertSame(NetworkException::class, $exception::class); $this->assertSame($errorMessage, $exception->getMessage()); $failureCallableCalled = true; diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index cec01e71dee75..81278931545a8 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -127,7 +127,7 @@ public function setData(mixed $data = []): static try { $data = json_encode($data, $this->encodingOptions); } catch (\Exception $e) { - if ('Exception' === \get_class($e) && str_starts_with($e->getMessage(), 'Failed calling ')) { + if ('Exception' === $e::class && str_starts_with($e->getMessage(), 'Failed calling ')) { throw $e->getPrevious() ?: $e; } throw $e; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index d80e7436191d8..6deee421687f7 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -240,7 +240,7 @@ public function save() $previousHandler = set_error_handler(function ($type, $msg, $file, $line) use (&$previousHandler) { if (\E_WARNING === $type && str_starts_with($msg, 'session_write_close():')) { $handler = $this->saveHandler instanceof SessionHandlerProxy ? $this->saveHandler->getHandler() : $this->saveHandler; - $msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', \get_class($handler)); + $msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', $handler::class); } return $previousHandler ? $previousHandler($type, $msg, $file, $line) : false; diff --git a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.php b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.php index df791db3d7e55..a352090eac842 100644 --- a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.php +++ b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.php @@ -134,7 +134,7 @@ public function getAttributesOfType(string $name, int $flags = 0): array } } else { foreach ($this->attributes as $attribute) { - if (\get_class($attribute) === $name) { + if ($attribute::class === $name) { $attributes[] = $attribute; } } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 3b7ff410f6a31..fcc9ccd9e8393 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -62,7 +62,7 @@ public function collect(Request $request, Response $response, \Throwable $except if (isset($this->kernel)) { foreach ($this->kernel->getBundles() as $name => $bundle) { - $this->data['bundles'][$name] = new ClassStub(\get_class($bundle)); + $this->data['bundles'][$name] = new ClassStub($bundle::class); } } diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index 9713ff3508b46..d87fbea29b94a 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -256,7 +256,7 @@ private function handleThrowable(\Throwable $e, Request $request, int $type): Re private function varToString(mixed $var): string { if (\is_object($var)) { - return sprintf('an object of type %s', \get_class($var)); + return sprintf('an object of type %s', $var::class); } if (\is_array($var)) { diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 8210e0e308577..3661c216a2c4b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -540,7 +540,7 @@ protected function getKernelParameters(): array $bundlesMetadata = []; foreach ($this->bundles as $name => $bundle) { - $bundles[$name] = \get_class($bundle); + $bundles[$name] = $bundle::class; $bundlesMetadata[$name] = [ 'path' => $bundle->getPath(), 'namespace' => $bundle->getNamespace(), diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php index 766c028873fd1..72e4921e7d219 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php @@ -63,7 +63,7 @@ public function testResolveOK(AbstractUid $expected, string $requestUid) { $this->assertEquals([$expected], (new UidValueResolver())->resolve( new Request([], [], ['id' => $requestUid]), - new ArgumentMetadata('id', \get_class($expected), false, false, null) + new ArgumentMetadata('id', $expected::class, false, false, null) )); } diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php index dc2ef3055eb39..e988fe6914956 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php @@ -40,8 +40,8 @@ public function testConstruct() $logger = new TestLogger(); $l = new ErrorListener('foo', $logger); - $_logger = new \ReflectionProperty(\get_class($l), 'logger'); - $_controller = new \ReflectionProperty(\get_class($l), 'controller'); + $_logger = new \ReflectionProperty($l::class, 'logger'); + $_controller = new \ReflectionProperty($l::class, 'controller'); $this->assertSame($logger, $_logger->getValue($l)); $this->assertSame('foo', $_controller->getValue($l)); diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index 1810d61ccbda0..fa127326ee839 100644 --- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -640,7 +640,7 @@ protected function getBundle($dir = null, $parent = null, $className = null, $bu $bundle ->expects($this->any()) ->method('getName') - ->willReturn($bundleName ?? \get_class($bundle)) + ->willReturn($bundleName ?? $bundle::class) ; $bundle diff --git a/src/Symfony/Component/Intl/Resources/bin/common.php b/src/Symfony/Component/Intl/Resources/bin/common.php index cf47fa448b034..02aaf06300376 100644 --- a/src/Symfony/Component/Intl/Resources/bin/common.php +++ b/src/Symfony/Component/Intl/Resources/bin/common.php @@ -85,7 +85,7 @@ function get_icu_version_from_genrb(string $genrb) echo "Caused by\n"; } - echo get_class($cause).': '.$cause->getMessage()."\n"; + echo $cause::class.': '.$cause->getMessage()."\n"; echo "\n"; echo $cause->getFile().':'.$cause->getLine()."\n"; echo $cause->getTraceAsString()."\n"; diff --git a/src/Symfony/Component/Mailer/Envelope.php b/src/Symfony/Component/Mailer/Envelope.php index f35f25f3652eb..0a4af2eda9dad 100644 --- a/src/Symfony/Component/Mailer/Envelope.php +++ b/src/Symfony/Component/Mailer/Envelope.php @@ -35,7 +35,7 @@ public function __construct(Address $sender, array $recipients) public static function create(RawMessage $message): self { - if (RawMessage::class === \get_class($message)) { + if (RawMessage::class === $message::class) { throw new LogicException('Cannot send a RawMessage instance without an explicit Envelope.'); } diff --git a/src/Symfony/Component/Mailer/Transport/Transports.php b/src/Symfony/Component/Mailer/Transport/Transports.php index 71182a8350936..1beaa883e49ec 100644 --- a/src/Symfony/Component/Mailer/Transport/Transports.php +++ b/src/Symfony/Component/Mailer/Transport/Transports.php @@ -47,7 +47,7 @@ public function __construct(iterable $transports) public function send(RawMessage $message, Envelope $envelope = null): ?SentMessage { /** @var Message $message */ - if (RawMessage::class === \get_class($message) || !$message->getHeaders()->has('X-Transport')) { + if (RawMessage::class === $message::class || !$message->getHeaders()->has('X-Transport')) { return $this->default->send($message, $envelope); } diff --git a/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php b/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php index f73d681a3ebfd..be10f5e7bc97a 100644 --- a/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php +++ b/src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php @@ -88,7 +88,7 @@ private function collectMessage(string $busName, array $tracedMessage) 'stamps' => $tracedMessage['stamps'] ?? null, 'stamps_after_dispatch' => $tracedMessage['stamps_after_dispatch'] ?? null, 'message' => [ - 'type' => new ClassStub(\get_class($message)), + 'type' => new ClassStub($message::class), 'value' => $message, ], 'caller' => $tracedMessage['caller'], @@ -98,7 +98,7 @@ private function collectMessage(string $busName, array $tracedMessage) $exception = $tracedMessage['exception']; $debugRepresentation['exception'] = [ - 'type' => \get_class($exception), + 'type' => $exception::class, 'value' => $exception, ]; } diff --git a/src/Symfony/Component/Messenger/Envelope.php b/src/Symfony/Component/Messenger/Envelope.php index 72e830c174ede..a9ea4e0b48f5f 100644 --- a/src/Symfony/Component/Messenger/Envelope.php +++ b/src/Symfony/Component/Messenger/Envelope.php @@ -35,7 +35,7 @@ public function __construct(object $message, array $stamps = []) $this->message = $message; foreach ($stamps as $stamp) { - $this->stamps[\get_class($stamp)][] = $stamp; + $this->stamps[$stamp::class][] = $stamp; } } @@ -59,7 +59,7 @@ public function with(StampInterface ...$stamps): static $cloned = clone $this; foreach ($stamps as $stamp) { - $cloned->stamps[\get_class($stamp)][] = $stamp; + $cloned->stamps[$stamp::class][] = $stamp; } return $cloned; diff --git a/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php b/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php index 31b418a2ecce4..0f071e82e702d 100644 --- a/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php +++ b/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php @@ -56,7 +56,7 @@ public function onMessageFailed(WorkerMessageFailedEvent $event) $message = $envelope->getMessage(); $context = [ - 'class' => \get_class($message), + 'class' => $message::class, ]; $shouldRetry = $retryStrategy && $this->shouldRetry($throwable, $envelope, $retryStrategy); @@ -89,7 +89,7 @@ public function onMessageFailed(WorkerMessageFailedEvent $event) private function withLimitedHistory(Envelope $envelope, StampInterface ...$stamps): Envelope { foreach ($stamps as $stamp) { - $history = $envelope->all(\get_class($stamp)); + $history = $envelope->all($stamp::class); if (\count($history) < $this->historySize) { $envelope = $envelope->with($stamp); continue; @@ -101,7 +101,7 @@ private function withLimitedHistory(Envelope $envelope, StampInterface ...$stamp [$stamp] ); - $envelope = $envelope->withoutAll(\get_class($stamp))->with(...$history); + $envelope = $envelope->withoutAll($stamp::class)->with(...$history); } return $envelope; diff --git a/src/Symfony/Component/Messenger/EventListener/SendFailedMessageToFailureTransportListener.php b/src/Symfony/Component/Messenger/EventListener/SendFailedMessageToFailureTransportListener.php index 21cad3ac627c7..4b6c6a2860a48 100644 --- a/src/Symfony/Component/Messenger/EventListener/SendFailedMessageToFailureTransportListener.php +++ b/src/Symfony/Component/Messenger/EventListener/SendFailedMessageToFailureTransportListener.php @@ -62,7 +62,7 @@ public function onMessageFailed(WorkerMessageFailedEvent $event) $this->logger?->info('Rejected message {class} will be sent to the failure transport {transport}.', [ 'class' => \get_class($envelope->getMessage()), - 'transport' => \get_class($failureSender), + 'transport' => $failureSender::class, ]); $failureSender->send($envelope); diff --git a/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php b/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php index 7dd6a9b0b1116..a5065131c40ff 100644 --- a/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php +++ b/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php @@ -25,7 +25,7 @@ public function __construct(array $exceptions) { $exceptionMessages = implode(", \n", array_map( function (\Throwable $e) { - return \get_class($e).': '.$e->getMessage(); + return $e::class.': '.$e->getMessage(); }, $exceptions )); diff --git a/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php b/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php index e090b037e4b23..ec5b1016364f8 100644 --- a/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php @@ -52,7 +52,7 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope $message = $envelope->getMessage(); $context = [ - 'class' => \get_class($message), + 'class' => $message::class, ]; $exceptions = []; diff --git a/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php b/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php index 9a9f362876215..c52119c7f0097 100644 --- a/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php +++ b/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php @@ -61,8 +61,8 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope $shouldDispatchEvent = false; } - $this->logger->info('Sending message {class} with {alias} sender using {sender}', $context + ['alias' => $alias, 'sender' => \get_class($sender)]); - $envelope = $sender->send($envelope->with(new SentStamp(\get_class($sender), \is_string($alias) ? $alias : null))); + $this->logger->info('Sending message {class} with {alias} sender using {sender}', $context + ['alias' => $alias, 'sender' => $sender::class]); + $envelope = $sender->send($envelope->with(new SentStamp($sender::class, \is_string($alias) ? $alias : null))); } } diff --git a/src/Symfony/Component/Messenger/Stamp/ErrorDetailsStamp.php b/src/Symfony/Component/Messenger/Stamp/ErrorDetailsStamp.php index 41b2190560d6f..0331ff24dbf73 100644 --- a/src/Symfony/Component/Messenger/Stamp/ErrorDetailsStamp.php +++ b/src/Symfony/Component/Messenger/Stamp/ErrorDetailsStamp.php @@ -44,7 +44,7 @@ public static function create(Throwable $throwable): self $flattenException = FlattenException::createFromThrowable($throwable); } - return new self(\get_class($throwable), $throwable->getCode(), $throwable->getMessage(), $flattenException); + return new self($throwable::class, $throwable->getCode(), $throwable->getMessage(), $flattenException); } public function getExceptionClass(): string diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php index c36274b12fe0a..4d7dd32b03547 100644 --- a/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php +++ b/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php @@ -72,11 +72,11 @@ public function itAddsHandledStampsProvider(): iterable { $first = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']); $first->method('__invoke')->willReturn('first result'); - $firstClass = \get_class($first); + $firstClass = $first::class; $second = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']); $second->method('__invoke')->willReturn(null); - $secondClass = \get_class($second); + $secondClass = $second::class; $failing = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']); $failing->method('__invoke')->will($this->throwException(new \Exception('handler failed.'))); diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php index b9992fc90fd0c..a0ff3667c9e5e 100644 --- a/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php +++ b/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php @@ -36,7 +36,7 @@ public function testItSendsTheMessageToAssignedSender() $sendersLocator = $this->createSendersLocator([DummyMessage::class => ['my_sender']], ['my_sender' => $sender]); $middleware = new SendMessageMiddleware($sendersLocator); - $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp(\get_class($sender), 'my_sender')))->willReturnArgument(0); + $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp($sender::class, 'my_sender')))->willReturnArgument(0); $envelope = $middleware->handle($envelope, $this->getStackMock(false)); @@ -91,7 +91,7 @@ public function testItSendsTheMessageToAssignedSenderWithPreWrappedMessage() $sendersLocator = $this->createSendersLocator([DummyMessage::class => ['foo_sender']], ['foo_sender' => $sender]); $middleware = new SendMessageMiddleware($sendersLocator); - $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp(\get_class($sender), 'foo_sender')))->willReturn($envelope); + $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp($sender::class, 'foo_sender')))->willReturn($envelope); $middleware->handle($envelope, $this->getStackMock(false)); } @@ -105,7 +105,7 @@ public function testItSendsTheMessageBasedOnTheMessageParentClass() $sendersLocator = $this->createSendersLocator([DummyMessage::class => ['foo_sender']], ['foo_sender' => $sender]); $middleware = new SendMessageMiddleware($sendersLocator); - $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp(\get_class($sender), 'foo_sender')))->willReturn($envelope); + $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp($sender::class, 'foo_sender')))->willReturn($envelope); $middleware->handle($envelope, $this->getStackMock(false)); } @@ -119,7 +119,7 @@ public function testItSendsTheMessageBasedOnTheMessageInterface() $sendersLocator = $this->createSendersLocator([DummyMessageInterface::class => ['foo_sender']], ['foo_sender' => $sender]); $middleware = new SendMessageMiddleware($sendersLocator); - $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp(\get_class($sender), 'foo_sender')))->willReturn($envelope); + $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp($sender::class, 'foo_sender')))->willReturn($envelope); $middleware->handle($envelope, $this->getStackMock(false)); } @@ -133,7 +133,7 @@ public function testItSendsTheMessageBasedOnWildcard() $sendersLocator = $this->createSendersLocator(['*' => ['foo_sender']], ['foo_sender' => $sender]); $middleware = new SendMessageMiddleware($sendersLocator); - $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp(\get_class($sender), 'foo_sender')))->willReturn($envelope); + $sender->expects($this->once())->method('send')->with($envelope->with(new SentStamp($sender::class, 'foo_sender')))->willReturn($envelope); $middleware->handle($envelope, $this->getStackMock(false)); } diff --git a/src/Symfony/Component/Messenger/Tests/WorkerTest.php b/src/Symfony/Component/Messenger/Tests/WorkerTest.php index 85419c78e45fa..5103d4ad84568 100644 --- a/src/Symfony/Component/Messenger/Tests/WorkerTest.php +++ b/src/Symfony/Component/Messenger/Tests/WorkerTest.php @@ -425,7 +425,7 @@ public function testWorkerMessageReceivedEventMutability() $worker->run(); $envelope = current($receiver->getAcknowledgedEnvelopes()); - $this->assertCount(1, $envelope->all(\get_class($stamp))); + $this->assertCount(1, $envelope->all($stamp::class)); } public function testWorkerRateLimitMessages() diff --git a/src/Symfony/Component/Messenger/Worker.php b/src/Symfony/Component/Messenger/Worker.php index fee30a460f831..1608644f9d6bd 100644 --- a/src/Symfony/Component/Messenger/Worker.php +++ b/src/Symfony/Component/Messenger/Worker.php @@ -211,7 +211,7 @@ private function ack(): bool if (null !== $this->logger) { $message = $envelope->getMessage(); $context = [ - 'class' => \get_class($message), + 'class' => $message::class, ]; $this->logger->info('{class} was handled successfully (acknowledging to transport).', $context); } diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php b/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php index d7d5b928dc367..6ca9cc0587d7b 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailAddressContains.php @@ -37,7 +37,7 @@ public function toString(): string */ protected function matches($message): bool { - if (RawMessage::class === \get_class($message)) { + if (RawMessage::class === $message::class) { throw new \LogicException('Unable to test a message address on a RawMessage instance.'); } diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php b/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php index 3ba5c724bae7c..d5c8ae981189c 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailAttachmentCount.php @@ -36,7 +36,7 @@ public function toString(): string */ protected function matches($message): bool { - if (RawMessage::class === \get_class($message) || Message::class === \get_class($message)) { + if (RawMessage::class === $message::class || Message::class === $message::class) { throw new \LogicException('Unable to test a message attachment on a RawMessage or Message instance.'); } diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php b/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php index d2cd36b805a14..b7c5625b266bc 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailHasHeader.php @@ -33,7 +33,7 @@ public function toString(): string */ protected function matches($message): bool { - if (RawMessage::class === \get_class($message)) { + if (RawMessage::class === $message::class) { throw new \LogicException('Unable to test a message header on a RawMessage instance.'); } diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php b/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php index 752d370719555..edb6ab4257d74 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailHeaderSame.php @@ -36,7 +36,7 @@ public function toString(): string */ protected function matches($message): bool { - if (RawMessage::class === \get_class($message)) { + if (RawMessage::class === $message::class) { throw new \LogicException('Unable to test a message header on a RawMessage instance.'); } diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php b/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php index 00a4b9dea2cb1..cbf303d1be6e5 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailHtmlBodyContains.php @@ -34,7 +34,7 @@ public function toString(): string */ protected function matches($message): bool { - if (RawMessage::class === \get_class($message) || Message::class === \get_class($message)) { + if (RawMessage::class === $message::class || Message::class === $message::class) { throw new \LogicException('Unable to test a message HTML body on a RawMessage or Message instance.'); } diff --git a/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php b/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php index 00bfd5b415dd0..592595cf44919 100644 --- a/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php +++ b/src/Symfony/Component/Mime/Test/Constraint/EmailTextBodyContains.php @@ -34,7 +34,7 @@ public function toString(): string */ protected function matches($message): bool { - if (RawMessage::class === \get_class($message) || Message::class === \get_class($message)) { + if (RawMessage::class === $message::class || Message::class === $message::class) { throw new \LogicException('Unable to test a message text body on a RawMessage or Message instance.'); } diff --git a/src/Symfony/Component/Notifier/Notification/Notification.php b/src/Symfony/Component/Notifier/Notification/Notification.php index 673fa8bc7abd3..f423804717f5e 100644 --- a/src/Symfony/Component/Notifier/Notification/Notification.php +++ b/src/Symfony/Component/Notifier/Notification/Notification.php @@ -139,7 +139,7 @@ public function getEmoji(): string */ public function exception(\Throwable $exception): static { - $parts = explode('\\', \get_class($exception)); + $parts = explode('\\', $exception::class); $this->subject = sprintf('%s: %s', array_pop($parts), $exception->getMessage()); if (class_exists(FlattenException::class)) { @@ -202,7 +202,7 @@ private function computeExceptionAsString(\Throwable $exception): string return $exception->getAsString(); } - $message = \get_class($exception); + $message = $exception::class; if ('' !== $exception->getMessage()) { $message .= ': '.$exception->getMessage(); } diff --git a/src/Symfony/Component/Notifier/Notifier.php b/src/Symfony/Component/Notifier/Notifier.php index edc6928b10c51..2e0665cef7c28 100644 --- a/src/Symfony/Component/Notifier/Notifier.php +++ b/src/Symfony/Component/Notifier/Notifier.php @@ -72,7 +72,7 @@ private function getChannels(Notification $notification, RecipientInterface $rec { $channels = $notification->getChannels($recipient); if (!$channels) { - $errorPrefix = sprintf('Unable to determine which channels to use to send the "%s" notification', \get_class($notification)); + $errorPrefix = sprintf('Unable to determine which channels to use to send the "%s" notification', $notification::class); $error = 'you should either pass channels in the constructor, override its "getChannels()" method'; if (null === $this->policy) { throw new LogicException(sprintf('%s; %s, or configure a "%s".', $errorPrefix, $error, ChannelPolicy::class)); diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index 205c15b4cd8ca..6e78815e87f51 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -1222,7 +1222,7 @@ public function count(): int private function formatValue(mixed $value): string { if (\is_object($value)) { - return \get_class($value); + return $value::class; } if (\is_array($value)) { diff --git a/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php b/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php index 81122d1cd3424..5fdc89cab91f5 100644 --- a/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php +++ b/src/Symfony/Component/PasswordHasher/Command/UserPasswordHashCommand.php @@ -143,7 +143,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $hashedPassword = $hasher->hash($password, $salt); $rows = [ - ['Hasher used', \get_class($hasher)], + ['Hasher used', $hasher::class], ['Password hash', $hashedPassword], ]; if (!$emptySalt) { diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index c076f572df616..20256928c2506 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -381,7 +381,7 @@ private function readProperty(array $zval, string $property, bool $ignoreInvalid $result = self::RESULT_PROTO; $object = $zval[self::VALUE]; - $class = \get_class($object); + $class = $object::class; $access = $this->getReadInfo($class, $property); if (null !== $access) { @@ -502,7 +502,7 @@ private function writeProperty(array $zval, string $property, mixed $value) } $object = $zval[self::VALUE]; - $class = \get_class($object); + $class = $object::class; $mutator = $this->getWriteInfo($class, $property, $value); if (PropertyWriteInfo::TYPE_NONE !== $mutator->getType()) { @@ -597,13 +597,13 @@ private function getWriteInfo(string $class, string $property, mixed $value): Pr */ private function isPropertyWritable(object $object, string $property): bool { - $mutatorForArray = $this->getWriteInfo(\get_class($object), $property, []); + $mutatorForArray = $this->getWriteInfo($object::class, $property, []); if (PropertyWriteInfo::TYPE_NONE !== $mutatorForArray->getType() || ($object instanceof \stdClass && property_exists($object, $property))) { return true; } - $mutator = $this->getWriteInfo(\get_class($object), $property, ''); + $mutator = $this->getWriteInfo($object::class, $property, ''); return PropertyWriteInfo::TYPE_NONE !== $mutator->getType() || ($object instanceof \stdClass && property_exists($object, $property)); } diff --git a/src/Symfony/Component/Routing/Requirement/EnumRequirement.php b/src/Symfony/Component/Routing/Requirement/EnumRequirement.php index 2a369845c4eb4..3ab2ed3321028 100644 --- a/src/Symfony/Component/Routing/Requirement/EnumRequirement.php +++ b/src/Symfony/Component/Routing/Requirement/EnumRequirement.php @@ -38,7 +38,7 @@ public function __construct(string|array $cases = []) throw new InvalidArgumentException(sprintf('Case must be a "BackedEnum" instance, "%s" given.', get_debug_type($case))); } - $class ??= \get_class($case); + $class ??= $case::class; if (!$case instanceof $class) { throw new InvalidArgumentException(sprintf('"%s::%s" is not a case of "%s".', get_debug_type($case), $case->name, $class)); diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index ed5857577c86b..025f6827bdfd1 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -86,7 +86,7 @@ private function getVoters(array $attributes, $object = null): iterable $keyAttributes[] = \is_string($attribute) ? $attribute : null; } // use `get_class` to handle anonymous classes - $keyObject = \is_object($object) ? \get_class($object) : get_debug_type($object); + $keyObject = \is_object($object) ? $object::class : get_debug_type($object); foreach ($this->voters as $key => $voter) { if (!$voter instanceof CacheableVoterInterface) { yield $voter; diff --git a/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php b/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php index 29d508cecd90e..39c02d56c5208 100644 --- a/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php +++ b/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php @@ -88,7 +88,7 @@ public function computeSignatureHash(UserInterface $user, int $expires): string } if (!\is_scalar($value) && !$value instanceof \Stringable) { - throw new \InvalidArgumentException(sprintf('The property path "%s" on the user object "%s" must return a value that can be cast to a string, but "%s" was returned.', $property, \get_class($user), get_debug_type($value))); + throw new \InvalidArgumentException(sprintf('The property path "%s" on the user object "%s" must return a value that can be cast to a string, but "%s" was returned.', $property, $user::class, get_debug_type($value))); } $signatureFields[] = base64_encode($value); } diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php index e174dfbfcbc5f..4ab19b1da8bd1 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php @@ -102,13 +102,13 @@ public function supports(Request $request): ?bool $skippedAuthenticators = []; $lazy = true; foreach ($this->authenticators as $authenticator) { - $this->logger?->debug('Checking support on authenticator.', ['firewall_name' => $this->firewallName, 'authenticator' => \get_class($authenticator)]); + $this->logger?->debug('Checking support on authenticator.', ['firewall_name' => $this->firewallName, 'authenticator' => $authenticator::class]); if (false !== $supports = $authenticator->supports($request)) { $authenticators[] = $authenticator; $lazy = $lazy && null === $supports; } else { - $this->logger?->debug('Authenticator does not support the request.', ['firewall_name' => $this->firewallName, 'authenticator' => \get_class($authenticator)]); + $this->logger?->debug('Authenticator does not support the request.', ['firewall_name' => $this->firewallName, 'authenticator' => $authenticator::class]); $skippedAuthenticators[] = $authenticator; } } @@ -181,7 +181,7 @@ private function executeAuthenticator(AuthenticatorInterface $authenticator, Req throw new BadCredentialsException(sprintf('Authentication failed: Security badge "%s" is not resolved, did you forget to register the correct listeners?', get_debug_type($badge))); } - $resolvedBadges[] = \get_class($badge); + $resolvedBadges[] = $badge::class; } $missingRequiredBadges = array_diff($this->requiredBadges, $resolvedBadges); diff --git a/src/Symfony/Component/Security/Http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php b/src/Symfony/Component/Security/Http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php index a5bc1c57799fb..2e933a32e8c49 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php +++ b/src/Symfony/Component/Security/Http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php @@ -50,7 +50,7 @@ public function authenticate(RequestEvent $event): void foreach ($request->attributes->get('_security_skipped_authenticators') as $skippedAuthenticator) { $this->authenticatorsInfo[] = [ 'supports' => false, - 'stub' => $this->hasVardumper ? new ClassStub(\get_class($skippedAuthenticator)) : \get_class($skippedAuthenticator), + 'stub' => $this->hasVardumper ? new ClassStub($skippedAuthenticator::class) : $skippedAuthenticator::class, 'passport' => null, 'duration' => 0, ]; diff --git a/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php b/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php index ea05acec27d7f..f6b5afa58f321 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php +++ b/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php @@ -70,7 +70,7 @@ public function getUser(): UserInterface */ public function addBadge(BadgeInterface $badge): static { - $this->badges[\get_class($badge)] = $badge; + $this->badges[$badge::class] = $badge; return $this; } diff --git a/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php b/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php index 9f439561e703b..bbe9813f2a5d6 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php +++ b/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php @@ -52,7 +52,7 @@ public function createRememberMeCookie(UserInterface $user): void { $series = base64_encode(random_bytes(64)); $tokenValue = $this->generateHash(base64_encode(random_bytes(64))); - $token = new PersistentToken(\get_class($user), $user->getUserIdentifier(), $series, $tokenValue, new \DateTime()); + $token = new PersistentToken($user::class, $user->getUserIdentifier(), $series, $tokenValue, new \DateTime()); $this->tokenProvider->createNewToken($token); $this->createCookie(RememberMeDetails::fromPersistentToken($token, time() + $this->options['lifetime'])); diff --git a/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php b/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php index 5f6edcb28c604..8a12dbea9ab57 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php +++ b/src/Symfony/Component/Security/Http/RememberMe/SignatureRememberMeHandler.php @@ -46,7 +46,7 @@ public function createRememberMeCookie(UserInterface $user): void $expires = time() + $this->options['lifetime']; $value = $this->signatureHasher->computeSignatureHash($user, $expires); - $details = new RememberMeDetails(\get_class($user), $user->getUserIdentifier(), $expires, $value); + $details = new RememberMeDetails($user::class, $user->getUserIdentifier(), $expires, $value); $this->createCookie($details); } diff --git a/src/Symfony/Component/Semaphore/Store/StoreFactory.php b/src/Symfony/Component/Semaphore/Store/StoreFactory.php index 6e03d619feff5..1d4ec3a72505c 100644 --- a/src/Symfony/Component/Semaphore/Store/StoreFactory.php +++ b/src/Symfony/Component/Semaphore/Store/StoreFactory.php @@ -36,7 +36,7 @@ public static function createStore(object|string $connection): PersistingStoreIn return new RedisStore($connection); case !\is_string($connection): - throw new InvalidArgumentException(sprintf('Unsupported Connection: "%s".', \get_class($connection))); + throw new InvalidArgumentException(sprintf('Unsupported Connection: "%s".', $connection::class)); case str_starts_with($connection, 'redis://'): case str_starts_with($connection, 'rediss://'): if (!class_exists(AbstractAdapter::class)) { diff --git a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php index 0524b03806272..9b73446273726 100644 --- a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php +++ b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php @@ -29,7 +29,7 @@ public function __construct(PropertyListExtractorInterface $propertyListExtracto public function getProperties(object $object, array $context = []): ?array { - $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); + $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : $object::class; return $this->propertyListExtractor->getProperties($class, $context); } diff --git a/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php b/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php index 8b9b02896c338..5359408dd80b5 100644 --- a/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php +++ b/src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php @@ -48,7 +48,7 @@ public function getMappingForMappedObject(object|string $object): ?ClassDiscrimi } } - $cacheKey = \is_object($object) ? \get_class($object) : $object; + $cacheKey = \is_object($object) ? $object::class : $object; if (!\array_key_exists($cacheKey, $this->mappingForMappedObjectCache)) { $this->mappingForMappedObjectCache[$cacheKey] = $this->resolveMappingForMappedObject($object); } diff --git a/src/Symfony/Component/Serializer/Mapping/Factory/ClassResolverTrait.php b/src/Symfony/Component/Serializer/Mapping/Factory/ClassResolverTrait.php index 05ce80922c859..7af722d55ee7f 100644 --- a/src/Symfony/Component/Serializer/Mapping/Factory/ClassResolverTrait.php +++ b/src/Symfony/Component/Serializer/Mapping/Factory/ClassResolverTrait.php @@ -37,6 +37,6 @@ private function getClass(object|string $value): string return ltrim($value, '\\'); } - return \get_class($value); + return $value::class; } } diff --git a/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php b/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php index 5bac97581caa2..670a935875d94 100644 --- a/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php +++ b/src/Symfony/Component/Serializer/Mapping/Factory/CompiledClassMetadataFactory.php @@ -44,7 +44,7 @@ public function __construct(string $compiledClassMetadataFile, ClassMetadataFact public function getMetadataFor(string|object $value): ClassMetadataInterface { - $className = \is_object($value) ? \get_class($value) : $value; + $className = \is_object($value) ? $value::class : $value; if (!isset($this->compiledClassMetadata[$className])) { return $this->classMetadataFactory->getMetadataFor($value); @@ -69,7 +69,7 @@ public function getMetadataFor(string|object $value): ClassMetadataInterface public function hasMetadataFor(mixed $value): bool { - $className = \is_object($value) ? \get_class($value) : $value; + $className = \is_object($value) ? $value::class : $value; return isset($this->compiledClassMetadata[$className]) || $this->classMetadataFactory->hasMetadataFor($value); } diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 1a499a04908dc..59704c6d6c076 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -156,7 +156,7 @@ public function normalize(mixed $object, string $format = null, array $context = $data = []; $stack = []; $attributes = $this->getAttributes($object, $format, $context); - $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); + $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : $object::class; $attributesMetadata = $this->classMetadataFactory?->getMetadataFor($class)->getAttributesMetadata(); if (isset($context[self::MAX_DEPTH_HANDLER])) { $maxDepthHandler = $context[self::MAX_DEPTH_HANDLER]; @@ -248,7 +248,7 @@ protected function instantiateObject(array &$data, string $class, array &$contex */ protected function getAttributes(object $object, ?string $format, array $context): array { - $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); + $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : $object::class; $key = $class.'-'.$context['cache_key']; if (isset($this->attributesCache[$key])) { @@ -318,7 +318,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $reflectionClass = new \ReflectionClass($type); $object = $this->instantiateObject($normalizedData, $type, $context, $reflectionClass, $allowedAttributes, $format); - $resolvedClass = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); + $resolvedClass = $this->objectClassResolver ? ($this->objectClassResolver)($object) : $object::class; foreach ($normalizedData as $attribute => $value) { if ($this->nameConverter) { diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index a0b6ee78037f3..08ccfd1bd5de4 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -137,7 +137,7 @@ protected function getAttributeValue(object $object, string $attribute, string $ protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []) { $setter = 'set'.ucfirst($attribute); - $key = \get_class($object).':'.$setter; + $key = $object::class.':'.$setter; if (!isset(self::$setterAccessibleCache[$key])) { self::$setterAccessibleCache[$key] = \is_callable([$object, $setter]) && !(new \ReflectionMethod($object, $setter))->isStatic(); diff --git a/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php index 1a31558186b1a..f112b3e2cbbb4 100644 --- a/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php @@ -61,7 +61,7 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object instanceof AbstractPart) { $ret = $this->normalizer->normalize($object, $format, $context); - $ret['class'] = \get_class($object); + $ret['class'] = $object::class; return $ret; } diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 5851bfe9a89a5..b949193e4312b 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -45,7 +45,7 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); $this->objectClassResolver = $objectClassResolver ?? function ($class) { - return \is_object($class) ? \get_class($class) : $class; + return \is_object($class) ? $class::class : $class; }; } @@ -56,7 +56,7 @@ public function hasCacheableSupportsMethod(): bool protected function extractAttributes(object $object, string $format = null, array $context = []): array { - if (\stdClass::class === \get_class($object)) { + if (\stdClass::class === $object::class) { return array_keys((array) $object); } @@ -119,7 +119,7 @@ protected function extractAttributes(object $object, string $format = null, arra protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed { - $cacheKey = \get_class($object); + $cacheKey = $object::class; if (!\array_key_exists($cacheKey, $this->discriminatorCache)) { $this->discriminatorCache[$cacheKey] = null; if (null !== $this->classDiscriminatorResolver) { @@ -147,7 +147,7 @@ protected function getAllowedAttributes(string|object $classOrObject, array $con } if (null !== $this->classDiscriminatorResolver) { - $class = \is_object($classOrObject) ? \get_class($classOrObject) : $classOrObject; + $class = \is_object($classOrObject) ? $classOrObject::class : $classOrObject; if (null !== $discriminatorMapping = $this->classDiscriminatorResolver->getMappingForMappedObject($classOrObject)) { $allowedAttributes[] = $attributesAsString ? $discriminatorMapping->getTypeProperty() : new AttributeMetadata($discriminatorMapping->getTypeProperty()); } diff --git a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php index 365b9f56c36fd..144f1c448dc97 100644 --- a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php @@ -59,7 +59,7 @@ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool { - return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data)); + return parent::supportsNormalization($data, $format) && $this->supports($data::class); } /** @@ -164,7 +164,7 @@ protected function getAttributeValue(object $object, string $attribute, string $ || ($reflectionProperty->isProtected() && !\array_key_exists("\0*\0{$reflectionProperty->name}", $propertyValues)) || ($reflectionProperty->isPrivate() && !\array_key_exists("\0{$reflectionProperty->class}\0{$reflectionProperty->name}", $propertyValues)) ) { - throw new UninitializedPropertyException(sprintf('The property "%s::$%s" is not initialized.', \get_class($object), $reflectionProperty->name)); + throw new UninitializedPropertyException(sprintf('The property "%s::$%s" is not initialized.', $object::class, $reflectionProperty->name)); } } diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index 7896129b24323..85a3ac5b558d4 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -246,7 +246,7 @@ public function supportsDenormalization(mixed $data, string $type, string $forma */ private function getNormalizer(mixed $data, ?string $format, array $context): ?NormalizerInterface { - $type = \is_object($data) ? \get_class($data) : 'native-'.\gettype($data); + $type = \is_object($data) ? $data::class : 'native-'.\gettype($data); if (!isset($this->normalizerCache[$format][$type])) { $this->normalizerCache[$format][$type] = []; diff --git a/src/Symfony/Component/Serializer/Tests/Debug/TraceableEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Debug/TraceableEncoderTest.php index aa2393bbe7f69..9c1fddc7dffd7 100644 --- a/src/Symfony/Component/Serializer/Tests/Debug/TraceableEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Debug/TraceableEncoderTest.php @@ -50,11 +50,11 @@ public function testCollectEncodingData() $dataCollector ->expects($this->once()) ->method('collectEncoding') - ->with($this->isType('string'), \get_class($encoder), $this->isType('float')); + ->with($this->isType('string'), $encoder::class, $this->isType('float')); $dataCollector ->expects($this->once()) ->method('collectDecoding') - ->with($this->isType('string'), \get_class($decoder), $this->isType('float')); + ->with($this->isType('string'), $decoder::class, $this->isType('float')); (new TraceableEncoder($encoder, $dataCollector))->encode('data', 'format', [TraceableSerializer::DEBUG_TRACE_ID => 'debug']); (new TraceableEncoder($decoder, $dataCollector))->decode('data', 'format', [TraceableSerializer::DEBUG_TRACE_ID => 'debug']); diff --git a/src/Symfony/Component/Serializer/Tests/Debug/TraceableNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Debug/TraceableNormalizerTest.php index dc99a03c03b22..481639fb95054 100644 --- a/src/Symfony/Component/Serializer/Tests/Debug/TraceableNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Debug/TraceableNormalizerTest.php @@ -50,11 +50,11 @@ public function testCollectNormalizationData() $dataCollector ->expects($this->once()) ->method('collectNormalization') - ->with($this->isType('string'), \get_class($normalizer), $this->isType('float')); + ->with($this->isType('string'), $normalizer::class, $this->isType('float')); $dataCollector ->expects($this->once()) ->method('collectDenormalization') - ->with($this->isType('string'), \get_class($denormalizer), $this->isType('float')); + ->with($this->isType('string'), $denormalizer::class, $this->isType('float')); (new TraceableNormalizer($normalizer, $dataCollector))->normalize('data', 'format', [TraceableSerializer::DEBUG_TRACE_ID => 'debug']); (new TraceableNormalizer($denormalizer, $dataCollector))->denormalize('data', 'type', 'format', [TraceableSerializer::DEBUG_TRACE_ID => 'debug']); diff --git a/src/Symfony/Component/Serializer/Tests/Extractor/ObjectPropertyListExtractorTest.php b/src/Symfony/Component/Serializer/Tests/Extractor/ObjectPropertyListExtractorTest.php index 65e776684f2b1..d639bf7336d36 100644 --- a/src/Symfony/Component/Serializer/Tests/Extractor/ObjectPropertyListExtractorTest.php +++ b/src/Symfony/Component/Serializer/Tests/Extractor/ObjectPropertyListExtractorTest.php @@ -26,7 +26,7 @@ public function testGetPropertiesWithoutObjectClassResolver() $propertyListExtractor = $this->createMock(PropertyListExtractorInterface::class); $propertyListExtractor->expects($this->once()) ->method('getProperties') - ->with(\get_class($object), $context) + ->with($object::class, $context) ->willReturn($properties); $this->assertSame( diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CacheMetadataFactoryTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CacheMetadataFactoryTest.php index 74fc1006991d1..9525ca6059fb3 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CacheMetadataFactoryTest.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CacheMetadataFactoryTest.php @@ -70,7 +70,7 @@ public function testAnonymousClass() $anonymousObject = new class() { }; - $metadata = new ClassMetadata(\get_class($anonymousObject)); + $metadata = new ClassMetadata($anonymousObject::class); $decorated = $this->createMock(ClassMetadataFactoryInterface::class); $decorated ->expects($this->once()) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php index db7b226c3e14b..a8ef81bb660a9 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php @@ -107,8 +107,8 @@ public function __construct() } }; - $obj = $normalizer->denormalize(['foo' => $valueBar], \get_class($objWithNoConstructorArgument), 'any', ['callbacks' => $callbacks]); - $this->assertInstanceof(\get_class($objWithNoConstructorArgument), $obj); + $obj = $normalizer->denormalize(['foo' => $valueBar], $objWithNoConstructorArgument::class, 'any', ['callbacks' => $callbacks]); + $this->assertInstanceof($objWithNoConstructorArgument::class, $obj); $this->assertEquals($result->getBar(), $obj->getBar()); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php index 1996e80e98a38..1407c824280ce 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php @@ -42,7 +42,7 @@ public function testUnableToNormalizeCircularReference(array $defaultContext, ar $obj = $this->getSelfReferencingModel(); $this->expectException(CircularReferenceException::class); - $this->expectExceptionMessage(sprintf('A circular reference has been detected when serializing the object of class "%s" (configured limit: %d).', \get_class($obj), $expectedLimit)); + $this->expectExceptionMessage(sprintf('A circular reference has been detected when serializing the object of class "%s" (configured limit: %d).', $obj::class, $expectedLimit)); $normalizer->normalize($obj, null, $context); } @@ -51,15 +51,15 @@ public function testCircularReferenceHandler() $normalizer = $this->getNormalizerForCircularReference([]); $obj = $this->getSelfReferencingModel(); - $expected = ['me' => \get_class($obj)]; + $expected = ['me' => $obj::class]; $context = [ 'circular_reference_handler' => function ($actualObj, string $format, array $context) use ($obj) { - $this->assertInstanceOf(\get_class($obj), $actualObj); + $this->assertInstanceOf($obj::class, $actualObj); $this->assertSame('test', $format); $this->assertArrayHasKey('foo', $context); - return \get_class($actualObj); + return $actualObj::class; }, 'foo' => 'bar', ]; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php index 2b9a111ed1e27..f1401158fb140 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php @@ -453,7 +453,7 @@ public function testMultiDimensionObject() RootDummy::class, 'any' ); - $this->assertEquals(\get_class($root), RootDummy::class); + $this->assertEquals($root::class, RootDummy::class); // children (two dimension array) $this->assertCount(1, $root->children); diff --git a/src/Symfony/Component/String/LazyString.php b/src/Symfony/Component/String/LazyString.php index 84fa7bf0b5a27..3b91c4f712c67 100644 --- a/src/Symfony/Component/String/LazyString.php +++ b/src/Symfony/Component/String/LazyString.php @@ -86,7 +86,7 @@ public function __toString(): string try { return $this->value = ($this->value)(); } catch (\Throwable $e) { - if (\TypeError::class === \get_class($e) && __FILE__ === $e->getFile()) { + if (\TypeError::class === $e::class && __FILE__ === $e->getFile()) { $type = explode(', ', $e->getMessage()); $type = substr(array_pop($type), 0, -\strlen(' returned')); $r = new \ReflectionFunction($this->value); diff --git a/src/Symfony/Component/String/Resources/bin/update-data.php b/src/Symfony/Component/String/Resources/bin/update-data.php index 3f66be2b7656d..edbe8a4c5a383 100644 --- a/src/Symfony/Component/String/Resources/bin/update-data.php +++ b/src/Symfony/Component/String/Resources/bin/update-data.php @@ -28,7 +28,7 @@ echo "Caused by\n"; } - echo get_class($cause).': '.$cause->getMessage()."\n"; + echo $cause::class.': '.$cause->getMessage()."\n"; echo "\n"; echo $cause->getFile().':'.$cause->getLine()."\n"; echo $cause->getTraceAsString()."\n"; diff --git a/src/Symfony/Component/Validator/Command/DebugCommand.php b/src/Symfony/Component/Validator/Command/DebugCommand.php index 06b8d0b8047dd..ed41eb8c7c9be 100644 --- a/src/Symfony/Component/Validator/Command/DebugCommand.php +++ b/src/Symfony/Component/Validator/Command/DebugCommand.php @@ -135,7 +135,7 @@ private function getClassConstraintsData(ClassMetadataInterface $classMetadata): { foreach ($classMetadata->getConstraints() as $constraint) { yield [ - 'class' => \get_class($constraint), + 'class' => $constraint::class, 'groups' => $constraint->groups, 'options' => $this->getConstraintOptions($constraint), ]; @@ -161,7 +161,7 @@ private function getPropertyData(ClassMetadataInterface $classMetadata, string $ foreach ($propertyMetadata as $metadata) { foreach ($metadata->getConstraints() as $constraint) { $data[] = [ - 'class' => \get_class($constraint), + 'class' => $constraint::class, 'groups' => $constraint->groups, 'options' => $this->getConstraintOptions($constraint), ]; diff --git a/src/Symfony/Component/Validator/Constraints/Composite.php b/src/Symfony/Component/Validator/Constraints/Composite.php index 53d69968af28e..a545779f0f31b 100644 --- a/src/Symfony/Component/Validator/Constraints/Composite.php +++ b/src/Symfony/Component/Validator/Constraints/Composite.php @@ -66,7 +66,7 @@ public function __construct(mixed $options = null, array $groups = null, mixed $ foreach ($nestedConstraints as $constraint) { if (!$constraint instanceof Constraint) { if (\is_object($constraint)) { - $constraint = \get_class($constraint); + $constraint = $constraint::class; } throw new ConstraintDefinitionException(sprintf('The value "%s" is not an instance of Constraint in constraint "%s".', $constraint, static::class)); diff --git a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php index 732befd000363..6c191298c0c87 100644 --- a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -74,7 +74,7 @@ public function getMetadataFor(mixed $value): MetadataInterface throw new NoSuchMetadataException(sprintf('Cannot create metadata for non-objects. Got: "%s".', get_debug_type($value))); } - $class = ltrim(\is_object($value) ? \get_class($value) : $value, '\\'); + $class = ltrim(\is_object($value) ? $value::class : $value, '\\'); if (isset($this->loadedClasses[$class])) { return $this->loadedClasses[$class]; @@ -139,7 +139,7 @@ public function hasMetadataFor(mixed $value): bool return false; } - $class = ltrim(\is_object($value) ? \get_class($value) : $value, '\\'); + $class = ltrim(\is_object($value) ? $value::class : $value, '\\'); return class_exists($class) || interface_exists($class, false); } diff --git a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index cf2a0f8f8d212..a32cd19966f03 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -132,7 +132,7 @@ public function isPrivate(object|string $objectOrClassName): bool */ public function getReflectionMember(object|string $objectOrClassName): \ReflectionMethod|\ReflectionProperty { - $className = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); + $className = \is_string($objectOrClassName) ? $objectOrClassName : $objectOrClassName::class; if (!isset($this->reflMember[$className])) { $this->reflMember[$className] = $this->newReflectionMember($objectOrClassName); } diff --git a/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php b/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php index 292b6fe586ef7..49620bfdfe309 100644 --- a/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php @@ -69,7 +69,7 @@ public function getPropertyValue(mixed $object): mixed protected function newReflectionMember(object|string $objectOrClassName): \ReflectionMethod|\ReflectionProperty { - $originalClass = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); + $originalClass = \is_string($objectOrClassName) ? $objectOrClassName : $objectOrClassName::class; while (!property_exists($objectOrClassName, $this->getName())) { $objectOrClassName = get_parent_class($objectOrClassName); diff --git a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php index 808d2550b568a..998cb4aea9816 100644 --- a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php @@ -186,7 +186,7 @@ protected function setObject(mixed $object) { $this->object = $object; $this->metadata = \is_object($object) - ? new ClassMetadata(\get_class($object)) + ? new ClassMetadata($object::class) : null; $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); @@ -196,7 +196,7 @@ protected function setProperty(mixed $object, string $property) { $this->object = $object; $this->metadata = \is_object($object) - ? new PropertyMetadata(\get_class($object), $property) + ? new PropertyMetadata($object::class, $property) : null; $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php index 4544e46687e48..4b29c6a6074ac 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php @@ -157,7 +157,7 @@ public function testInvalidValuePath() $constraint = $this->createConstraint(['propertyPath' => 'foo']); $this->expectException(ConstraintDefinitionException::class); - $this->expectExceptionMessage(sprintf('Invalid property path "foo" provided to "%s" constraint', \get_class($constraint))); + $this->expectExceptionMessage(sprintf('Invalid property path "foo" provided to "%s" constraint', $constraint::class)); $object = new ComparisonTest_Class(5); @@ -239,7 +239,7 @@ public function throwsOnInvalidStringDatesProvider(): array 'value' => 'foo', ]); - $constraintClass = \get_class($constraint); + $constraintClass = $constraint::class; return [ [$constraint, sprintf('The compared value "foo" could not be converted to a "DateTimeImmutable" instance in the "%s" constraint.', $constraintClass), new \DateTimeImmutable()], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php index 4219295c147d2..b29e0096bb27f 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php @@ -163,7 +163,7 @@ public function testInvalidValuePath() $constraint = new Bic(['ibanPropertyPath' => 'foo']); $this->expectException(ConstraintDefinitionException::class); - $this->expectExceptionMessage(sprintf('Invalid property path "foo" provided to "%s" constraint', \get_class($constraint))); + $this->expectExceptionMessage(sprintf('Invalid property path "foo" provided to "%s" constraint', $constraint::class)); $object = new BicComparisonTestClass(5); diff --git a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php index cd0d2fdc5aa33..0c14d7104a430 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php @@ -1258,7 +1258,7 @@ public function testReplaceDefaultGroup($sequence, array $assertViolations) $context->addViolation('Violation in Group 3'); }; - $metadata = new ClassMetadata(\get_class($entity)); + $metadata = new ClassMetadata($entity::class); $metadata->addConstraint(new Callback([ 'callback' => function () {}, 'groups' => 'Group 1', diff --git a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index 4fc8ca2f00286..5ab26d48d7eef 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -183,7 +183,7 @@ public function validateProperty(object $object, string $propertyName, string|Gr $this->validateGenericNode( $propertyValue, $object, - $cacheKey.':'.\get_class($object).':'.$propertyName, + $cacheKey.':'.$object::class.':'.$propertyName, $propertyMetadata, $propertyPath, $groups, @@ -212,7 +212,7 @@ public function validatePropertyValue(object|string $objectOrClass, string $prop if (\is_object($objectOrClass)) { $object = $objectOrClass; - $class = \get_class($object); + $class = $object::class; $cacheKey = $this->generateCacheKey($objectOrClass); $propertyPath = PropertyPath::append($this->defaultPropertyPath, $propertyName); } else { @@ -501,7 +501,7 @@ private function validateClassNode(object $object, ?string $cacheKey, ClassMetad $this->validateGenericNode( $propertyValue, $object, - $cacheKey.':'.\get_class($object).':'.$propertyName, + $cacheKey.':'.$object::class.':'.$propertyName, $propertyMetadata, PropertyPath::append($propertyPath, $propertyName), $groups, diff --git a/src/Symfony/Component/VarDumper/Caster/CutStub.php b/src/Symfony/Component/VarDumper/Caster/CutStub.php index b5a96a02cfcdc..772399ef69f03 100644 --- a/src/Symfony/Component/VarDumper/Caster/CutStub.php +++ b/src/Symfony/Component/VarDumper/Caster/CutStub.php @@ -27,7 +27,7 @@ public function __construct(mixed $value) switch (\gettype($value)) { case 'object': $this->type = self::TYPE_OBJECT; - $this->class = \get_class($value); + $this->class = $value::class; if ($value instanceof \Closure) { ReflectionCaster::castClosure($value, [], $this, true, Caster::EXCLUDE_VERBOSE); diff --git a/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/Symfony/Component/VarDumper/Caster/SplCaster.php index de040231dba09..448afbad90a47 100644 --- a/src/Symfony/Component/VarDumper/Caster/SplCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -218,7 +218,7 @@ private static function castSplArray(\ArrayObject|\ArrayIterator $c, array $a, S if (!($flags & \ArrayObject::STD_PROP_LIST)) { $c->setFlags(\ArrayObject::STD_PROP_LIST); - $a = Caster::castObject($c, \get_class($c), method_exists($c, '__debugInfo'), $stub->class); + $a = Caster::castObject($c, $c::class, method_exists($c, '__debugInfo'), $stub->class); $c->setFlags($flags); } $a += [ diff --git a/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php b/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php index 08428b9274100..c8f856d16fc1a 100644 --- a/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php @@ -49,7 +49,7 @@ public static function castRequest(Request $request, array $a, Stub $stub, bool public static function castHttpClient($client, array $a, Stub $stub, bool $isNested) { - $multiKey = sprintf("\0%s\0multi", \get_class($client)); + $multiKey = sprintf("\0%s\0multi", $client::class); if (isset($a[$multiKey])) { $a[$multiKey] = new CutStub($a[$multiKey]); } diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index ec5f989062559..4068c7c386305 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -126,7 +126,7 @@ protected function doClone(mixed $var): array if (empty($objRefs[$h = spl_object_id($v)])) { $stub = new Stub(); $stub->type = Stub::TYPE_OBJECT; - $stub->class = \get_class($v); + $stub->class = $v::class; $stub->value = $v; $stub->handle = $h; $a = $this->castObject($stub, 0 < $i); diff --git a/src/Symfony/Component/VarDumper/Dumper/ContextualizedDumper.php b/src/Symfony/Component/VarDumper/Dumper/ContextualizedDumper.php index cd2b28f0c40d7..1ba803d813894 100644 --- a/src/Symfony/Component/VarDumper/Dumper/ContextualizedDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/ContextualizedDumper.php @@ -35,7 +35,7 @@ public function dump(Data $data) { $context = []; foreach ($this->contextProviders as $contextProvider) { - $context[\get_class($contextProvider)] = $contextProvider->getContext(); + $context[$contextProvider::class] = $contextProvider->getContext(); } $this->wrappedDumper->dump($data->withContext($context)); diff --git a/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php b/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php index 122f0d358a129..fd8eca9f138ab 100644 --- a/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php +++ b/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php @@ -21,6 +21,6 @@ class ThrowingCasterException extends \Exception */ public function __construct(\Throwable $prev) { - parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); + parent::__construct('Unexpected '.$prev::class.' thrown from a caster: '.$prev->getMessage(), 0, $prev); } } diff --git a/src/Symfony/Component/VarExporter/Hydrator.php b/src/Symfony/Component/VarExporter/Hydrator.php index b568e43502844..5f456fb3cf7e7 100644 --- a/src/Symfony/Component/VarExporter/Hydrator.php +++ b/src/Symfony/Component/VarExporter/Hydrator.php @@ -57,7 +57,7 @@ final class Hydrator public static function hydrate(object $instance, array $properties = [], array $scopedProperties = []): object { if ($properties) { - $class = \get_class($instance); + $class = $instance::class; $propertyScopes = InternalHydrator::$propertyScopes[$class] ??= InternalHydrator::getPropertyScopes($class); foreach ($properties as $name => &$value) { diff --git a/src/Symfony/Component/VarExporter/Internal/Exporter.php b/src/Symfony/Component/VarExporter/Internal/Exporter.php index b22d6ae609468..57c229eb14d2b 100644 --- a/src/Symfony/Component/VarExporter/Internal/Exporter.php +++ b/src/Symfony/Component/VarExporter/Internal/Exporter.php @@ -73,7 +73,7 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount goto handle_value; } - $class = \get_class($value); + $class = $value::class; $reflector = Registry::$reflectors[$class] ??= Registry::getClassReflector($class); if ($reflector->hasMethod('__serialize')) { @@ -364,7 +364,7 @@ private static function exportHydrator(Hydrator $value, string $indent, string $ self::export($value->wakeups, $subIndent), ]; - return '\\'.\get_class($value)."::hydrate(\n".$subIndent.implode(",\n".$subIndent, $code)."\n".$indent.')'; + return '\\'.$value::class."::hydrate(\n".$subIndent.implode(",\n".$subIndent, $code)."\n".$indent.')'; } /** diff --git a/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php b/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php index 471c1a6b91381..509cac3d50275 100644 --- a/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php +++ b/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php @@ -65,7 +65,7 @@ public function initialize($instance, $propertyName, $propertyScope) } if (self::STATUS_UNINITIALIZED_FULL === $this->status) { - if ($defaultProperties = array_diff_key(GhostObjectRegistry::$defaultProperties[\get_class($instance)], (array) $instance)) { + if ($defaultProperties = array_diff_key(GhostObjectRegistry::$defaultProperties[$instance::class], (array) $instance)) { Hydrator::hydrate($instance, $defaultProperties); } @@ -77,7 +77,7 @@ public function initialize($instance, $propertyName, $propertyScope) $value = ($this->initializer)(...[$instance, $propertyName, $propertyScope]); - $propertyScope ??= \get_class($instance); + $propertyScope ??= $instance::class; $accessor = GhostObjectRegistry::$classAccessors[$propertyScope] ??= GhostObjectRegistry::getClassAccessors($propertyScope); $accessor['set']($instance, $propertyName, $value); diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index 7c2e19cd78b62..952a3a61c18da 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -112,7 +112,7 @@ public static function dump(mixed $value, int $flags = 0): string case $value instanceof \DateTimeInterface: return $value->format('c'); case $value instanceof \UnitEnum: - return sprintf('!php/const %s::%s', \get_class($value), $value->name); + return sprintf('!php/const %s::%s', $value::class, $value->name); case \is_object($value): if ($value instanceof TaggedValue) { return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags); diff --git a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php index 84df70654f2ce..9489300760bfc 100644 --- a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php +++ b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php @@ -1125,7 +1125,7 @@ public function testWithOptions() $client2 = $client->withOptions(['base_uri' => 'http://localhost:8057/']); $this->assertNotSame($client, $client2); - $this->assertSame(\get_class($client), \get_class($client2)); + $this->assertSame($client::class, $client2::class); $response = $client2->request('GET', '/'); $this->assertSame(200, $response->getStatusCode()); From e5675ac0fb615aa4ec87a8b3b259b4b09f4eb904 Mon Sep 17 00:00:00 2001 From: Jeroeny Date: Thu, 1 Sep 2022 14:12:23 +0200 Subject: [PATCH 0057/1170] fix typo in method retrySpecificEnvelopes --- .../Messenger/Command/FailedMessagesRetryCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php index af70141733cb9..ed7c3fa5ac7d0 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php @@ -150,7 +150,7 @@ private function runInteractive(string $failureTransportName, SymfonyStyle $io, break; } - $this->retrySpecificEnvelops($envelopes, $failureTransportName, $io, $shouldForce); + $this->retrySpecificEnvelopes($envelopes, $failureTransportName, $io, $shouldForce); } } else { // get() and ask messages one-by-one @@ -227,7 +227,7 @@ private function retrySpecificIds(string $failureTransportName, array $ids, Symf } } - private function retrySpecificEnvelops(array $envelopes, string $failureTransportName, SymfonyStyle $io, bool $shouldForce) + private function retrySpecificEnvelopes(array $envelopes, string $failureTransportName, SymfonyStyle $io, bool $shouldForce) { $receiver = $this->getReceiver($failureTransportName); From a1a1609b34110e5eb0bfc00891a16c31139be516 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Sep 2022 20:18:29 +0200 Subject: [PATCH 0058/1170] [Mime] Fix TextPart broken after being serialized --- src/Symfony/Component/Mime/Part/TextPart.php | 1 + src/Symfony/Component/Mime/Tests/Part/TextPartTest.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Mime/Part/TextPart.php b/src/Symfony/Component/Mime/Part/TextPart.php index 4afb6560aec0a..bfe41c0aab235 100644 --- a/src/Symfony/Component/Mime/Part/TextPart.php +++ b/src/Symfony/Component/Mime/Part/TextPart.php @@ -197,6 +197,7 @@ public function __sleep() // convert resources to strings for serialization if (null !== $this->seekable) { $this->body = $this->getBody(); + $this->seekable = null; } $this->_headers = $this->getHeaders(); diff --git a/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php b/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php index c3818b883d465..ea14fe29f88af 100644 --- a/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php +++ b/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php @@ -87,6 +87,8 @@ public function testSerialize() $p = new TextPart($r); $p->getHeaders()->addTextHeader('foo', 'bar'); $expected = clone $p; - $this->assertEquals($expected->toString(), unserialize(serialize($p))->toString()); + $n = unserialize(serialize($p)); + $this->assertEquals($expected->toString(), $p->toString()); + $this->assertEquals($expected->toString(), $n->toString()); } } From 9c117b26d0c9833b1e1d21906fe7b20c4fabfb65 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Sep 2022 05:16:13 +0200 Subject: [PATCH 0059/1170] Fix test --- .../Transport/InfobipApiTransportTest.php | 18 ++++++------------ .../Mailer/Bridge/Infobip/composer.json | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php index 0865d6b7ffa47..7e01b673ebafe 100644 --- a/src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php @@ -332,23 +332,11 @@ public function testSendEmailWithAttachmentsWithSuccess() %a Content-Type: multipart/mixed; boundary=%s - --%s - Content-Type: multipart/related; boundary=%s - --%s Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable foobar - --%s - Content-ID: %s - Content-Type: text/plain; name=inline.txt - Content-Transfer-Encoding: base64 - Content-Disposition: inline; name=inline.txt; filename=inline.txt - - c29tZSBpbmxpbmUgYXR0YWNobWVudA== - --%s-- - --%s Content-Type: text/plain; name=attachment.txt Content-Transfer-Encoding: base64 @@ -356,6 +344,12 @@ public function testSendEmailWithAttachmentsWithSuccess() filename=attachment.txt c29tZSBhdHRhY2htZW50 + --%s + Content-Type: text/plain; name=inline.txt + Content-Transfer-Encoding: base64 + Content-Disposition: inline; name=inline.txt; filename=inline.txt + + c29tZSBpbmxpbmUgYXR0YWNobWVudA== --%s-- TXT, $sentMessage->toString() diff --git a/src/Symfony/Component/Mailer/Bridge/Infobip/composer.json b/src/Symfony/Component/Mailer/Bridge/Infobip/composer.json index 727ad07c81c7a..30305803fccb1 100644 --- a/src/Symfony/Component/Mailer/Bridge/Infobip/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Infobip/composer.json @@ -22,7 +22,7 @@ "require": { "php": ">=8.1", "symfony/mailer": "^6.1", - "symfony/mime": "^5.4.11|~6.0.11|^6.1.3" + "symfony/mime": "^5.4.13|~6.0.13|^6.1.5" }, "require-dev": { "symfony/http-client": "^6.1" From 8b54f40bc598b344f719d469c4dab64cbea91367 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 2 Sep 2022 11:14:49 +0200 Subject: [PATCH 0060/1170] fix tests on Windows --- .../Tests/Functional/ContainerDebugCommandTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index b812bb781a2e8..949c6191a1252 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -109,7 +109,7 @@ public function testTagsPartialSearch() $tester = new ApplicationTester($application); $tester->setInputs(['0']); - $tester->run(['command' => 'debug:container', '--tag' => 'kernel.']); + $tester->run(['command' => 'debug:container', '--tag' => 'kernel.'], ['decorated' => false]); $this->assertStringContainsString('Select one of the following tags to display its information', $tester->getDisplay()); $this->assertStringContainsString('[0] kernel.event_subscriber', $tester->getDisplay()); From 25ab9563fc16e0562ea8b15b2cf76b88414fd8fa Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 2 Sep 2022 12:36:06 +0200 Subject: [PATCH 0061/1170] [Console] [Completion] Make fish completion run in non interactive mode --- src/Symfony/Component/Console/Resources/completion.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Resources/completion.fish b/src/Symfony/Component/Console/Resources/completion.fish index 680d180e03843..6fd91e4feca8d 100644 --- a/src/Symfony/Component/Console/Resources/completion.fish +++ b/src/Symfony/Component/Console/Resources/completion.fish @@ -9,7 +9,7 @@ function _sf_{{ COMMAND_NAME }} set sf_cmd (commandline -o) set c (count (commandline -oc)) - set completecmd "$sf_cmd[1]" "_complete" "-sfish" "-S{{ VERSION }}" + set completecmd "$sf_cmd[1]" "_complete" "--no-interaction" "-sfish" "-S{{ VERSION }}" for i in $sf_cmd if [ $i != "" ] From 4e5add4739a452f173e537105a68426ff1b11a37 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 2 Sep 2022 12:36:39 +0200 Subject: [PATCH 0062/1170] [Console] [Completion] Make zsh completion run in non interactive mode --- src/Symfony/Component/Console/Resources/completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Resources/completion.zsh b/src/Symfony/Component/Console/Resources/completion.zsh index ef5a380cfc8b9..97a9e88cd617c 100644 --- a/src/Symfony/Component/Console/Resources/completion.zsh +++ b/src/Symfony/Component/Console/Resources/completion.zsh @@ -31,7 +31,7 @@ _sf_{{ COMMAND_NAME }}() { fi # Prepare the command to obtain completions - requestComp="${words[0]} ${words[1]} _complete -szsh -a{{ VERSION }} -c$((CURRENT-1))" i="" + requestComp="${words[0]} ${words[1]} _complete --no-interaction -szsh -a{{ VERSION }} -c$((CURRENT-1))" i="" for w in ${words[@]}; do w=$(printf -- '%b' "$w") # remove quotes from typed values From fcfcba11b67df38f57cd7463625419cb75b60157 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 2 Sep 2022 14:13:40 +0200 Subject: [PATCH 0063/1170] skip a transient test on Windows --- .../Component/VarDumper/Tests/Server/ConnectionTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/VarDumper/Tests/Server/ConnectionTest.php b/src/Symfony/Component/VarDumper/Tests/Server/ConnectionTest.php index 15e7b0760d3b6..e15b8d6acffb2 100644 --- a/src/Symfony/Component/VarDumper/Tests/Server/ConnectionTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Server/ConnectionTest.php @@ -24,6 +24,10 @@ class ConnectionTest extends TestCase public function testDump() { + if ('True' === getenv('APPVEYOR')) { + $this->markTestSkipped('Skip transient test on AppVeyor'); + } + $cloner = new VarCloner(); $data = $cloner->cloneVar('foo'); $connection = new Connection(self::VAR_DUMPER_SERVER, [ From 5f0a5b44bf14986a515c207fe5974bb9bd8554f1 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 2 Sep 2022 15:07:33 +0200 Subject: [PATCH 0064/1170] tweak the factory class description for inlined factory services --- .../Console/Descriptor/JsonDescriptor.php | 2 +- .../Console/Descriptor/MarkdownDescriptor.php | 2 +- .../Console/Descriptor/TextDescriptor.php | 2 +- .../Console/Descriptor/XmlDescriptor.php | 2 +- .../Descriptor/builder_1_services.json | 2 +- .../Fixtures/Descriptor/builder_1_services.md | 2 +- .../Descriptor/builder_1_services.xml | 2 +- .../Fixtures/Descriptor/definition_3.json | 2 +- .../Tests/Fixtures/Descriptor/definition_3.md | 2 +- .../Fixtures/Descriptor/definition_3.txt | 34 +++++++++---------- .../Fixtures/Descriptor/definition_3.xml | 2 +- .../Descriptor/definition_arguments_3.json | 2 +- .../Descriptor/definition_arguments_3.md | 2 +- .../Descriptor/definition_arguments_3.txt | 34 +++++++++---------- .../Descriptor/definition_arguments_3.xml | 2 +- 15 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index f22e6f48b71fb..3af3ec03f437a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -219,7 +219,7 @@ private function getContainerDefinitionData(Definition $definition, bool $omitTa if ($factory[0] instanceof Reference) { $data['factory_service'] = (string) $factory[0]; } elseif ($factory[0] instanceof Definition) { - $data['factory_class'] = $factory[0]->getClass() ?? 'not configured'; + $data['factory_service'] = sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'class not configured'); } else { $data['factory_class'] = $factory[0]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index bd3f8c78d67e5..4d48620236f79 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -196,7 +196,7 @@ protected function describeContainerDefinition(Definition $definition, array $op if ($factory[0] instanceof Reference) { $output .= "\n".'- Factory Service: `'.$factory[0].'`'; } elseif ($factory[0] instanceof Definition) { - $output .= "\n".'- Factory Class: `'.($factory[0]->getClass() ?? 'not configured').'`'; + $output .= "\n".sprintf('- Factory Service: inline factory service (%s)', $factory[0]->getClass() ? sprintf('`%s`', $factory[0]->getClass()) : 'not configured'); } else { $output .= "\n".'- Factory Class: `'.$factory[0].'`'; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index e5bb80010ca7b..5163a8730795b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -309,7 +309,7 @@ protected function describeContainerDefinition(Definition $definition, array $op if ($factory[0] instanceof Reference) { $tableRows[] = ['Factory Service', $factory[0]]; } elseif ($factory[0] instanceof Definition) { - $tableRows[] = ['Factory Class', $factory[0]->getClass() ?? 'not configured']; + $tableRows[] = ['Factory Service', sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'class not configured')]; } else { $tableRows[] = ['Factory Class', $factory[0]]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 7d13cc35df0ae..28044126f9a7f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -294,7 +294,7 @@ private function getContainerDefinitionDocument(Definition $definition, string $ if ($factory[0] instanceof Reference) { $factoryXML->setAttribute('service', (string) $factory[0]); } elseif ($factory[0] instanceof Definition) { - $factoryXML->setAttribute('class', $factory[0]->getClass() ?? 'not configured'); + $factoryXML->setAttribute('service', sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'not configured')); } else { $factoryXML->setAttribute('class', $factory[0]); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json index 31987c13f6c0c..401c588c03d42 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json @@ -45,7 +45,7 @@ "autowire": false, "autoconfigure": false, "file": "\/path\/to\/file", - "factory_class": "Full\\Qualified\\FactoryClass", + "factory_service": "inline factory service (Full\\Qualified\\FactoryClass)", "factory_method": "get", "tags": [] } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md index 2bc9cfac9582d..f8667daa86793 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md @@ -36,7 +36,7 @@ Definitions - Autowired: no - Autoconfigured: no - File: `/path/to/file` -- Factory Class: `Full\Qualified\FactoryClass` +- Factory Service: inline factory service (`Full\Qualified\FactoryClass`) - Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml index fd450279000b2..b9416fd069d05 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml @@ -18,6 +18,6 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json index 1c9f6abbf1b0c..4bf56746493f8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.json @@ -8,7 +8,7 @@ "autowire": false, "autoconfigure": false, "file": "\/path\/to\/file", - "factory_class": "Full\\Qualified\\FactoryClass", + "factory_service": "inline factory service (Full\\Qualified\\FactoryClass)", "factory_method": "get", "tags": [] } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md index 7db01b0b02045..68f51634db99f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.md @@ -7,5 +7,5 @@ - Autowired: no - Autoconfigured: no - File: `/path/to/file` -- Factory Class: `Full\Qualified\FactoryClass` +- Factory Service: inline factory service (`Full\Qualified\FactoryClass`) - Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt index 9a1de59a7e9a4..35ddaf3e452a8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.txt @@ -1,18 +1,18 @@ - ---------------- ----------------------------- -  Option   Value  - ---------------- ----------------------------- - Service ID - - Class Full\Qualified\Class3 - Tags - - Public no - Synthetic no - Lazy no - Shared yes - Abstract no - Autowired no - Autoconfigured no - Required File /path/to/file - Factory Class Full\Qualified\FactoryClass - Factory Method get - ---------------- ----------------------------- + ----------------- ------------------------------------------------------ +  Option   Value  + ----------------- ------------------------------------------------------ + Service ID - + Class Full\Qualified\Class3 + Tags - + Public no + Synthetic no + Lazy no + Shared yes + Abstract no + Autowired no + Autoconfigured no + Required File /path/to/file + Factory Service inline factory service (Full\Qualified\FactoryClass) + Factory Method get + ----------------- ------------------------------------------------------ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml index 4969b699e5763..e81c77014253f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_3.xml @@ -1,4 +1,4 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json index 9971492075ca9..94c2fda5402fc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.json @@ -9,7 +9,7 @@ "autoconfigure": false, "arguments": [], "file": "\/path\/to\/file", - "factory_class": "Full\\Qualified\\FactoryClass", + "factory_service": "inline factory service (Full\\Qualified\\FactoryClass)", "factory_method": "get", "tags": [] } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md index 40051de909ef4..2ce1f264dfc6c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.md @@ -8,5 +8,5 @@ - Autoconfigured: no - Arguments: no - File: `/path/to/file` -- Factory Class: `Full\Qualified\FactoryClass` +- Factory Service: inline factory service (`Full\Qualified\FactoryClass`) - Factory Method: `get` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt index b3c6fd80560f2..6e400de44e8ff 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.txt @@ -1,18 +1,18 @@ - ---------------- ----------------------------- -  Option   Value  - ---------------- ----------------------------- - Service ID - - Class Full\Qualified\Class3 - Tags - - Public no - Synthetic no - Lazy no - Shared yes - Abstract no - Autowired no - Autoconfigured no - Required File /path/to/file - Factory Class Full\Qualified\FactoryClass - Factory Method get - ---------------- ----------------------------- + ----------------- ------------------------------------------------------ +  Option   Value  + ----------------- ------------------------------------------------------ + Service ID - + Class Full\Qualified\Class3 + Tags - + Public no + Synthetic no + Lazy no + Shared yes + Abstract no + Autowired no + Autoconfigured no + Required File /path/to/file + Factory Service inline factory service (Full\Qualified\FactoryClass) + Factory Method get + ----------------- ------------------------------------------------------ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml index 4969b699e5763..e81c77014253f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_3.xml @@ -1,4 +1,4 @@ - + From c751bd04ac7a940377f4cac495fb2e3bf4892608 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 2 Sep 2022 15:34:45 +0200 Subject: [PATCH 0065/1170] [HttpKernel] Don't cache controller's reflector inside the request --- src/Symfony/Component/HttpKernel/CHANGELOG.md | 1 + .../Controller/ArgumentResolver.php | 5 ++-- .../Controller/ArgumentResolverInterface.php | 4 ++- .../Controller/TraceableArgumentResolver.php | 8 +++-- .../ArgumentMetadataFactory.php | 30 +++++++------------ .../ArgumentMetadataFactoryInterface.php | 4 ++- .../Event/ControllerArgumentsEvent.php | 3 +- .../HttpKernel/Event/ControllerEvent.php | 29 +++++++++++------- .../Component/HttpKernel/HttpKernel.php | 3 +- .../Tests/Event/ControllerEventTest.php | 17 +---------- .../Tests/HttpCache/TestHttpKernel.php | 2 +- .../HttpCache/TestMultipleHttpKernel.php | 2 +- .../HttpKernel/Tests/TestHttpKernel.php | 2 +- 13 files changed, 50 insertions(+), 60 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/CHANGELOG.md b/src/Symfony/Component/HttpKernel/CHANGELOG.md index 991f9c217334a..5ff615301a0e3 100644 --- a/src/Symfony/Component/HttpKernel/CHANGELOG.md +++ b/src/Symfony/Component/HttpKernel/CHANGELOG.md @@ -9,6 +9,7 @@ CHANGELOG * Add `#[Cache]` to describe the default HTTP cache headers on controllers * Add `absolute_uri` option to surrogate fragment renderers * Add `ValueResolverInterface` and deprecate `ArgumentValueResolverInterface` + * Add argument `$reflector` to `ArgumentResolverInterface` and `ArgumentMetadataFactoryInterface` 6.1 --- diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php index cf690aa9291be..52ac242141af6 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php @@ -40,12 +40,11 @@ public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFa $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); } - public function getArguments(Request $request, callable $controller): array + public function getArguments(Request $request, callable $controller, \ReflectionFunctionAbstract $reflector = null): array { $arguments = []; - $reflectors = $request->attributes->get('_controller_reflectors') ?? []; - foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller, ...$reflectors) as $metadata) { + foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller, $reflector) as $metadata) { foreach ($this->argumentValueResolvers as $resolver) { if ((!$resolver instanceof ValueResolverInterface || $resolver instanceof TraceableValueResolver) && !$resolver->supports($request, $metadata)) { continue; diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php index e2acde680e038..33d3ce29850ec 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php @@ -24,7 +24,9 @@ interface ArgumentResolverInterface /** * Returns the arguments to pass to the controller. * + * @param \ReflectionFunctionAbstract|null $reflector + * * @throws \RuntimeException When no value could be provided for a required argument */ - public function getArguments(Request $request, callable $controller): array; + public function getArguments(Request $request, callable $controller/* , \ReflectionFunctionAbstract $reflector = null */): array; } diff --git a/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php b/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php index 57bc74417291f..63429e33859dc 100644 --- a/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php @@ -28,11 +28,15 @@ public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stop $this->stopwatch = $stopwatch; } - public function getArguments(Request $request, callable $controller): array + /** + * @param \ReflectionFunctionAbstract|null $reflector + */ + public function getArguments(Request $request, callable $controller/* , \ReflectionFunctionAbstract $reflector = null */): array { + $reflector = 2 < \func_num_args() ? func_get_arg(2) : null; $e = $this->stopwatch->start('controller.get_arguments'); - $ret = $this->resolver->getArguments($request, $controller); + $ret = $this->resolver->getArguments($request, $controller, $reflector); $e->stop(); diff --git a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php index 5022180e77c62..cb7f0a78c4ae1 100644 --- a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -18,17 +18,12 @@ */ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface { - public function createArgumentMetadata(string|object|array $controller, \ReflectionClass $class = null, \ReflectionFunctionAbstract $reflection = null): array + public function createArgumentMetadata(string|object|array $controller, \ReflectionFunctionAbstract $reflector = null): array { $arguments = []; + $reflector ??= new \ReflectionFunction($controller(...)); - if (null === $reflection) { - $reflection = new \ReflectionFunction($controller(...)); - $class = str_contains($reflection->name, '{closure}') ? null : $reflection->getClosureScopeClass(); - } - $class = $class?->name; - - foreach ($reflection->getParameters() as $param) { + foreach ($reflector->getParameters() as $param) { $attributes = []; foreach ($param->getAttributes() as $reflectionAttribute) { if (class_exists($reflectionAttribute->getName())) { @@ -36,7 +31,7 @@ public function createArgumentMetadata(string|object|array $controller, \Reflect } } - $arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param, $class), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull(), $attributes); + $arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull(), $attributes); } return $arguments; @@ -45,22 +40,17 @@ public function createArgumentMetadata(string|object|array $controller, \Reflect /** * Returns an associated type to the given parameter if available. */ - private function getType(\ReflectionParameter $parameter, ?string $class): ?string + private function getType(\ReflectionParameter $parameter): ?string { if (!$type = $parameter->getType()) { return null; } $name = $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type; - if (null !== $class) { - switch (strtolower($name)) { - case 'self': - return $class; - case 'parent': - return get_parent_class($class) ?: null; - } - } - - return $name; + return match (strtolower($name)) { + 'self' => $parameter->getDeclaringClass()?->name, + 'parent' => get_parent_class($parameter->getDeclaringClass()?->name ?? '') ?: null, + default => $name, + }; } } diff --git a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php index b94ce4e83f9f8..954f901ef2478 100644 --- a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php +++ b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php @@ -19,7 +19,9 @@ interface ArgumentMetadataFactoryInterface { /** + * @param \ReflectionFunctionAbstract|null $reflector + * * @return ArgumentMetadata[] */ - public function createArgumentMetadata(string|object|array $controller): array; + public function createArgumentMetadata(string|object|array $controller/* , \ReflectionFunctionAbstract $reflector = null */): array; } diff --git a/src/Symfony/Component/HttpKernel/Event/ControllerArgumentsEvent.php b/src/Symfony/Component/HttpKernel/Event/ControllerArgumentsEvent.php index 7004caa822753..0af39671e69f6 100644 --- a/src/Symfony/Component/HttpKernel/Event/ControllerArgumentsEvent.php +++ b/src/Symfony/Component/HttpKernel/Event/ControllerArgumentsEvent.php @@ -77,9 +77,8 @@ public function getNamedArguments(): array $namedArguments = []; $arguments = $this->arguments; - $r = $this->getRequest()->attributes->get('_controller_reflectors')[1] ?? new \ReflectionFunction($this->controllerEvent->getController()); - foreach ($r->getParameters() as $i => $param) { + foreach ($this->controllerEvent->getControllerReflector()->getParameters() as $i => $param) { if ($param->isVariadic()) { $namedArguments[$param->name] = \array_slice($arguments, $i); break; diff --git a/src/Symfony/Component/HttpKernel/Event/ControllerEvent.php b/src/Symfony/Component/HttpKernel/Event/ControllerEvent.php index b1eceb4ca247b..efbdb944800ff 100644 --- a/src/Symfony/Component/HttpKernel/Event/ControllerEvent.php +++ b/src/Symfony/Component/HttpKernel/Event/ControllerEvent.php @@ -28,6 +28,7 @@ final class ControllerEvent extends KernelEvent { private string|array|object $controller; + private \ReflectionFunctionAbstract $controllerReflector; private array $attributes; public function __construct(HttpKernelInterface $kernel, callable $controller, Request $request, ?int $requestType) @@ -42,6 +43,11 @@ public function getController(): callable return $this->controller; } + public function getControllerReflector(): \ReflectionFunctionAbstract + { + return $this->controllerReflector; + } + /** * @param array>|null $attributes */ @@ -62,17 +68,13 @@ public function setController(callable $controller, array $attributes = null): v } if (\is_array($controller) && method_exists(...$controller)) { - $action = new \ReflectionMethod(...$controller); - $class = new \ReflectionClass($controller[0]); + $this->controllerReflector = new \ReflectionMethod(...$controller); } elseif (\is_string($controller) && false !== $i = strpos($controller, '::')) { - $action = new \ReflectionMethod($controller); - $class = new \ReflectionClass(substr($controller, 0, $i)); + $this->controllerReflector = new \ReflectionMethod($controller); } else { - $action = new \ReflectionFunction($controller(...)); - $class = str_contains($action->name, '{closure}') ? null : $action->getClosureScopeClass(); + $this->controllerReflector = new \ReflectionFunction($controller(...)); } - $this->getRequest()->attributes->set('_controller_reflectors', [$class, $action]); $this->controller = $controller; } @@ -81,13 +83,20 @@ public function setController(callable $controller, array $attributes = null): v */ public function getAttributes(): array { - if (isset($this->attributes) || ![$class, $action] = $this->getRequest()->attributes->get('_controller_reflectors')) { - return $this->attributes ??= []; + if (isset($this->attributes)) { + return $this->attributes; } + if (\is_array($this->controller) && method_exists(...$this->controller)) { + $class = new \ReflectionClass($this->controller[0]); + } elseif (\is_string($this->controller) && false !== $i = strpos($this->controller, '::')) { + $class = new \ReflectionClass(substr($this->controller, 0, $i)); + } else { + $class = str_contains($this->controllerReflector->name, '{closure}') ? null : $this->controllerReflector->getClosureScopeClass(); + } $this->attributes = []; - foreach (array_merge($class?->getAttributes() ?? [], $action->getAttributes()) as $attribute) { + foreach (array_merge($class?->getAttributes() ?? [], $this->controllerReflector->getAttributes()) as $attribute) { if (class_exists($attribute->getName())) { $this->attributes[$attribute->getName()][] = $attribute->newInstance(); } diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index d87fbea29b94a..9a64e64f38ad4 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -145,7 +145,7 @@ private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Re $controller = $event->getController(); // controller arguments - $arguments = $this->argumentResolver->getArguments($request, $controller); + $arguments = $this->argumentResolver->getArguments($request, $controller, $event->getControllerReflector()); $event = new ControllerArgumentsEvent($this, $event, $arguments, $request, $type); $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS); @@ -173,7 +173,6 @@ private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Re throw new ControllerDoesNotReturnResponseException($msg, $controller, __FILE__, __LINE__ - 17); } } - $request->attributes->remove('_controller_reflectors'); return $this->filterResponse($response, $request, $type); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php b/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php index e4bdb4f266abb..f3644707acfde 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php @@ -21,27 +21,12 @@ class ControllerEventTest extends TestCase { - public function testSetAttributes() - { - $request = new Request(); - $request->attributes->set('_controller_reflectors', [1, 2]); - $controller = [new AttributeController(), 'action']; - $event = new ControllerEvent(new TestHttpKernel(), $controller, $request, HttpKernelInterface::MAIN_REQUEST); - $event->setController($controller, []); - - $this->assertSame([], $event->getAttributes()); - } - /** * @dataProvider provideGetAttributes */ public function testGetAttributes(callable $controller) { - $request = new Request(); - $reflector = new \ReflectionFunction($controller(...)); - $request->attributes->set('_controller_reflectors', [str_contains($reflector->name, '{closure}') ? null : $reflector->getClosureScopeClass(), $reflector]); - - $event = new ControllerEvent(new TestHttpKernel(), $controller, $request, HttpKernelInterface::MAIN_REQUEST); + $event = new ControllerEvent(new TestHttpKernel(), $controller, new Request(), HttpKernelInterface::MAIN_REQUEST); $expected = [ Bar::class => [ diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php index 789081e1b5407..f862e5e0acb28 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php @@ -72,7 +72,7 @@ public function getController(Request $request): callable|false return $this->callController(...); } - public function getArguments(Request $request, callable $controller): array + public function getArguments(Request $request, callable $controller, \ReflectionFunctionAbstract $reflector = null): array { return [$request]; } diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php index af1288bd1b049..bb5338a540e3d 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php @@ -55,7 +55,7 @@ public function getController(Request $request): callable|false return $this->callController(...); } - public function getArguments(Request $request, callable $controller): array + public function getArguments(Request $request, callable $controller, \ReflectionFunctionAbstract $reflector = null): array { return [$request]; } diff --git a/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php b/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php index f608df2c7e38f..9a089db7b6f93 100644 --- a/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php +++ b/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php @@ -30,7 +30,7 @@ public function getController(Request $request): callable|false return $this->callController(...); } - public function getArguments(Request $request, callable $controller): array + public function getArguments(Request $request, callable $controller, \ReflectionFunctionAbstract $reflector = null): array { return [$request]; } From 46a66956ca69d884d3e1b2c900ce81414da34728 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 2 Sep 2022 16:55:07 +0200 Subject: [PATCH 0066/1170] CS fixes --- .../Bridge/Twig/Command/DebugCommand.php | 2 +- .../DependencyInjection/FrameworkExtension.php | 17 +++++++++-------- .../Cache/DataCollector/CacheDataCollector.php | 2 +- .../Component/Cache/Traits/RedisTrait.php | 11 ++++++----- .../Component/Console/Command/Command.php | 8 ++++---- .../Component/Console/Tests/ApplicationTest.php | 2 +- .../DependencyInjection/ContainerBuilder.php | 4 ++-- .../DependencyInjection/Dumper/PhpDumper.php | 4 ++-- .../Instantiator/InstantiatorInterface.php | 2 +- .../Debug/TraceableEventDispatcher.php | 2 +- .../EventDispatcher/Debug/WrappedListener.php | 2 +- .../EventDispatcher/EventDispatcher.php | 2 +- .../Tests/Extension/Core/Type/EnumTypeTest.php | 16 ++++++++-------- .../Component/HttpClient/AmpHttpClient.php | 10 +++++----- .../HttpFoundation/StreamedResponse.php | 4 ++-- src/Symfony/Component/HttpKernel/Log/Logger.php | 15 ++++++++------- .../Component/Intl/Resources/emoji/build.php | 4 ++-- .../Mailer/EventListener/MessageListener.php | 2 +- .../Messenger/Handler/HandlerDescriptor.php | 2 +- .../Transport/Receiver/ReceiverInterface.php | 4 ++-- .../Component/Mime/Header/MailboxListHeader.php | 8 ++++---- .../Component/Runtime/GenericRuntime.php | 2 +- .../Core/Authorization/AuthorizationChecker.php | 1 - .../Security/Http/Firewall/ContextListener.php | 10 +++++----- .../AbstractNormalizerContextBuilder.php | 2 +- .../Normalizer/AbstractNormalizer.php | 4 ++-- .../Normalizer/GetSetMethodNormalizer.php | 2 +- .../Translation/Tests/TranslatorTest.php | 2 -- .../AbstractComparisonValidatorTestCase.php | 12 ------------ .../Component/VarDumper/Dumper/CliDumper.php | 17 ++++++----------- src/Symfony/Component/Yaml/Tests/DumperTest.php | 2 +- src/Symfony/Contracts/Cache/CacheInterface.php | 4 ++-- 32 files changed, 82 insertions(+), 99 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/src/Symfony/Bridge/Twig/Command/DebugCommand.php index d5e64859a6c20..889ecb91b3d09 100644 --- a/src/Symfony/Bridge/Twig/Command/DebugCommand.php +++ b/src/Symfony/Bridge/Twig/Command/DebugCommand.php @@ -384,7 +384,7 @@ private function getPrettyMetadata(string $type, mixed $entity, bool $decorated) if ('globals' === $type) { if (\is_object($meta)) { - return ' = object('.\get_class($meta).')'; + return ' = object('.$meta::class.')'; } $description = substr(@json_encode($meta), 0, 50); diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 0911bc640109c..b4f1be19e87d7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -2806,14 +2806,15 @@ private function resolveTrustedHeaders(array $headers): int $trustedHeaders = 0; foreach ($headers as $h) { - switch ($h) { - case 'forwarded': $trustedHeaders |= Request::HEADER_FORWARDED; break; - case 'x-forwarded-for': $trustedHeaders |= Request::HEADER_X_FORWARDED_FOR; break; - case 'x-forwarded-host': $trustedHeaders |= Request::HEADER_X_FORWARDED_HOST; break; - case 'x-forwarded-proto': $trustedHeaders |= Request::HEADER_X_FORWARDED_PROTO; break; - case 'x-forwarded-port': $trustedHeaders |= Request::HEADER_X_FORWARDED_PORT; break; - case 'x-forwarded-prefix': $trustedHeaders |= Request::HEADER_X_FORWARDED_PREFIX; break; - } + $trustedHeaders |= match ($h) { + 'forwarded' => Request::HEADER_FORWARDED, + 'x-forwarded-for' => Request::HEADER_X_FORWARDED_FOR, + 'x-forwarded-host' => Request::HEADER_X_FORWARDED_HOST, + 'x-forwarded-proto' => Request::HEADER_X_FORWARDED_PROTO, + 'x-forwarded-port' => Request::HEADER_X_FORWARDED_PORT, + 'x-forwarded-prefix' => Request::HEADER_X_FORWARDED_PREFIX, + default => 0, + }; } return $trustedHeaders; diff --git a/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php b/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php index bbbf1f5d1240b..af5d687927887 100644 --- a/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php +++ b/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php @@ -42,7 +42,7 @@ public function collect(Request $request, Response $response, \Throwable $except $this->data = ['instances' => $empty, 'total' => $empty]; foreach ($this->instances as $name => $instance) { $this->data['instances']['calls'][$name] = $instance->getCalls(); - $this->data['instances']['adapters'][$name] = \get_debug_type($instance->getPool()); + $this->data['instances']['adapters'][$name] = get_debug_type($instance->getPool()); } $this->data['instances']['statistics'] = $this->calculateStatistics(); diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 5682e119038e0..adc61f0048825 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -288,11 +288,12 @@ public static function createConnection(string $dsn, array $options = []): \Redi if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) { $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); } - switch ($params['failover']) { - case 'error': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_ERROR); break; - case 'distribute': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE); break; - case 'slaves': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES); break; - } + $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, match ($params['failover']) { + 'error' => \RedisCluster::FAILOVER_ERROR, + 'distribute' => \RedisCluster::FAILOVER_DISTRIBUTE, + 'slaves' => \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES, + 'none' => \RedisCluster::FAILOVER_NONE, + }); return $redis; }; diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index b41e69153720f..3c5074933d6a2 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -439,9 +439,9 @@ public function getNativeDefinition(): InputDefinition * @param $default The default value (for InputArgument::OPTIONAL mode only) * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion * - * @throws InvalidArgumentException When argument mode is not valid - * * @return $this + * + * @throws InvalidArgumentException When argument mode is not valid */ public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = null */): static { @@ -463,9 +463,9 @@ public function addArgument(string $name, int $mode = null, string $description * @param $default The default value (must be null for InputOption::VALUE_NONE) * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion * - * @throws InvalidArgumentException If option mode is invalid or incompatible - * * @return $this + * + * @throws InvalidArgumentException If option mode is invalid or incompatible */ public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static { diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index 6295de3ecaf18..55a218d04b128 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -2086,7 +2086,7 @@ public function __construct(bool $emitsSignal = true) protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->emitsSignal) { - posix_kill(posix_getpid(), SIGUSR1); + posix_kill(posix_getpid(), \SIGUSR1); } for ($i = 0; $i < $this->loop; ++$i) { diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index e364e9f40e35e..7b6e40ea19b14 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -291,7 +291,7 @@ public function addObjectResource(object|string $object): static { if ($this->trackResources) { if (\is_object($object)) { - $object = \get_class($object); + $object = $object::class; } if (!isset($this->classReflectors[$object])) { $this->classReflectors[$object] = new \ReflectionClass($object); @@ -1037,7 +1037,7 @@ private function createService(Definition $definition, array &$inlineServices, b if (null !== $factory) { $service = $factory(...$arguments); - if (\is_object($tryProxy) && \get_class($service) !== $parameterBag->resolveValue($definition->getClass())) { + if (\is_object($tryProxy) && $service::class !== $parameterBag->resolveValue($definition->getClass())) { throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', $definition->getClass(), get_debug_type($service))); } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 6ea2de7c3f14a..8fde0e73353bc 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1665,7 +1665,7 @@ private function exportParameters(array $parameters, string $path = '', int $ind throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path.'/'.$key)); } elseif ($value instanceof \UnitEnum) { $hasEnum = true; - $value = sprintf('\%s::%s', \get_class($value), $value->name); + $value = sprintf('\%s::%s', $value::class, $value->name); } else { $value = $this->export($value); } @@ -1917,7 +1917,7 @@ private function dumpValue(mixed $value, bool $interpolate = true): string return $code; } } elseif ($value instanceof \UnitEnum) { - return sprintf('\%s::%s', \get_class($value), $value->name); + return sprintf('\%s::%s', $value::class, $value->name); } elseif ($value instanceof AbstractArgument) { throw new RuntimeException($value->getTextWithContext()); } elseif (\is_object($value) || \is_resource($value)) { diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php index 92c4b44845253..f4c6b29258c90 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php @@ -25,7 +25,7 @@ interface InstantiatorInterface /** * Instantiates a proxy object. * - * @param string $id Identifier of the requested service + * @param string $id Identifier of the requested service * @param callable(object=) $realInstantiator A callback that is capable of producing the real service instance * * @return object diff --git a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php index e0ab370ba66f5..cc3efa4d431ef 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php @@ -108,7 +108,7 @@ public function hasListeners(string $eventName = null): bool public function dispatch(object $event, string $eventName = null): object { - $eventName ??= \get_class($event); + $eventName ??= $event::class; if (null === $this->callStack) { $this->callStack = new \SplObjectStorage(); diff --git a/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php b/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php index 88329e2ae5309..91f8a3dc836bc 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php +++ b/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php @@ -61,7 +61,7 @@ public function __construct(callable|array $listener, ?string $name, Stopwatch $ } else { $this->name = get_debug_type($listener); $this->pretty = $this->name.'::__invoke'; - $this->callableRef = \get_class($listener).'::__invoke'; + $this->callableRef = $listener::class.'::__invoke'; } if (null !== $name) { diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/Symfony/Component/EventDispatcher/EventDispatcher.php index 27828c6eff969..41f3f7ae7c848 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -44,7 +44,7 @@ public function __construct() public function dispatch(object $event, string $eventName = null): object { - $eventName ??= \get_class($event); + $eventName ??= $event::class; if (isset($this->optimized)) { $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName)); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php index f571d631b4a39..9eb89442ea6a3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php @@ -91,13 +91,13 @@ public function provideSingleSubmitData(): iterable yield 'string backed' => [ Suit::class, - (Suit::Spades)->value, + Suit::Spades->value, Suit::Spades, ]; yield 'integer backed' => [ Number::class, - (string) (Number::Two)->value, + (string) Number::Two->value, Number::Two, ]; } @@ -131,7 +131,7 @@ public function testSubmitNull($expected = null, $norm = null, $view = null) public function testSubmitNullUsesDefaultEmptyData($emptyData = 'empty', $expectedData = null) { - $emptyData = (Suit::Hearts)->value; + $emptyData = Suit::Hearts->value; $form = $this->factory->create($this->getTestedType(), null, [ 'class' => Suit::class, @@ -151,7 +151,7 @@ public function testSubmitMultipleChoiceWithEmptyData() 'multiple' => true, 'expanded' => false, 'class' => Suit::class, - 'empty_data' => [(Suit::Diamonds)->value], + 'empty_data' => [Suit::Diamonds->value], ]); $form->submit(null); @@ -165,7 +165,7 @@ public function testSubmitSingleChoiceExpandedWithEmptyData() 'multiple' => false, 'expanded' => true, 'class' => Suit::class, - 'empty_data' => (Suit::Hearts)->value, + 'empty_data' => Suit::Hearts->value, ]); $form->submit(null); @@ -179,7 +179,7 @@ public function testSubmitMultipleChoiceExpandedWithEmptyData() 'multiple' => true, 'expanded' => true, 'class' => Suit::class, - 'empty_data' => [(Suit::Spades)->value], + 'empty_data' => [Suit::Spades->value], ]); $form->submit(null); @@ -233,13 +233,13 @@ public function provideMultiSubmitData(): iterable yield 'string backed' => [ Suit::class, - [(Suit::Hearts)->value, (Suit::Spades)->value], + [Suit::Hearts->value, Suit::Spades->value], [Suit::Hearts, Suit::Spades], ]; yield 'integer backed' => [ Number::class, - [(string) (Number::Two)->value, (string) (Number::Three)->value], + [(string) Number::Two->value, (string) Number::Three->value], [Number::Two, Number::Three], ]; } diff --git a/src/Symfony/Component/HttpClient/AmpHttpClient.php b/src/Symfony/Component/HttpClient/AmpHttpClient.php index 2252b14ad901f..f886d97492eb3 100644 --- a/src/Symfony/Component/HttpClient/AmpHttpClient.php +++ b/src/Symfony/Component/HttpClient/AmpHttpClient.php @@ -111,11 +111,11 @@ public function request(string $method, string $url, array $options = []): Respo $request = new Request(implode('', $url), $method); if ($options['http_version']) { - switch ((float) $options['http_version']) { - case 1.0: $request->setProtocolVersions(['1.0']); break; - case 1.1: $request->setProtocolVersions(['1.1', '1.0']); break; - default: $request->setProtocolVersions(['2', '1.1', '1.0']); break; - } + $request->setProtocolVersions(match ((float) $options['http_version']) { + 1.0 => ['1.0'], + 1.1 => $request->setProtocolVersions(['1.1', '1.0']), + default => ['2', '1.1', '1.0'], + }); } foreach ($options['headers'] as $v) { diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index cb893d861994e..0bddcdc9bb731 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -95,9 +95,9 @@ public function sendContent(): static } /** - * @throws \LogicException when the content is not null - * * @return $this + * + * @throws \LogicException when the content is not null */ public function setContent(?string $content): static { diff --git a/src/Symfony/Component/HttpKernel/Log/Logger.php b/src/Symfony/Component/HttpKernel/Log/Logger.php index 767f3cdb01ddd..60de6b4814843 100644 --- a/src/Symfony/Component/HttpKernel/Log/Logger.php +++ b/src/Symfony/Component/HttpKernel/Log/Logger.php @@ -48,12 +48,13 @@ public function __construct(string $minLevel = null, $output = null, callable $f $minLevel = null === $output || 'php://stdout' === $output || 'php://stderr' === $output ? LogLevel::ERROR : LogLevel::WARNING; if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) { - switch ((int) ($_ENV['SHELL_VERBOSITY'] ?? $_SERVER['SHELL_VERBOSITY'])) { - case -1: $minLevel = LogLevel::ERROR; break; - case 1: $minLevel = LogLevel::NOTICE; break; - case 2: $minLevel = LogLevel::INFO; break; - case 3: $minLevel = LogLevel::DEBUG; break; - } + $minLevel = match ((int) ($_ENV['SHELL_VERBOSITY'] ?? $_SERVER['SHELL_VERBOSITY'])) { + -1 => LogLevel::ERROR, + 1 => LogLevel::NOTICE, + 2 => LogLevel::INFO, + 3 => LogLevel::DEBUG, + default => $minLevel, + }; } } @@ -96,7 +97,7 @@ private function format(string $level, string $message, array $context, bool $pr } elseif ($val instanceof \DateTimeInterface) { $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); } elseif (\is_object($val)) { - $replacements["{{$key}}"] = '[object '.\get_class($val).']'; + $replacements["{{$key}}"] = '[object '.$val::class.']'; } else { $replacements["{{$key}}"] = '['.\gettype($val).']'; } diff --git a/src/Symfony/Component/Intl/Resources/emoji/build.php b/src/Symfony/Component/Intl/Resources/emoji/build.php index 191ba5578612d..cf34ea11baf2c 100755 --- a/src/Symfony/Component/Intl/Resources/emoji/build.php +++ b/src/Symfony/Component/Intl/Resources/emoji/build.php @@ -173,7 +173,7 @@ public static function saveRules(iterable $rulesByLocale): void file_put_contents(self::TARGET_DIR."/emoji-$locale.php", " $v) { - for ($i = 0; \ord($k[$i]) < 128 || "\xC2" === $k[$i]; ++$i) { + for ($i = 0; ord($k[$i]) < 128 || "\xC2" === $k[$i]; ++$i) { } for ($j = $i; isset($k[$j]) && !isset($firstChars[$k[$j]]); ++$j) { } @@ -189,7 +189,7 @@ public static function saveRules(iterable $rulesByLocale): void $quickCheck = '"'.str_replace('%', '\\x', rawurlencode(implode('', $firstChars))).'"'; - $file = \dirname(__DIR__, 2).'/Transliterator/EmojiTransliterator.php'; + $file = dirname(__DIR__, 2).'/Transliterator/EmojiTransliterator.php'; file_put_contents($file, preg_replace('/QUICK_CHECK = .*;/m', "QUICK_CHECK = {$quickCheck};", file_get_contents($file))); } diff --git a/src/Symfony/Component/Mailer/EventListener/MessageListener.php b/src/Symfony/Component/Mailer/EventListener/MessageListener.php index 9688ddddc394a..6e1fc93112030 100644 --- a/src/Symfony/Component/Mailer/EventListener/MessageListener.php +++ b/src/Symfony/Component/Mailer/EventListener/MessageListener.php @@ -15,8 +15,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Mailer\Event\MessageEvent; use Symfony\Component\Mailer\Exception\InvalidArgumentException; -use Symfony\Component\Mailer\Exception\RuntimeException; use Symfony\Component\Mailer\Exception\LogicException; +use Symfony\Component\Mailer\Exception\RuntimeException; use Symfony\Component\Mime\BodyRendererInterface; use Symfony\Component\Mime\Header\Headers; use Symfony\Component\Mime\Header\MailboxListHeader; diff --git a/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php b/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php index 8b872bd94b9cb..260a4a7a6ca38 100644 --- a/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php +++ b/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php @@ -43,7 +43,7 @@ public function __construct(callable $handler, array $options = []) $this->batchHandler = $handler; } - $this->name = \get_class($handler).'::'.$r->name; + $this->name = $handler::class.'::'.$r->name; } } diff --git a/src/Symfony/Component/Messenger/Transport/Receiver/ReceiverInterface.php b/src/Symfony/Component/Messenger/Transport/Receiver/ReceiverInterface.php index 68f72c5021167..01e1ca9f2cb83 100644 --- a/src/Symfony/Component/Messenger/Transport/Receiver/ReceiverInterface.php +++ b/src/Symfony/Component/Messenger/Transport/Receiver/ReceiverInterface.php @@ -39,9 +39,9 @@ interface ReceiverInterface * be retried again (e.g. if there's a queue, it should be removed) * and a MessageDecodingFailedException should be thrown. * - * @throws TransportException If there is an issue communicating with the transport - * * @return Envelope[] + * + * @throws TransportException If there is an issue communicating with the transport */ public function get(): iterable; diff --git a/src/Symfony/Component/Mime/Header/MailboxListHeader.php b/src/Symfony/Component/Mime/Header/MailboxListHeader.php index e6e6ce195d724..76cf59f36196b 100644 --- a/src/Symfony/Component/Mime/Header/MailboxListHeader.php +++ b/src/Symfony/Component/Mime/Header/MailboxListHeader.php @@ -44,9 +44,9 @@ public function setBody(mixed $body) } /** - * @throws RfcComplianceException - * * @return Address[] + * + * @throws RfcComplianceException */ public function getBody(): array { @@ -99,9 +99,9 @@ public function getAddresses(): array /** * Gets the full mailbox list of this Header as an array of valid RFC 2822 strings. * - * @throws RfcComplianceException - * * @return string[] + * + * @throws RfcComplianceException */ public function getAddressStrings(): array { diff --git a/src/Symfony/Component/Runtime/GenericRuntime.php b/src/Symfony/Component/Runtime/GenericRuntime.php index f3326a570f25e..822197692beb9 100644 --- a/src/Symfony/Component/Runtime/GenericRuntime.php +++ b/src/Symfony/Component/Runtime/GenericRuntime.php @@ -122,7 +122,7 @@ public function getRunner(?object $application): RunnerInterface } if (!$application instanceof \Closure) { - if ($runtime = $this->resolveRuntime(\get_class($application))) { + if ($runtime = $this->resolveRuntime($application::class)) { return $runtime->getRunner($application); } diff --git a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php index 478ea01cba63b..3827f8b91ee38 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php +++ b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php @@ -13,7 +13,6 @@ use Symfony\Component\Security\Core\Authentication\Token\NullToken; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; /** * AuthorizationChecker is the main authorization point of the Security component. diff --git a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php index 873434ee7120c..3b7d66c6cda0f 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php @@ -119,7 +119,7 @@ public function authenticate(RequestEvent $event) $this->logger?->debug('Read existing security token from the session.', [ 'key' => $this->sessionKey, - 'token_class' => \is_object($token) ? \get_class($token) : null, + 'token_class' => \is_object($token) ? $token::class : null, ]); if ($token instanceof TokenInterface) { @@ -192,7 +192,7 @@ protected function refreshUser(TokenInterface $token): ?TokenInterface $userNotFoundByProvider = false; $userDeauthenticated = false; - $userClass = \get_class($user); + $userClass = $user::class; foreach ($this->userProviders as $provider) { if (!$provider instanceof UserProviderInterface) { @@ -212,7 +212,7 @@ protected function refreshUser(TokenInterface $token): ?TokenInterface if ($token instanceof AbstractToken && $this->hasUserChanged($user, $newToken)) { $userDeauthenticated = true; - $this->logger?->debug('Cannot refresh token because user has changed.', ['username' => $refreshedUser->getUserIdentifier(), 'provider' => \get_class($provider)]); + $this->logger?->debug('Cannot refresh token because user has changed.', ['username' => $refreshedUser->getUserIdentifier(), 'provider' => $provider::class]); continue; } @@ -220,7 +220,7 @@ protected function refreshUser(TokenInterface $token): ?TokenInterface $token->setUser($refreshedUser); if (null !== $this->logger) { - $context = ['provider' => \get_class($provider), 'username' => $refreshedUser->getUserIdentifier()]; + $context = ['provider' => $provider::class, 'username' => $refreshedUser->getUserIdentifier()]; if ($token instanceof SwitchUserToken) { $originalToken = $token->getOriginalToken(); @@ -234,7 +234,7 @@ protected function refreshUser(TokenInterface $token): ?TokenInterface } catch (UnsupportedUserException) { // let's try the next user provider } catch (UserNotFoundException $e) { - $this->logger?->warning('Username could not be found in the selected user provider.', ['username' => $e->getUserIdentifier(), 'provider' => \get_class($provider)]); + $this->logger?->warning('Username could not be found in the selected user provider.', ['username' => $e->getUserIdentifier(), 'provider' => $provider::class]); $userNotFoundByProvider = true; } diff --git a/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php b/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php index f494f060ac005..670543540b5aa 100644 --- a/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php +++ b/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php @@ -158,7 +158,7 @@ public function withCircularReferenceHandler(?callable $circularReferenceHandler * Note: The behaviour for nested structures is different from ATTRIBUTES * for historical reason. Aligning the behaviour would be a BC break. * - * @param list|null $attributes + * @param list|null $ignoredAttributes */ public function withIgnoredAttributes(?array $ignoredAttributes): static { diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index cb6890d3cf1c7..12c778cb803af 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -205,9 +205,9 @@ protected function handleCircularReference(object $object, string $format = null * * @param bool $attributesAsString If false, return an array of {@link AttributeMetadataInterface} * - * @throws LogicException if the 'allow_extra_attributes' context variable is false and no class metadata factory is provided - * * @return string[]|AttributeMetadataInterface[]|bool + * + * @throws LogicException if the 'allow_extra_attributes' context variable is false and no class metadata factory is provided */ protected function getAllowedAttributes(string|object $classOrObject, array $context, bool $attributesAsString = false) { diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 08ccfd1bd5de4..ba39b41ff8d4d 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -41,7 +41,7 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer */ public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool { - return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data)); + return parent::supportsNormalization($data, $format) && $this->supports($data::class); } /** diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php index b5c332dffd8ac..941b1d397d383 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -15,10 +15,8 @@ use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Component\Translation\Exception\NotFoundResourceException; use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Translation\Formatter\IntlFormatter; use Symfony\Component\Translation\Formatter\IntlFormatterInterface; use Symfony\Component\Translation\Formatter\MessageFormatter; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; use Symfony\Component\Translation\Loader\ArrayLoader; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\TranslatableMessage; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php index 4b29c6a6074ac..c6bbbf76b5297 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php @@ -99,9 +99,6 @@ public function testThrowsConstraintExceptionIfBothValueAndPropertyPath() /** * @dataProvider provideAllValidComparisons - * - * @param mixed $dirtyValue - * @param mixed $comparisonValue */ public function testValidComparisonToValue($dirtyValue, $comparisonValue) { @@ -172,12 +169,6 @@ abstract public function provideValidComparisonsToPropertyPath(): array; /** * @dataProvider provideAllInvalidComparisons - * - * @param mixed $dirtyValue - * @param mixed $dirtyValueAsString - * @param mixed $comparedValue - * @param mixed $comparedValueString - * @param string $comparedValueType */ public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $comparedValue, $comparedValueString, $comparedValueType) { @@ -290,9 +281,6 @@ abstract public function provideInvalidComparisons(): array; abstract public function provideComparisonsToNullValueAtPropertyPath(); - /** - * @param array|null $options Options for the constraint - */ abstract protected function createConstraint(array $options = null): Constraint; protected function getErrorCode(): ?string diff --git a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php index c0ab500e1eba1..182c794c5ae2f 100644 --- a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php @@ -147,17 +147,12 @@ public function dumpScalar(Cursor $cursor, string $type, string|int|float|bool|n $style = 'float'; } - switch (true) { - case \INF === $value: $value = 'INF'; break; - case -\INF === $value: $value = '-INF'; break; - case is_nan($value): $value = 'NAN'; break; - default: - $value = (string) $value; - if (!str_contains($value, $this->decimalPoint)) { - $value .= $this->decimalPoint.'0'; - } - break; - } + $value = match (true) { + \INF === $value => 'INF', + -\INF === $value => '-INF', + is_nan($value) => 'NAN', + default => !str_contains($value = (string) $value, $this->decimalPoint) ? $value .= $this->decimalPoint.'0' : $value, + }; break; case 'NULL': diff --git a/src/Symfony/Component/Yaml/Tests/DumperTest.php b/src/Symfony/Component/Yaml/Tests/DumperTest.php index 5ac9b81661e65..d6516d7dd9ec3 100644 --- a/src/Symfony/Component/Yaml/Tests/DumperTest.php +++ b/src/Symfony/Component/Yaml/Tests/DumperTest.php @@ -677,7 +677,7 @@ public function testDumpMultiLineStringAsScalarBlock() nested_inlined_multi_line_string: { inlined_multi_line: "foo\nbar\r\nempty line:\n\nbaz" } YAML -); + ); $this->assertSame($expected, $yml); $this->assertSame($data, $this->parser->parse($yml)); } diff --git a/src/Symfony/Contracts/Cache/CacheInterface.php b/src/Symfony/Contracts/Cache/CacheInterface.php index 0840a8fa0cbb7..0d4f4030b5db9 100644 --- a/src/Symfony/Contracts/Cache/CacheInterface.php +++ b/src/Symfony/Contracts/Cache/CacheInterface.php @@ -47,9 +47,9 @@ public function get(string $key, callable $callback, float $beta = null, array & * * @param string $key The key to delete * - * @throws InvalidArgumentException When $key is not valid - * * @return bool True if the item was successfully removed, false if there was any error + * + * @throws InvalidArgumentException When $key is not valid */ public function delete(string $key): bool; } From bf9b5f96dc97fd9c966720f5d3b35cc379179c87 Mon Sep 17 00:00:00 2001 From: Guilherme Ferreira Date: Fri, 2 Sep 2022 22:54:56 +0200 Subject: [PATCH 0067/1170] Use identical comparison for schema validation. --- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 4b2c4d96752c4..fe021c259a3b2 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -983,7 +983,7 @@ public function getHttpHost() $scheme = $this->getScheme(); $port = $this->getPort(); - if (('http' == $scheme && 80 == $port) || ('https' == $scheme && 443 == $port)) { + if (('http' === $scheme && 80 == $port) || ('https' === $scheme && 443 == $port)) { return $this->getHost(); } From 4a169536c8b17a3ec1eaceba919c341736160738 Mon Sep 17 00:00:00 2001 From: "Phil E. Taylor" Date: Sat, 3 Sep 2022 01:28:45 +0100 Subject: [PATCH 0068/1170] sleep 1millisecond to ensure time has changed on fast computers --- src/Symfony/Component/Clock/Tests/MockClockTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/Clock/Tests/MockClockTest.php b/src/Symfony/Component/Clock/Tests/MockClockTest.php index 56c76299a41c4..be1f8316055f8 100644 --- a/src/Symfony/Component/Clock/Tests/MockClockTest.php +++ b/src/Symfony/Component/Clock/Tests/MockClockTest.php @@ -43,6 +43,7 @@ public function testNow() { $before = new \DateTimeImmutable(); $clock = new MockClock(); + usleep(1); $after = new \DateTimeImmutable(); $this->assertGreaterThan($before, $clock->now()); From 48621393478d15f05ba6f1d2fc029b5bf76159d9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 3 Aug 2022 18:02:10 +0200 Subject: [PATCH 0069/1170] [DependencyInjection][VarExporter] Generate lazy proxies for non-ghostable lazy services out of the box --- .github/expected-missing-return-types.diff | 46 +-- .../Bridge/Doctrine/ManagerRegistry.php | 6 +- .../Tests/LazyProxy/ContainerBuilderTest.php | 2 + .../Tests/LazyProxy/Dumper/PhpDumperTest.php | 2 + .../DependencyInjection/CHANGELOG.md | 2 +- .../Compiler/AutowirePass.php | 8 +- .../Compiler/ResolveBindingsPass.php | 7 +- .../Compiler/ResolveNamedArgumentsPass.php | 4 +- .../DependencyInjection/ContainerBuilder.php | 9 - .../DependencyInjection/Dumper/PhpDumper.php | 26 +- .../Instantiator/LazyServiceInstantiator.php | 14 +- .../LazyProxy/PhpDumper/LazyServiceDumper.php | 118 +++--- .../LazyProxy/ProxyHelper.php | 4 +- .../Tests/ContainerBuilderTest.php | 3 +- .../Tests/Dumper/PhpDumperTest.php | 2 +- .../php/services9_lazy_inlined_factories.txt | 19 +- .../php/services_dedup_lazy_ghost.php | 34 +- .../php/services_dedup_lazy_proxy.php | 13 - .../Fixtures/php/services_non_shared_lazy.php | 13 - .../php/services_non_shared_lazy_as_files.txt | 34 +- .../php/services_non_shared_lazy_ghost.php | 30 +- .../Fixtures/php/services_wither_lazy.php | 39 +- .../ErrorHandler/DebugClassLoader.php | 4 +- ...RegisterControllerArgumentLocatorsPass.php | 6 +- .../Component/VarExporter/CHANGELOG.md | 2 +- .../LogicException.php} | 7 +- .../VarExporter/Internal/GhostObjectId.php | 39 -- ...ectRegistry.php => LazyObjectRegistry.php} | 59 ++- ...ostObjectState.php => LazyObjectState.php} | 42 ++- ...hostObjectTrait.php => LazyGhostTrait.php} | 156 ++++---- ...tInterface.php => LazyObjectInterface.php} | 10 +- .../Component/VarExporter/LazyProxyTrait.php | 345 +++++++++++++++++ .../Component/VarExporter/ProxyHelper.php | 351 ++++++++++++++++++ src/Symfony/Component/VarExporter/README.md | 79 +++- .../ChildMagicClass.php | 11 +- .../ChildStdClass.php | 12 +- .../ChildTestClass.php | 6 +- .../MagicClass.php | 2 +- .../NoMagicClass.php | 2 +- .../TestClass.php | 7 +- .../Fixtures/LazyProxy/FinalPublicClass.php | 27 ++ .../Fixtures/LazyProxy/ReadOnlyClass.php | 20 + .../LazyProxy/StringMagicGetClass.php | 20 + .../Tests/Fixtures/LazyProxy/TestClass.php | 31 ++ .../LazyProxy/TestUnserializeClass.php | 26 ++ .../Fixtures/LazyProxy/TestWakeupClass.php | 20 + ...ctTraitTest.php => LazyGhostTraitTest.php} | 98 ++--- .../VarExporter/Tests/LazyProxyTraitTest.php | 262 +++++++++++++ .../VarExporter/Tests/ProxyHelperTest.php | 253 +++++++++++++ .../Component/VarExporter/VarExporter.php | 2 +- .../Component/VarExporter/composer.json | 2 +- 51 files changed, 1818 insertions(+), 518 deletions(-) rename src/Symfony/Component/VarExporter/{Internal/EmptyScope.php => Exception/LogicException.php} (65%) delete mode 100644 src/Symfony/Component/VarExporter/Internal/GhostObjectId.php rename src/Symfony/Component/VarExporter/Internal/{GhostObjectRegistry.php => LazyObjectRegistry.php} (60%) rename src/Symfony/Component/VarExporter/Internal/{GhostObjectState.php => LazyObjectState.php} (59%) rename src/Symfony/Component/VarExporter/{LazyGhostObjectTrait.php => LazyGhostTrait.php} (63%) rename src/Symfony/Component/VarExporter/{LazyGhostObjectInterface.php => LazyObjectInterface.php} (62%) create mode 100644 src/Symfony/Component/VarExporter/LazyProxyTrait.php create mode 100644 src/Symfony/Component/VarExporter/ProxyHelper.php rename src/Symfony/Component/VarExporter/Tests/Fixtures/{LazyGhostObject => LazyGhost}/ChildMagicClass.php (59%) rename src/Symfony/Component/VarExporter/Tests/Fixtures/{LazyGhostObject => LazyGhost}/ChildStdClass.php (57%) rename src/Symfony/Component/VarExporter/Tests/Fixtures/{LazyGhostObject => LazyGhost}/ChildTestClass.php (87%) rename src/Symfony/Component/VarExporter/Tests/Fixtures/{LazyGhostObject => LazyGhost}/MagicClass.php (99%) rename src/Symfony/Component/VarExporter/Tests/Fixtures/{LazyGhostObject => LazyGhost}/NoMagicClass.php (99%) rename src/Symfony/Component/VarExporter/Tests/Fixtures/{LazyGhostObject => LazyGhost}/TestClass.php (86%) create mode 100644 src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/FinalPublicClass.php create mode 100644 src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/ReadOnlyClass.php create mode 100644 src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/StringMagicGetClass.php create mode 100644 src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestClass.php create mode 100644 src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestUnserializeClass.php create mode 100644 src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestWakeupClass.php rename src/Symfony/Component/VarExporter/Tests/{LazyGhostObjectTraitTest.php => LazyGhostTraitTest.php} (55%) create mode 100644 src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php create mode 100644 src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php diff --git a/.github/expected-missing-return-types.diff b/.github/expected-missing-return-types.diff index a59d20fd2811e..6940232ce0f04 100644 --- a/.github/expected-missing-return-types.diff +++ b/.github/expected-missing-return-types.diff @@ -7,10 +7,10 @@ head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff) git checkout composer.json src/ diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php -index 165797504b..0c0922088a 100644 +index 18b5c21b9f..8fca8244e3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php -@@ -87,5 +87,5 @@ abstract class KernelTestCase extends TestCase +@@ -88,5 +88,5 @@ abstract class KernelTestCase extends TestCase * @return Container */ - protected static function getContainer(): ContainerInterface @@ -156,52 +156,52 @@ index 6b1c6c5fbe..bb80ed461e 100644 + public function isFresh(ResourceInterface $resource, int $timestamp): bool; } diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php -index 64068fcc23..f29aaf1b94 100644 +index 53f2021fa9..cf95c1fe99 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php -@@ -218,5 +218,5 @@ class Application implements ResetInterface +@@ -219,5 +219,5 @@ class Application implements ResetInterface * @return int 0 if everything went fine, or an error code */ - public function doRun(InputInterface $input, OutputInterface $output) + public function doRun(InputInterface $input, OutputInterface $output): int { if (true === $input->hasParameterOption(['--version', '-V'], true)) { -@@ -454,5 +454,5 @@ class Application implements ResetInterface +@@ -453,5 +453,5 @@ class Application implements ResetInterface * @return string */ - public function getLongVersion() + public function getLongVersion(): string { if ('UNKNOWN' !== $this->getName()) { -@@ -497,5 +497,5 @@ class Application implements ResetInterface +@@ -496,5 +496,5 @@ class Application implements ResetInterface * @return Command|null */ - public function add(Command $command) + public function add(Command $command): ?Command { $this->init(); -@@ -534,5 +534,5 @@ class Application implements ResetInterface +@@ -533,5 +533,5 @@ class Application implements ResetInterface * @throws CommandNotFoundException When given command name does not exist */ - public function get(string $name) + public function get(string $name): Command { $this->init(); -@@ -641,5 +641,5 @@ class Application implements ResetInterface +@@ -640,5 +640,5 @@ class Application implements ResetInterface * @throws CommandNotFoundException When command name is incorrect or ambiguous */ - public function find(string $name) + public function find(string $name): Command { $this->init(); -@@ -751,5 +751,5 @@ class Application implements ResetInterface +@@ -750,5 +750,5 @@ class Application implements ResetInterface * @return Command[] */ - public function all(string $namespace = null) + public function all(string $namespace = null): array { $this->init(); -@@ -950,5 +950,5 @@ class Application implements ResetInterface +@@ -949,5 +949,5 @@ class Application implements ResetInterface * @return int 0 if everything went fine, or an error code */ - protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) @@ -234,7 +234,7 @@ index b41e691537..34de10fa70 100644 { if (null === $this->helperSet) { diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/Symfony/Component/Console/Formatter/OutputFormatter.php -index 3c6b0efccd..121664f15a 100644 +index 0112350a50..dc972564fb 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatter.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -137,5 +137,5 @@ class OutputFormatter implements WrappableOutputFormatterInterface @@ -301,22 +301,22 @@ index 2f1631ed30..a4b572771e 100644 { if (\is_array($value)) { diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php -index 04b7022484..5d736ec754 100644 +index 20ca68e514..e0850df0f8 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php -@@ -108,5 +108,5 @@ class Container implements ContainerInterface, ResetInterface - * @throws InvalidArgumentException if the parameter is not defined +@@ -109,5 +109,5 @@ class Container implements ContainerInterface, ResetInterface + * @throws ParameterNotFoundException if the parameter is not defined */ - public function getParameter(string $name) + public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null { return $this->parameterBag->get($name); diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php -index cad44026c0..14cd192e07 100644 +index 9e97fb71fc..1cda97c611 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php @@ -53,5 +53,5 @@ interface ContainerInterface extends PsrContainerInterface - * @throws InvalidArgumentException if the parameter is not defined + * @throws ParameterNotFoundException if the parameter is not defined */ - public function getParameter(string $name); + public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null; @@ -358,7 +358,7 @@ index d553203c43..1163f4b107 100644 { $class = static::class; diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php -index 4f66f18073..e96d867296 100644 +index 11cda00cc5..07b4990160 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php @@ -35,5 +35,5 @@ interface ExtensionInterface @@ -913,7 +913,7 @@ index 5014b9bd51..757c76f546 100644 + public function supportsDecoding(string $format): bool; } diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php -index 391cdcb39c..f637687e74 100644 +index e426d87076..350cbc6335 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -213,5 +213,5 @@ abstract class AbstractNormalizer implements NormalizerInterface, DenormalizerIn @@ -1094,11 +1094,11 @@ index b22d6ae609..31d1a25f9d 100644 + public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount, &$valuesAreStatic): array { $refs = $values; -diff --git a/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php b/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php -index 471c1a6b91..2e19d2ab2d 100644 ---- a/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php -+++ b/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php -@@ -54,5 +54,5 @@ class GhostObjectState +diff --git a/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php b/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php +index 6ea89bc831..01748bcfc0 100644 +--- a/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php ++++ b/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php +@@ -56,5 +56,5 @@ class LazyObjectState * @return bool Returns true when fully-initializing, false when partial-initializing */ - public function initialize($instance, $propertyName, $propertyScope) diff --git a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php index 52050c3a56d36..bcd16dc06e6f3 100644 --- a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php +++ b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php @@ -15,7 +15,7 @@ use ProxyManager\Proxy\GhostObjectInterface; use ProxyManager\Proxy\LazyLoadingInterface; use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\VarExporter\LazyGhostObjectInterface; +use Symfony\Component\VarExporter\LazyObjectInterface; /** * References Doctrine connections and entity/document managers. @@ -41,8 +41,8 @@ protected function resetService($name): void } $manager = $this->container->get($name); - if ($manager instanceof LazyGhostObjectInterface) { - if (!$manager->resetLazyGhostObject()) { + if ($manager instanceof LazyObjectInterface) { + if (!$manager->resetLazyObject()) { throw new \LogicException(sprintf('Resetting a non-lazy manager service is not supported. Declare the "%s" service as lazy.', $name)); } diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php index 85455d222194e..0967f1b1d5b23 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php @@ -16,6 +16,7 @@ use PHPUnit\Framework\TestCase; use ProxyManager\Proxy\LazyLoadingInterface; use ProxyManagerBridgeFooClass; +use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; use Symfony\Component\DependencyInjection\ContainerBuilder; /** @@ -29,6 +30,7 @@ class ContainerBuilderTest extends TestCase public function testCreateProxyServiceWithRuntimeInstantiator() { $builder = new ContainerBuilder(); + $builder->setProxyInstantiator(new RuntimeInstantiator()); $builder->register('foo1', ProxyManagerBridgeFooClass::class)->setFile(__DIR__.'/Fixtures/includes/foo.php')->setPublic(true); $builder->getDefinition('foo1')->setLazy(true)->addTag('proxy', ['interface' => ProxyManagerBridgeFooClass::class]); diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php index bef5e5062bb95..aedfff33c56c5 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use ProxyManager\Proxy\LazyLoadingInterface; +use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Dumper\PhpDumper; @@ -66,6 +67,7 @@ private function dumpLazyServiceProjectServiceContainer() $container->compile(); $dumper = new PhpDumper($container); + $dumper->setProxyDumper(new ProxyDumper()); return $dumper->dump(['class' => 'LazyServiceProjectServiceContainer']); } diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md index fe744789eaa50..274df06358bf1 100644 --- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -4,7 +4,7 @@ CHANGELOG 6.2 --- - * Use lazy-loading ghost object proxies out of the box + * Use lazy-loading ghost objects and virtual proxies out of the box * Add argument `&$asGhostObject` to LazyProxy's `DumperInterface` to allow using ghost objects for lazy loading services * Add `enum` env var processor * Add `shuffle` env var processor diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index 11376411c9091..cf0bd9ae244a0 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -24,9 +24,9 @@ use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\AutowiringFailedException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\TypedReference; +use Symfony\Component\VarExporter\ProxyHelper; use Symfony\Contracts\Service\Attribute\SubscribedService; /** @@ -276,7 +276,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a continue; } - $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, true); + $type = ProxyHelper::exportType($parameter, true); if ($checkAttributes) { foreach ($parameter->getAttributes() as $attribute) { @@ -306,8 +306,8 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a --$index; break; } - $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, false); - $type = $type ? sprintf('is type-hinted "%s"', ltrim($type, '\\')) : 'has no type-hint'; + $type = ProxyHelper::exportType($parameter); + $type = $type ? sprintf('is type-hinted "%s"', preg_replace('/(^|[(|&])\\\\|^\?\\\\?/', '\1', $type)) : 'has no type-hint'; throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method, $type)); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php index 31924263504e5..0039496d72ec4 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php @@ -19,9 +19,9 @@ use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\TypedReference; +use Symfony\Component\VarExporter\ProxyHelper; /** * @author Guilhem Niot @@ -176,10 +176,11 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed continue; } - $typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter); + $typeHint = ltrim(ProxyHelper::exportType($parameter) ?? '', '?'); + $name = Target::parseName($parameter); - if ($typeHint && \array_key_exists($k = ltrim($typeHint, '\\').' $'.$name, $bindings)) { + if ($typeHint && \array_key_exists($k = preg_replace('/(^|[(|&])\\\\/', '\1', $typeHint).' $'.$name, $bindings)) { $arguments[$key] = $this->getBindingValue($bindings[$k]); continue; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php index 53bf4b2c8323b..28e4389de296c 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php @@ -14,8 +14,8 @@ use Symfony\Component\DependencyInjection\Argument\AbstractArgument; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\VarExporter\ProxyHelper; /** * Resolves named arguments to their corresponding numeric index. @@ -87,7 +87,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) { + if (!\array_key_exists($j, $resolvedArguments) && ProxyHelper::exportType($p, true) === $key) { $resolvedArguments[$j] = $argument; $typeFound = true; } diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 7b6e40ea19b14..5f9bb9d1d8de7 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -46,7 +46,6 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\ExpressionLanguage\Expression; use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\VarExporter\Hydrator; /** * ContainerBuilder is a DI container that provides an API to easily describe services. @@ -1037,10 +1036,6 @@ private function createService(Definition $definition, array &$inlineServices, b if (null !== $factory) { $service = $factory(...$arguments); - if (\is_object($tryProxy) && $service::class !== $parameterBag->resolveValue($definition->getClass())) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', $definition->getClass(), get_debug_type($service))); - } - if (!$definition->isDeprecated() && \is_array($factory) && \is_string($factory[0])) { $r = new \ReflectionClass($factory[0]); @@ -1110,10 +1105,6 @@ private function createService(Definition $definition, array &$inlineServices, b $callable($service); } - if (\is_object($tryProxy) && $tryProxy !== $service) { - return Hydrator::hydrate($tryProxy, (array) $service); - } - return $service; } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 8fde0e73353bc..6f4465665812c 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -673,9 +673,6 @@ private function addServiceInstance(string $id, Definition $definition, bool $is $return = ''; if ($isSimpleInstance) { - if ($asGhostObject && null !== $definition->getFactory()) { - $instantiation .= '$this->hydrateProxy($lazyLoad, '; - } $return = 'return '; } else { $instantiation .= ' = '; @@ -893,9 +890,7 @@ protected function {$methodName}($lazyInitialization) $code .= sprintf(' %s ??= ', $factory); if ($asFile) { - $code .= "function () {\n"; - $code .= " return self::do(\$container);\n"; - $code .= " };\n\n"; + $code .= "fn () => self::do(\$container);\n\n"; } else { $code .= sprintf("\$this->%s(...);\n\n", $methodName); } @@ -1076,11 +1071,7 @@ private function addInlineService(string $id, Definition $definition, Definition return $code; } - if (!$asGhostObject) { - return $code."\n return \$instance;\n"; - } - - return $code."\n return \$this->hydrateProxy(\$lazyLoad, \$instance);\n"; + return $code."\n return \$instance;\n"; } private function addServices(array &$services = null): string @@ -1326,19 +1317,6 @@ protected function createProxy(\$class, \Closure \$factory) {$proxyLoader}return \$factory(); } - protected function hydrateProxy(\$proxy, \$instance) - { - if (\$proxy === \$instance) { - return \$proxy; - } - - if (!\in_array(\get_class(\$instance), [\get_class(\$proxy), get_parent_class(\$proxy)], true)) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1\$s".', get_parent_class(\$proxy), get_debug_type(\$instance))); - } - - return \Symfony\Component\VarExporter\Hydrator::hydrate(\$proxy, (array) \$instance); - } - EOF; break; } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php index 053f80f11bbec..419bcd5d54398 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php @@ -11,12 +11,10 @@ namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; -use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\LazyServiceDumper; -use Symfony\Component\VarExporter\LazyGhostObjectInterface; -use Symfony\Component\VarExporter\LazyGhostObjectTrait; +use Symfony\Component\VarExporter\LazyGhostTrait; /** * @author Nicolas Grekas @@ -27,14 +25,10 @@ public function instantiateProxy(ContainerInterface $container, Definition $defi { $dumper = new LazyServiceDumper(); - if ($dumper->useProxyManager($definition)) { - return (new RuntimeInstantiator())->instantiateProxy($container, $definition, $id, $realInstantiator); + if (!class_exists($proxyClass = $dumper->getProxyClass($definition, $class), false)) { + eval($dumper->getProxyCode($definition)); } - if (!class_exists($proxyClass = $dumper->getProxyClass($definition), false)) { - eval(sprintf('class %s extends %s implements %s { use %s; }', $proxyClass, $definition->getClass(), LazyGhostObjectInterface::class, LazyGhostObjectTrait::class)); - } - - return $proxyClass::createLazyGhostObject($realInstantiator); + return isset(class_uses($proxyClass)[LazyGhostTrait::class]) ? $proxyClass::createLazyGhost($realInstantiator) : $proxyClass::createLazyProxy($realInstantiator); } } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php index ed66f6962db8b..0f443f42facd8 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php @@ -11,12 +11,10 @@ namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; -use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\VarExporter\LazyGhostObjectInterface; -use Symfony\Component\VarExporter\LazyGhostObjectTrait; +use Symfony\Component\VarExporter\Exception\LogicException; +use Symfony\Component\VarExporter\ProxyHelper; /** * @author Nicolas Grekas @@ -48,29 +46,26 @@ public function isProxyCandidate(Definition $definition, bool &$asGhostObject = return false; } - $class = new \ReflectionClass($class); - - if ($class->isFinal()) { - throw new InvalidArgumentException(sprintf('Cannot make service of class "%s" lazy because the class is final.', $definition->getClass())); + if ($definition->getFactory()) { + return true; } - if ($asGhostObject = !$class->isAbstract() && !$class->isInterface() && (\stdClass::class === $class->name || !$class->isInternal())) { - while ($class = $class->getParentClass()) { - if (!$asGhostObject = \stdClass::class === $class->name || !$class->isInternal()) { - break; - } + foreach ($definition->getMethodCalls() as $call) { + if ($call[2] ?? false) { + return true; } } + try { + $asGhostObject = (bool) ProxyHelper::generateLazyGhost(new \ReflectionClass($class)); + } catch (LogicException) { + } + return true; } public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string { - if ($dumper = $this->useProxyManager($definition)) { - return $dumper->getProxyFactoryCode($definition, $id, $factoryCode); - } - $instantiation = 'return'; if ($definition->isShared()) { @@ -79,66 +74,75 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ $proxyClass = $this->getProxyClass($definition); + if (!str_contains($factoryCode, '$proxy')) { + return <<createProxy('$proxyClass', fn () => \\$proxyClass::createLazyProxy(fn () => $factoryCode)); + } + + + EOF; + } + if (preg_match('/^\$this->\w++\(\$proxy\)$/', $factoryCode)) { $factoryCode = substr_replace($factoryCode, '(...)', -8); } else { - $factoryCode = sprintf('function ($proxy) { return %s; }', $factoryCode); + $factoryCode = sprintf('fn ($proxy) => %s', $factoryCode); } return <<createProxy('$proxyClass', function () { - return \\$proxyClass::createLazyGhostObject($factoryCode); - }); - } + if (true === \$lazyLoad) { + $instantiation \$this->createProxy('$proxyClass', fn () => \\$proxyClass::createLazyGhost($factoryCode)); + } -EOF; + EOF; } public function getProxyCode(Definition $definition): string - { - if ($dumper = $this->useProxyManager($definition)) { - return $dumper->getProxyCode($definition); - } - - $proxyClass = $this->getProxyClass($definition); - - return sprintf(<<getClass(), - LazyGhostObjectInterface::class, - LazyGhostObjectTrait::class - ); - } - - public function getProxyClass(Definition $definition): string - { - $class = (new \ReflectionClass($definition->getClass()))->name; - - return preg_replace('/^.*\\\\/', '', $class).'_'.substr(hash('sha256', $this->salt.'+'.$class), -7); - } - - public function useProxyManager(Definition $definition): ?ProxyDumper { if (!$this->isProxyCandidate($definition, $asGhostObject)) { throw new InvalidArgumentException(sprintf('Cannot instantiate lazy proxy for service of class "%s".', $definition->getClass())); } + $proxyClass = $this->getProxyClass($definition, $class); if ($asGhostObject) { - return null; + try { + return 'class '.$proxyClass.ProxyHelper::generateLazyGhost($class); + } catch (LogicException $e) { + throw new InvalidArgumentException(sprintf('Cannot generate lazy ghost for service of class "%s" lazy.', $definition->getClass()), 0, $e); + } } - if (!class_exists(ProxyDumper::class)) { - throw new LogicException('You cannot use virtual proxies for lazy services as the ProxyManager bridge is not installed. Try running "composer require symfony/proxy-manager-bridge".'); + if ($definition->hasTag('proxy')) { + $interfaces = []; + foreach ($definition->getTag('proxy') as $tag) { + if (!isset($tag['interface'])) { + throw new InvalidArgumentException(sprintf('Invalid definition for service of class "%s": the "interface" attribute is missing on a "proxy" tag.', $definition->getClass())); + } + if (!interface_exists($tag['interface']) && !class_exists($tag['interface'], false)) { + throw new InvalidArgumentException(sprintf('Invalid definition for service of class "%s": several "proxy" tags found but "%s" is not an interface.', $definition->getClass(), $tag['interface'])); + } + $interfaces[] = new \ReflectionClass($tag['interface']); + } + } else { + $interfaces = [$class]; } + if (1 === \count($interfaces) && !$interfaces[0]->isInterface()) { + $class = array_pop($interfaces); + } + + try { + return (\PHP_VERSION_ID >= 80200 && $class->isReadOnly() ? 'readonly ' : '').'class '.$proxyClass.ProxyHelper::generateLazyProxy($class, $interfaces); + } catch (LogicException $e) { + throw new InvalidArgumentException(sprintf('Cannot generate lazy proxy for service of class "%s" lazy.', $definition->getClass()), 0, $e); + } + } + + public function getProxyClass(Definition $definition, \ReflectionClass &$class = null): string + { + $class = new \ReflectionClass($definition->getClass()); - return new ProxyDumper($this->salt); + return preg_replace('/^.*\\\\/', '', $class->name).'_'.substr(hash('sha256', $this->salt.'+'.$class->name), -7); } } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/ProxyHelper.php b/src/Symfony/Component/DependencyInjection/LazyProxy/ProxyHelper.php index f33011ad1d84f..bde7d6a3fff58 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/ProxyHelper.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/ProxyHelper.php @@ -11,10 +11,12 @@ namespace Symfony\Component\DependencyInjection\LazyProxy; +trigger_deprecation('symfony/dependency-injection', '6.2', 'The "%s" class is deprecated, use "%s" instead.', ProxyHelper::class, \Symfony\Component\VarExporter\ProxyHelper::class); + /** * @author Nicolas Grekas * - * @internal + * @deprecated since Symfony 6.2, use VarExporter's ProxyHelper instead */ class ProxyHelper { diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 5f48b68e2c046..8325ecb51b7e5 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -1696,7 +1696,8 @@ public function testLazyWither() $wither = $container->get('wither'); $this->assertInstanceOf(Foo::class, $wither->foo); - $this->assertTrue($wither->resetLazyGhostObject()); + $this->assertTrue($wither->resetLazyObject()); + $this->assertInstanceOf(Wither::class, $wither->withFoo1($wither->foo)); } public function testWitherWithStaticReturnType() diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 47efc42331fd1..316c89d461e37 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -1452,7 +1452,7 @@ public function testLazyWither() $wither = $container->get('wither'); $this->assertInstanceOf(Foo::class, $wither->foo); - $this->assertTrue($wither->resetLazyGhostObject()); + $this->assertTrue($wither->resetLazyObject()); } public function testWitherWithStaticReturnType() 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 4c13b02341884..7af59984549ae 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,7 +6,7 @@ namespace Container%s; include_once $this->targetDir.''.'/Fixtures/includes/foo.php'; -class FooClass_2b16075 extends \Bar\FooClass implements \Symfony\Component\VarExporter\LazyGhostObjectInterface +class FooClass_2b16075 extends \Bar\FooClass implements \Symfony\Component\VarExporter\LazyObjectInterface %A if (!\class_exists('FooClass_%s', false)) { @@ -70,19 +70,6 @@ class ProjectServiceContainer extends Container return $factory(); } - protected function hydrateProxy($proxy, $instance) - { - if ($proxy === $instance) { - return $proxy; - } - - if (!\in_array(\get_class($instance), [\get_class($proxy), get_parent_class($proxy)], true)) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', get_parent_class($proxy), get_debug_type($instance))); - } - - return \Symfony\Component\VarExporter\Hydrator::hydrate($proxy, (array) $instance); - } - /** * Gets the public 'lazy_foo' shared service. * @@ -91,9 +78,7 @@ class ProjectServiceContainer extends Container protected function getLazyFooService($lazyLoad = true) { if (true === $lazyLoad) { - return $this->services['lazy_foo'] = $this->createProxy('FooClass_2b16075', function () { - return \FooClass_2b16075::createLazyGhostObject($this->getLazyFooService(...)); - }); + return $this->services['lazy_foo'] = $this->createProxy('FooClass_2b16075', fn () => \FooClass_2b16075::createLazyGhost($this->getLazyFooService(...))); } include_once $this->targetDir.''.'/Fixtures/includes/foo_lazy.php'; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_ghost.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_ghost.php index a918805905491..32e5364ef4e35 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_ghost.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_ghost.php @@ -42,19 +42,6 @@ protected function createProxy($class, \Closure $factory) return $factory(); } - protected function hydrateProxy($proxy, $instance) - { - if ($proxy === $instance) { - return $proxy; - } - - if (!\in_array(\get_class($instance), [\get_class($proxy), get_parent_class($proxy)], true)) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', get_parent_class($proxy), get_debug_type($instance))); - } - - return \Symfony\Component\VarExporter\Hydrator::hydrate($proxy, (array) $instance); - } - /** * Gets the public 'bar' shared service. * @@ -63,9 +50,7 @@ protected function hydrateProxy($proxy, $instance) protected function getBarService($lazyLoad = true) { if (true === $lazyLoad) { - return $this->services['bar'] = $this->createProxy('stdClass_5a8a5eb', function () { - return \stdClass_5a8a5eb::createLazyGhostObject($this->getBarService(...)); - }); + return $this->services['bar'] = $this->createProxy('stdClass_5a8a5eb', fn () => \stdClass_5a8a5eb::createLazyGhost($this->getBarService(...))); } return $lazyLoad; @@ -79,16 +64,23 @@ protected function getBarService($lazyLoad = true) protected function getFooService($lazyLoad = true) { if (true === $lazyLoad) { - return $this->services['foo'] = $this->createProxy('stdClass_5a8a5eb', function () { - return \stdClass_5a8a5eb::createLazyGhostObject($this->getFooService(...)); - }); + return $this->services['foo'] = $this->createProxy('stdClass_5a8a5eb', fn () => \stdClass_5a8a5eb::createLazyGhost($this->getFooService(...))); } return $lazyLoad; } } -class stdClass_5a8a5eb extends \stdClass implements \Symfony\Component\VarExporter\LazyGhostObjectInterface +class stdClass_5a8a5eb extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface { - use \Symfony\Component\VarExporter\LazyGhostObjectTrait; + use \Symfony\Component\VarExporter\LazyGhostTrait; + + private int $lazyObjectId; + + private const LAZY_OBJECT_PROPERTY_SCOPES = []; } + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php index c1e8c37b5fc4c..841c892216f68 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php @@ -42,19 +42,6 @@ protected function createProxy($class, \Closure $factory) return $factory(); } - protected function hydrateProxy($proxy, $instance) - { - if ($proxy === $instance) { - return $proxy; - } - - if (!\in_array(\get_class($instance), [\get_class($proxy), get_parent_class($proxy)], true)) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', get_parent_class($proxy), get_debug_type($instance))); - } - - return \Symfony\Component\VarExporter\Hydrator::hydrate($proxy, (array) $instance); - } - /** * Gets the public 'bar' shared service. * diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php index ea4a634841684..001d7746da3bb 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php @@ -48,19 +48,6 @@ protected function createProxy($class, \Closure $factory) return $factory(); } - protected function hydrateProxy($proxy, $instance) - { - if ($proxy === $instance) { - return $proxy; - } - - if (!\in_array(\get_class($instance), [\get_class($proxy), get_parent_class($proxy)], true)) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', get_parent_class($proxy), get_debug_type($instance))); - } - - return \Symfony\Component\VarExporter\Hydrator::hydrate($proxy, (array) $instance); - } - /** * Gets the public 'bar' shared service. * diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt index 889d92125785e..d04e886a810b2 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt @@ -19,14 +19,10 @@ class getNonSharedFooService extends ProjectServiceContainer */ public static function do($container, $lazyLoad = true) { - $container->factories['non_shared_foo'] ??= function () use ($container) { - return self::do($container); - }; + $container->factories['non_shared_foo'] ??= fn () => self::do($container); if (true === $lazyLoad) { - return $container->createProxy('FooLazyClass_f814e3a', function () use ($container) { - return \FooLazyClass_f814e3a::createLazyGhostObject(function ($proxy) use ($container) { return self::do($container, $proxy); }); - }); + return $container->createProxy('FooLazyClass_f814e3a', fn () => \FooLazyClass_f814e3a::createLazyGhost(fn ($proxy) => self::do($container, $proxy))); } static $include = true; @@ -45,11 +41,20 @@ class getNonSharedFooService extends ProjectServiceContainer namespace Container%s; -class FooLazyClass_f814e3a extends \Bar\FooLazyClass implements \Symfony\Component\VarExporter\LazyGhostObjectInterface +class FooLazyClass_f814e3a extends \Bar\FooLazyClass implements \Symfony\Component\VarExporter\LazyObjectInterface { - use \Symfony\Component\VarExporter\LazyGhostObjectTrait; + use \Symfony\Component\VarExporter\LazyGhostTrait; + + private int $lazyObjectId; + + private const LAZY_OBJECT_PROPERTY_SCOPES = []; } +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + if (!\class_exists('FooLazyClass_f814e3a', false)) { \class_alias(__NAMESPACE__.'\\FooLazyClass_f814e3a', 'FooLazyClass_f814e3a', false); } @@ -123,19 +128,6 @@ class ProjectServiceContainer extends Container return $factory(); } - - protected function hydrateProxy($proxy, $instance) - { - if ($proxy === $instance) { - return $proxy; - } - - if (!\in_array(\get_class($instance), [\get_class($proxy), get_parent_class($proxy)], true)) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', get_parent_class($proxy), get_debug_type($instance))); - } - - return \Symfony\Component\VarExporter\Hydrator::hydrate($proxy, (array) $instance); - } } [ProjectServiceContainer.preload.php] => factories['service_container']['foo'] ??= $this->getFooService(...); if (true === $lazyLoad) { - return $this->createProxy('stdClass_5a8a5eb', function () { - return \stdClass_5a8a5eb::createLazyGhostObject($this->getFooService(...)); - }); + return $this->createProxy('stdClass_5a8a5eb', fn () => \stdClass_5a8a5eb::createLazyGhost($this->getFooService(...))); } return $lazyLoad; } } -class stdClass_5a8a5eb extends \stdClass implements \Symfony\Component\VarExporter\LazyGhostObjectInterface +class stdClass_5a8a5eb extends \stdClass implements \Symfony\Component\VarExporter\LazyObjectInterface { - use \Symfony\Component\VarExporter\LazyGhostObjectTrait; + use \Symfony\Component\VarExporter\LazyGhostTrait; + + private int $lazyObjectId; + + private const LAZY_OBJECT_PROPERTY_SCOPES = []; } + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); 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 e21fc1d7fdc87..ec39e663e4ec7 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 @@ -48,19 +48,6 @@ protected function createProxy($class, \Closure $factory) return $factory(); } - protected function hydrateProxy($proxy, $instance) - { - if ($proxy === $instance) { - return $proxy; - } - - if (!\in_array(\get_class($instance), [\get_class($proxy), get_parent_class($proxy)], true)) { - throw new LogicException(sprintf('Lazy service of type "%s" cannot be hydrated because its factory returned an unexpected instance of "%s". Try adding the "proxy" tag to the corresponding service definition with attribute "interface" set to "%1$s".', get_parent_class($proxy), get_debug_type($instance))); - } - - return \Symfony\Component\VarExporter\Hydrator::hydrate($proxy, (array) $instance); - } - /** * Gets the public 'wither' shared autowired service. * @@ -69,12 +56,10 @@ protected function hydrateProxy($proxy, $instance) protected function getWitherService($lazyLoad = true) { if (true === $lazyLoad) { - return $this->services['wither'] = $this->createProxy('Wither_94fa281', function () { - return \Wither_94fa281::createLazyGhostObject($this->getWitherService(...)); - }); + return $this->services['wither'] = $this->createProxy('Wither_94fa281', fn () => \Wither_94fa281::createLazyProxy(fn () => $this->getWitherService(false))); } - $instance = $lazyLoad; + $instance = new \Symfony\Component\DependencyInjection\Tests\Compiler\Wither(); $a = new \Symfony\Component\DependencyInjection\Tests\Compiler\Foo(); @@ -82,11 +67,25 @@ protected function getWitherService($lazyLoad = true) $instance = $instance->withFoo2($a); $instance->setFoo($a); - return $this->hydrateProxy($lazyLoad, $instance); + return $instance; } } -class Wither_94fa281 extends \Symfony\Component\DependencyInjection\Tests\Compiler\Wither implements \Symfony\Component\VarExporter\LazyGhostObjectInterface +class Wither_94fa281 extends \Symfony\Component\DependencyInjection\Tests\Compiler\Wither implements \Symfony\Component\VarExporter\LazyObjectInterface { - use \Symfony\Component\VarExporter\LazyGhostObjectTrait; + use \Symfony\Component\VarExporter\LazyProxyTrait; + + private int $lazyObjectId; + private parent $lazyObjectReal; + + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'lazyObjectReal' => [self::class, 'lazyObjectReal', null], + "\0".self::class."\0lazyObjectReal" => [self::class, 'lazyObjectReal', null], + 'foo' => [parent::class, 'foo', null], + ]; } + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); diff --git a/src/Symfony/Component/ErrorHandler/DebugClassLoader.php b/src/Symfony/Component/ErrorHandler/DebugClassLoader.php index de0f1ca052603..5befc7fc8cbe9 100644 --- a/src/Symfony/Component/ErrorHandler/DebugClassLoader.php +++ b/src/Symfony/Component/ErrorHandler/DebugClassLoader.php @@ -21,7 +21,7 @@ use Prophecy\Prophecy\ProphecySubjectInterface; use ProxyManager\Proxy\ProxyInterface; use Symfony\Component\ErrorHandler\Internal\TentativeTypes; -use Symfony\Component\VarExporter\LazyGhostObjectInterface; +use Symfony\Component\VarExporter\LazyObjectInterface; /** * Autoloader checking if the class is really defined in the file found. @@ -251,7 +251,7 @@ public static function checkClasses(): bool && !is_subclass_of($symbols[$i], ProphecySubjectInterface::class) && !is_subclass_of($symbols[$i], Proxy::class) && !is_subclass_of($symbols[$i], ProxyInterface::class) - && !is_subclass_of($symbols[$i], LazyGhostObjectInterface::class) + && !is_subclass_of($symbols[$i], LazyObjectInterface::class) && !is_subclass_of($symbols[$i], LegacyProxy::class) && !is_subclass_of($symbols[$i], MockInterface::class) && !is_subclass_of($symbols[$i], IMock::class) diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index c266917e91290..dd58485996f0b 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -19,11 +19,11 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\TypedReference; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\SessionInterface; +use Symfony\Component\VarExporter\ProxyHelper; /** * Creates the service-locators required by ServiceValueResolver. @@ -120,7 +120,7 @@ public function process(ContainerBuilder $container) $args = []; foreach ($parameters as $p) { /** @var \ReflectionParameter $p */ - $type = ltrim($target = (string) ProxyHelper::getTypeHint($r, $p), '\\'); + $type = preg_replace('/(^|[(|&])\\\\/', '\1', $target = ltrim(ProxyHelper::exportType($p) ?? '', '?')); $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; $autowireAttributes = $autowire ? $emptyAutowireAttributes : []; @@ -183,7 +183,7 @@ public function process(ContainerBuilder $container) $args[$p->name] = new Reference($erroredId, ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE); } else { - $target = ltrim($target, '\\'); + $target = preg_replace('/(^|[(|&])\\\\/', '\1', $target); $args[$p->name] = $type ? new TypedReference($target, $type, $invalidBehavior, Target::parseName($p)) : new Reference($target, $invalidBehavior); } } diff --git a/src/Symfony/Component/VarExporter/CHANGELOG.md b/src/Symfony/Component/VarExporter/CHANGELOG.md index 25f2a55b5ff78..1b21a0bbde8cc 100644 --- a/src/Symfony/Component/VarExporter/CHANGELOG.md +++ b/src/Symfony/Component/VarExporter/CHANGELOG.md @@ -4,7 +4,7 @@ CHANGELOG 6.2 --- - * Add `LazyGhostObjectTrait` + * Add support for lazy ghost objects and virtual proxies * Add `Hydrator::hydrate()` * Preserve PHP references also when using `Hydrator::hydrate()` or `Instantiator::instantiate()` * Add support for hydrating from native (array) casts diff --git a/src/Symfony/Component/VarExporter/Internal/EmptyScope.php b/src/Symfony/Component/VarExporter/Exception/LogicException.php similarity index 65% rename from src/Symfony/Component/VarExporter/Internal/EmptyScope.php rename to src/Symfony/Component/VarExporter/Exception/LogicException.php index 224f6b96452fc..619d0559ab819 100644 --- a/src/Symfony/Component/VarExporter/Internal/EmptyScope.php +++ b/src/Symfony/Component/VarExporter/Exception/LogicException.php @@ -9,11 +9,8 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\VarExporter\Internal; +namespace Symfony\Component\VarExporter\Exception; -/** - * @internal - */ -enum EmptyScope +class LogicException extends \LogicException implements ExceptionInterface { } diff --git a/src/Symfony/Component/VarExporter/Internal/GhostObjectId.php b/src/Symfony/Component/VarExporter/Internal/GhostObjectId.php deleted file mode 100644 index 3cc614d21322d..0000000000000 --- a/src/Symfony/Component/VarExporter/Internal/GhostObjectId.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -/** - * Keeps the state of lazy ghost objects. - * - * As a micro-optimization, this class uses no type declarations. - * - * @internal - */ -class GhostObjectId -{ - public int $id; - - public function __construct() - { - $this->id = spl_object_id($this); - } - - public function __clone() - { - $this->id = spl_object_id($this); - } - - public function __destruct() - { - unset(GhostObjectRegistry::$states[$this->id]); - } -} diff --git a/src/Symfony/Component/VarExporter/Internal/GhostObjectRegistry.php b/src/Symfony/Component/VarExporter/Internal/LazyObjectRegistry.php similarity index 60% rename from src/Symfony/Component/VarExporter/Internal/GhostObjectRegistry.php rename to src/Symfony/Component/VarExporter/Internal/LazyObjectRegistry.php index 757ce1b7b604e..888f90025bc84 100644 --- a/src/Symfony/Component/VarExporter/Internal/GhostObjectRegistry.php +++ b/src/Symfony/Component/VarExporter/Internal/LazyObjectRegistry.php @@ -12,16 +12,16 @@ namespace Symfony\Component\VarExporter\Internal; /** - * Stores the state of lazy ghost objects and caches related reflection information. + * Stores the state of lazy objects and caches related reflection information. * * As a micro-optimization, this class uses no type declarations. * * @internal */ -class GhostObjectRegistry +class LazyObjectRegistry { /** - * @var array + * @var array */ public static $states = []; @@ -46,17 +46,24 @@ class GhostObjectRegistry public static $classAccessors = []; /** - * @var array + * @var array */ public static $parentMethods = []; public static function getClassResetters($class) { $classProperties = []; - $propertyScopes = Hydrator::$propertyScopes[$class] ??= Hydrator::getPropertyScopes($class); + + if ((self::$classReflectors[$class] ??= new \ReflectionClass($class))->isInternal()) { + $propertyScopes = []; + } else { + $propertyScopes = Hydrator::$propertyScopes[$class] ??= Hydrator::getPropertyScopes($class); + } foreach ($propertyScopes as $key => [$scope, $name, $readonlyScope]) { - if ('lazyGhostObjectId' !== $name && null !== ($propertyScopes["\0$scope\0$name"] ?? $propertyScopes["\0*\0$name"] ?? $readonlyScope)) { + $propertyScopes[$k = "\0$scope\0$name"] ?? $propertyScopes[$k = "\0*\0$name"] ?? $k = null !== $readonlyScope ? $name : null; + + if ($k === $key && "\0$class\0lazyObjectId" !== $k) { $classProperties[$readonlyScope ?? $scope][$name] = $key; } } @@ -105,22 +112,40 @@ public static function getClassAccessors($class) unset($instance->$name); }, ]; - }, null, $class)(); + }, null, \Closure::class === $class ? null : $class)(); } public static function getParentMethods($class) { $parent = get_parent_class($class); + $methods = []; + + foreach (['set', 'isset', 'unset', 'clone', 'serialize', 'unserialize', 'sleep', 'wakeup', 'destruct', 'get'] as $method) { + if (!$parent || !method_exists($parent, '__'.$method)) { + $methods[$method] = false; + } else { + $m = new \ReflectionMethod($parent, '__'.$method); + $methods[$method] = !$m->isAbstract() && !$m->isPrivate(); + } + } + + $methods['get'] = $methods['get'] ? ($m->returnsReference() ? 2 : 1) : 0; + + return $methods; + } + + public static function getScope($propertyScopes, $class, $property, $readonlyScope = null) + { + if (null === $readonlyScope && !isset($propertyScopes["\0$class\0$property"]) && !isset($propertyScopes["\0*\0$property"])) { + return null; + } + + $scope = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['class'] ?? \Closure::class; + + if (null === $readonlyScope && isset($propertyScopes["\0*\0$property"]) && ($class === $scope || is_subclass_of($class, $scope))) { + return null; + } - return [ - 'get' => $parent && method_exists($parent, '__get') ? ((new \ReflectionMethod($parent, '__get'))->returnsReference() ? 2 : 1) : 0, - 'set' => $parent && method_exists($parent, '__set'), - 'isset' => $parent && method_exists($parent, '__isset'), - 'unset' => $parent && method_exists($parent, '__unset'), - 'clone' => $parent && method_exists($parent, '__clone'), - 'serialize' => $parent && method_exists($parent, '__serialize'), - 'sleep' => $parent && method_exists($parent, '__sleep'), - 'destruct' => $parent && method_exists($parent, '__destruct'), - ]; + return $scope; } } diff --git a/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php b/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php similarity index 59% rename from src/Symfony/Component/VarExporter/Internal/GhostObjectState.php rename to src/Symfony/Component/VarExporter/Internal/LazyObjectState.php index 509cac3d50275..a6cd95741e3f3 100644 --- a/src/Symfony/Component/VarExporter/Internal/GhostObjectState.php +++ b/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php @@ -14,41 +14,47 @@ use Symfony\Component\VarExporter\Hydrator; /** - * Keeps the state of lazy ghost objects. + * Keeps the state of lazy objects. * * As a micro-optimization, this class uses no type declarations. * * @internal */ -class GhostObjectState +class LazyObjectState { public const STATUS_INITIALIZED_PARTIAL = 1; public const STATUS_UNINITIALIZED_FULL = 2; public const STATUS_INITIALIZED_FULL = 3; - public \Closure $initializer; - /** * @var array> */ - public $preInitUnsetProperties; + public array $preInitUnsetProperties; /** * @var array */ - public $preInitSetProperties = []; + public array $preInitSetProperties; /** * @var array> */ - public $unsetProperties = []; + public array $unsetProperties; + + /** + * @var array + */ + public array $skippedProperties; /** - * One of self::STATUS_*. - * - * @var int + * @var self::STATUS_* */ - public $status; + public int $status = 0; + + public function __construct(public \Closure $initializer, $skippedProperties = []) + { + $this->skippedProperties = $this->preInitSetProperties = $skippedProperties; + } /** * @return bool Returns true when fully-initializing, false when partial-initializing @@ -57,7 +63,15 @@ public function initialize($instance, $propertyName, $propertyScope) { if (!$this->status) { $this->status = 1 < (new \ReflectionFunction($this->initializer))->getNumberOfRequiredParameters() ? self::STATUS_INITIALIZED_PARTIAL : self::STATUS_UNINITIALIZED_FULL; - $this->preInitUnsetProperties ??= $this->unsetProperties; + $this->preInitUnsetProperties = $this->unsetProperties ??= []; + + if (\count($this->preInitSetProperties) !== \count($properties = $this->preInitSetProperties + (array) $instance)) { + $this->preInitSetProperties = array_fill_keys(array_keys($properties), true); + } + + if (null === $propertyName) { + return self::STATUS_INITIALIZED_PARTIAL !== $this->status; + } } if (self::STATUS_INITIALIZED_FULL === $this->status) { @@ -65,7 +79,7 @@ public function initialize($instance, $propertyName, $propertyScope) } if (self::STATUS_UNINITIALIZED_FULL === $this->status) { - if ($defaultProperties = array_diff_key(GhostObjectRegistry::$defaultProperties[$instance::class], (array) $instance)) { + if ($defaultProperties = array_diff_key(LazyObjectRegistry::$defaultProperties[$instance::class], $this->preInitSetProperties)) { Hydrator::hydrate($instance, $defaultProperties); } @@ -78,7 +92,7 @@ public function initialize($instance, $propertyName, $propertyScope) $value = ($this->initializer)(...[$instance, $propertyName, $propertyScope]); $propertyScope ??= $instance::class; - $accessor = GhostObjectRegistry::$classAccessors[$propertyScope] ??= GhostObjectRegistry::getClassAccessors($propertyScope); + $accessor = LazyObjectRegistry::$classAccessors[$propertyScope] ??= LazyObjectRegistry::getClassAccessors($propertyScope); $accessor['set']($instance, $propertyName, $value); diff --git a/src/Symfony/Component/VarExporter/LazyGhostObjectTrait.php b/src/Symfony/Component/VarExporter/LazyGhostTrait.php similarity index 63% rename from src/Symfony/Component/VarExporter/LazyGhostObjectTrait.php rename to src/Symfony/Component/VarExporter/LazyGhostTrait.php index 658bae08191af..f270e9c0b31ad 100644 --- a/src/Symfony/Component/VarExporter/LazyGhostObjectTrait.php +++ b/src/Symfony/Component/VarExporter/LazyGhostTrait.php @@ -11,45 +11,49 @@ namespace Symfony\Component\VarExporter; -use Symfony\Component\VarExporter\Internal\EmptyScope; -use Symfony\Component\VarExporter\Internal\GhostObjectId; -use Symfony\Component\VarExporter\Internal\GhostObjectRegistry as Registry; -use Symfony\Component\VarExporter\Internal\GhostObjectState; use Symfony\Component\VarExporter\Internal\Hydrator; +use Symfony\Component\VarExporter\Internal\LazyObjectRegistry as Registry; +use Symfony\Component\VarExporter\Internal\LazyObjectState; -trait LazyGhostObjectTrait +/** + * @property int $lazyObjectId + */ +trait LazyGhostTrait { - private ?GhostObjectId $lazyGhostObjectId = null; - /** * @param \Closure(static):void|\Closure(static, string, ?string):mixed $initializer Initializes the instance passed as argument; when partial initialization * is desired the closure should take extra arguments $propertyName and * $propertyScope and should return the value of the corresponding property + * @param array $skippedProperties An array indexed by the properties to skip, + * aka the ones that the initializer doesn't set */ - public static function createLazyGhostObject(\Closure $initializer): static + public static function createLazyGhost(\Closure $initializer, array $skippedProperties = []): static { - $class = static::class; - $instance = (Registry::$classReflectors[$class] ??= new \ReflectionClass($class))->newInstanceWithoutConstructor(); + if (self::class !== $class = static::class) { + $skippedProperties["\0".self::class."\0lazyObjectId"] = true; + } elseif (\defined($class.'::LAZY_OBJECT_PROPERTY_SCOPES')) { + Hydrator::$propertyScopes[$class] ??= $class::LAZY_OBJECT_PROPERTY_SCOPES; + } + $instance = (Registry::$classReflectors[$class] ??= new \ReflectionClass($class))->newInstanceWithoutConstructor(); Registry::$defaultProperties[$class] ??= (array) $instance; - $instance->lazyGhostObjectId = new GhostObjectId(); - $state = Registry::$states[$instance->lazyGhostObjectId->id] = new GhostObjectState(); - $state->initializer = $initializer; + $instance->lazyObjectId = $id = spl_object_id($instance); + Registry::$states[$id] = new LazyObjectState($initializer, $skippedProperties); foreach (Registry::$classResetters[$class] ??= Registry::getClassResetters($class) as $reset) { - $reset($instance); + $reset($instance, $skippedProperties); } return $instance; } /** - * Forces initialization of a lazy ghost object. + * Forces initialization of a lazy object and returns it. */ - public function initializeLazyGhostObject(): void + public function initializeLazyObject(): static { - if (!$state = Registry::$states[$this->lazyGhostObjectId?->id] ?? null) { - return; + if (!$state = Registry::$states[$this->lazyObjectId ?? ''] ?? null) { + return $this; } $class = static::class; @@ -62,24 +66,25 @@ public function initializeLazyGhostObject(): void continue; } if ($state->initialize($this, $name, $readonlyScope ?? ('*' !== $scope ? $scope : null))) { - return; + return $this; } $properties = (array) $this; } + + return $this; } /** - * @return bool Returns false when the object cannot be reset, ie when it's not a ghost object + * @return bool Returns false when the object cannot be reset, ie when it's not a lazy object */ - public function resetLazyGhostObject(): bool + public function resetLazyObject(): bool { - if (!$state = Registry::$states[$this->lazyGhostObjectId?->id] ?? null) { + if (!$state = Registry::$states[$this->lazyObjectId ?? ''] ?? null) { return false; } if (!$state->status) { - $state->preInitSetProperties = []; - $state->preInitUnsetProperties ??= $state->unsetProperties ?? []; + return $state->initialize($this, null, null) || true; } $class = static::class; @@ -97,30 +102,24 @@ public function resetLazyGhostObject(): bool $reset($this, $skippedProperties); } - if (GhostObjectState::STATUS_INITIALIZED_FULL === $state->status) { - $state->status = GhostObjectState::STATUS_UNINITIALIZED_FULL; + if (LazyObjectState::STATUS_INITIALIZED_FULL === $state->status) { + $state->status = LazyObjectState::STATUS_UNINITIALIZED_FULL; } - $state->unsetProperties = $state->preInitUnsetProperties; + $state->unsetProperties = $state->preInitUnsetProperties ??= []; return true; } - public function &__get($name) + public function &__get($name): mixed { $propertyScopes = Hydrator::$propertyScopes[static::class] ??= Hydrator::getPropertyScopes(static::class); $scope = null; if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) { - if (isset($propertyScopes["\0$class\0$name"]) || isset($propertyScopes["\0*\0$name"])) { - $scope = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class'] ?? EmptyScope::class; + $scope = Registry::getScope($propertyScopes, $class, $name); - if (isset($propertyScopes["\0*\0$name"]) && ($class === $scope || is_subclass_of($class, $scope))) { - $scope = null; - } - } - - if ($state = Registry::$states[$this->lazyGhostObjectId?->id] ?? null) { + if ($state = Registry::$states[$this->lazyObjectId ?? ''] ?? null) { if (isset($state->unsetProperties[$scope ?? '*'][$name])) { $class = null; } elseif (null === $scope || isset($propertyScopes["\0$scope\0$name"])) { @@ -132,10 +131,9 @@ public function &__get($name) if ($parent = (Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['get']) { if (2 === $parent) { - $value = &parent::__get($name); - } else { - $value = parent::__get($name); + return parent::__get($name); } + $value = parent::__get($name); return $value; } @@ -167,21 +165,10 @@ public function __set($name, $value): void $state = null; if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) { - if (null !== $readonlyScope || isset($propertyScopes["\0$class\0$name"]) || isset($propertyScopes["\0*\0$name"])) { - $scope = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class'] ?? EmptyScope::class; + $scope = Registry::getScope($propertyScopes, $class, $name, $readonlyScope); - if (null === $readonlyScope && isset($propertyScopes["\0*\0$name"]) && ($class === $scope || is_subclass_of($class, $scope))) { - $scope = null; - } - } - - $state = Registry::$states[$this->lazyGhostObjectId?->id] ?? null; + $state = Registry::$states[$this->lazyObjectId ?? ''] ?? null; if ($state && ($readonlyScope === $scope || isset($propertyScopes["\0$scope\0$name"]))) { - if (!$state->status && null === $state->preInitUnsetProperties) { - $propertyScopes[$k = "\0$class\0$name"] ?? $propertyScopes[$k = "\0*\0$name"] ?? $k = $name; - $state->preInitSetProperties[$k] = true; - } - goto set_in_scope; } } @@ -212,15 +199,9 @@ public function __isset($name): bool $scope = null; if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) { - if (isset($propertyScopes["\0$class\0$name"]) || isset($propertyScopes["\0*\0$name"])) { - $scope = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class'] ?? EmptyScope::class; - - if (isset($propertyScopes["\0*\0$name"]) && ($class === $scope || is_subclass_of($class, $scope))) { - $scope = null; - } - } + $scope = Registry::getScope($propertyScopes, $class, $name); - if ($state = Registry::$states[$this->lazyGhostObjectId?->id] ?? null) { + if ($state = Registry::$states[$this->lazyObjectId ?? ''] ?? null) { if (isset($state->unsetProperties[$scope ?? '*'][$name])) { return false; } @@ -252,20 +233,10 @@ public function __unset($name): void $scope = null; if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) { - if (null !== $readonlyScope || isset($propertyScopes["\0$class\0$name"]) || isset($propertyScopes["\0*\0$name"])) { - $scope = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class'] ?? EmptyScope::class; - - if (null === $readonlyScope && isset($propertyScopes["\0*\0$name"]) && ($class === $scope || is_subclass_of($class, $scope))) { - $scope = null; - } - } + $scope = Registry::getScope($propertyScopes, $class, $name, $readonlyScope); - $state = Registry::$states[$this->lazyGhostObjectId?->id] ?? null; + $state = Registry::$states[$this->lazyObjectId ?? ''] ?? null; if ($state && ($readonlyScope === $scope || isset($propertyScopes["\0$scope\0$name"]))) { - if (!$state->status && null === $state->preInitUnsetProperties) { - $propertyScopes[$k = "\0$class\0$name"] ?? $propertyScopes[$k = "\0*\0$name"] ?? $k = $name; - unset($state->preInitSetProperties[$k]); - } $state->unsetProperties[$scope ?? '*'][$name] = true; return; @@ -288,11 +259,14 @@ public function __unset($name): void $accessor['unset']($this, $name); } - public function __clone() + public function __clone(): void { - if ($previousId = $this->lazyGhostObjectId?->id) { - $this->lazyGhostObjectId = clone $this->lazyGhostObjectId; - Registry::$states[$this->lazyGhostObjectId->id] = clone Registry::$states[$previousId]; + if ($state = Registry::$states[$this->lazyObjectId ?? ''] ?? null) { + Registry::$states[$this->lazyObjectId = spl_object_id($this)] = clone $state; + + if (LazyObjectState::STATUS_UNINITIALIZED_FULL === $state->status) { + return; + } } if ((Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['clone']) { @@ -305,14 +279,14 @@ public function __serialize(): array $class = self::class; if ((Registry::$parentMethods[$class] ??= Registry::getParentMethods($class))['serialize']) { - return parent::__serialize(); + $properties = parent::__serialize(); + } else { + $this->initializeLazyObject(); + $properties = (array) $this; } + unset($properties["\0$class\0lazyObjectId"]); - $this->initializeLazyGhostObject(); - $properties = (array) $this; - unset($properties["\0$class\0lazyGhostObjectId"]); - - if (!Registry::$parentMethods[$class]['sleep']) { + if (Registry::$parentMethods[$class]['serialize'] || !Registry::$parentMethods[$class]['sleep']) { return $properties; } @@ -334,12 +308,20 @@ public function __serialize(): array public function __destruct() { - if (!(Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['destruct']) { - return; - } + $state = Registry::$states[$this->lazyObjectId ?? null] ?? null; - if ((Registry::$states[$this->lazyGhostObjectId?->id] ?? null)?->status) { - parent::__destruct(); + try { + if ($state && !\in_array($state->status, [LazyObjectState::STATUS_INITIALIZED_FULL, LazyObjectState::STATUS_INITIALIZED_PARTIAL], true)) { + return; + } + + if ((Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['destruct']) { + parent::__destruct(); + } + } finally { + if ($state) { + unset(Registry::$states[$this->lazyObjectId]); + } } } } diff --git a/src/Symfony/Component/VarExporter/LazyGhostObjectInterface.php b/src/Symfony/Component/VarExporter/LazyObjectInterface.php similarity index 62% rename from src/Symfony/Component/VarExporter/LazyGhostObjectInterface.php rename to src/Symfony/Component/VarExporter/LazyObjectInterface.php index 361d2766b8b42..47d373f3b4baf 100644 --- a/src/Symfony/Component/VarExporter/LazyGhostObjectInterface.php +++ b/src/Symfony/Component/VarExporter/LazyObjectInterface.php @@ -11,15 +11,15 @@ namespace Symfony\Component\VarExporter; -interface LazyGhostObjectInterface +interface LazyObjectInterface { /** - * Forces initialization of a lazy ghost object. + * Forces initialization of a lazy object and returns it. */ - public function initializeLazyGhostObject(): void; + public function initializeLazyObject(): object; /** - * @return bool Returns false when the object cannot be reset, ie when it's not a ghost object + * @return bool Returns false when the object cannot be reset, ie when it's not a lazy object */ - public function resetLazyGhostObject(): bool; + public function resetLazyObject(): bool; } diff --git a/src/Symfony/Component/VarExporter/LazyProxyTrait.php b/src/Symfony/Component/VarExporter/LazyProxyTrait.php new file mode 100644 index 0000000000000..568d92f0a6fa3 --- /dev/null +++ b/src/Symfony/Component/VarExporter/LazyProxyTrait.php @@ -0,0 +1,345 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter; + +use Symfony\Component\VarExporter\Hydrator as PublicHydrator; +use Symfony\Component\VarExporter\Internal\Hydrator; +use Symfony\Component\VarExporter\Internal\LazyObjectRegistry as Registry; +use Symfony\Component\VarExporter\Internal\LazyObjectState; + +/** + * @property int $lazyObjectId + * @property parent $lazyObjectReal + */ +trait LazyProxyTrait +{ + /** + * @param \Closure():object $initializer Returns the proxied object + */ + public static function createLazyProxy(\Closure $initializer): static + { + if (self::class !== $class = static::class) { + $skippedProperties = ["\0".self::class."\0lazyObjectId" => true]; + } elseif (\defined($class.'::LAZY_OBJECT_PROPERTY_SCOPES')) { + Hydrator::$propertyScopes[$class] ??= $class::LAZY_OBJECT_PROPERTY_SCOPES; + } + + $instance = (Registry::$classReflectors[$class] ??= new \ReflectionClass($class))->newInstanceWithoutConstructor(); + $instance->lazyObjectId = $id = spl_object_id($instance); + Registry::$states[$id] = new LazyObjectState($initializer); + + foreach (Registry::$classResetters[$class] ??= Registry::getClassResetters($class) as $reset) { + $reset($instance, $skippedProperties ??= []); + } + + return $instance; + } + + /** + * Forces initialization of a lazy object and returns it. + */ + public function initializeLazyObject(): parent + { + if (isset($this->lazyObjectReal)) { + return $this->lazyObjectReal; + } + + return $this; + } + + /** + * @return bool Returns false when the object cannot be reset, ie when it's not a lazy object + */ + public function resetLazyObject(): bool + { + if (0 >= ($this->lazyObjectId ?? 0)) { + return false; + } + + if (\array_key_exists("\0".self::class."\0lazyObjectReal", (array) $this)) { + unset($this->lazyObjectReal); + } + + return true; + } + + public function &__get($name): mixed + { + $propertyScopes = Hydrator::$propertyScopes[static::class] ??= Hydrator::getPropertyScopes(static::class); + $scope = null; + $instance = $this; + + if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) { + $scope = Registry::getScope($propertyScopes, $class, $name); + + if (null === $scope || isset($propertyScopes["\0$scope\0$name"])) { + if (isset($this->lazyObjectId)) { + if ('lazyObjectReal' === $name && self::class === $scope) { + $this->lazyObjectReal = (Registry::$states[$this->lazyObjectId]->initializer)(); + + return $this->lazyObjectReal; + } + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } + } + $parent = 2; + goto get_in_scope; + } + } + $parent = (Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['get']; + + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } else { + if (2 === $parent) { + return parent::__get($name); + } + $value = parent::__get($name); + + return $value; + } + + if (!$parent && null === $class && !\array_key_exists($name, (array) $instance)) { + $frame = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]; + trigger_error(sprintf('Undefined property: %s::$%s in %s on line %s', $instance::class, $name, $frame['file'], $frame['line']), \E_USER_NOTICE); + } + + get_in_scope: + + if (null === $scope) { + if (null === $readonlyScope && 1 !== $parent) { + return $instance->$name; + } + $value = $instance->$name; + + return $value; + } + $accessor = Registry::$classAccessors[$scope] ??= Registry::getClassAccessors($scope); + + return $accessor['get']($instance, $name, null !== $readonlyScope || 1 === $parent); + } + + public function __set($name, $value): void + { + $propertyScopes = Hydrator::$propertyScopes[static::class] ??= Hydrator::getPropertyScopes(static::class); + $scope = null; + $instance = $this; + + if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) { + $scope = Registry::getScope($propertyScopes, $class, $name, $readonlyScope); + + if ($readonlyScope === $scope || isset($propertyScopes["\0$scope\0$name"])) { + if (isset($this->lazyObjectId)) { + if ('lazyObjectReal' === $name && self::class === $scope) { + $this->lazyObjectReal = $value; + + return; + } + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } + } + goto set_in_scope; + } + } + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } elseif ((Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['set']) { + parent::__set($name, $value); + + return; + } + + set_in_scope: + + if (null === $scope) { + $instance->$name = $value; + + return; + } + $accessor = Registry::$classAccessors[$scope] ??= Registry::getClassAccessors($scope); + + $accessor['set']($instance, $name, $value); + } + + public function __isset($name): bool + { + $propertyScopes = Hydrator::$propertyScopes[static::class] ??= Hydrator::getPropertyScopes(static::class); + $scope = null; + $instance = $this; + + if ([$class] = $propertyScopes[$name] ?? null) { + $scope = Registry::getScope($propertyScopes, $class, $name); + + if (null === $scope || isset($propertyScopes["\0$scope\0$name"])) { + if (isset($this->lazyObjectId)) { + if ('lazyObjectReal' === $name && self::class === $scope) { + return null !== $this->lazyObjectReal = (Registry::$states[$this->lazyObjectId]->initializer)(); + } + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } + } + goto isset_in_scope; + } + } + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } elseif ((Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['isset']) { + return parent::__isset($name); + } + + isset_in_scope: + + if (null === $scope) { + return isset($instance->$name); + } + $accessor = Registry::$classAccessors[$scope] ??= Registry::getClassAccessors($scope); + + return $accessor['isset']($instance, $name); + } + + public function __unset($name): void + { + $propertyScopes = Hydrator::$propertyScopes[static::class] ??= Hydrator::getPropertyScopes(static::class); + $scope = null; + $instance = $this; + + if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) { + $scope = Registry::getScope($propertyScopes, $class, $name, $readonlyScope); + + if ($readonlyScope === $scope || isset($propertyScopes["\0$scope\0$name"])) { + if (isset($this->lazyObjectId)) { + if ('lazyObjectReal' === $name && self::class === $scope) { + unset($this->lazyObjectReal); + + return; + } + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } + } + goto unset_in_scope; + } + } + if (isset($this->lazyObjectReal)) { + $instance = $this->lazyObjectReal; + } elseif ((Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['unset']) { + parent::__unset($name); + + return; + } + + unset_in_scope: + + if (null === $scope) { + unset($instance->$name); + + return; + } + $accessor = Registry::$classAccessors[$scope] ??= Registry::getClassAccessors($scope); + + $accessor['unset']($instance, $name); + } + + public function __clone(): void + { + if (!isset($this->lazyObjectId)) { + if ((Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['clone']) { + parent::__clone(); + } + + return; + } + + if (\array_key_exists("\0".self::class."\0lazyObjectReal", (array) $this)) { + $this->lazyObjectReal = clone $this->lazyObjectReal; + } + if ($state = Registry::$states[$this->lazyObjectId] ?? null) { + Registry::$states[$this->lazyObjectId = spl_object_id($this)] = clone $state; + } + } + + public function __serialize(): array + { + $class = self::class; + + if (!isset($this->lazyObjectReal) && (Registry::$parentMethods[$class] ??= Registry::getParentMethods($class))['serialize']) { + $properties = parent::__serialize(); + } else { + $properties = (array) $this; + } + unset($properties["\0$class\0lazyObjectId"]); + + if (isset($this->lazyObjectReal) || Registry::$parentMethods[$class]['serialize'] || !Registry::$parentMethods[$class]['sleep']) { + return $properties; + } + + $scope = get_parent_class($class); + $data = []; + + foreach (parent::__sleep() as $name) { + $value = $properties[$k = $name] ?? $properties[$k = "\0*\0$name"] ?? $properties[$k = "\0$scope\0$name"] ?? $k = null; + + if (null === $k) { + trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $name), \E_USER_NOTICE); + } else { + $data[$k] = $value; + } + } + + return $data; + } + + public function __unserialize(array $data): void + { + $class = self::class; + + if (isset($data["\0$class\0lazyObjectReal"])) { + foreach (Registry::$classResetters[$class] ??= Registry::getClassResetters($class) as $reset) { + $reset($this, $data); + } + + if (1 < \count($data)) { + PublicHydrator::hydrate($this, $data); + } else { + $this->lazyObjectReal = $data["\0$class\0lazyObjectReal"]; + } + Registry::$states[-1] ??= new LazyObjectState(static fn () => throw new \LogicException('Lazy proxy has no initializer.')); + $this->lazyObjectId = -1; + } elseif ((Registry::$parentMethods[$class] ??= Registry::getParentMethods($class))['unserialize']) { + parent::__unserialize($data); + } else { + PublicHydrator::hydrate($this, $data); + + if (Registry::$parentMethods[$class]['wakeup']) { + parent:__wakeup(); + } + } + } + + public function __destruct() + { + if (isset($this->lazyObjectId)) { + if (0 < $this->lazyObjectId) { + unset(Registry::$states[$this->lazyObjectId]); + } + + return; + } + + if ((Registry::$parentMethods[self::class] ??= Registry::getParentMethods(self::class))['destruct']) { + parent::__destruct(); + } + } +} diff --git a/src/Symfony/Component/VarExporter/ProxyHelper.php b/src/Symfony/Component/VarExporter/ProxyHelper.php new file mode 100644 index 0000000000000..0aa6c5647a4ee --- /dev/null +++ b/src/Symfony/Component/VarExporter/ProxyHelper.php @@ -0,0 +1,351 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter; + +use Symfony\Component\VarExporter\Exception\LogicException; +use Symfony\Component\VarExporter\Internal\Hydrator; +use Symfony\Component\VarExporter\Internal\LazyObjectRegistry; + +/** + * @author Nicolas Grekas + */ +final class ProxyHelper +{ + /** + * Helps generate lazy-loading ghost objects. + * + * @throws LogicException When the class is incompatible with ghost objects + */ + public static function generateLazyGhost(\ReflectionClass $class): string + { + if ($class->isFinal()) { + throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" is final.', $class->name)); + } + if ($class->isInterface() || $class->isAbstract()) { + throw new LogicException(sprintf('Cannot generate lazy ghost: "%s" is not a concrete class.', $class->name)); + } + if (\stdClass::class !== $class->name && $class->isInternal()) { + throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" is internal.', $class->name)); + } + if ($class->hasMethod('__get') && 'mixed' !== (self::exportType($class->getMethod('__get')) ?? 'mixed')) { + throw new LogicException(sprintf('Cannot generate lazy ghost: return type of method "%s::__get()" should be "mixed".', $class->name)); + } + + static $traitMethods; + $traitMethods ??= (new \ReflectionClass(LazyGhostTrait::class))->getMethods(); + + foreach ($traitMethods as $method) { + if ($class->hasMethod($method->name) && $class->getMethod($method->name)->isFinal()) { + throw new LogicException(sprintf('Cannot generate lazy ghost: method "%s::%s()" is final.', $class->name, $method->name)); + } + } + + $parent = $class; + while ($parent = $parent->getParentClass()) { + if (\stdClass::class !== $parent->name && $parent->isInternal()) { + throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" extends "%s" which is internal.', $class->name, $parent->name)); + } + } + $propertyScopes = self::exportPropertyScopes($class->name); + $readonly = \PHP_VERSION_ID >= 80200 && $class->isReadOnly() ? 'readonly ' : ''; + + return <<name} implements \Symfony\Component\VarExporter\LazyObjectInterface + { + use \Symfony\Component\VarExporter\LazyGhostTrait; + + private {$readonly}int \$lazyObjectId; + + private const LAZY_OBJECT_PROPERTY_SCOPES = {$propertyScopes}; + } + + // Help opcache.preload discover always-needed symbols + class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); + class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); + class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + + EOPHP; + } + + /** + * Helps generate lazy-loading virtual proxies. + * + * @param \ReflectionClass[] $interfaces + * + * @throws LogicException When the class is incompatible with virtual proxies + */ + public static function generateLazyProxy(?\ReflectionClass $class, array $interfaces = []): string + { + if (!class_exists($class?->name ?? \stdClass::class, false)) { + throw new LogicException(sprintf('Cannot generate lazy proxy: "%s" is not a class.', $class->name)); + } + if ($class?->isFinal()) { + throw new LogicException(sprintf('Cannot generate lazy proxy: class "%s" is final.', $class->name)); + } + + $methodReflectors = [$class?->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) ?? []]; + foreach ($interfaces as $interface) { + if (!$interface->isInterface()) { + throw new LogicException(sprintf('Cannot generate lazy proxy: "%s" is not an interface.', $interface->name)); + } + $methodReflectors[] = $interface->getMethods(); + } + $methodReflectors = array_merge(...$methodReflectors); + + $extendsInternalClass = false; + if ($parent = $class) { + do { + $extendsInternalClass = \stdClass::class !== $parent->name && $parent->isInternal(); + } while (!$extendsInternalClass && $parent = $parent->getParentClass()); + } + $methodsHaveToBeProxied = $extendsInternalClass; + $methods = []; + + foreach ($methodReflectors as $method) { + if ('__get' !== strtolower($method->name) || 'mixed' === ($type = self::exportType($method) ?? 'mixed')) { + continue; + } + $methodsHaveToBeProxied = true; + $trait = new \ReflectionMethod(LazyProxyTrait::class, '__get'); + $body = \array_slice(file($trait->getFileName()), $trait->getStartLine() - 1, $trait->getEndLine() - $trait->getStartLine()); + $body[0] = str_replace('): mixed', '): '.$type, $body[0]); + $methods['__get'] = strtr(implode('', $body).' }', [ + 'Hydrator' => '\\'.Hydrator::class, + 'Registry' => '\\'.LazyObjectRegistry::class, + ]); + break; + } + + foreach ($methodReflectors as $method) { + if ($method->isStatic() || isset($methods[$lcName = strtolower($method->name)])) { + continue; + } + if ($method->isFinal()) { + if ($extendsInternalClass || $methodsHaveToBeProxied || method_exists(LazyProxyTrait::class, $method->name)) { + throw new LogicException(sprintf('Cannot generate lazy proxy: method "%s::%s()" is final.', $class->name, $method->name)); + } + continue; + } + if (method_exists(LazyProxyTrait::class, $method->name) || ($method->isProtected() && !$method->isAbstract())) { + continue; + } + + $signature = self::exportSignature($method); + $parentCall = $method->isAbstract() ? "throw new \BadMethodCallException('Cannot forward abstract method \"{$method->class}::{$method->name}()\".')" : "parent::{$method->name}(...\\func_get_args())"; + + if (str_ends_with($signature, '): never') || str_ends_with($signature, '): void')) { + $body = <<lazyObjectReal)) { + \$this->lazyObjectReal->{$method->name}(...\\func_get_args()); + } else { + {$parentCall}; + } + EOPHP; + } else { + if (!$methodsHaveToBeProxied && !$method->isAbstract()) { + // Skip proxying methods that might return $this + foreach (preg_split('/[()|&]++/', self::exportType($method) ?? 'static') as $type) { + if (\in_array($type = ltrim($type, '?'), ['static', 'object'], true)) { + continue 2; + } + foreach ([$class, ...$interfaces] as $r) { + if ($r && is_a($r->name, $type, true)) { + continue 3; + } + } + } + } + + $body = <<lazyObjectReal)) { + return \$this->lazyObjectReal->{$method->name}(...\\func_get_args()); + } + + return {$parentCall}; + EOPHP; + } + $methods[$lcName] = " {$signature}\n {\n{$body}\n }"; + } + + $readonly = \PHP_VERSION_ID >= 80200 && $class && $class->isReadOnly() ? 'readonly ' : ''; + $types = $interfaces = array_unique(array_column($interfaces, 'name')); + $interfaces[] = LazyObjectInterface::class; + $interfaces = implode(', \\', $interfaces); + $parent = $class ? ' extends \\'.$class->name : ''; + array_unshift($types, $class ? 'parent' : ''); + $type = ltrim(implode('&\\', $types), '&'); + + if (!$class) { + $trait = new \ReflectionMethod(LazyProxyTrait::class, 'initializeLazyObject'); + $body = \array_slice(file($trait->getFileName()), $trait->getStartLine() - 1, $trait->getEndLine() - $trait->getStartLine()); + $body[0] = str_replace('): parent', '): '.$type, $body[0]); + $methods = ['initializeLazyObject' => implode('', $body).' }'] + $methods; + } + $body = $methods ? "\n".implode("\n\n", $methods)."\n" : ''; + + if ($class) { + $propertyScopes = substr(self::exportPropertyScopes($class->name), 1, -6); + $body = << [self::class, 'lazyObjectReal', null], + "\\0".self::class."\\0lazyObjectReal" => [self::class, 'lazyObjectReal', null],{$propertyScopes} + ]; + {$body} + EOPHP; + } + + return <<getParameters() as $param) { + if (\in_array($default = rtrim(substr(explode('$'.$param->name.' = ', (string) $param, 2)[1] ?? '', 0, -2)), ['', 'NULL'], true)) { + $default = 'null'; + } elseif (str_contains($default, '\\') || str_contains($default, '::') || str_contains($default, '(')) { + $default = self::fixDefault($default, $function); + } + $parameters[] = ($param->getAttributes(\SensitiveParameter::class) ? '#[\SensitiveParameter] ' : '') + .($withParameterTypes && $param->hasType() ? self::exportType($param).' ' : '') + .($param->isPassedByReference() ? '&' : '') + .($param->isVariadic() ? '...' : '').'$'.$param->name + .($param->isOptional() && !$param->isVariadic() ? ' = '.$default : ''); + } + + $signature = 'function '.($function->returnsReference() ? '&' : '') + .($function->isClosure() ? '' : $function->name).'('.implode(', ', $parameters).')'; + + if ($function instanceof \ReflectionMethod) { + $signature = ($function->isPublic() ? 'public ' : ($function->isProtected() ? 'protected ' : 'private ')) + .($function->isStatic() ? 'static ' : '').$signature; + } + if ($function->hasReturnType()) { + $signature .= ': '.self::exportType($function); + } + + static $getPrototype; + $getPrototype ??= (new \ReflectionMethod(\ReflectionMethod::class, 'getPrototype'))->invoke(...); + + while ($function) { + if ($function->hasTentativeReturnType()) { + return '#[\ReturnTypeWillChange] '.$signature; + } + + try { + $function = $function instanceof \ReflectionMethod && $function->isAbstract() ? false : $getPrototype($function); + } catch (\ReflectionException) { + break; + } + } + + return $signature; + } + + public static function exportType(\ReflectionFunctionAbstract|\ReflectionProperty|\ReflectionParameter $owner, bool $noBuiltin = false, \ReflectionType $type = null): ?string + { + if (!$type ??= $owner instanceof \ReflectionFunctionAbstract ? $owner->getReturnType() : $owner->getType()) { + return null; + } + $class = null; + $types = []; + if ($type instanceof \ReflectionUnionType) { + $reflectionTypes = $type->getTypes(); + $glue = '|'; + } elseif ($type instanceof \ReflectionIntersectionType) { + $reflectionTypes = $type->getTypes(); + $glue = '&'; + } else { + $reflectionTypes = [$type]; + $glue = null; + } + + foreach ($reflectionTypes as $type) { + if ($type instanceof \ReflectionIntersectionType) { + if ('' !== $name = '('.self::exportType($owner, $noBuiltin, $type).')') { + $types[] = $name; + } + continue; + } + $name = $type->getName(); + + if ($noBuiltin && $type->isBuiltin()) { + continue; + } + if (\in_array($name, ['parent', 'self'], true) && $class ??= $owner->getDeclaringClass()) { + $name = 'parent' === $name ? ($class->getParentClass() ?: null)?->name ?? 'parent' : $class->name; + } + + $types[] = ($noBuiltin || $type->isBuiltin() || 'static' === $name ? '' : '\\').$name; + } + + if (!$types) { + return ''; + } + if (null === $glue) { + return (!$noBuiltin && $type->allowsNull() && 'mixed' !== $name ? '?' : '').$types[0]; + } + sort($types); + + return implode($glue, $types); + } + + private static function exportPropertyScopes(string $parent): string + { + $propertyScopes = Hydrator::$propertyScopes[$parent] ??= Hydrator::getPropertyScopes($parent); + uksort($propertyScopes, 'strnatcmp'); + $propertyScopes = VarExporter::export($propertyScopes); + $propertyScopes = str_replace(VarExporter::export($parent), 'parent::class', $propertyScopes); + $propertyScopes = preg_replace("/(?|(,)\n( ) |\n |,\n (\]))/", '$1$2', $propertyScopes); + $propertyScopes = str_replace("\n", "\n ", $propertyScopes); + + return $propertyScopes; + } + + private static function fixDefault(string $default, \ReflectionFunctionAbstract $function): string + { + $regexp = "/(\"(?:[^\"\\\\]*+(?:\\\\.)*+)*+\"|'(?:[^'\\\\]*+(?:\\\\.)*+)*+')/"; + $parts = preg_split($regexp, $default, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); + + $regexp = '/([\( ]|^)([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z0-9_\x7f-\xff]++)*+)(?!: )/'; + $callback = $function instanceof \ReflectionMethod + ? fn ($m) => $m[1].match ($m[2]) { + 'new' => 'new', + 'self' => '\\'.$function->getDeclaringClass()->name, + 'namespace\\parent', + 'parent' => ($parent = $function->getDeclaringClass()->getParentClass()) ? '\\'.$parent->name : 'parent', + default => '\\'.$m[2], + } + : fn ($m) => $m[1].(\in_array($m[2], ['new', 'self', 'parent'], true) ? '' : '\\').$m[2]; + + return implode('', array_map(fn ($part) => match ($part[0]) { + '"' => $part, // for internal classes only + "'" => str_replace("\0", '\'."\0".\'', $part), + default => preg_replace_callback($regexp, $callback, $part), + }, $parts)); + } +} diff --git a/src/Symfony/Component/VarExporter/README.md b/src/Symfony/Component/VarExporter/README.md index a2e2a9050f1cb..bc0ed193613ef 100644 --- a/src/Symfony/Component/VarExporter/README.md +++ b/src/Symfony/Component/VarExporter/README.md @@ -11,7 +11,7 @@ of objects: - `Instantiator::instantiate()` creates an object and sets its properties without calling its constructor nor any other methods. - `Hydrator::hydrate()` can set the properties of an existing object. -- `LazyGhostObjectTrait` can make a class behave as a lazy loading ghost object. +- `Lazy*Trait` can make a class behave as a lazy-loading ghost or virtual proxy. VarExporter::export() --------------------- @@ -57,34 +57,61 @@ Hydrator::hydrate($object, [], [ ]); ``` -LazyGhostObjectTrait --------------------- +`Lazy*Trait` +------------ -By using `LazyGhostObjectTrait` either directly in your classes or using -inheritance, you can make their instances able to lazy load themselves. This -works by creating these instances empty and by computing their state only when -accessing a property. +The component provides two lazy-loading patterns: ghost objects and virtual +proxies (see https://martinfowler.com/eaaCatalog/lazyLoad.html for reference.) + +Ghost objects work only with concrete and non-internal classes. In the generic +case, they are not compatible with using factories in their initializer. + +Virtual proxies work with concrete, abstract or internal classes. They provide an +API that looks like the actual objects and forward calls to them. They can cause +identity problems because proxies might not be seen as equivalents to the actual +objects they proxy. + +Because of this identity problem, ghost objects should be preferred when +possible. Exceptions thrown by the `ProxyHelper` class can help decide when it +can be used or not. + +Ghost objects and virtual proxies both provide implementations for the +`LazyObjectInterface` which allows resetting them to their initial state or to +forcibly initialize them when needed. Note that resetting a ghost object skips +its read-only properties. You should use a virtual proxy to reset read-only +properties. + +### `LazyGhostTrait` + +By using `LazyGhostTrait` either directly in your classes or by using +`ProxyHelper::generateLazyGhost()`, you can make their instances lazy-loadable. +This works by creating these instances empty and by computing their state only +when accessing a property. ```php -FooMadeLazy extends Foo +class FooLazyGhost extends Foo { - use LazyGhostObjectTrait; + use LazyGhostTrait; + + private int $lazyObjectId; } -// This closure will be called when the object needs to be initialized, ie when a property is accessed -$initializer = function (Foo $instance) { - // [...] Use whatever heavy logic you need here to compute the $dependencies of the $instance +$foo = FooLazyGhost::createLazyGhost(initializer: function (Foo $instance): void { + // [...] Use whatever heavy logic you need here + // to compute the $dependencies of the $instance $instance->__construct(...$dependencies); -}; + // [...] Call setters, etc. if needed +}); -$foo = FooMadeLazy::createLazyGhostObject($initializer); +// $foo is now a lazy-loading ghost object. The initializer will +// be called only when and if a *property* is accessed. ``` You can also partially initialize the objects on a property-by-property basis by adding two arguments to the initializer: ```php -$initializer = function (Foo $instance, string $propertyName, ?string $propertyScope) { +$initializer = function (Foo $instance, string $propertyName, ?string $propertyScope): mixed { if (Foo::class === $propertyScope && 'bar' === $propertyName) { return 123; } @@ -96,6 +123,28 @@ Because lazy-initialization is not triggered when (un)setting a property, it's also possible to do partial initialization by calling setters on a just-created ghost object. +### `LazyProxyTrait` + +Alternatively, `LazyProxyTrait` can be used to create virtual proxies: + +```php +$proxyCode = ProxyHelper::generateLazyProxy(new ReflectionClass(Foo::class)); +// $proxyCode contains the reference to LazyProxyTrait +// and should be dumped into a file in production envs +eval('class FooLazyProxy'.$proxyCode); + +$foo = FooLazyProxy::createLazyProxy(initializer: function (): Foo { + // [...] Use whatever heavy logic you need here + // to compute the $dependencies of the $instance + $instance = new Foo(...$dependencies); + // [...] Call setters, etc. if needed + + return $instance; +}); +// $foo is now a lazy-loading virtual proxy object. The initializer will +// be called only when and if a *method* is called. +``` + Resources --------- diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildMagicClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildMagicClass.php similarity index 59% rename from src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildMagicClass.php rename to src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildMagicClass.php index b9926ab78e93a..a7dc5d3d73fb4 100644 --- a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildMagicClass.php +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildMagicClass.php @@ -9,14 +9,15 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject; +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost; -use Symfony\Component\VarExporter\LazyGhostObjectInterface; -use Symfony\Component\VarExporter\LazyGhostObjectTrait; +use Symfony\Component\VarExporter\LazyGhostTrait; +use Symfony\Component\VarExporter\LazyObjectInterface; -class ChildMagicClass extends MagicClass implements LazyGhostObjectInterface +class ChildMagicClass extends MagicClass implements LazyObjectInterface { - use LazyGhostObjectTrait; + use LazyGhostTrait; + private int $lazyObjectId; private int $data = 123; } diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildStdClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildStdClass.php similarity index 57% rename from src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildStdClass.php rename to src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildStdClass.php index c9e7f10085e26..0a131d9bfb5c1 100644 --- a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildStdClass.php +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildStdClass.php @@ -9,12 +9,14 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject; +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost; -use Symfony\Component\VarExporter\LazyGhostObjectInterface; -use Symfony\Component\VarExporter\LazyGhostObjectTrait; +use Symfony\Component\VarExporter\LazyGhostTrait; +use Symfony\Component\VarExporter\LazyObjectInterface; -class ChildStdClass extends \stdClass implements LazyGhostObjectInterface +class ChildStdClass extends \stdClass implements LazyObjectInterface { - use LazyGhostObjectTrait; + use LazyGhostTrait; + + private int $lazyObjectId; } diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildTestClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildTestClass.php similarity index 87% rename from src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildTestClass.php rename to src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildTestClass.php index f971ae452f29e..ea5b8bfb26c3d 100644 --- a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/ChildTestClass.php +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildTestClass.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject; +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost; -use Symfony\Component\VarExporter\LazyGhostObjectInterface; +use Symfony\Component\VarExporter\LazyObjectInterface; -class ChildTestClass extends TestClass implements LazyGhostObjectInterface +class ChildTestClass extends TestClass implements LazyObjectInterface { public int $public = 4; public readonly int $publicReadonly; diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/MagicClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/MagicClass.php similarity index 99% rename from src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/MagicClass.php rename to src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/MagicClass.php index 204ccc09242a7..6ac1f7364b517 100644 --- a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/MagicClass.php +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/MagicClass.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject; +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost; class MagicClass { diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/NoMagicClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/NoMagicClass.php similarity index 99% rename from src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/NoMagicClass.php rename to src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/NoMagicClass.php index 75cea5a6dfb57..88fa4f0dbd64b 100644 --- a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/NoMagicClass.php +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/NoMagicClass.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject; +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost; class NoMagicClass { diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/TestClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/TestClass.php similarity index 86% rename from src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/TestClass.php rename to src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/TestClass.php index ecb4d4236f5a2..1c1127d546399 100644 --- a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhostObject/TestClass.php +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/TestClass.php @@ -9,14 +9,15 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject; +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost; -use Symfony\Component\VarExporter\LazyGhostObjectTrait; +use Symfony\Component\VarExporter\LazyGhostTrait; class TestClass extends NoMagicClass { - use LazyGhostObjectTrait; + use LazyGhostTrait; + private int $lazyObjectId; public int $public = 1; protected int $protected = 2; protected readonly int $protectedReadonly; diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/FinalPublicClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/FinalPublicClass.php new file mode 100644 index 0000000000000..e61e2ee782520 --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/FinalPublicClass.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy; + +class FinalPublicClass +{ + private $count = 0; + + final public function increment(): int + { + return $this->count += 1; + } + + public function decrement(): int + { + return $this->count -= 1; + } +} diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/ReadOnlyClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/ReadOnlyClass.php new file mode 100644 index 0000000000000..45221614a7101 --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/ReadOnlyClass.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy; + +readonly class ReadOnlyClass +{ + public function __construct( + public int $foo + ) { + } +} diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/StringMagicGetClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/StringMagicGetClass.php new file mode 100644 index 0000000000000..9f79b0b077a01 --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/StringMagicGetClass.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy; + +class StringMagicGetClass +{ + public function __get(string $name): string + { + return $name; + } +} diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestClass.php new file mode 100644 index 0000000000000..0f12c6db2c660 --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestClass.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy; + +#[\AllowDynamicProperties] +class TestClass +{ + public function __construct( + protected \stdClass $dep, + ) { + } + + public function getDep(): \stdClass + { + return $this->dep; + } + + public function __destruct() + { + $this->dep->destructed = true; + } +} diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestUnserializeClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestUnserializeClass.php new file mode 100644 index 0000000000000..f9e2e2475f17c --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestUnserializeClass.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy; + +class TestUnserializeClass extends TestClass +{ + public function __serialize(): array + { + return [$this->dep]; + } + + public function __unserialize(array $data): void + { + $this->dep = $data[0]; + $this->dep->wokeUp = true; + } +} diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestWakeupClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestWakeupClass.php new file mode 100644 index 0000000000000..f473e53f66fab --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/TestWakeupClass.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy; + +class TestWakeupClass extends TestClass +{ + public function __wakeup() + { + $this->dep->wokeUp = true; + } +} diff --git a/src/Symfony/Component/VarExporter/Tests/LazyGhostObjectTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php similarity index 55% rename from src/Symfony/Component/VarExporter/Tests/LazyGhostObjectTraitTest.php rename to src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php index b6fc527a779f1..346974519d45f 100644 --- a/src/Symfony/Component/VarExporter/Tests/LazyGhostObjectTraitTest.php +++ b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php @@ -12,45 +12,44 @@ namespace Symfony\Component\VarExporter\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\VarExporter\Internal\GhostObjectId; -use Symfony\Component\VarExporter\Internal\GhostObjectRegistry; -use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject\ChildMagicClass; -use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject\ChildStdClass; -use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject\ChildTestClass; -use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject\MagicClass; -use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhostObject\TestClass; - -class LazyGhostObjectTraitTest extends TestCase +use Symfony\Component\VarExporter\Internal\LazyObjectRegistry; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ChildMagicClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ChildStdClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ChildTestClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\MagicClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\TestClass; + +class LazyGhostTraitTest extends TestCase { public function testGetPublic() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $ghost) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $ghost) { $ghost->__construct(); }); - $this->assertSame(["\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $instance)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId"], array_keys((array) $instance)); $this->assertSame(-4, $instance->public); $this->assertSame(4, $instance->publicReadonly); } public function testIssetPublic() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $ghost) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $ghost) { $ghost->__construct(); }); - $this->assertSame(["\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $instance)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId"], array_keys((array) $instance)); $this->assertTrue(isset($instance->public)); $this->assertSame(4, $instance->publicReadonly); } public function testUnsetPublic() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $ghost) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $ghost) { $ghost->__construct(); }); - $this->assertSame(["\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $instance)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId"], array_keys((array) $instance)); unset($instance->public); $this->assertFalse(isset($instance->public)); $this->assertSame(4, $instance->publicReadonly); @@ -58,11 +57,11 @@ public function testUnsetPublic() public function testSetPublic() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $ghost) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $ghost) { $ghost->__construct(); }); - $this->assertSame(["\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $instance)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId"], array_keys((array) $instance)); $instance->public = 12; $this->assertSame(12, $instance->public); $this->assertSame(4, $instance->publicReadonly); @@ -70,32 +69,35 @@ public function testSetPublic() public function testClone() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $ghost) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $ghost) { $ghost->__construct(); }); $clone = clone $instance; $this->assertNotSame((array) $instance, (array) $clone); - $this->assertSame(["\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $instance)); - $this->assertSame(["\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $clone)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId"], array_keys((array) $instance)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId"], array_keys((array) $clone)); $clone = clone $clone; - $this->assertTrue($clone->resetLazyGhostObject()); + $this->assertTrue($clone->resetLazyObject()); } public function testSerialize() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $ghost) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $ghost) { $ghost->__construct(); }); $serialized = serialize($instance); - $this->assertStringNotContainsString('lazyGhostObjectId', $serialized); + $this->assertStringNotContainsString('lazyObjectId', $serialized); $clone = unserialize($serialized); - $this->assertSame(array_keys((array) $instance), array_keys((array) $clone)); - $this->assertFalse($clone->resetLazyGhostObject()); + $expected = (array) $instance; + $this->assertArrayHasKey("\0".TestClass::class."\0lazyObjectId", $expected); + unset($expected["\0".TestClass::class."\0lazyObjectId"]); + $this->assertSame(array_keys($expected), array_keys((array) $clone)); + $this->assertFalse($clone->resetLazyObject()); } /** @@ -124,49 +126,49 @@ public function provideMagicClass() { yield [new MagicClass()]; - yield [ChildMagicClass::createLazyGhostObject(function (ChildMagicClass $instance) { + yield [ChildMagicClass::createLazyGhost(function (ChildMagicClass $instance) { $instance->__construct(); })]; } public function testDestruct() { - $registryCount = \count(GhostObjectRegistry::$states); + $registryCount = \count(LazyObjectRegistry::$states); $destructCounter = MagicClass::$destructCounter; - $instance = ChildMagicClass::createLazyGhostObject(function (ChildMagicClass $instance) { + $instance = ChildMagicClass::createLazyGhost(function (ChildMagicClass $instance) { $instance->__construct(); }); unset($instance); $this->assertSame($destructCounter, MagicClass::$destructCounter); - $instance = ChildMagicClass::createLazyGhostObject(function (ChildMagicClass $instance) { + $instance = ChildMagicClass::createLazyGhost(function (ChildMagicClass $instance) { $instance->__construct(); }); - $instance->initializeLazyGhostObject(); + $instance->initializeLazyObject(); unset($instance); $this->assertSame(1 + $destructCounter, MagicClass::$destructCounter); - $this->assertCount($registryCount, GhostObjectRegistry::$states); + $this->assertCount($registryCount, LazyObjectRegistry::$states); } - public function testResetLazyGhostObject() + public function testResetLazyGhost() { - $instance = ChildMagicClass::createLazyGhostObject(function (ChildMagicClass $instance) { + $instance = ChildMagicClass::createLazyGhost(function (ChildMagicClass $instance) { $instance->__construct(); }); $instance->foo = 234; - $this->assertTrue($instance->resetLazyGhostObject()); + $this->assertTrue($instance->resetLazyObject()); $this->assertSame('bar', $instance->foo); } public function testFullInitialization() { $counter = 0; - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $ghost) use (&$counter) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $ghost) use (&$counter) { ++$counter; $ghost->__construct(); }); @@ -180,7 +182,7 @@ public function testFullInitialization() public function testPartialInitialization() { $counter = 0; - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $instance, string $propertyName, ?string $propertyScope) use (&$counter) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $instance, string $propertyName, ?string $propertyScope) use (&$counter) { ++$counter; return match ($propertyName) { @@ -195,25 +197,25 @@ public function testPartialInitialization() }; }); - $this->assertSame(["\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $instance)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId"], array_keys((array) $instance)); $this->assertSame(123, $instance->public); - $this->assertSame(['public', "\0".TestClass::class."\0lazyGhostObjectId"], array_keys((array) $instance)); + $this->assertSame(["\0".TestClass::class."\0lazyObjectId", 'public'], array_keys((array) $instance)); $this->assertSame(1, $counter); - $instance->initializeLazyGhostObject(); + $instance->initializeLazyObject(); $this->assertSame(123, $instance->public); $this->assertSame(6, $counter); $properties = (array) $instance; + $this->assertIsInt($properties["\0".TestClass::class."\0lazyObjectId"]); + unset($properties["\0".TestClass::class."\0lazyObjectId"]); $this->assertSame(array_keys((array) new ChildTestClass()), array_keys($properties)); - $properties = array_values($properties); - $this->assertInstanceOf(GhostObjectId::class, array_splice($properties, 4, 1)[0]); $this->assertSame([123, 345, 456, 567, 234, 678], array_values($properties)); } public function testPartialInitializationWithReset() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $instance, string $propertyName, ?string $propertyScope) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $instance, string $propertyName, ?string $propertyScope) { return 234; }); @@ -222,26 +224,26 @@ public function testPartialInitializationWithReset() $this->assertSame(234, $instance->publicReadonly); $this->assertSame(123, $instance->public); - $this->assertTrue($instance->resetLazyGhostObject()); + $this->assertTrue($instance->resetLazyObject()); $this->assertSame(234, $instance->publicReadonly); $this->assertSame(123, $instance->public); - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $instance, string $propertyName, ?string $propertyScope) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $instance, string $propertyName, ?string $propertyScope) { return 234; }); - $instance->resetLazyGhostObject(); + $instance->resetLazyObject(); $instance->public = 123; $this->assertSame(123, $instance->public); - $this->assertTrue($instance->resetLazyGhostObject()); + $this->assertTrue($instance->resetLazyObject()); $this->assertSame(234, $instance->public); } public function testPartialInitializationWithNastyPassByRef() { - $instance = ChildTestClass::createLazyGhostObject(function (ChildTestClass $instance, string &$propertyName, ?string &$propertyScope) { + $instance = ChildTestClass::createLazyGhost(function (ChildTestClass $instance, string &$propertyName, ?string &$propertyScope) { return $propertyName = $propertyScope = 123; }); @@ -250,7 +252,7 @@ public function testPartialInitializationWithNastyPassByRef() public function testSetStdClassProperty() { - $instance = ChildStdClass::createLazyGhostObject(function (ChildStdClass $ghost) { + $instance = ChildStdClass::createLazyGhost(function (ChildStdClass $ghost) { }); $instance->public = 12; diff --git a/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php new file mode 100644 index 0000000000000..4926aa0cc4324 --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php @@ -0,0 +1,262 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarExporter\ProxyHelper; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\FinalPublicClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\ReadOnlyClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\StringMagicGetClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestUnserializeClass; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestWakeupClass; + +class LazyProxyTraitTest extends TestCase +{ + public function testGetter() + { + $initCounter = 0; + $proxy = $this->createLazyProxy(TestClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestClass((object) ['hello' => 'world']); + }); + + $this->assertInstanceOf(TestClass::class, $proxy); + $this->assertSame(0, $initCounter); + + $dep1 = $proxy->getDep(); + $this->assertSame(1, $initCounter); + + $this->assertTrue($proxy->resetLazyObject()); + $this->assertSame(1, $initCounter); + + $dep2 = $proxy->getDep(); + $this->assertSame(2, $initCounter); + $this->assertNotSame($dep1, $dep2); + } + + public function testInitialize() + { + $initCounter = 0; + $proxy = $this->createLazyProxy(TestClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestClass((object) ['hello' => 'world']); + }); + + $this->assertSame(0, $initCounter); + + $proxy->initializeLazyObject(); + $this->assertSame(1, $initCounter); + + $proxy->initializeLazyObject(); + $this->assertSame(1, $initCounter); + } + + public function testClone() + { + $initCounter = 0; + $proxy = $this->createLazyProxy(TestClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestClass((object) ['hello' => 'world']); + }); + + $clone = clone $proxy; + $this->assertSame(0, $initCounter); + + $dep1 = $proxy->getDep(); + $this->assertSame(1, $initCounter); + + $dep2 = $clone->getDep(); + $this->assertSame(2, $initCounter); + + $this->assertNotSame($dep1, $dep2); + } + + public function testUnserialize() + { + $initCounter = 0; + $proxy = $this->createLazyProxy(TestUnserializeClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestUnserializeClass((object) ['hello' => 'world']); + }); + + $this->assertInstanceOf(TestUnserializeClass::class, $proxy); + $this->assertSame(0, $initCounter); + + $copy = unserialize(serialize($proxy)); + $this->assertSame(1, $initCounter); + + $this->assertFalse($copy->resetLazyObject()); + $this->assertTrue($copy->getDep()->wokeUp); + $this->assertSame('world', $copy->getDep()->hello); + } + + public function testWakeup() + { + $initCounter = 0; + $proxy = $this->createLazyProxy(TestWakeupClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestWakeupClass((object) ['hello' => 'world']); + }); + + $this->assertInstanceOf(TestWakeupClass::class, $proxy); + $this->assertSame(0, $initCounter); + + $copy = unserialize(serialize($proxy)); + $this->assertSame(1, $initCounter); + + $this->assertFalse($copy->resetLazyObject()); + $this->assertTrue($copy->getDep()->wokeUp); + $this->assertSame('world', $copy->getDep()->hello); + } + + public function testDestruct() + { + $initCounter = 0; + $proxy = $this->createLazyProxy(TestClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestClass((object) ['hello' => 'world']); + }); + + unset($proxy); + $this->assertSame(0, $initCounter); + + $proxy = $this->createLazyProxy(TestClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestClass((object) ['hello' => 'world']); + }); + $dep = $proxy->getDep(); + $this->assertSame(1, $initCounter); + unset($proxy); + $this->assertTrue($dep->destructed); + } + + public function testDynamicProperty() + { + $initCounter = 0; + $proxy = $this->createLazyProxy(TestClass::class, function () use (&$initCounter) { + ++$initCounter; + + return new TestClass((object) ['hello' => 'world']); + }); + + $proxy->dynProp = 123; + $this->assertSame(1, $initCounter); + $this->assertSame(123, $proxy->dynProp); + $this->assertTrue(isset($proxy->dynProp)); + $this->assertCount(2, (array) $proxy); + unset($proxy->dynProp); + $this->assertFalse(isset($proxy->dynProp)); + $this->assertCount(2, (array) $proxy); + } + + public function testStringMagicGet() + { + $proxy = $this->createLazyProxy(StringMagicGetClass::class, function () { + return new StringMagicGetClass(); + }); + + $this->assertSame('abc', $proxy->abc); + } + + public function testFinalPublicClass() + { + $proxy = $this->createLazyProxy(FinalPublicClass::class, function () { + return new FinalPublicClass(); + }); + + $this->assertSame(1, $proxy->increment()); + $this->assertSame(2, $proxy->increment()); + $this->assertSame(1, $proxy->decrement()); + } + + public function testWither() + { + $obj = new class() { + public $foo = 123; + + public function withFoo($foo): static + { + $clone = clone $this; + $clone->foo = $foo; + + return $clone; + } + }; + $proxy = $this->createLazyProxy($obj::class, fn () => $obj); + + $clone = $proxy->withFoo(234); + $this->assertSame($clone::class, $proxy::class); + $this->assertSame(234, $clone->foo); + $this->assertSame(234, $obj->foo); + } + + public function testFluent() + { + $obj = new class() { + public $foo = 123; + + public function setFoo($foo): static + { + $this->foo = $foo; + + return $this; + } + }; + $proxy = $this->createLazyProxy($obj::class, fn () => $obj); + + $this->assertSame($proxy->setFoo(234), $proxy); + $this->assertSame(234, $proxy->foo); + } + + /** + * @requires PHP 8.2 + */ + public function testReadOnlyClass() + { + $proxy = $this->createLazyProxy(ReadOnlyClass::class, fn () => new ReadOnlyClass(123)); + + $this->assertSame(123, $proxy->foo); + } + + /** + * @template T + * + * @param class-string $class + * + * @return T + */ + private function createLazyProxy(string $class, \Closure $initializer): object + { + $r = new \ReflectionClass($class); + + if (str_contains($class, "\0")) { + $class = __CLASS__.'\\'.debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['function'].'_L'.$r->getStartLine(); + class_alias($r->name, $class); + } + $proxy = str_replace($r->name, $class, ProxyHelper::generateLazyProxy($r)); + $class = str_replace('\\', '_', $class).'_'.md5($proxy); + + if (!class_exists($class, false)) { + eval((\PHP_VERSION_ID >= 80200 && $r->isReadOnly() ? 'readonly ' : '').'class '.$class.' '.$proxy); + } + + return $class::createLazyProxy($initializer); + } +} diff --git a/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php new file mode 100644 index 0000000000000..8d489bb7812b1 --- /dev/null +++ b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php @@ -0,0 +1,253 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarExporter\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarExporter\Exception\LogicException; +use Symfony\Component\VarExporter\ProxyHelper; +use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\StringMagicGetClass; + +class ProxyHelperTest extends TestCase +{ + /** + * @dataProvider provideExportSignature + */ + public function testExportSignature(string $expected, \ReflectionMethod $method) + { + $this->assertSame($expected, ProxyHelper::exportSignature($method)); + } + + public function provideExportSignature() + { + $methods = (new \ReflectionClass(TestForProxyHelper::class))->getMethods(); + $source = file(__FILE__); + + foreach ($methods as $method) { + $expected = substr($source[$method->getStartLine() - 1], $method->isAbstract() ? 13 : 4, -(1 + $method->isAbstract())); + $expected = str_replace(['.', ' . . . ', '"', '\0'], [' . ', '...', "'", '\'."\0".\''], $expected); + $expected = str_replace('Bar', '\\'.Bar::class, $expected); + $expected = str_replace('self', '\\'.TestForProxyHelper::class, $expected); + + yield [$expected, $method]; + } + } + + public function testExportSignatureFQ() + { + $expected = <<<'EOPHP' + public function bar($a = \Symfony\Component\VarExporter\Tests\Bar::BAZ, + $b = new \Symfony\Component\VarExporter\Tests\Bar(\Symfony\Component\VarExporter\Tests\Bar::BAZ, bar: \Symfony\Component\VarExporter\Tests\Bar::BAZ), + $c = new \stdClass(), + $d = new \Symfony\Component\VarExporter\Tests\TestSignatureFQ(), + $e = new \Symfony\Component\VarExporter\Tests\Bar(), + $f = new \Symfony\Component\VarExporter\Tests\Qux(), + $g = new \Symfony\Component\VarExporter\Tests\Qux(), + $i = new \Qux(), + $j = \stdClass::BAZ, + $k = \Symfony\Component\VarExporter\Tests\Bar) + EOPHP; + + $this->assertSame($expected, str_replace(', $', ",\n$", ProxyHelper::exportSignature(new \ReflectionMethod(TestSignatureFQ::class, 'bar')))); + } + + public function testGenerateLazyProxy() + { + $expected = <<<'EOPHP' + extends \Symfony\Component\VarExporter\Tests\TestForProxyHelper implements \Symfony\Component\VarExporter\LazyObjectInterface + { + use \Symfony\Component\VarExporter\LazyProxyTrait; + + private int $lazyObjectId; + private parent $lazyObjectReal; + + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'lazyObjectReal' => [self::class, 'lazyObjectReal', null], + "\0".self::class."\0lazyObjectReal" => [self::class, 'lazyObjectReal', null], + ]; + + public function foo1(): ?\Symfony\Component\VarExporter\Tests\Bar + { + if (isset($this->lazyObjectReal)) { + return $this->lazyObjectReal->foo1(...\func_get_args()); + } + + return parent::foo1(...\func_get_args()); + } + + public function foo4(\Symfony\Component\VarExporter\Tests\Bar|string $b): void + { + if (isset($this->lazyObjectReal)) { + $this->lazyObjectReal->foo4(...\func_get_args()); + } else { + parent::foo4(...\func_get_args()); + } + } + + protected function foo7() + { + if (isset($this->lazyObjectReal)) { + return $this->lazyObjectReal->foo7(...\func_get_args()); + } + + return throw new \BadMethodCallException('Cannot forward abstract method "Symfony\Component\VarExporter\Tests\TestForProxyHelper::foo7()".'); + } + } + + // Help opcache.preload discover always-needed symbols + class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); + class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); + class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + + EOPHP; + + $this->assertSame($expected, ProxyHelper::generateLazyProxy(new \ReflectionClass(TestForProxyHelper::class))); + } + + public function testGenerateLazyProxyForInterfaces() + { + $expected = <<<'EOPHP' + implements \Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface1, \Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface2, \Symfony\Component\VarExporter\LazyObjectInterface + { + use \Symfony\Component\VarExporter\LazyProxyTrait; + + private int $lazyObjectId; + private \Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface1&\Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface2 $lazyObjectReal; + + public function initializeLazyObject(): \Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface1&\Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface2 + { + if (isset($this->lazyObjectReal)) { + return $this->lazyObjectReal; + } + + return $this; + } + + public function foo1(): ?\Symfony\Component\VarExporter\Tests\Bar + { + if (isset($this->lazyObjectReal)) { + return $this->lazyObjectReal->foo1(...\func_get_args()); + } + + return throw new \BadMethodCallException('Cannot forward abstract method "Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface1::foo1()".'); + } + + public function foo2(?\Symfony\Component\VarExporter\Tests\Bar $b): \Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface2 + { + if (isset($this->lazyObjectReal)) { + return $this->lazyObjectReal->foo2(...\func_get_args()); + } + + return throw new \BadMethodCallException('Cannot forward abstract method "Symfony\Component\VarExporter\Tests\TestForProxyHelperInterface2::foo2()".'); + } + } + + // Help opcache.preload discover always-needed symbols + class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); + class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); + class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + + EOPHP; + + $this->assertSame($expected, ProxyHelper::generateLazyProxy(null, [new \ReflectionClass(TestForProxyHelperInterface1::class), new \ReflectionClass(TestForProxyHelperInterface2::class)])); + } + + public function testAttributes() + { + $expected = <<<'EOPHP' + + public function foo(#[\SensitiveParameter] $a): int + { + if (isset($this->lazyObjectReal)) { + return $this->lazyObjectReal->foo(...\func_get_args()); + } + + return parent::foo(...\func_get_args()); + } + } + + EOPHP; + + $class = new \ReflectionClass(new class() { + #[SomeAttribute] + public function foo(#[\SensitiveParameter, AnotherAttribute] $a): int + { + } + }); + $this->assertStringContainsString($expected, ProxyHelper::generateLazyProxy($class)); + } + + public function testCannotGenerateGhostForStringMagicGet() + { + $this->expectException(LogicException::class); + ProxyHelper::generateLazyGhost(new \ReflectionClass(StringMagicGetClass::class)); + } +} + +abstract class TestForProxyHelper +{ + public function foo1(): ?Bar + { + } + + public function foo2(?Bar $b): ?self + { + } + + public function &foo3(Bar &$b, string &...$c) + { + } + + public function foo4(Bar|string $b): void + { + } + + public function foo5($b = new \stdClass([0 => 123]).Bar.Bar::BAR."a\0b") + { + } + + protected function foo6($b = null): never + { + } + + abstract protected function foo7(); + + public static function foo8() + { + } +} + +interface TestForProxyHelperInterface1 +{ + public function foo1(): ?Bar; +} + +interface TestForProxyHelperInterface2 +{ + public function foo2(?Bar $b): self; +} + +class TestSignatureFQ extends \stdClass +{ + public function bar( + $a = Bar::BAZ, + $b = new Bar(Bar::BAZ, bar: Bar::BAZ), + $c = new parent(), + $d = new self(), + $e = new namespace\Bar(), + $f = new Qux(), + $g = new namespace\Qux(), + $i = new \Qux(), + $j = parent::BAZ, + $k = Bar, + ) { + } +} diff --git a/src/Symfony/Component/VarExporter/VarExporter.php b/src/Symfony/Component/VarExporter/VarExporter.php index 3e2a4cc038631..c820fc902d554 100644 --- a/src/Symfony/Component/VarExporter/VarExporter.php +++ b/src/Symfony/Component/VarExporter/VarExporter.php @@ -33,7 +33,7 @@ final class VarExporter * Exports a serializable PHP value to PHP code. * * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise - * @param bool &$classes Classes found in the value are added to this list as both keys and values + * @param bool &$foundClasses Classes found in the value are added to this list as both keys and values * * @throws ExceptionInterface When the provided value cannot be serialized */ diff --git a/src/Symfony/Component/VarExporter/composer.json b/src/Symfony/Component/VarExporter/composer.json index 3aac3aff326e7..67c4a279f4c7d 100644 --- a/src/Symfony/Component/VarExporter/composer.json +++ b/src/Symfony/Component/VarExporter/composer.json @@ -2,7 +2,7 @@ "name": "symfony/var-exporter", "type": "library", "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "keywords": ["export", "serialize", "instantiate", "hydrate", "construct", "clone"], + "keywords": ["export", "serialize", "instantiate", "hydrate", "construct", "clone", "lazy loading", "proxy"], "homepage": "https://symfony.com", "license": "MIT", "authors": [ From d5e624c339dd2e0d47cb1d23261ade11fe91eacd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 4 Sep 2022 00:51:21 +0200 Subject: [PATCH 0070/1170] skip a transient test on AppVeyor --- .../Component/VarDumper/Tests/Dumper/ServerDumperTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php index 921cfda456acf..44036295efb68 100644 --- a/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php @@ -39,6 +39,10 @@ public function testDumpForwardsToWrappedDumperWhenServerIsUnavailable() public function testDump() { + if ('True' === getenv('APPVEYOR')) { + $this->markTestSkipped('Skip transient test on AppVeyor'); + } + $wrappedDumper = $this->createMock(DataDumperInterface::class); $wrappedDumper->expects($this->never())->method('dump'); // test wrapped dumper is not used From f6f8748b110bc8e3b4a31ff710bd0fc6c9b3e599 Mon Sep 17 00:00:00 2001 From: nuryagdym Date: Mon, 29 Aug 2022 01:14:07 +0300 Subject: [PATCH 0071/1170] Psr18Client ignore invalid HTTP headers --- .../Component/HttpClient/Psr18Client.php | 6 +++++- .../HttpClient/Tests/Psr18ClientTest.php | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/Psr18Client.php b/src/Symfony/Component/HttpClient/Psr18Client.php index 67c2fdb8f07bc..7f79af16426a1 100644 --- a/src/Symfony/Component/HttpClient/Psr18Client.php +++ b/src/Symfony/Component/HttpClient/Psr18Client.php @@ -100,7 +100,11 @@ public function sendRequest(RequestInterface $request): ResponseInterface foreach ($response->getHeaders(false) as $name => $values) { foreach ($values as $value) { - $psrResponse = $psrResponse->withAddedHeader($name, $value); + try { + $psrResponse = $psrResponse->withAddedHeader($name, $value); + } catch (\InvalidArgumentException $e) { + // ignore invalid header + } } } diff --git a/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php b/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php index 1ef36fc5bd09e..366d555ae03f9 100644 --- a/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php @@ -13,10 +13,12 @@ use Nyholm\Psr7\Factory\Psr17Factory; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpClient\NativeHttpClient; use Symfony\Component\HttpClient\Psr18Client; use Symfony\Component\HttpClient\Psr18NetworkException; use Symfony\Component\HttpClient\Psr18RequestException; +use Symfony\Component\HttpClient\Response\MockResponse; use Symfony\Contracts\HttpClient\Test\TestHttpServer; class Psr18ClientTest extends TestCase @@ -81,4 +83,22 @@ public function test404() $response = $client->sendRequest($factory->createRequest('GET', 'http://localhost:8057/404')); $this->assertSame(404, $response->getStatusCode()); } + + public function testInvalidHeaderResponse() + { + $responseHeaders = [ + // space in header name not allowed in RFC 7230 + ' X-XSS-Protection' => '0', + 'Cache-Control' => 'no-cache', + ]; + $response = new MockResponse('body', ['response_headers' => $responseHeaders]); + $this->assertArrayHasKey(' x-xss-protection', $response->getHeaders()); + + $client = new Psr18Client(new MockHttpClient($response)); + $request = $client->createRequest('POST', 'http://localhost:8057/post') + ->withBody($client->createStream('foo=0123456789')); + + $resultResponse = $client->sendRequest($request); + $this->assertCount(1, $resultResponse->getHeaders()); + } } From b2e45678f41f569f4cb739afbfc10aeef6f0af77 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 5 Sep 2022 12:56:33 +0200 Subject: [PATCH 0072/1170] Remove unneeded conflict line --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 59b21fd6d0c9a..e51e2c655e9c8 100644 --- a/composer.json +++ b/composer.json @@ -156,7 +156,6 @@ "masterminds/html5": "<2.6", "phpdocumentor/reflection-docblock": "<5.2", "phpdocumentor/type-resolver": "<1.5.1", - "ocramius/proxy-manager": "<2.1", "phpunit/phpunit": "<5.4.3" }, "config": { From c825724ed368265d87ad0adecde3999ec2482316 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 5 Sep 2022 15:49:36 +0200 Subject: [PATCH 0073/1170] [DependencyInjection] Fix dumping lazy-proxy of interfaces --- .../LazyProxy/PhpDumper/ProxyDumper.php | 4 +-- .../DependencyInjection/CHANGELOG.md | 2 +- .../DependencyInjection/Dumper/PhpDumper.php | 16 +++++----- .../Instantiator/LazyServiceInstantiator.php | 2 +- .../LazyProxy/PhpDumper/DumperInterface.php | 7 ++-- .../LazyProxy/PhpDumper/LazyServiceDumper.php | 32 ++++++++++--------- .../LazyProxy/PhpDumper/NullDumper.php | 4 +-- .../Tests/Fixtures/includes/classes.php | 4 +-- .../PhpDumper/LazyServiceDumperTest.php | 29 +++++++++++++++++ .../Component/VarExporter/ProxyHelper.php | 2 +- 10 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php index 930b7d76b0606..82ff95dc4cc93 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -37,7 +37,7 @@ public function __construct(string $salt = '') $this->classGenerator = new BaseGeneratorStrategy(); } - public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): bool + public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool { $asGhostObject = false; @@ -72,7 +72,7 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ EOF; } - public function getProxyCode(Definition $definition): string + public function getProxyCode(Definition $definition, string $id = null): string { $code = $this->classGenerator->generate($this->generateProxyClass($definition)); $code = preg_replace('/^(class [^ ]++ extends )([^\\\\])/', '$1\\\\$2', $code); diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md index 274df06358bf1..bfb69b9547e23 100644 --- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -5,7 +5,7 @@ CHANGELOG --- * Use lazy-loading ghost objects and virtual proxies out of the box - * Add argument `&$asGhostObject` to LazyProxy's `DumperInterface` to allow using ghost objects for lazy loading services + * Add arguments `&$asGhostObject` and `$id` to LazyProxy's `DumperInterface` to allow using ghost objects for lazy loading services * Add `enum` env var processor * Add `shuffle` env var processor * Add `resolve-env` option to `debug:config` command to display actual values of environment variables in dumped configuration diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 6f4465665812c..bf21d6059bee3 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -550,8 +550,8 @@ private function generateProxyClasses(): array $strip = '' === $this->docStar && method_exists(Kernel::class, 'stripComments'); $proxyDumper = $this->getProxyDumper(); ksort($definitions); - foreach ($definitions as $definition) { - if (!$definition = $this->isProxyCandidate($definition)) { + foreach ($definitions as $id => $definition) { + if (!$definition = $this->isProxyCandidate($definition, $asGhostObject, $id)) { continue; } if (isset($alreadyGenerated[$class = $definition->getClass()])) { @@ -560,7 +560,7 @@ private function generateProxyClasses(): array $alreadyGenerated[$class] = true; // register class' reflector for resource tracking $this->container->getReflectionClass($class); - if ("\n" === $proxyCode = "\n".$proxyDumper->getProxyCode($definition)) { + if ("\n" === $proxyCode = "\n".$proxyDumper->getProxyCode($definition, $id)) { continue; } @@ -655,7 +655,7 @@ private function addServiceInstance(string $id, Definition $definition, bool $is } $asGhostObject = false; - $isProxyCandidate = $this->isProxyCandidate($definition, $asGhostObject); + $isProxyCandidate = $this->isProxyCandidate($definition, $asGhostObject, $id); $instantiation = ''; $lastWitherIndex = null; @@ -883,7 +883,7 @@ protected function {$methodName}($lazyInitialization) } $asGhostObject = false; - if ($isProxyCandidate = $this->isProxyCandidate($definition, $asGhostObject)) { + if ($isProxyCandidate = $this->isProxyCandidate($definition, $asGhostObject, $id)) { $definition = $isProxyCandidate; if (!$definition->isShared()) { @@ -1041,7 +1041,7 @@ private function addInlineService(string $id, Definition $definition, Definition } $asGhostObject = false; - $isProxyCandidate = $this->isProxyCandidate($inlineDef, $asGhostObject); + $isProxyCandidate = $this->isProxyCandidate($inlineDef, $asGhostObject, $id); if (isset($this->definitionVariables[$inlineDef])) { $isSimpleInstance = false; @@ -2266,7 +2266,7 @@ private function getClasses(Definition $definition, string $id): array return $classes; } - private function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): ?Definition + private function isProxyCandidate(Definition $definition, ?bool &$asGhostObject, string $id): ?Definition { $asGhostObject = false; @@ -2279,6 +2279,6 @@ private function isProxyCandidate(Definition $definition, bool &$asGhostObject = ->setClass($bag->resolveValue($definition->getClass())) ->setTags(($definition->hasTag('proxy') ? ['proxy' => $bag->resolveValue($definition->getTag('proxy'))] : []) + $definition->getTags()); - return $proxyDumper->isProxyCandidate($definition, $asGhostObject) ? $definition : null; + return $proxyDumper->isProxyCandidate($definition, $asGhostObject, $id) ? $definition : null; } } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php index 419bcd5d54398..cb846445de994 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/LazyServiceInstantiator.php @@ -26,7 +26,7 @@ public function instantiateProxy(ContainerInterface $container, Definition $defi $dumper = new LazyServiceDumper(); if (!class_exists($proxyClass = $dumper->getProxyClass($definition, $class), false)) { - eval($dumper->getProxyCode($definition)); + eval($dumper->getProxyCode($definition, $id)); } return isset(class_uses($proxyClass)[LazyGhostTrait::class]) ? $proxyClass::createLazyGhost($realInstantiator) : $proxyClass::createLazyProxy($realInstantiator); diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php index 41bd33650df5b..d3b9d77a236d0 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php @@ -23,9 +23,10 @@ interface DumperInterface /** * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container. * - * @param bool|null &$asGhostObject Set to true after the call if the proxy is a ghost object + * @param bool|null &$asGhostObject Set to true after the call if the proxy is a ghost object + * @param string|null $id */ - public function isProxyCandidate(Definition $definition/* , bool &$asGhostObject = null */): bool; + public function isProxyCandidate(Definition $definition/* , bool &$asGhostObject = null, string $id = null */): bool; /** * Generates the code to be used to instantiate a proxy in the dumped factory code. @@ -35,5 +36,5 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ /** * Generates the code for the lazy proxy. */ - public function getProxyCode(Definition $definition): string; + public function getProxyCode(Definition $definition/* , string $id = null */): string; } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php index 0f443f42facd8..1043da00f0a45 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/LazyServiceDumper.php @@ -26,13 +26,13 @@ public function __construct( ) { } - public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): bool + public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool { $asGhostObject = false; if ($definition->hasTag('proxy')) { if (!$definition->isLazy()) { - throw new InvalidArgumentException(sprintf('Invalid definition for service of class "%s": setting the "proxy" tag on a service requires it to be "lazy".', $definition->getClass())); + throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": setting the "proxy" tag on a service requires it to be "lazy".', $id ?? $definition->getClass())); } return true; @@ -99,10 +99,10 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ EOF; } - public function getProxyCode(Definition $definition): string + public function getProxyCode(Definition $definition, string $id = null): string { - if (!$this->isProxyCandidate($definition, $asGhostObject)) { - throw new InvalidArgumentException(sprintf('Cannot instantiate lazy proxy for service of class "%s".', $definition->getClass())); + if (!$this->isProxyCandidate($definition, $asGhostObject, $id)) { + throw new InvalidArgumentException(sprintf('Cannot instantiate lazy proxy for service "%s".', $id ?? $definition->getClass())); } $proxyClass = $this->getProxyClass($definition, $class); @@ -110,32 +110,34 @@ public function getProxyCode(Definition $definition): string try { return 'class '.$proxyClass.ProxyHelper::generateLazyGhost($class); } catch (LogicException $e) { - throw new InvalidArgumentException(sprintf('Cannot generate lazy ghost for service of class "%s" lazy.', $definition->getClass()), 0, $e); + throw new InvalidArgumentException(sprintf('Cannot generate lazy ghost for service "%s".', $id ?? $definition->getClass()), 0, $e); } } + $interfaces = []; if ($definition->hasTag('proxy')) { - $interfaces = []; foreach ($definition->getTag('proxy') as $tag) { if (!isset($tag['interface'])) { - throw new InvalidArgumentException(sprintf('Invalid definition for service of class "%s": the "interface" attribute is missing on a "proxy" tag.', $definition->getClass())); + throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": the "interface" attribute is missing on a "proxy" tag.', $id ?? $definition->getClass())); } if (!interface_exists($tag['interface']) && !class_exists($tag['interface'], false)) { - throw new InvalidArgumentException(sprintf('Invalid definition for service of class "%s": several "proxy" tags found but "%s" is not an interface.', $definition->getClass(), $tag['interface'])); + throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": several "proxy" tags found but "%s" is not an interface.', $id ?? $definition->getClass(), $tag['interface'])); } $interfaces[] = new \ReflectionClass($tag['interface']); } - } else { + + if (1 === \count($interfaces) && !$interfaces[0]->isInterface()) { + $class = array_pop($interfaces); + } + } elseif ($class->isInterface()) { $interfaces = [$class]; - } - if (1 === \count($interfaces) && !$interfaces[0]->isInterface()) { - $class = array_pop($interfaces); + $class = null; } try { - return (\PHP_VERSION_ID >= 80200 && $class->isReadOnly() ? 'readonly ' : '').'class '.$proxyClass.ProxyHelper::generateLazyProxy($class, $interfaces); + return (\PHP_VERSION_ID >= 80200 && $class?->isReadOnly() ? 'readonly ' : '').'class '.$proxyClass.ProxyHelper::generateLazyProxy($class, $interfaces); } catch (LogicException $e) { - throw new InvalidArgumentException(sprintf('Cannot generate lazy proxy for service of class "%s" lazy.', $definition->getClass()), 0, $e); + throw new InvalidArgumentException(sprintf('Cannot generate lazy proxy for service "%s".', $id ?? $definition->getClass()), 0, $e); } } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php index 4a061c187638e..daa6fed79fdb3 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php @@ -22,7 +22,7 @@ */ class NullDumper implements DumperInterface { - public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): bool + public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool { return $asGhostObject = false; } @@ -32,7 +32,7 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ return ''; } - public function getProxyCode(Definition $definition): string + public function getProxyCode(Definition $definition, string $id = null): string { return ''; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php index 3add8dc3bd3d7..e765bf34b6b3b 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php @@ -84,7 +84,7 @@ public function callPassed() class DummyProxyDumper implements ProxyDumper { - public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null): bool + public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool { $asGhostObject = false; @@ -96,7 +96,7 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ return " // lazy factory for {$definition->getClass()}\n\n"; } - public function getProxyCode(Definition $definition): string + public function getProxyCode(Definition $definition, $id = null): string { return "// proxy code for {$definition->getClass()}\n"; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php new file mode 100644 index 0000000000000..f9236004ac1fe --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\LazyProxy\PhpDumper; + +use PHPUnit\Framework\TestCase; +use Psr\Container\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\LazyServiceDumper; + +class LazyServiceDumperTest extends TestCase +{ + public function testProxyInterface() + { + $dumper = new LazyServiceDumper(); + $definition = (new Definition(ContainerInterface::class))->setLazy(true); + + $this->assertTrue($dumper->isProxyCandidate($definition)); + $this->assertStringContainsString('function get(', $dumper->getProxyCode($definition)); + } +} diff --git a/src/Symfony/Component/VarExporter/ProxyHelper.php b/src/Symfony/Component/VarExporter/ProxyHelper.php index 0aa6c5647a4ee..ee0740f6c0d24 100644 --- a/src/Symfony/Component/VarExporter/ProxyHelper.php +++ b/src/Symfony/Component/VarExporter/ProxyHelper.php @@ -176,7 +176,7 @@ public static function generateLazyProxy(?\ReflectionClass $class, array $interf $methods[$lcName] = " {$signature}\n {\n{$body}\n }"; } - $readonly = \PHP_VERSION_ID >= 80200 && $class && $class->isReadOnly() ? 'readonly ' : ''; + $readonly = \PHP_VERSION_ID >= 80200 && $class?->isReadOnly() ? 'readonly ' : ''; $types = $interfaces = array_unique(array_column($interfaces, 'name')); $interfaces[] = LazyObjectInterface::class; $interfaces = implode(', \\', $interfaces); From 89e13985f352b36bb3318797b96c2d2736e30600 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Mon, 5 Sep 2022 16:21:17 +0200 Subject: [PATCH 0074/1170] Prevent exception if request stack is empty --- .../HttpKernel/DataCollector/RequestDataCollector.php | 2 +- .../Tests/DataCollector/RequestDataCollectorTest.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index 523f5c957f188..951860a225668 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -110,7 +110,7 @@ public function collect(Request $request, Response $response, \Throwable $except 'session_metadata' => $sessionMetadata, 'session_attributes' => $sessionAttributes, 'session_usages' => array_values($this->sessionUsages), - 'stateless_check' => $this->requestStack && $this->requestStack->getMainRequest()->attributes->get('_stateless', false), + 'stateless_check' => $this->requestStack && ($mainRequest = $this->requestStack->getMainRequest()) && $mainRequest->attributes->get('_stateless', false), 'flashes' => $flashes, 'path_info' => $request->getPathInfo(), 'controller' => 'n/a', diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php index 0c576e00ed4dd..d7c8b302b628a 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -312,6 +312,15 @@ public function testStatelessCheck() $collector->lateCollect(); $this->assertTrue($collector->getStatelessCheck()); + + $requestStack = new RequestStack(); + $request = $this->createRequest(); + + $collector = new RequestDataCollector($requestStack); + $collector->collect($request, $response = $this->createResponse()); + $collector->lateCollect(); + + $this->assertFalse($collector->getStatelessCheck()); } public function testItHidesPassword() From 62ceded47ca4a581eefbe00c85387c6915a1f8e2 Mon Sep 17 00:00:00 2001 From: Ivan Kurnosov Date: Tue, 6 Sep 2022 09:23:46 +1200 Subject: [PATCH 0075/1170] Bug #42343 [Security] Fix valid remember-me token exposure to the second consequent request Close https://github.com/symfony/symfony/issues/42343 Fix https://github.com/symfony/symfony/pull/46760 --- .../Http/RememberMe/PersistentRememberMeHandler.php | 5 ++--- .../RememberMe/PersistentRememberMeHandlerTest.php | 13 +------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php b/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php index 8a5db07e5e8ab..8d9360355282a 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php +++ b/src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php @@ -75,7 +75,6 @@ public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInte if ($this->tokenVerifier) { $isTokenValid = $this->tokenVerifier->verifyToken($persistentToken, $tokenValue); - $tokenValue = $persistentToken->getTokenValue(); } else { $isTokenValid = hash_equals($persistentToken->getTokenValue(), $tokenValue); } @@ -96,9 +95,9 @@ public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInte $this->tokenVerifier->updateExistingToken($persistentToken, $tokenValue, $tokenLastUsed); } $this->tokenProvider->updateToken($series, $tokenValue, $tokenLastUsed); - } - $this->createCookie($rememberMeDetails->withValue($series.':'.$tokenValue)); + $this->createCookie($rememberMeDetails->withValue($series.':'.$tokenValue)); + } } /** diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentRememberMeHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentRememberMeHandlerTest.php index 770a1c634abe6..4e2c0980ba0aa 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentRememberMeHandlerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentRememberMeHandlerTest.php @@ -125,18 +125,7 @@ public function testConsumeRememberMeCookieValidByValidatorWithoutUpdate() $rememberMeDetails = new RememberMeDetails(InMemoryUser::class, 'wouter', 360, 'series1:oldTokenValue'); $handler->consumeRememberMeCookie($rememberMeDetails); - // assert that the cookie has been updated with a new base64 encoded token value - $this->assertTrue($this->request->attributes->has(ResponseListener::COOKIE_ATTR_NAME)); - - /** @var Cookie $cookie */ - $cookie = $this->request->attributes->get(ResponseListener::COOKIE_ATTR_NAME); - - $cookieParts = explode(':', base64_decode($cookie->getValue()), 4); - - $this->assertSame(InMemoryUser::class, $cookieParts[0]); // class - $this->assertSame(base64_encode('wouter'), $cookieParts[1]); // identifier - $this->assertSame('360', $cookieParts[2]); // expire - $this->assertSame('series1:tokenvalue', $cookieParts[3]); // value + $this->assertFalse($this->request->attributes->has(ResponseListener::COOKIE_ATTR_NAME)); } public function testConsumeRememberMeCookieInvalidToken() From cfb46edf0f1343b355551915e38056e852e2f495 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 16 Aug 2022 17:39:18 +0200 Subject: [PATCH 0076/1170] [Cache] make `Redis*Proxy` extend `Redis*` --- .appveyor.yml | 4 +- .github/patch-types.php | 9 +- .github/workflows/integration-tests.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- .php-cs-fixer.dist.php | 5 + .../Component/Cache/Adapter/RedisAdapter.php | 4 +- .../Cache/Adapter/RedisTagAwareAdapter.php | 4 +- .../Cache/Tests/RedisProxiesTest.php | 85 ++ .../Component/Cache/Traits/Redis5Proxy.php | 1234 +++++++++++++++++ .../Component/Cache/Traits/Redis6Proxy.php | 1184 ++++++++++++++++ .../Cache/Traits/RedisCluster5Proxy.php | 989 +++++++++++++ .../Cache/Traits/RedisCluster6Proxy.php | 994 +++++++++++++ .../Cache/Traits/RedisClusterNodeProxy.php | 11 +- .../Cache/Traits/RedisClusterProxy.php | 51 +- .../Component/Cache/Traits/RedisProxy.php | 54 +- .../Component/Cache/Traits/RedisTrait.php | 26 +- src/Symfony/Component/Cache/composer.json | 2 +- .../Storage/Handler/RedisSessionHandler.php | 11 +- .../Storage/Handler/SessionHandlerFactory.php | 4 - .../Component/HttpFoundation/composer.json | 3 + .../Component/Lock/Store/RedisStore.php | 20 +- .../Component/Lock/Store/StoreFactory.php | 4 - .../Tests/Store/AbstractRedisStoreTest.php | 9 +- .../Lock/Tests/Store/StoreFactoryTest.php | 4 - src/Symfony/Component/Lock/composer.json | 3 +- .../Component/Semaphore/Store/RedisStore.php | 17 +- .../Semaphore/Store/StoreFactory.php | 4 - .../Tests/Store/StoreFactoryTest.php | 4 - src/Symfony/Component/Semaphore/composer.json | 3 + 29 files changed, 4555 insertions(+), 191 deletions(-) create mode 100644 src/Symfony/Component/Cache/Tests/RedisProxiesTest.php create mode 100644 src/Symfony/Component/Cache/Traits/Redis5Proxy.php create mode 100644 src/Symfony/Component/Cache/Traits/Redis6Proxy.php create mode 100644 src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php create mode 100644 src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php diff --git a/.appveyor.yml b/.appveyor.yml index 67dcba9b569f6..383bbfdbb6493 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -18,8 +18,8 @@ install: - cd ext - appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.21-8.1-ts-vs16-x86.zip - 7z x php_apcu-5.1.21-8.1-ts-vs16-x86.zip -y >nul - - appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-5.3.7rc1-8.1-ts-vs16-x86.zip - - 7z x php_redis-5.3.7rc1-8.1-ts-vs16-x86.zip -y >nul + - appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-5.3.7-8.1-ts-vs16-x86.zip + - 7z x php_redis-5.3.7-8.1-ts-vs16-x86.zip -y >nul - cd .. - copy /Y php.ini-development php.ini-min - echo memory_limit=-1 >> php.ini-min diff --git a/.github/patch-types.php b/.github/patch-types.php index a5ff5b3293c15..7e3914053d8af 100644 --- a/.github/patch-types.php +++ b/.github/patch-types.php @@ -12,8 +12,15 @@ Symfony\Component\ErrorHandler\DebugClassLoader::enable(); foreach ($loader->getClassMap() as $class => $file) { + $file = realpath($file); + switch (true) { - case false !== strpos($file = realpath($file), '/vendor/'): + case false !== strpos($file, '/src/Symfony/Component/Cache/Traits/Redis'): + if (!str_ends_with($file, 'Proxy.php')) { + break; + } + // no break; + case false !== strpos($file, '/vendor/'): case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'): case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'): case false !== strpos($file, '/src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php'): diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 2d2ec7a1c271e..cd7421521a403 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -134,7 +134,7 @@ jobs: uses: shivammathur/setup-php@v2 with: coverage: "none" - extensions: "json,couchbase-3.2.2,memcached,mongodb-1.12.0,redis-5.3.4,rdkafka,xsl,ldap" + extensions: "json,couchbase-3.2.2,memcached,mongodb-1.12.0,redis,rdkafka,xsl,ldap" ini-values: date.timezone=Europe/Paris,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1 php-version: "${{ matrix.php }}" tools: pecl diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 81c1cf0fa7815..84b151581a3c3 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -21,7 +21,7 @@ jobs: name: Tests env: - extensions: amqp,apcu,igbinary,intl,mbstring,memcached,redis-5.3.4 + extensions: amqp,apcu,igbinary,intl,mbstring,memcached,redis strategy: matrix: diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 35a6317290581..db6a854c1f398 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -66,6 +66,11 @@ ->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php') // stop removing spaces on the end of the line in strings ->notPath('Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php') + // auto-generated proxies + ->notPath('Symfony/Component/Cache/Traits/Redis5Proxy.php') + ->notPath('Symfony/Component/Cache/Traits/Redis6Proxy.php') + ->notPath('Symfony/Component/Cache/Traits/RedisCluster5Proxy.php') + ->notPath('Symfony/Component/Cache/Traits/RedisCluster6Proxy.php') ) ->setCacheFile('.php-cs-fixer.cache') ; diff --git a/src/Symfony/Component/Cache/Adapter/RedisAdapter.php b/src/Symfony/Component/Cache/Adapter/RedisAdapter.php index 45bc340076dab..9cb8d58991d79 100644 --- a/src/Symfony/Component/Cache/Adapter/RedisAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/RedisAdapter.php @@ -12,15 +12,13 @@ namespace Symfony\Component\Cache\Adapter; use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Cache\Traits\RedisTrait; class RedisAdapter extends AbstractAdapter { use RedisTrait; - public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) + public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) { $this->init($redis, $namespace, $defaultLifetime, $marshaller); } diff --git a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php index 8f731dd61efb4..c18d9d4219737 100644 --- a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php @@ -22,8 +22,6 @@ use Symfony\Component\Cache\Marshaller\DeflateMarshaller; use Symfony\Component\Cache\Marshaller\MarshallerInterface; use Symfony\Component\Cache\Marshaller\TagAwareMarshaller; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Cache\Traits\RedisTrait; /** @@ -61,7 +59,7 @@ class RedisTagAwareAdapter extends AbstractTagAwareAdapter private string $redisEvictionPolicy; private string $namespace; - public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) + public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) { if ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof ClusterInterface && !$redis->getConnection() instanceof PredisCluster) { throw new InvalidArgumentException(sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, get_debug_type($redis->getConnection()))); diff --git a/src/Symfony/Component/Cache/Tests/RedisProxiesTest.php b/src/Symfony/Component/Cache/Tests/RedisProxiesTest.php new file mode 100644 index 0000000000000..d13dc1e3e0e14 --- /dev/null +++ b/src/Symfony/Component/Cache/Tests/RedisProxiesTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Traits; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarExporter\LazyProxyTrait; +use Symfony\Component\VarExporter\ProxyHelper; + +/** + * @requires extension redis + */ +class RedisProxiesTest extends TestCase +{ + /** + * @testWith ["Redis"] + * ["RedisCluster"] + */ + public function testRedis5Proxy($class) + { + $proxy = file_get_contents(\dirname(__DIR__)."/Traits/{$class}5Proxy.php"); + $proxy = substr($proxy, 0, 8 + strpos($proxy, "\n ];")); + $methods = []; + + foreach ((new \ReflectionClass($class))->getMethods() as $method) { + if ('reset' === $method->name || method_exists(LazyProxyTrait::class, $method->name)) { + continue; + } + $return = $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return '; + $methods[] = "\n ".ProxyHelper::exportSignature($method, false)."\n".<<lazyObjectReal->{$method->name}(...\\func_get_args()); + } + + EOPHP; + } + + uksort($methods, 'strnatcmp'); + $proxy .= implode('', $methods)."}\n"; + + $this->assertStringEqualsFile(\dirname(__DIR__)."/Traits/{$class}5Proxy.php", $proxy); + } + + /** + * @testWith ["Redis", "redis"] + * ["RedisCluster", "redis_cluster"] + */ + public function testRedis6Proxy($class, $stub) + { + $stub = file_get_contents("https://raw.githubusercontent.com/phpredis/phpredis/develop/{$stub}.stub.php"); + $stub = preg_replace('/^class /m', 'return; \0', $stub); + $stub = preg_replace('/^return; class ([a-zA-Z]++)/m', 'interface \1StubInterface', $stub, 1); + eval(substr($stub, 5)); + + $proxy = file_get_contents(\dirname(__DIR__)."/Traits/{$class}6Proxy.php"); + $proxy = substr($proxy, 0, 8 + strpos($proxy, "\n ];")); + $methods = []; + + foreach ((new \ReflectionClass($class.'StubInterface'))->getMethods() as $method) { + if ('reset' === $method->name || method_exists(LazyProxyTrait::class, $method->name)) { + continue; + } + $return = $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return '; + $methods[] = "\n ".ProxyHelper::exportSignature($method, false)."\n".<<lazyObjectReal->{$method->name}(...\\func_get_args()); + } + + EOPHP; + } + + uksort($methods, 'strnatcmp'); + $proxy .= implode('', $methods)."}\n"; + + $this->assertStringEqualsFile(\dirname(__DIR__)."/Traits/{$class}6Proxy.php", $proxy); + } +} diff --git a/src/Symfony/Component/Cache/Traits/Redis5Proxy.php b/src/Symfony/Component/Cache/Traits/Redis5Proxy.php new file mode 100644 index 0000000000000..f9235b04df63f --- /dev/null +++ b/src/Symfony/Component/Cache/Traits/Redis5Proxy.php @@ -0,0 +1,1234 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits; + +use Symfony\Component\VarExporter\LazyObjectInterface; +use Symfony\Component\VarExporter\LazyProxyTrait; +use Symfony\Contracts\Service\ResetInterface; + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +/** + * @internal + */ +class Redis5Proxy extends \Redis implements ResetInterface, LazyObjectInterface +{ + use LazyProxyTrait { + resetLazyObject as reset; + } + + private int $lazyObjectId; + private \Redis $lazyObjectReal; + + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'lazyObjectReal' => [self::class, 'lazyObjectReal', null], + "\0".self::class."\0lazyObjectReal" => [self::class, 'lazyObjectReal', null], + ]; + + public function __construct() + { + return $this->lazyObjectReal->__construct(...\func_get_args()); + } + + public function _prefix($key) + { + return $this->lazyObjectReal->_prefix(...\func_get_args()); + } + + public function _serialize($value) + { + return $this->lazyObjectReal->_serialize(...\func_get_args()); + } + + public function _unserialize($value) + { + return $this->lazyObjectReal->_unserialize(...\func_get_args()); + } + + public function _pack($value) + { + return $this->lazyObjectReal->_pack(...\func_get_args()); + } + + public function _unpack($value) + { + return $this->lazyObjectReal->_unpack(...\func_get_args()); + } + + public function _compress($value) + { + return $this->lazyObjectReal->_compress(...\func_get_args()); + } + + public function _uncompress($value) + { + return $this->lazyObjectReal->_uncompress(...\func_get_args()); + } + + public function acl($subcmd, ...$args) + { + return $this->lazyObjectReal->acl(...\func_get_args()); + } + + public function append($key, $value) + { + return $this->lazyObjectReal->append(...\func_get_args()); + } + + public function auth($auth) + { + return $this->lazyObjectReal->auth(...\func_get_args()); + } + + public function bgSave() + { + return $this->lazyObjectReal->bgSave(...\func_get_args()); + } + + public function bgrewriteaof() + { + return $this->lazyObjectReal->bgrewriteaof(...\func_get_args()); + } + + public function bitcount($key) + { + return $this->lazyObjectReal->bitcount(...\func_get_args()); + } + + public function bitop($operation, $ret_key, $key, ...$other_keys) + { + return $this->lazyObjectReal->bitop(...\func_get_args()); + } + + public function bitpos($key, $bit, $start = null, $end = null) + { + return $this->lazyObjectReal->bitpos(...\func_get_args()); + } + + public function blPop($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->blPop(...\func_get_args()); + } + + public function brPop($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->brPop(...\func_get_args()); + } + + public function brpoplpush($src, $dst, $timeout) + { + return $this->lazyObjectReal->brpoplpush(...\func_get_args()); + } + + public function bzPopMax($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->bzPopMax(...\func_get_args()); + } + + public function bzPopMin($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->bzPopMin(...\func_get_args()); + } + + public function clearLastError() + { + return $this->lazyObjectReal->clearLastError(...\func_get_args()); + } + + public function client($cmd, ...$args) + { + return $this->lazyObjectReal->client(...\func_get_args()); + } + + public function close() + { + return $this->lazyObjectReal->close(...\func_get_args()); + } + + public function command(...$args) + { + return $this->lazyObjectReal->command(...\func_get_args()); + } + + public function config($cmd, $key, $value = null) + { + return $this->lazyObjectReal->config(...\func_get_args()); + } + + public function connect($host, $port = null, $timeout = null, $retry_interval = null) + { + return $this->lazyObjectReal->connect(...\func_get_args()); + } + + public function dbSize() + { + return $this->lazyObjectReal->dbSize(...\func_get_args()); + } + + public function debug($key) + { + return $this->lazyObjectReal->debug(...\func_get_args()); + } + + public function decr($key) + { + return $this->lazyObjectReal->decr(...\func_get_args()); + } + + public function decrBy($key, $value) + { + return $this->lazyObjectReal->decrBy(...\func_get_args()); + } + + public function del($key, ...$other_keys) + { + return $this->lazyObjectReal->del(...\func_get_args()); + } + + public function discard() + { + return $this->lazyObjectReal->discard(...\func_get_args()); + } + + public function dump($key) + { + return $this->lazyObjectReal->dump(...\func_get_args()); + } + + public function echo($msg) + { + return $this->lazyObjectReal->echo(...\func_get_args()); + } + + public function eval($script, $args = null, $num_keys = null) + { + return $this->lazyObjectReal->eval(...\func_get_args()); + } + + public function evalsha($script_sha, $args = null, $num_keys = null) + { + return $this->lazyObjectReal->evalsha(...\func_get_args()); + } + + public function exec() + { + return $this->lazyObjectReal->exec(...\func_get_args()); + } + + public function exists($key, ...$other_keys) + { + return $this->lazyObjectReal->exists(...\func_get_args()); + } + + public function expire($key, $timeout) + { + return $this->lazyObjectReal->expire(...\func_get_args()); + } + + public function expireAt($key, $timestamp) + { + return $this->lazyObjectReal->expireAt(...\func_get_args()); + } + + public function flushAll($async = null) + { + return $this->lazyObjectReal->flushAll(...\func_get_args()); + } + + public function flushDB($async = null) + { + return $this->lazyObjectReal->flushDB(...\func_get_args()); + } + + public function geoadd($key, $lng, $lat, $member, ...$other_triples) + { + return $this->lazyObjectReal->geoadd(...\func_get_args()); + } + + public function geodist($key, $src, $dst, $unit = null) + { + return $this->lazyObjectReal->geodist(...\func_get_args()); + } + + public function geohash($key, $member, ...$other_members) + { + return $this->lazyObjectReal->geohash(...\func_get_args()); + } + + public function geopos($key, $member, ...$other_members) + { + return $this->lazyObjectReal->geopos(...\func_get_args()); + } + + public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadius(...\func_get_args()); + } + + public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadius_ro(...\func_get_args()); + } + + public function georadiusbymember($key, $member, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadiusbymember(...\func_get_args()); + } + + public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadiusbymember_ro(...\func_get_args()); + } + + public function get($key) + { + return $this->lazyObjectReal->get(...\func_get_args()); + } + + public function getAuth() + { + return $this->lazyObjectReal->getAuth(...\func_get_args()); + } + + public function getBit($key, $offset) + { + return $this->lazyObjectReal->getBit(...\func_get_args()); + } + + public function getDBNum() + { + return $this->lazyObjectReal->getDBNum(...\func_get_args()); + } + + public function getHost() + { + return $this->lazyObjectReal->getHost(...\func_get_args()); + } + + public function getLastError() + { + return $this->lazyObjectReal->getLastError(...\func_get_args()); + } + + public function getMode() + { + return $this->lazyObjectReal->getMode(...\func_get_args()); + } + + public function getOption($option) + { + return $this->lazyObjectReal->getOption(...\func_get_args()); + } + + public function getPersistentID() + { + return $this->lazyObjectReal->getPersistentID(...\func_get_args()); + } + + public function getPort() + { + return $this->lazyObjectReal->getPort(...\func_get_args()); + } + + public function getRange($key, $start, $end) + { + return $this->lazyObjectReal->getRange(...\func_get_args()); + } + + public function getReadTimeout() + { + return $this->lazyObjectReal->getReadTimeout(...\func_get_args()); + } + + public function getSet($key, $value) + { + return $this->lazyObjectReal->getSet(...\func_get_args()); + } + + public function getTimeout() + { + return $this->lazyObjectReal->getTimeout(...\func_get_args()); + } + + public function hDel($key, $member, ...$other_members) + { + return $this->lazyObjectReal->hDel(...\func_get_args()); + } + + public function hExists($key, $member) + { + return $this->lazyObjectReal->hExists(...\func_get_args()); + } + + public function hGet($key, $member) + { + return $this->lazyObjectReal->hGet(...\func_get_args()); + } + + public function hGetAll($key) + { + return $this->lazyObjectReal->hGetAll(...\func_get_args()); + } + + public function hIncrBy($key, $member, $value) + { + return $this->lazyObjectReal->hIncrBy(...\func_get_args()); + } + + public function hIncrByFloat($key, $member, $value) + { + return $this->lazyObjectReal->hIncrByFloat(...\func_get_args()); + } + + public function hKeys($key) + { + return $this->lazyObjectReal->hKeys(...\func_get_args()); + } + + public function hLen($key) + { + return $this->lazyObjectReal->hLen(...\func_get_args()); + } + + public function hMget($key, $keys) + { + return $this->lazyObjectReal->hMget(...\func_get_args()); + } + + public function hMset($key, $pairs) + { + return $this->lazyObjectReal->hMset(...\func_get_args()); + } + + public function hSet($key, $member, $value) + { + return $this->lazyObjectReal->hSet(...\func_get_args()); + } + + public function hSetNx($key, $member, $value) + { + return $this->lazyObjectReal->hSetNx(...\func_get_args()); + } + + public function hStrLen($key, $member) + { + return $this->lazyObjectReal->hStrLen(...\func_get_args()); + } + + public function hVals($key) + { + return $this->lazyObjectReal->hVals(...\func_get_args()); + } + + public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->hscan(...\func_get_args()); + } + + public function incr($key) + { + return $this->lazyObjectReal->incr(...\func_get_args()); + } + + public function incrBy($key, $value) + { + return $this->lazyObjectReal->incrBy(...\func_get_args()); + } + + public function incrByFloat($key, $value) + { + return $this->lazyObjectReal->incrByFloat(...\func_get_args()); + } + + public function info($option = null) + { + return $this->lazyObjectReal->info(...\func_get_args()); + } + + public function isConnected() + { + return $this->lazyObjectReal->isConnected(...\func_get_args()); + } + + public function keys($pattern) + { + return $this->lazyObjectReal->keys(...\func_get_args()); + } + + public function lInsert($key, $position, $pivot, $value) + { + return $this->lazyObjectReal->lInsert(...\func_get_args()); + } + + public function lLen($key) + { + return $this->lazyObjectReal->lLen(...\func_get_args()); + } + + public function lPop($key) + { + return $this->lazyObjectReal->lPop(...\func_get_args()); + } + + public function lPush($key, $value) + { + return $this->lazyObjectReal->lPush(...\func_get_args()); + } + + public function lPushx($key, $value) + { + return $this->lazyObjectReal->lPushx(...\func_get_args()); + } + + public function lSet($key, $index, $value) + { + return $this->lazyObjectReal->lSet(...\func_get_args()); + } + + public function lastSave() + { + return $this->lazyObjectReal->lastSave(...\func_get_args()); + } + + public function lindex($key, $index) + { + return $this->lazyObjectReal->lindex(...\func_get_args()); + } + + public function lrange($key, $start, $end) + { + return $this->lazyObjectReal->lrange(...\func_get_args()); + } + + public function lrem($key, $value, $count) + { + return $this->lazyObjectReal->lrem(...\func_get_args()); + } + + public function ltrim($key, $start, $stop) + { + return $this->lazyObjectReal->ltrim(...\func_get_args()); + } + + public function mget($keys) + { + return $this->lazyObjectReal->mget(...\func_get_args()); + } + + public function migrate($host, $port, $key, $db, $timeout, $copy = null, $replace = null) + { + return $this->lazyObjectReal->migrate(...\func_get_args()); + } + + public function move($key, $dbindex) + { + return $this->lazyObjectReal->move(...\func_get_args()); + } + + public function mset($pairs) + { + return $this->lazyObjectReal->mset(...\func_get_args()); + } + + public function msetnx($pairs) + { + return $this->lazyObjectReal->msetnx(...\func_get_args()); + } + + public function multi($mode = null) + { + return $this->lazyObjectReal->multi(...\func_get_args()); + } + + public function object($field, $key) + { + return $this->lazyObjectReal->object(...\func_get_args()); + } + + public function pconnect($host, $port = null, $timeout = null) + { + return $this->lazyObjectReal->pconnect(...\func_get_args()); + } + + public function persist($key) + { + return $this->lazyObjectReal->persist(...\func_get_args()); + } + + public function pexpire($key, $timestamp) + { + return $this->lazyObjectReal->pexpire(...\func_get_args()); + } + + public function pexpireAt($key, $timestamp) + { + return $this->lazyObjectReal->pexpireAt(...\func_get_args()); + } + + public function pfadd($key, $elements) + { + return $this->lazyObjectReal->pfadd(...\func_get_args()); + } + + public function pfcount($key) + { + return $this->lazyObjectReal->pfcount(...\func_get_args()); + } + + public function pfmerge($dstkey, $keys) + { + return $this->lazyObjectReal->pfmerge(...\func_get_args()); + } + + public function ping() + { + return $this->lazyObjectReal->ping(...\func_get_args()); + } + + public function pipeline() + { + return $this->lazyObjectReal->pipeline(...\func_get_args()); + } + + public function psetex($key, $expire, $value) + { + return $this->lazyObjectReal->psetex(...\func_get_args()); + } + + public function psubscribe($patterns, $callback) + { + return $this->lazyObjectReal->psubscribe(...\func_get_args()); + } + + public function pttl($key) + { + return $this->lazyObjectReal->pttl(...\func_get_args()); + } + + public function publish($channel, $message) + { + return $this->lazyObjectReal->publish(...\func_get_args()); + } + + public function pubsub($cmd, ...$args) + { + return $this->lazyObjectReal->pubsub(...\func_get_args()); + } + + public function punsubscribe($pattern, ...$other_patterns) + { + return $this->lazyObjectReal->punsubscribe(...\func_get_args()); + } + + public function rPop($key) + { + return $this->lazyObjectReal->rPop(...\func_get_args()); + } + + public function rPush($key, $value) + { + return $this->lazyObjectReal->rPush(...\func_get_args()); + } + + public function rPushx($key, $value) + { + return $this->lazyObjectReal->rPushx(...\func_get_args()); + } + + public function randomKey() + { + return $this->lazyObjectReal->randomKey(...\func_get_args()); + } + + public function rawcommand($cmd, ...$args) + { + return $this->lazyObjectReal->rawcommand(...\func_get_args()); + } + + public function rename($key, $newkey) + { + return $this->lazyObjectReal->rename(...\func_get_args()); + } + + public function renameNx($key, $newkey) + { + return $this->lazyObjectReal->renameNx(...\func_get_args()); + } + + public function restore($ttl, $key, $value) + { + return $this->lazyObjectReal->restore(...\func_get_args()); + } + + public function role() + { + return $this->lazyObjectReal->role(...\func_get_args()); + } + + public function rpoplpush($src, $dst) + { + return $this->lazyObjectReal->rpoplpush(...\func_get_args()); + } + + public function sAdd($key, $value) + { + return $this->lazyObjectReal->sAdd(...\func_get_args()); + } + + public function sAddArray($key, $options) + { + return $this->lazyObjectReal->sAddArray(...\func_get_args()); + } + + public function sDiff($key, ...$other_keys) + { + return $this->lazyObjectReal->sDiff(...\func_get_args()); + } + + public function sDiffStore($dst, $key, ...$other_keys) + { + return $this->lazyObjectReal->sDiffStore(...\func_get_args()); + } + + public function sInter($key, ...$other_keys) + { + return $this->lazyObjectReal->sInter(...\func_get_args()); + } + + public function sInterStore($dst, $key, ...$other_keys) + { + return $this->lazyObjectReal->sInterStore(...\func_get_args()); + } + + public function sMembers($key) + { + return $this->lazyObjectReal->sMembers(...\func_get_args()); + } + + public function sMisMember($key, $member, ...$other_members) + { + return $this->lazyObjectReal->sMisMember(...\func_get_args()); + } + + public function sMove($src, $dst, $value) + { + return $this->lazyObjectReal->sMove(...\func_get_args()); + } + + public function sPop($key) + { + return $this->lazyObjectReal->sPop(...\func_get_args()); + } + + public function sRandMember($key, $count = null) + { + return $this->lazyObjectReal->sRandMember(...\func_get_args()); + } + + public function sUnion($key, ...$other_keys) + { + return $this->lazyObjectReal->sUnion(...\func_get_args()); + } + + public function sUnionStore($dst, $key, ...$other_keys) + { + return $this->lazyObjectReal->sUnionStore(...\func_get_args()); + } + + public function save() + { + return $this->lazyObjectReal->save(...\func_get_args()); + } + + public function scan(&$i_iterator, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->scan(...\func_get_args()); + } + + public function scard($key) + { + return $this->lazyObjectReal->scard(...\func_get_args()); + } + + public function script($cmd, ...$args) + { + return $this->lazyObjectReal->script(...\func_get_args()); + } + + public function select($dbindex) + { + return $this->lazyObjectReal->select(...\func_get_args()); + } + + public function set($key, $value, $opts = null) + { + return $this->lazyObjectReal->set(...\func_get_args()); + } + + public function setBit($key, $offset, $value) + { + return $this->lazyObjectReal->setBit(...\func_get_args()); + } + + public function setOption($option, $value) + { + return $this->lazyObjectReal->setOption(...\func_get_args()); + } + + public function setRange($key, $offset, $value) + { + return $this->lazyObjectReal->setRange(...\func_get_args()); + } + + public function setex($key, $expire, $value) + { + return $this->lazyObjectReal->setex(...\func_get_args()); + } + + public function setnx($key, $value) + { + return $this->lazyObjectReal->setnx(...\func_get_args()); + } + + public function sismember($key, $value) + { + return $this->lazyObjectReal->sismember(...\func_get_args()); + } + + public function slaveof($host = null, $port = null) + { + return $this->lazyObjectReal->slaveof(...\func_get_args()); + } + + public function slowlog($arg, $option = null) + { + return $this->lazyObjectReal->slowlog(...\func_get_args()); + } + + public function sort($key, $options = null) + { + return $this->lazyObjectReal->sort(...\func_get_args()); + } + + public function sortAsc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) + { + return $this->lazyObjectReal->sortAsc(...\func_get_args()); + } + + public function sortAscAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) + { + return $this->lazyObjectReal->sortAscAlpha(...\func_get_args()); + } + + public function sortDesc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) + { + return $this->lazyObjectReal->sortDesc(...\func_get_args()); + } + + public function sortDescAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) + { + return $this->lazyObjectReal->sortDescAlpha(...\func_get_args()); + } + + public function srem($key, $member, ...$other_members) + { + return $this->lazyObjectReal->srem(...\func_get_args()); + } + + public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->sscan(...\func_get_args()); + } + + public function strlen($key) + { + return $this->lazyObjectReal->strlen(...\func_get_args()); + } + + public function subscribe($channels, $callback) + { + return $this->lazyObjectReal->subscribe(...\func_get_args()); + } + + public function swapdb($srcdb, $dstdb) + { + return $this->lazyObjectReal->swapdb(...\func_get_args()); + } + + public function time() + { + return $this->lazyObjectReal->time(...\func_get_args()); + } + + public function ttl($key) + { + return $this->lazyObjectReal->ttl(...\func_get_args()); + } + + public function type($key) + { + return $this->lazyObjectReal->type(...\func_get_args()); + } + + public function unlink($key, ...$other_keys) + { + return $this->lazyObjectReal->unlink(...\func_get_args()); + } + + public function unsubscribe($channel, ...$other_channels) + { + return $this->lazyObjectReal->unsubscribe(...\func_get_args()); + } + + public function unwatch() + { + return $this->lazyObjectReal->unwatch(...\func_get_args()); + } + + public function wait($numslaves, $timeout) + { + return $this->lazyObjectReal->wait(...\func_get_args()); + } + + public function watch($key, ...$other_keys) + { + return $this->lazyObjectReal->watch(...\func_get_args()); + } + + public function xack($str_key, $str_group, $arr_ids) + { + return $this->lazyObjectReal->xack(...\func_get_args()); + } + + public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) + { + return $this->lazyObjectReal->xadd(...\func_get_args()); + } + + public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) + { + return $this->lazyObjectReal->xclaim(...\func_get_args()); + } + + public function xdel($str_key, $arr_ids) + { + return $this->lazyObjectReal->xdel(...\func_get_args()); + } + + public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) + { + return $this->lazyObjectReal->xgroup(...\func_get_args()); + } + + public function xinfo($str_cmd, $str_key = null, $str_group = null) + { + return $this->lazyObjectReal->xinfo(...\func_get_args()); + } + + public function xlen($key) + { + return $this->lazyObjectReal->xlen(...\func_get_args()); + } + + public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) + { + return $this->lazyObjectReal->xpending(...\func_get_args()); + } + + public function xrange($str_key, $str_start, $str_end, $i_count = null) + { + return $this->lazyObjectReal->xrange(...\func_get_args()); + } + + public function xread($arr_streams, $i_count = null, $i_block = null) + { + return $this->lazyObjectReal->xread(...\func_get_args()); + } + + public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) + { + return $this->lazyObjectReal->xreadgroup(...\func_get_args()); + } + + public function xrevrange($str_key, $str_start, $str_end, $i_count = null) + { + return $this->lazyObjectReal->xrevrange(...\func_get_args()); + } + + public function xtrim($str_key, $i_maxlen, $boo_approximate = null) + { + return $this->lazyObjectReal->xtrim(...\func_get_args()); + } + + public function zAdd($key, $score, $value, ...$extra_args) + { + return $this->lazyObjectReal->zAdd(...\func_get_args()); + } + + public function zCard($key) + { + return $this->lazyObjectReal->zCard(...\func_get_args()); + } + + public function zCount($key, $min, $max) + { + return $this->lazyObjectReal->zCount(...\func_get_args()); + } + + public function zIncrBy($key, $value, $member) + { + return $this->lazyObjectReal->zIncrBy(...\func_get_args()); + } + + public function zLexCount($key, $min, $max) + { + return $this->lazyObjectReal->zLexCount(...\func_get_args()); + } + + public function zPopMax($key) + { + return $this->lazyObjectReal->zPopMax(...\func_get_args()); + } + + public function zPopMin($key) + { + return $this->lazyObjectReal->zPopMin(...\func_get_args()); + } + + public function zRange($key, $start, $end, $scores = null) + { + return $this->lazyObjectReal->zRange(...\func_get_args()); + } + + public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) + { + return $this->lazyObjectReal->zRangeByLex(...\func_get_args()); + } + + public function zRangeByScore($key, $start, $end, $options = null) + { + return $this->lazyObjectReal->zRangeByScore(...\func_get_args()); + } + + public function zRank($key, $member) + { + return $this->lazyObjectReal->zRank(...\func_get_args()); + } + + public function zRem($key, $member, ...$other_members) + { + return $this->lazyObjectReal->zRem(...\func_get_args()); + } + + public function zRemRangeByLex($key, $min, $max) + { + return $this->lazyObjectReal->zRemRangeByLex(...\func_get_args()); + } + + public function zRemRangeByRank($key, $start, $end) + { + return $this->lazyObjectReal->zRemRangeByRank(...\func_get_args()); + } + + public function zRemRangeByScore($key, $min, $max) + { + return $this->lazyObjectReal->zRemRangeByScore(...\func_get_args()); + } + + public function zRevRange($key, $start, $end, $scores = null) + { + return $this->lazyObjectReal->zRevRange(...\func_get_args()); + } + + public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) + { + return $this->lazyObjectReal->zRevRangeByLex(...\func_get_args()); + } + + public function zRevRangeByScore($key, $start, $end, $options = null) + { + return $this->lazyObjectReal->zRevRangeByScore(...\func_get_args()); + } + + public function zRevRank($key, $member) + { + return $this->lazyObjectReal->zRevRank(...\func_get_args()); + } + + public function zScore($key, $member) + { + return $this->lazyObjectReal->zScore(...\func_get_args()); + } + + public function zinterstore($key, $keys, $weights = null, $aggregate = null) + { + return $this->lazyObjectReal->zinterstore(...\func_get_args()); + } + + public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->zscan(...\func_get_args()); + } + + public function zunionstore($key, $keys, $weights = null, $aggregate = null) + { + return $this->lazyObjectReal->zunionstore(...\func_get_args()); + } + + public function delete($key, ...$other_keys) + { + return $this->lazyObjectReal->delete(...\func_get_args()); + } + + public function evaluate($script, $args = null, $num_keys = null) + { + return $this->lazyObjectReal->evaluate(...\func_get_args()); + } + + public function evaluateSha($script_sha, $args = null, $num_keys = null) + { + return $this->lazyObjectReal->evaluateSha(...\func_get_args()); + } + + public function getKeys($pattern) + { + return $this->lazyObjectReal->getKeys(...\func_get_args()); + } + + public function getMultiple($keys) + { + return $this->lazyObjectReal->getMultiple(...\func_get_args()); + } + + public function lGet($key, $index) + { + return $this->lazyObjectReal->lGet(...\func_get_args()); + } + + public function lGetRange($key, $start, $end) + { + return $this->lazyObjectReal->lGetRange(...\func_get_args()); + } + + public function lRemove($key, $value, $count) + { + return $this->lazyObjectReal->lRemove(...\func_get_args()); + } + + public function lSize($key) + { + return $this->lazyObjectReal->lSize(...\func_get_args()); + } + + public function listTrim($key, $start, $stop) + { + return $this->lazyObjectReal->listTrim(...\func_get_args()); + } + + public function open($host, $port = null, $timeout = null, $retry_interval = null) + { + return $this->lazyObjectReal->open(...\func_get_args()); + } + + public function popen($host, $port = null, $timeout = null) + { + return $this->lazyObjectReal->popen(...\func_get_args()); + } + + public function renameKey($key, $newkey) + { + return $this->lazyObjectReal->renameKey(...\func_get_args()); + } + + public function sContains($key, $value) + { + return $this->lazyObjectReal->sContains(...\func_get_args()); + } + + public function sGetMembers($key) + { + return $this->lazyObjectReal->sGetMembers(...\func_get_args()); + } + + public function sRemove($key, $member, ...$other_members) + { + return $this->lazyObjectReal->sRemove(...\func_get_args()); + } + + public function sSize($key) + { + return $this->lazyObjectReal->sSize(...\func_get_args()); + } + + public function sendEcho($msg) + { + return $this->lazyObjectReal->sendEcho(...\func_get_args()); + } + + public function setTimeout($key, $timeout) + { + return $this->lazyObjectReal->setTimeout(...\func_get_args()); + } + + public function substr($key, $start, $end) + { + return $this->lazyObjectReal->substr(...\func_get_args()); + } + + public function zDelete($key, $member, ...$other_members) + { + return $this->lazyObjectReal->zDelete(...\func_get_args()); + } + + public function zDeleteRangeByRank($key, $min, $max) + { + return $this->lazyObjectReal->zDeleteRangeByRank(...\func_get_args()); + } + + public function zDeleteRangeByScore($key, $min, $max) + { + return $this->lazyObjectReal->zDeleteRangeByScore(...\func_get_args()); + } + + public function zInter($key, $keys, $weights = null, $aggregate = null) + { + return $this->lazyObjectReal->zInter(...\func_get_args()); + } + + public function zRemove($key, $member, ...$other_members) + { + return $this->lazyObjectReal->zRemove(...\func_get_args()); + } + + public function zRemoveRangeByScore($key, $min, $max) + { + return $this->lazyObjectReal->zRemoveRangeByScore(...\func_get_args()); + } + + public function zReverseRange($key, $start, $end, $scores = null) + { + return $this->lazyObjectReal->zReverseRange(...\func_get_args()); + } + + public function zSize($key) + { + return $this->lazyObjectReal->zSize(...\func_get_args()); + } + + public function zUnion($key, $keys, $weights = null, $aggregate = null) + { + return $this->lazyObjectReal->zUnion(...\func_get_args()); + } +} diff --git a/src/Symfony/Component/Cache/Traits/Redis6Proxy.php b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php new file mode 100644 index 0000000000000..010468844b85b --- /dev/null +++ b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php @@ -0,0 +1,1184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits; + +use Symfony\Component\VarExporter\LazyObjectInterface; +use Symfony\Component\VarExporter\LazyProxyTrait; +use Symfony\Contracts\Service\ResetInterface; + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +/** + * @internal + */ +class Redis6Proxy extends \Redis implements ResetInterface, LazyObjectInterface +{ + use LazyProxyTrait { + resetLazyObject as reset; + } + + private int $lazyObjectId; + private \Redis $lazyObjectReal; + + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'lazyObjectReal' => [self::class, 'lazyObjectReal', null], + "\0".self::class."\0lazyObjectReal" => [self::class, 'lazyObjectReal', null], + ]; + + public function __construct($options = null) + { + return $this->lazyObjectReal->__construct(...\func_get_args()); + } + + public function _compress($value): string + { + return $this->lazyObjectReal->_compress(...\func_get_args()); + } + + public function _pack($value): string + { + return $this->lazyObjectReal->_pack(...\func_get_args()); + } + + public function _prefix($key): string + { + return $this->lazyObjectReal->_prefix(...\func_get_args()); + } + + public function _serialize($value): string + { + return $this->lazyObjectReal->_serialize(...\func_get_args()); + } + + public function _uncompress($value): string + { + return $this->lazyObjectReal->_uncompress(...\func_get_args()); + } + + public function _unpack($value): mixed + { + return $this->lazyObjectReal->_unpack(...\func_get_args()); + } + + public function _unserialize($value): mixed + { + return $this->lazyObjectReal->_unserialize(...\func_get_args()); + } + + public function acl($subcmd, ...$args) + { + return $this->lazyObjectReal->acl(...\func_get_args()); + } + + public function append($key, $value) + { + return $this->lazyObjectReal->append(...\func_get_args()); + } + + public function auth(#[\SensitiveParameter] $credentials): bool + { + return $this->lazyObjectReal->auth(...\func_get_args()); + } + + public function bgSave(): bool + { + return $this->lazyObjectReal->bgSave(...\func_get_args()); + } + + public function bgrewriteaof(): bool + { + return $this->lazyObjectReal->bgrewriteaof(...\func_get_args()); + } + + public function bitcount($key, $start = 0, $end = -1) + { + return $this->lazyObjectReal->bitcount(...\func_get_args()); + } + + public function bitop($operation, $deskey, $srckey, ...$other_keys): int + { + return $this->lazyObjectReal->bitop(...\func_get_args()); + } + + public function bitpos($key, $bit, $start = 0, $end = -1) + { + return $this->lazyObjectReal->bitpos(...\func_get_args()); + } + + public function blPop($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->blPop(...\func_get_args()); + } + + public function brPop($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->brPop(...\func_get_args()); + } + + public function brpoplpush($src, $dst, $timeout): string + { + return $this->lazyObjectReal->brpoplpush(...\func_get_args()); + } + + public function bzPopMax($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->bzPopMax(...\func_get_args()); + } + + public function bzPopMin($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->bzPopMin(...\func_get_args()); + } + + public function clearLastError(): bool + { + return $this->lazyObjectReal->clearLastError(...\func_get_args()); + } + + public function client($opt, $arg = null): mixed + { + return $this->lazyObjectReal->client(...\func_get_args()); + } + + public function close(): bool + { + return $this->lazyObjectReal->close(...\func_get_args()); + } + + public function command($opt, $arg): mixed + { + return $this->lazyObjectReal->command(...\func_get_args()); + } + + public function config($operation, $key, $value = null): mixed + { + return $this->lazyObjectReal->config(...\func_get_args()); + } + + public function connect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + { + return $this->lazyObjectReal->connect(...\func_get_args()); + } + + public function copy($src, $dst, $options = null): bool + { + return $this->lazyObjectReal->copy(...\func_get_args()); + } + + public function dbSize(): int + { + return $this->lazyObjectReal->dbSize(...\func_get_args()); + } + + public function debug($key): string + { + return $this->lazyObjectReal->debug(...\func_get_args()); + } + + public function decr($key) + { + return $this->lazyObjectReal->decr(...\func_get_args()); + } + + public function decrBy($key, $value) + { + return $this->lazyObjectReal->decrBy(...\func_get_args()); + } + + public function del($key, ...$other_keys) + { + return $this->lazyObjectReal->del(...\func_get_args()); + } + + public function delete($key, ...$other_keys) + { + return $this->lazyObjectReal->delete(...\func_get_args()); + } + + public function discard(): bool + { + return $this->lazyObjectReal->discard(...\func_get_args()); + } + + public function dump($key): string + { + return $this->lazyObjectReal->dump(...\func_get_args()); + } + + public function echo($str) + { + return $this->lazyObjectReal->echo(...\func_get_args()); + } + + public function eval($script, $keys = null, $num_keys = 0): mixed + { + return $this->lazyObjectReal->eval(...\func_get_args()); + } + + public function evalsha($sha1, $keys = null, $num_keys = 0): mixed + { + return $this->lazyObjectReal->evalsha(...\func_get_args()); + } + + public function exec(): array + { + return $this->lazyObjectReal->exec(...\func_get_args()); + } + + public function exists($key) + { + return $this->lazyObjectReal->exists(...\func_get_args()); + } + + public function expire($key, $timeout): bool + { + return $this->lazyObjectReal->expire(...\func_get_args()); + } + + public function expireAt($key, $timestamp): bool + { + return $this->lazyObjectReal->expireAt(...\func_get_args()); + } + + public function failover($to = null, $abort = false, $timeout = 0): bool + { + return $this->lazyObjectReal->failover(...\func_get_args()); + } + + public function flushAll($sync = null): bool + { + return $this->lazyObjectReal->flushAll(...\func_get_args()); + } + + public function flushDB($sync = null): bool + { + return $this->lazyObjectReal->flushDB(...\func_get_args()); + } + + public function geoadd($key, $lng, $lat, $member, ...$other_triples): int + { + return $this->lazyObjectReal->geoadd(...\func_get_args()); + } + + public function geodist($key, $src, $dst, $unit = null): array + { + return $this->lazyObjectReal->geodist(...\func_get_args()); + } + + public function geohash($key, $member, ...$other_members): array + { + return $this->lazyObjectReal->geohash(...\func_get_args()); + } + + public function geopos($key, $member, ...$other_members): array + { + return $this->lazyObjectReal->geopos(...\func_get_args()); + } + + public function georadius($key, $lng, $lat, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadius(...\func_get_args()); + } + + public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadius_ro(...\func_get_args()); + } + + public function georadiusbymember($key, $member, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadiusbymember(...\func_get_args()); + } + + public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadiusbymember_ro(...\func_get_args()); + } + + public function geosearch($key, $position, $shape, $unit, $options = []): array + { + return $this->lazyObjectReal->geosearch(...\func_get_args()); + } + + public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): array + { + return $this->lazyObjectReal->geosearchstore(...\func_get_args()); + } + + public function get($key) + { + return $this->lazyObjectReal->get(...\func_get_args()); + } + + public function getAuth(): mixed + { + return $this->lazyObjectReal->getAuth(...\func_get_args()); + } + + public function getBit($key, $idx) + { + return $this->lazyObjectReal->getBit(...\func_get_args()); + } + + public function getEx($key, $options = []): bool|string + { + return $this->lazyObjectReal->getEx(...\func_get_args()); + } + + public function getDBNum(): int + { + return $this->lazyObjectReal->getDBNum(...\func_get_args()); + } + + public function getDel($key): bool|string + { + return $this->lazyObjectReal->getDel(...\func_get_args()); + } + + public function getHost(): string + { + return $this->lazyObjectReal->getHost(...\func_get_args()); + } + + public function getLastError(): ?string + { + return $this->lazyObjectReal->getLastError(...\func_get_args()); + } + + public function getMode(): int + { + return $this->lazyObjectReal->getMode(...\func_get_args()); + } + + public function getOption($option): mixed + { + return $this->lazyObjectReal->getOption(...\func_get_args()); + } + + public function getPersistentID(): ?string + { + return $this->lazyObjectReal->getPersistentID(...\func_get_args()); + } + + public function getPort(): int + { + return $this->lazyObjectReal->getPort(...\func_get_args()); + } + + public function getRange($key, $start, $end) + { + return $this->lazyObjectReal->getRange(...\func_get_args()); + } + + public function getReadTimeout(): int + { + return $this->lazyObjectReal->getReadTimeout(...\func_get_args()); + } + + public function getset($key, $value) + { + return $this->lazyObjectReal->getset(...\func_get_args()); + } + + public function getTimeout(): int + { + return $this->lazyObjectReal->getTimeout(...\func_get_args()); + } + + public function hDel($key, $member, ...$other_members): int + { + return $this->lazyObjectReal->hDel(...\func_get_args()); + } + + public function hExists($key, $member): bool + { + return $this->lazyObjectReal->hExists(...\func_get_args()); + } + + public function hGet($key, $member): string + { + return $this->lazyObjectReal->hGet(...\func_get_args()); + } + + public function hGetAll($key): array + { + return $this->lazyObjectReal->hGetAll(...\func_get_args()); + } + + public function hIncrBy($key, $member, $value): int + { + return $this->lazyObjectReal->hIncrBy(...\func_get_args()); + } + + public function hIncrByFloat($key, $member, $value): float + { + return $this->lazyObjectReal->hIncrByFloat(...\func_get_args()); + } + + public function hKeys($key): array + { + return $this->lazyObjectReal->hKeys(...\func_get_args()); + } + + public function hLen($key): int + { + return $this->lazyObjectReal->hLen(...\func_get_args()); + } + + public function hMget($key, $keys): array + { + return $this->lazyObjectReal->hMget(...\func_get_args()); + } + + public function hMset($key, $keyvals): bool + { + return $this->lazyObjectReal->hMset(...\func_get_args()); + } + + public function hRandField($key, $options = null): array|string + { + return $this->lazyObjectReal->hRandField(...\func_get_args()); + } + + public function hSet($key, $member, $value): int + { + return $this->lazyObjectReal->hSet(...\func_get_args()); + } + + public function hSetNx($key, $member, $value): int + { + return $this->lazyObjectReal->hSetNx(...\func_get_args()); + } + + public function hStrLen($key, $member): int + { + return $this->lazyObjectReal->hStrLen(...\func_get_args()); + } + + public function hVals($key): array + { + return $this->lazyObjectReal->hVals(...\func_get_args()); + } + + public function hscan($key, &$iterator, $pattern = null, $count = 0): array|bool + { + return $this->lazyObjectReal->hscan(...\func_get_args()); + } + + public function incr($key) + { + return $this->lazyObjectReal->incr(...\func_get_args()); + } + + public function incrBy($key, $value) + { + return $this->lazyObjectReal->incrBy(...\func_get_args()); + } + + public function incrByFloat($key, $value) + { + return $this->lazyObjectReal->incrByFloat(...\func_get_args()); + } + + public function info($opt = null): array + { + return $this->lazyObjectReal->info(...\func_get_args()); + } + + public function isConnected(): bool + { + return $this->lazyObjectReal->isConnected(...\func_get_args()); + } + + public function keys($pattern) + { + return $this->lazyObjectReal->keys(...\func_get_args()); + } + + public function lInsert($key, $pos, $pivot, $value) + { + return $this->lazyObjectReal->lInsert(...\func_get_args()); + } + + public function lLen($key): int + { + return $this->lazyObjectReal->lLen(...\func_get_args()); + } + + public function lMove($src, $dst, $wherefrom, $whereto): string + { + return $this->lazyObjectReal->lMove(...\func_get_args()); + } + + public function lPop($key, $count = 0): array|bool|string + { + return $this->lazyObjectReal->lPop(...\func_get_args()); + } + + public function lPos($key, $value, $options = null): array|bool|int + { + return $this->lazyObjectReal->lPos(...\func_get_args()); + } + + public function lPush($key, ...$elements) + { + return $this->lazyObjectReal->lPush(...\func_get_args()); + } + + public function rPush($key, ...$elements) + { + return $this->lazyObjectReal->rPush(...\func_get_args()); + } + + public function lPushx($key, $value) + { + return $this->lazyObjectReal->lPushx(...\func_get_args()); + } + + public function rPushx($key, $value) + { + return $this->lazyObjectReal->rPushx(...\func_get_args()); + } + + public function lSet($key, $index, $value): bool + { + return $this->lazyObjectReal->lSet(...\func_get_args()); + } + + public function lastSave(): int + { + return $this->lazyObjectReal->lastSave(...\func_get_args()); + } + + public function lindex($key, $index): string + { + return $this->lazyObjectReal->lindex(...\func_get_args()); + } + + public function lrange($key, $start, $end): array + { + return $this->lazyObjectReal->lrange(...\func_get_args()); + } + + public function lrem($key, $value, $count = 0): bool + { + return $this->lazyObjectReal->lrem(...\func_get_args()); + } + + public function ltrim($key, $start, $end): bool + { + return $this->lazyObjectReal->ltrim(...\func_get_args()); + } + + public function mget($keys) + { + return $this->lazyObjectReal->mget(...\func_get_args()); + } + + public function migrate($host, $port, $key, $dst, $timeout, $copy = false, $replace = false): bool + { + return $this->lazyObjectReal->migrate(...\func_get_args()); + } + + public function move($key, $index): bool + { + return $this->lazyObjectReal->move(...\func_get_args()); + } + + public function mset($key_values): bool + { + return $this->lazyObjectReal->mset(...\func_get_args()); + } + + public function msetnx($key_values): int + { + return $this->lazyObjectReal->msetnx(...\func_get_args()); + } + + public function multi($value = \Redis::MULTI): \Redis|bool + { + return $this->lazyObjectReal->multi(...\func_get_args()); + } + + public function object($subcommand, $key): int|string + { + return $this->lazyObjectReal->object(...\func_get_args()); + } + + public function open($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + { + return $this->lazyObjectReal->open(...\func_get_args()); + } + + public function pconnect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + { + return $this->lazyObjectReal->pconnect(...\func_get_args()); + } + + public function persist($key): bool + { + return $this->lazyObjectReal->persist(...\func_get_args()); + } + + public function pexpire($key, $timeout): bool + { + return $this->lazyObjectReal->pexpire(...\func_get_args()); + } + + public function pexpireAt($key, $timestamp): bool + { + return $this->lazyObjectReal->pexpireAt(...\func_get_args()); + } + + public function pfadd($key, $elements): int + { + return $this->lazyObjectReal->pfadd(...\func_get_args()); + } + + public function pfcount($key): int + { + return $this->lazyObjectReal->pfcount(...\func_get_args()); + } + + public function pfmerge($dst, $keys): bool + { + return $this->lazyObjectReal->pfmerge(...\func_get_args()); + } + + public function ping($key = null) + { + return $this->lazyObjectReal->ping(...\func_get_args()); + } + + public function pipeline(): \Redis|bool + { + return $this->lazyObjectReal->pipeline(...\func_get_args()); + } + + public function popen($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, $context = null): bool + { + return $this->lazyObjectReal->popen(...\func_get_args()); + } + + public function psetex($key, $expire, $value) + { + return $this->lazyObjectReal->psetex(...\func_get_args()); + } + + public function psubscribe($patterns, $cb): bool + { + return $this->lazyObjectReal->psubscribe(...\func_get_args()); + } + + public function pttl($key): int + { + return $this->lazyObjectReal->pttl(...\func_get_args()); + } + + public function publish($channel, $message): int + { + return $this->lazyObjectReal->publish(...\func_get_args()); + } + + public function pubsub($command, $arg = null): mixed + { + return $this->lazyObjectReal->pubsub(...\func_get_args()); + } + + public function punsubscribe($patterns): array|bool + { + return $this->lazyObjectReal->punsubscribe(...\func_get_args()); + } + + public function rPop($key, $count = 0): array|bool|string + { + return $this->lazyObjectReal->rPop(...\func_get_args()); + } + + public function randomKey() + { + return $this->lazyObjectReal->randomKey(...\func_get_args()); + } + + public function rawcommand($command, ...$args): mixed + { + return $this->lazyObjectReal->rawcommand(...\func_get_args()); + } + + public function rename($key_src, $key_dst) + { + return $this->lazyObjectReal->rename(...\func_get_args()); + } + + public function renameNx($key_src, $key_dst) + { + return $this->lazyObjectReal->renameNx(...\func_get_args()); + } + + public function restore($key, $timeout, $value): bool + { + return $this->lazyObjectReal->restore(...\func_get_args()); + } + + public function role(): mixed + { + return $this->lazyObjectReal->role(...\func_get_args()); + } + + public function rpoplpush($src, $dst): string + { + return $this->lazyObjectReal->rpoplpush(...\func_get_args()); + } + + public function sAdd($key, $value, ...$other_values): int + { + return $this->lazyObjectReal->sAdd(...\func_get_args()); + } + + public function sAddArray($key, $values): int + { + return $this->lazyObjectReal->sAddArray(...\func_get_args()); + } + + public function sDiff($key, ...$other_keys): array + { + return $this->lazyObjectReal->sDiff(...\func_get_args()); + } + + public function sDiffStore($dst, $key, ...$other_keys): int + { + return $this->lazyObjectReal->sDiffStore(...\func_get_args()); + } + + public function sInter($key, ...$other_keys): array + { + return $this->lazyObjectReal->sInter(...\func_get_args()); + } + + public function sInterStore($dst, $key, ...$other_keys): int + { + return $this->lazyObjectReal->sInterStore(...\func_get_args()); + } + + public function sMembers($key): array + { + return $this->lazyObjectReal->sMembers(...\func_get_args()); + } + + public function sMisMember($key, $member, ...$other_members): array + { + return $this->lazyObjectReal->sMisMember(...\func_get_args()); + } + + public function sMove($src, $dst, $value): bool + { + return $this->lazyObjectReal->sMove(...\func_get_args()); + } + + public function sPop($key, $count = 0): array|string + { + return $this->lazyObjectReal->sPop(...\func_get_args()); + } + + public function sRandMember($key, $count = 0): array|string + { + return $this->lazyObjectReal->sRandMember(...\func_get_args()); + } + + public function sUnion($key, ...$other_keys): array + { + return $this->lazyObjectReal->sUnion(...\func_get_args()); + } + + public function sUnionStore($dst, $key, ...$other_keys): int + { + return $this->lazyObjectReal->sUnionStore(...\func_get_args()); + } + + public function save(): bool + { + return $this->lazyObjectReal->save(...\func_get_args()); + } + + public function scan(&$iterator, $pattern = null, $count = 0): array + { + return $this->lazyObjectReal->scan(...\func_get_args()); + } + + public function scard($key): int + { + return $this->lazyObjectReal->scard(...\func_get_args()); + } + + public function script($command, ...$args): mixed + { + return $this->lazyObjectReal->script(...\func_get_args()); + } + + public function select($db): bool + { + return $this->lazyObjectReal->select(...\func_get_args()); + } + + public function set($key, $value, $opt = null) + { + return $this->lazyObjectReal->set(...\func_get_args()); + } + + public function setBit($key, $idx, $value) + { + return $this->lazyObjectReal->setBit(...\func_get_args()); + } + + public function setRange($key, $start, $value) + { + return $this->lazyObjectReal->setRange(...\func_get_args()); + } + + public function setOption($option, $value): bool + { + return $this->lazyObjectReal->setOption(...\func_get_args()); + } + + public function setex($key, $expire, $value) + { + return $this->lazyObjectReal->setex(...\func_get_args()); + } + + public function setnx($key, $value) + { + return $this->lazyObjectReal->setnx(...\func_get_args()); + } + + public function sismember($key, $value): bool + { + return $this->lazyObjectReal->sismember(...\func_get_args()); + } + + public function slaveof($host = null, $port = 6379): bool + { + return $this->lazyObjectReal->slaveof(...\func_get_args()); + } + + public function slowlog($mode, $option = 0): mixed + { + return $this->lazyObjectReal->slowlog(...\func_get_args()); + } + + public function sort($key, $options = null): mixed + { + return $this->lazyObjectReal->sort(...\func_get_args()); + } + + public function sortAsc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array + { + return $this->lazyObjectReal->sortAsc(...\func_get_args()); + } + + public function sortAscAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array + { + return $this->lazyObjectReal->sortAscAlpha(...\func_get_args()); + } + + public function sortDesc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array + { + return $this->lazyObjectReal->sortDesc(...\func_get_args()); + } + + public function sortDescAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array + { + return $this->lazyObjectReal->sortDescAlpha(...\func_get_args()); + } + + public function srem($key, $value, ...$other_values): int + { + return $this->lazyObjectReal->srem(...\func_get_args()); + } + + public function sscan($key, &$iterator, $pattern = null, $count = 0): array + { + return $this->lazyObjectReal->sscan(...\func_get_args()); + } + + public function strlen($key) + { + return $this->lazyObjectReal->strlen(...\func_get_args()); + } + + public function subscribe($channels, $cb): bool + { + return $this->lazyObjectReal->subscribe(...\func_get_args()); + } + + public function swapdb($src, $dst): bool + { + return $this->lazyObjectReal->swapdb(...\func_get_args()); + } + + public function time(): array + { + return $this->lazyObjectReal->time(...\func_get_args()); + } + + public function ttl($key): int + { + return $this->lazyObjectReal->ttl(...\func_get_args()); + } + + public function type($key) + { + return $this->lazyObjectReal->type(...\func_get_args()); + } + + public function unlink($key, ...$other_keys) + { + return $this->lazyObjectReal->unlink(...\func_get_args()); + } + + public function unsubscribe($channels): array|bool + { + return $this->lazyObjectReal->unsubscribe(...\func_get_args()); + } + + public function unwatch() + { + return $this->lazyObjectReal->unwatch(...\func_get_args()); + } + + public function watch($key, ...$other_keys) + { + return $this->lazyObjectReal->watch(...\func_get_args()); + } + + public function wait($count, $timeout): int + { + return $this->lazyObjectReal->wait(...\func_get_args()); + } + + public function xack($key, $group, $ids): int + { + return $this->lazyObjectReal->xack(...\func_get_args()); + } + + public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): string + { + return $this->lazyObjectReal->xadd(...\func_get_args()); + } + + public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): array|bool + { + return $this->lazyObjectReal->xautoclaim(...\func_get_args()); + } + + public function xclaim($key, $group, $consumer, $min_idle, $ids, $options): array|bool + { + return $this->lazyObjectReal->xclaim(...\func_get_args()); + } + + public function xdel($key, $ids): int + { + return $this->lazyObjectReal->xdel(...\func_get_args()); + } + + public function xgroup($operation, $key = null, $arg1 = null, $arg2 = null, $arg3 = false): mixed + { + return $this->lazyObjectReal->xgroup(...\func_get_args()); + } + + public function xinfo($operation, $arg1 = null, $arg2 = null): mixed + { + return $this->lazyObjectReal->xinfo(...\func_get_args()); + } + + public function xlen($key): int + { + return $this->lazyObjectReal->xlen(...\func_get_args()); + } + + public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): string + { + return $this->lazyObjectReal->xpending(...\func_get_args()); + } + + public function xrange($key, $start, $end, $count = -1): array|bool + { + return $this->lazyObjectReal->xrange(...\func_get_args()); + } + + public function xread($streams, $count = -1, $block = -1): array|bool + { + return $this->lazyObjectReal->xread(...\func_get_args()); + } + + public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): array|bool + { + return $this->lazyObjectReal->xreadgroup(...\func_get_args()); + } + + public function xrevrange($key, $start, $end, $count = -1): array|bool + { + return $this->lazyObjectReal->xrevrange(...\func_get_args()); + } + + public function xtrim($key, $maxlen, $approx = false): int + { + return $this->lazyObjectReal->xtrim(...\func_get_args()); + } + + public function zAdd($key, $score, $value): int + { + return $this->lazyObjectReal->zAdd(...\func_get_args()); + } + + public function zCard($key): int + { + return $this->lazyObjectReal->zCard(...\func_get_args()); + } + + public function zCount($key, $start, $end): int + { + return $this->lazyObjectReal->zCount(...\func_get_args()); + } + + public function zIncrBy($key, $value, $member): float + { + return $this->lazyObjectReal->zIncrBy(...\func_get_args()); + } + + public function zLexCount($key, $min, $max): int + { + return $this->lazyObjectReal->zLexCount(...\func_get_args()); + } + + public function zMscore($key, $member, ...$other_members): array + { + return $this->lazyObjectReal->zMscore(...\func_get_args()); + } + + public function zPopMax($key, $value = null): array + { + return $this->lazyObjectReal->zPopMax(...\func_get_args()); + } + + public function zPopMin($key, $value = null): array + { + return $this->lazyObjectReal->zPopMin(...\func_get_args()); + } + + public function zRange($key, $start, $end, $scores = null): array + { + return $this->lazyObjectReal->zRange(...\func_get_args()); + } + + public function zRangeByLex($key, $min, $max, $offset = -1, $count = -1): array + { + return $this->lazyObjectReal->zRangeByLex(...\func_get_args()); + } + + public function zRangeByScore($key, $start, $end, $options = []): array + { + return $this->lazyObjectReal->zRangeByScore(...\func_get_args()); + } + + public function zRandMember($key, $options = null): array|string + { + return $this->lazyObjectReal->zRandMember(...\func_get_args()); + } + + public function zRank($key, $member): int + { + return $this->lazyObjectReal->zRank(...\func_get_args()); + } + + public function zRem($key, $member, ...$other_members): int + { + return $this->lazyObjectReal->zRem(...\func_get_args()); + } + + public function zRemRangeByLex($key, $min, $max): int + { + return $this->lazyObjectReal->zRemRangeByLex(...\func_get_args()); + } + + public function zRemRangeByRank($key, $start, $end): int + { + return $this->lazyObjectReal->zRemRangeByRank(...\func_get_args()); + } + + public function zRemRangeByScore($key, $start, $end): int + { + return $this->lazyObjectReal->zRemRangeByScore(...\func_get_args()); + } + + public function zRevRange($key, $start, $end, $scores = null): array + { + return $this->lazyObjectReal->zRevRange(...\func_get_args()); + } + + public function zRevRangeByLex($key, $min, $max, $offset = -1, $count = -1): array + { + return $this->lazyObjectReal->zRevRangeByLex(...\func_get_args()); + } + + public function zRevRangeByScore($key, $start, $end, $options = []): array + { + return $this->lazyObjectReal->zRevRangeByScore(...\func_get_args()); + } + + public function zRevRank($key, $member): int + { + return $this->lazyObjectReal->zRevRank(...\func_get_args()); + } + + public function zScore($key, $member): float + { + return $this->lazyObjectReal->zScore(...\func_get_args()); + } + + public function zdiff($keys, $options = null): array + { + return $this->lazyObjectReal->zdiff(...\func_get_args()); + } + + public function zdiffstore($dst, $keys, $options = null): int + { + return $this->lazyObjectReal->zdiffstore(...\func_get_args()); + } + + public function zinter($keys, $weights = null, $options = null): array + { + return $this->lazyObjectReal->zinter(...\func_get_args()); + } + + public function zinterstore($dst, $keys, $weights = null, $aggregate = null): int + { + return $this->lazyObjectReal->zinterstore(...\func_get_args()); + } + + public function zscan($key, &$iterator, $pattern = null, $count = 0): array|bool + { + return $this->lazyObjectReal->zscan(...\func_get_args()); + } + + public function zunion($keys, $weights = null, $options = null): array + { + return $this->lazyObjectReal->zunion(...\func_get_args()); + } + + public function zunionstore($dst, $keys, $weights = null, $aggregate = null): int + { + return $this->lazyObjectReal->zunionstore(...\func_get_args()); + } +} diff --git a/src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php b/src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php new file mode 100644 index 0000000000000..58e5ad5cbff9f --- /dev/null +++ b/src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php @@ -0,0 +1,989 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits; + +use Symfony\Component\VarExporter\LazyObjectInterface; +use Symfony\Component\VarExporter\LazyProxyTrait; +use Symfony\Contracts\Service\ResetInterface; + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +/** + * @internal + */ +class RedisCluster5Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface +{ + use LazyProxyTrait { + resetLazyObject as reset; + } + + private int $lazyObjectId; + private \RedisCluster $lazyObjectReal; + + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'lazyObjectReal' => [self::class, 'lazyObjectReal', null], + "\0".self::class."\0lazyObjectReal" => [self::class, 'lazyObjectReal', null], + ]; + + public function __construct($name, $seeds = null, $timeout = null, $read_timeout = null, $persistent = null, $auth = null) + { + return $this->lazyObjectReal->__construct(...\func_get_args()); + } + + public function _masters() + { + return $this->lazyObjectReal->_masters(...\func_get_args()); + } + + public function _prefix($key) + { + return $this->lazyObjectReal->_prefix(...\func_get_args()); + } + + public function _redir() + { + return $this->lazyObjectReal->_redir(...\func_get_args()); + } + + public function _serialize($value) + { + return $this->lazyObjectReal->_serialize(...\func_get_args()); + } + + public function _unserialize($value) + { + return $this->lazyObjectReal->_unserialize(...\func_get_args()); + } + + public function _compress($value) + { + return $this->lazyObjectReal->_compress(...\func_get_args()); + } + + public function _uncompress($value) + { + return $this->lazyObjectReal->_uncompress(...\func_get_args()); + } + + public function _pack($value) + { + return $this->lazyObjectReal->_pack(...\func_get_args()); + } + + public function _unpack($value) + { + return $this->lazyObjectReal->_unpack(...\func_get_args()); + } + + public function acl($key_or_address, $subcmd, ...$args) + { + return $this->lazyObjectReal->acl(...\func_get_args()); + } + + public function append($key, $value) + { + return $this->lazyObjectReal->append(...\func_get_args()); + } + + public function bgrewriteaof($key_or_address) + { + return $this->lazyObjectReal->bgrewriteaof(...\func_get_args()); + } + + public function bgsave($key_or_address) + { + return $this->lazyObjectReal->bgsave(...\func_get_args()); + } + + public function bitcount($key) + { + return $this->lazyObjectReal->bitcount(...\func_get_args()); + } + + public function bitop($operation, $ret_key, $key, ...$other_keys) + { + return $this->lazyObjectReal->bitop(...\func_get_args()); + } + + public function bitpos($key, $bit, $start = null, $end = null) + { + return $this->lazyObjectReal->bitpos(...\func_get_args()); + } + + public function blpop($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->blpop(...\func_get_args()); + } + + public function brpop($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->brpop(...\func_get_args()); + } + + public function brpoplpush($src, $dst, $timeout) + { + return $this->lazyObjectReal->brpoplpush(...\func_get_args()); + } + + public function clearlasterror() + { + return $this->lazyObjectReal->clearlasterror(...\func_get_args()); + } + + public function bzpopmax($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->bzpopmax(...\func_get_args()); + } + + public function bzpopmin($key, $timeout_or_key, ...$extra_args) + { + return $this->lazyObjectReal->bzpopmin(...\func_get_args()); + } + + public function client($key_or_address, $arg = null, ...$other_args) + { + return $this->lazyObjectReal->client(...\func_get_args()); + } + + public function close() + { + return $this->lazyObjectReal->close(...\func_get_args()); + } + + public function cluster($key_or_address, $arg = null, ...$other_args) + { + return $this->lazyObjectReal->cluster(...\func_get_args()); + } + + public function command(...$args) + { + return $this->lazyObjectReal->command(...\func_get_args()); + } + + public function config($key_or_address, $arg = null, ...$other_args) + { + return $this->lazyObjectReal->config(...\func_get_args()); + } + + public function dbsize($key_or_address) + { + return $this->lazyObjectReal->dbsize(...\func_get_args()); + } + + public function decr($key) + { + return $this->lazyObjectReal->decr(...\func_get_args()); + } + + public function decrby($key, $value) + { + return $this->lazyObjectReal->decrby(...\func_get_args()); + } + + public function del($key, ...$other_keys) + { + return $this->lazyObjectReal->del(...\func_get_args()); + } + + public function discard() + { + return $this->lazyObjectReal->discard(...\func_get_args()); + } + + public function dump($key) + { + return $this->lazyObjectReal->dump(...\func_get_args()); + } + + public function echo($msg) + { + return $this->lazyObjectReal->echo(...\func_get_args()); + } + + public function eval($script, $args = null, $num_keys = null) + { + return $this->lazyObjectReal->eval(...\func_get_args()); + } + + public function evalsha($script_sha, $args = null, $num_keys = null) + { + return $this->lazyObjectReal->evalsha(...\func_get_args()); + } + + public function exec() + { + return $this->lazyObjectReal->exec(...\func_get_args()); + } + + public function exists($key) + { + return $this->lazyObjectReal->exists(...\func_get_args()); + } + + public function expire($key, $timeout) + { + return $this->lazyObjectReal->expire(...\func_get_args()); + } + + public function expireat($key, $timestamp) + { + return $this->lazyObjectReal->expireat(...\func_get_args()); + } + + public function flushall($key_or_address, $async = null) + { + return $this->lazyObjectReal->flushall(...\func_get_args()); + } + + public function flushdb($key_or_address, $async = null) + { + return $this->lazyObjectReal->flushdb(...\func_get_args()); + } + + public function geoadd($key, $lng, $lat, $member, ...$other_triples) + { + return $this->lazyObjectReal->geoadd(...\func_get_args()); + } + + public function geodist($key, $src, $dst, $unit = null) + { + return $this->lazyObjectReal->geodist(...\func_get_args()); + } + + public function geohash($key, $member, ...$other_members) + { + return $this->lazyObjectReal->geohash(...\func_get_args()); + } + + public function geopos($key, $member, ...$other_members) + { + return $this->lazyObjectReal->geopos(...\func_get_args()); + } + + public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadius(...\func_get_args()); + } + + public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadius_ro(...\func_get_args()); + } + + public function georadiusbymember($key, $member, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadiusbymember(...\func_get_args()); + } + + public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) + { + return $this->lazyObjectReal->georadiusbymember_ro(...\func_get_args()); + } + + public function get($key) + { + return $this->lazyObjectReal->get(...\func_get_args()); + } + + public function getbit($key, $offset) + { + return $this->lazyObjectReal->getbit(...\func_get_args()); + } + + public function getlasterror() + { + return $this->lazyObjectReal->getlasterror(...\func_get_args()); + } + + public function getmode() + { + return $this->lazyObjectReal->getmode(...\func_get_args()); + } + + public function getoption($option) + { + return $this->lazyObjectReal->getoption(...\func_get_args()); + } + + public function getrange($key, $start, $end) + { + return $this->lazyObjectReal->getrange(...\func_get_args()); + } + + public function getset($key, $value) + { + return $this->lazyObjectReal->getset(...\func_get_args()); + } + + public function hdel($key, $member, ...$other_members) + { + return $this->lazyObjectReal->hdel(...\func_get_args()); + } + + public function hexists($key, $member) + { + return $this->lazyObjectReal->hexists(...\func_get_args()); + } + + public function hget($key, $member) + { + return $this->lazyObjectReal->hget(...\func_get_args()); + } + + public function hgetall($key) + { + return $this->lazyObjectReal->hgetall(...\func_get_args()); + } + + public function hincrby($key, $member, $value) + { + return $this->lazyObjectReal->hincrby(...\func_get_args()); + } + + public function hincrbyfloat($key, $member, $value) + { + return $this->lazyObjectReal->hincrbyfloat(...\func_get_args()); + } + + public function hkeys($key) + { + return $this->lazyObjectReal->hkeys(...\func_get_args()); + } + + public function hlen($key) + { + return $this->lazyObjectReal->hlen(...\func_get_args()); + } + + public function hmget($key, $keys) + { + return $this->lazyObjectReal->hmget(...\func_get_args()); + } + + public function hmset($key, $pairs) + { + return $this->lazyObjectReal->hmset(...\func_get_args()); + } + + public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->hscan(...\func_get_args()); + } + + public function hset($key, $member, $value) + { + return $this->lazyObjectReal->hset(...\func_get_args()); + } + + public function hsetnx($key, $member, $value) + { + return $this->lazyObjectReal->hsetnx(...\func_get_args()); + } + + public function hstrlen($key, $member) + { + return $this->lazyObjectReal->hstrlen(...\func_get_args()); + } + + public function hvals($key) + { + return $this->lazyObjectReal->hvals(...\func_get_args()); + } + + public function incr($key) + { + return $this->lazyObjectReal->incr(...\func_get_args()); + } + + public function incrby($key, $value) + { + return $this->lazyObjectReal->incrby(...\func_get_args()); + } + + public function incrbyfloat($key, $value) + { + return $this->lazyObjectReal->incrbyfloat(...\func_get_args()); + } + + public function info($key_or_address, $option = null) + { + return $this->lazyObjectReal->info(...\func_get_args()); + } + + public function keys($pattern) + { + return $this->lazyObjectReal->keys(...\func_get_args()); + } + + public function lastsave($key_or_address) + { + return $this->lazyObjectReal->lastsave(...\func_get_args()); + } + + public function lget($key, $index) + { + return $this->lazyObjectReal->lget(...\func_get_args()); + } + + public function lindex($key, $index) + { + return $this->lazyObjectReal->lindex(...\func_get_args()); + } + + public function linsert($key, $position, $pivot, $value) + { + return $this->lazyObjectReal->linsert(...\func_get_args()); + } + + public function llen($key) + { + return $this->lazyObjectReal->llen(...\func_get_args()); + } + + public function lpop($key) + { + return $this->lazyObjectReal->lpop(...\func_get_args()); + } + + public function lpush($key, $value) + { + return $this->lazyObjectReal->lpush(...\func_get_args()); + } + + public function lpushx($key, $value) + { + return $this->lazyObjectReal->lpushx(...\func_get_args()); + } + + public function lrange($key, $start, $end) + { + return $this->lazyObjectReal->lrange(...\func_get_args()); + } + + public function lrem($key, $value) + { + return $this->lazyObjectReal->lrem(...\func_get_args()); + } + + public function lset($key, $index, $value) + { + return $this->lazyObjectReal->lset(...\func_get_args()); + } + + public function ltrim($key, $start, $stop) + { + return $this->lazyObjectReal->ltrim(...\func_get_args()); + } + + public function mget($keys) + { + return $this->lazyObjectReal->mget(...\func_get_args()); + } + + public function mset($pairs) + { + return $this->lazyObjectReal->mset(...\func_get_args()); + } + + public function msetnx($pairs) + { + return $this->lazyObjectReal->msetnx(...\func_get_args()); + } + + public function multi() + { + return $this->lazyObjectReal->multi(...\func_get_args()); + } + + public function object($field, $key) + { + return $this->lazyObjectReal->object(...\func_get_args()); + } + + public function persist($key) + { + return $this->lazyObjectReal->persist(...\func_get_args()); + } + + public function pexpire($key, $timestamp) + { + return $this->lazyObjectReal->pexpire(...\func_get_args()); + } + + public function pexpireat($key, $timestamp) + { + return $this->lazyObjectReal->pexpireat(...\func_get_args()); + } + + public function pfadd($key, $elements) + { + return $this->lazyObjectReal->pfadd(...\func_get_args()); + } + + public function pfcount($key) + { + return $this->lazyObjectReal->pfcount(...\func_get_args()); + } + + public function pfmerge($dstkey, $keys) + { + return $this->lazyObjectReal->pfmerge(...\func_get_args()); + } + + public function ping($key_or_address) + { + return $this->lazyObjectReal->ping(...\func_get_args()); + } + + public function psetex($key, $expire, $value) + { + return $this->lazyObjectReal->psetex(...\func_get_args()); + } + + public function psubscribe($patterns, $callback) + { + return $this->lazyObjectReal->psubscribe(...\func_get_args()); + } + + public function pttl($key) + { + return $this->lazyObjectReal->pttl(...\func_get_args()); + } + + public function publish($channel, $message) + { + return $this->lazyObjectReal->publish(...\func_get_args()); + } + + public function pubsub($key_or_address, $arg = null, ...$other_args) + { + return $this->lazyObjectReal->pubsub(...\func_get_args()); + } + + public function punsubscribe($pattern, ...$other_patterns) + { + return $this->lazyObjectReal->punsubscribe(...\func_get_args()); + } + + public function randomkey($key_or_address) + { + return $this->lazyObjectReal->randomkey(...\func_get_args()); + } + + public function rawcommand($cmd, ...$args) + { + return $this->lazyObjectReal->rawcommand(...\func_get_args()); + } + + public function rename($key, $newkey) + { + return $this->lazyObjectReal->rename(...\func_get_args()); + } + + public function renamenx($key, $newkey) + { + return $this->lazyObjectReal->renamenx(...\func_get_args()); + } + + public function restore($ttl, $key, $value) + { + return $this->lazyObjectReal->restore(...\func_get_args()); + } + + public function role() + { + return $this->lazyObjectReal->role(...\func_get_args()); + } + + public function rpop($key) + { + return $this->lazyObjectReal->rpop(...\func_get_args()); + } + + public function rpoplpush($src, $dst) + { + return $this->lazyObjectReal->rpoplpush(...\func_get_args()); + } + + public function rpush($key, $value) + { + return $this->lazyObjectReal->rpush(...\func_get_args()); + } + + public function rpushx($key, $value) + { + return $this->lazyObjectReal->rpushx(...\func_get_args()); + } + + public function sadd($key, $value) + { + return $this->lazyObjectReal->sadd(...\func_get_args()); + } + + public function saddarray($key, $options) + { + return $this->lazyObjectReal->saddarray(...\func_get_args()); + } + + public function save($key_or_address) + { + return $this->lazyObjectReal->save(...\func_get_args()); + } + + public function scan(&$i_iterator, $str_node, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->scan(...\func_get_args()); + } + + public function scard($key) + { + return $this->lazyObjectReal->scard(...\func_get_args()); + } + + public function script($key_or_address, $arg = null, ...$other_args) + { + return $this->lazyObjectReal->script(...\func_get_args()); + } + + public function sdiff($key, ...$other_keys) + { + return $this->lazyObjectReal->sdiff(...\func_get_args()); + } + + public function sdiffstore($dst, $key, ...$other_keys) + { + return $this->lazyObjectReal->sdiffstore(...\func_get_args()); + } + + public function set($key, $value, $opts = null) + { + return $this->lazyObjectReal->set(...\func_get_args()); + } + + public function setbit($key, $offset, $value) + { + return $this->lazyObjectReal->setbit(...\func_get_args()); + } + + public function setex($key, $expire, $value) + { + return $this->lazyObjectReal->setex(...\func_get_args()); + } + + public function setnx($key, $value) + { + return $this->lazyObjectReal->setnx(...\func_get_args()); + } + + public function setoption($option, $value) + { + return $this->lazyObjectReal->setoption(...\func_get_args()); + } + + public function setrange($key, $offset, $value) + { + return $this->lazyObjectReal->setrange(...\func_get_args()); + } + + public function sinter($key, ...$other_keys) + { + return $this->lazyObjectReal->sinter(...\func_get_args()); + } + + public function sinterstore($dst, $key, ...$other_keys) + { + return $this->lazyObjectReal->sinterstore(...\func_get_args()); + } + + public function sismember($key, $value) + { + return $this->lazyObjectReal->sismember(...\func_get_args()); + } + + public function slowlog($key_or_address, $arg = null, ...$other_args) + { + return $this->lazyObjectReal->slowlog(...\func_get_args()); + } + + public function smembers($key) + { + return $this->lazyObjectReal->smembers(...\func_get_args()); + } + + public function smove($src, $dst, $value) + { + return $this->lazyObjectReal->smove(...\func_get_args()); + } + + public function sort($key, $options = null) + { + return $this->lazyObjectReal->sort(...\func_get_args()); + } + + public function spop($key) + { + return $this->lazyObjectReal->spop(...\func_get_args()); + } + + public function srandmember($key, $count = null) + { + return $this->lazyObjectReal->srandmember(...\func_get_args()); + } + + public function srem($key, $value) + { + return $this->lazyObjectReal->srem(...\func_get_args()); + } + + public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->sscan(...\func_get_args()); + } + + public function strlen($key) + { + return $this->lazyObjectReal->strlen(...\func_get_args()); + } + + public function subscribe($channels, $callback) + { + return $this->lazyObjectReal->subscribe(...\func_get_args()); + } + + public function sunion($key, ...$other_keys) + { + return $this->lazyObjectReal->sunion(...\func_get_args()); + } + + public function sunionstore($dst, $key, ...$other_keys) + { + return $this->lazyObjectReal->sunionstore(...\func_get_args()); + } + + public function time() + { + return $this->lazyObjectReal->time(...\func_get_args()); + } + + public function ttl($key) + { + return $this->lazyObjectReal->ttl(...\func_get_args()); + } + + public function type($key) + { + return $this->lazyObjectReal->type(...\func_get_args()); + } + + public function unsubscribe($channel, ...$other_channels) + { + return $this->lazyObjectReal->unsubscribe(...\func_get_args()); + } + + public function unlink($key, ...$other_keys) + { + return $this->lazyObjectReal->unlink(...\func_get_args()); + } + + public function unwatch() + { + return $this->lazyObjectReal->unwatch(...\func_get_args()); + } + + public function watch($key, ...$other_keys) + { + return $this->lazyObjectReal->watch(...\func_get_args()); + } + + public function xack($str_key, $str_group, $arr_ids) + { + return $this->lazyObjectReal->xack(...\func_get_args()); + } + + public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) + { + return $this->lazyObjectReal->xadd(...\func_get_args()); + } + + public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) + { + return $this->lazyObjectReal->xclaim(...\func_get_args()); + } + + public function xdel($str_key, $arr_ids) + { + return $this->lazyObjectReal->xdel(...\func_get_args()); + } + + public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) + { + return $this->lazyObjectReal->xgroup(...\func_get_args()); + } + + public function xinfo($str_cmd, $str_key = null, $str_group = null) + { + return $this->lazyObjectReal->xinfo(...\func_get_args()); + } + + public function xlen($key) + { + return $this->lazyObjectReal->xlen(...\func_get_args()); + } + + public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) + { + return $this->lazyObjectReal->xpending(...\func_get_args()); + } + + public function xrange($str_key, $str_start, $str_end, $i_count = null) + { + return $this->lazyObjectReal->xrange(...\func_get_args()); + } + + public function xread($arr_streams, $i_count = null, $i_block = null) + { + return $this->lazyObjectReal->xread(...\func_get_args()); + } + + public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) + { + return $this->lazyObjectReal->xreadgroup(...\func_get_args()); + } + + public function xrevrange($str_key, $str_start, $str_end, $i_count = null) + { + return $this->lazyObjectReal->xrevrange(...\func_get_args()); + } + + public function xtrim($str_key, $i_maxlen, $boo_approximate = null) + { + return $this->lazyObjectReal->xtrim(...\func_get_args()); + } + + public function zadd($key, $score, $value, ...$extra_args) + { + return $this->lazyObjectReal->zadd(...\func_get_args()); + } + + public function zcard($key) + { + return $this->lazyObjectReal->zcard(...\func_get_args()); + } + + public function zcount($key, $min, $max) + { + return $this->lazyObjectReal->zcount(...\func_get_args()); + } + + public function zincrby($key, $value, $member) + { + return $this->lazyObjectReal->zincrby(...\func_get_args()); + } + + public function zinterstore($key, $keys, $weights = null, $aggregate = null) + { + return $this->lazyObjectReal->zinterstore(...\func_get_args()); + } + + public function zlexcount($key, $min, $max) + { + return $this->lazyObjectReal->zlexcount(...\func_get_args()); + } + + public function zpopmax($key) + { + return $this->lazyObjectReal->zpopmax(...\func_get_args()); + } + + public function zpopmin($key) + { + return $this->lazyObjectReal->zpopmin(...\func_get_args()); + } + + public function zrange($key, $start, $end, $scores = null) + { + return $this->lazyObjectReal->zrange(...\func_get_args()); + } + + public function zrangebylex($key, $min, $max, $offset = null, $limit = null) + { + return $this->lazyObjectReal->zrangebylex(...\func_get_args()); + } + + public function zrangebyscore($key, $start, $end, $options = null) + { + return $this->lazyObjectReal->zrangebyscore(...\func_get_args()); + } + + public function zrank($key, $member) + { + return $this->lazyObjectReal->zrank(...\func_get_args()); + } + + public function zrem($key, $member, ...$other_members) + { + return $this->lazyObjectReal->zrem(...\func_get_args()); + } + + public function zremrangebylex($key, $min, $max) + { + return $this->lazyObjectReal->zremrangebylex(...\func_get_args()); + } + + public function zremrangebyrank($key, $min, $max) + { + return $this->lazyObjectReal->zremrangebyrank(...\func_get_args()); + } + + public function zremrangebyscore($key, $min, $max) + { + return $this->lazyObjectReal->zremrangebyscore(...\func_get_args()); + } + + public function zrevrange($key, $start, $end, $scores = null) + { + return $this->lazyObjectReal->zrevrange(...\func_get_args()); + } + + public function zrevrangebylex($key, $min, $max, $offset = null, $limit = null) + { + return $this->lazyObjectReal->zrevrangebylex(...\func_get_args()); + } + + public function zrevrangebyscore($key, $start, $end, $options = null) + { + return $this->lazyObjectReal->zrevrangebyscore(...\func_get_args()); + } + + public function zrevrank($key, $member) + { + return $this->lazyObjectReal->zrevrank(...\func_get_args()); + } + + public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) + { + return $this->lazyObjectReal->zscan(...\func_get_args()); + } + + public function zscore($key, $member) + { + return $this->lazyObjectReal->zscore(...\func_get_args()); + } + + public function zunionstore($key, $keys, $weights = null, $aggregate = null) + { + return $this->lazyObjectReal->zunionstore(...\func_get_args()); + } +} diff --git a/src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php b/src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php new file mode 100644 index 0000000000000..084d40000058b --- /dev/null +++ b/src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php @@ -0,0 +1,994 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Traits; + +use Symfony\Component\VarExporter\LazyObjectInterface; +use Symfony\Component\VarExporter\LazyProxyTrait; +use Symfony\Contracts\Service\ResetInterface; + +// Help opcache.preload discover always-needed symbols +class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); +class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); + +/** + * @internal + */ +class RedisCluster6Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface +{ + use LazyProxyTrait { + resetLazyObject as reset; + } + + private int $lazyObjectId; + private \RedisCluster $lazyObjectReal; + + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'lazyObjectReal' => [self::class, 'lazyObjectReal', null], + "\0".self::class."\0lazyObjectReal" => [self::class, 'lazyObjectReal', null], + ]; + + public function __construct($name, $seeds = null, $timeout = 0, $read_timeout = 0, $persistent = false, #[\SensitiveParameter] $auth = null, $context = null) + { + return $this->lazyObjectReal->__construct(...\func_get_args()); + } + + public function _compress($value): string + { + return $this->lazyObjectReal->_compress(...\func_get_args()); + } + + public function _masters(): array + { + return $this->lazyObjectReal->_masters(...\func_get_args()); + } + + public function _pack($value): string + { + return $this->lazyObjectReal->_pack(...\func_get_args()); + } + + public function _prefix($key): bool|string + { + return $this->lazyObjectReal->_prefix(...\func_get_args()); + } + + public function _redir(): ?string + { + return $this->lazyObjectReal->_redir(...\func_get_args()); + } + + public function _serialize($value): bool|string + { + return $this->lazyObjectReal->_serialize(...\func_get_args()); + } + + public function _uncompress($value): string + { + return $this->lazyObjectReal->_uncompress(...\func_get_args()); + } + + public function _unpack($value): mixed + { + return $this->lazyObjectReal->_unpack(...\func_get_args()); + } + + public function _unserialize($value): mixed + { + return $this->lazyObjectReal->_unserialize(...\func_get_args()); + } + + public function acl($key_or_address, $subcmd, ...$args): mixed + { + return $this->lazyObjectReal->acl(...\func_get_args()); + } + + public function append($key, $value): bool|int + { + return $this->lazyObjectReal->append(...\func_get_args()); + } + + public function bgrewriteaof($key_or_address): bool + { + return $this->lazyObjectReal->bgrewriteaof(...\func_get_args()); + } + + public function bgsave($key_or_address): bool + { + return $this->lazyObjectReal->bgsave(...\func_get_args()); + } + + public function bitcount($key, $start = 0, $end = -1): bool|int + { + return $this->lazyObjectReal->bitcount(...\func_get_args()); + } + + public function bitop($operation, $deskey, $srckey, ...$otherkeys): bool|int + { + return $this->lazyObjectReal->bitop(...\func_get_args()); + } + + public function bitpos($key, $bit, $start = null, $end = null): bool|int + { + return $this->lazyObjectReal->bitpos(...\func_get_args()); + } + + public function blpop($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->blpop(...\func_get_args()); + } + + public function brpop($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->brpop(...\func_get_args()); + } + + public function brpoplpush($srckey, $deskey, $timeout): mixed + { + return $this->lazyObjectReal->brpoplpush(...\func_get_args()); + } + + public function bzpopmax($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->bzpopmax(...\func_get_args()); + } + + public function bzpopmin($key, $timeout_or_key, ...$extra_args): array + { + return $this->lazyObjectReal->bzpopmin(...\func_get_args()); + } + + public function clearlasterror(): bool + { + return $this->lazyObjectReal->clearlasterror(...\func_get_args()); + } + + public function client($node, $subcommand, $arg): array|bool|string + { + return $this->lazyObjectReal->client(...\func_get_args()); + } + + public function close(): bool + { + return $this->lazyObjectReal->close(...\func_get_args()); + } + + public function cluster($node, $command, ...$extra_args): mixed + { + return $this->lazyObjectReal->cluster(...\func_get_args()); + } + + public function command(...$extra_args): mixed + { + return $this->lazyObjectReal->command(...\func_get_args()); + } + + public function config($node, $subcommand, ...$extra_args): mixed + { + return $this->lazyObjectReal->config(...\func_get_args()); + } + + public function dbsize($key_or_address): int + { + return $this->lazyObjectReal->dbsize(...\func_get_args()); + } + + public function decr($key): int + { + return $this->lazyObjectReal->decr(...\func_get_args()); + } + + public function decrby($key, $value): int + { + return $this->lazyObjectReal->decrby(...\func_get_args()); + } + + public function decrbyfloat($key, $value): float + { + return $this->lazyObjectReal->decrbyfloat(...\func_get_args()); + } + + public function del($key, ...$other_keys): array + { + return $this->lazyObjectReal->del(...\func_get_args()); + } + + public function discard(): bool + { + return $this->lazyObjectReal->discard(...\func_get_args()); + } + + public function dump($key): string + { + return $this->lazyObjectReal->dump(...\func_get_args()); + } + + public function echo($node, $msg): string + { + return $this->lazyObjectReal->echo(...\func_get_args()); + } + + public function eval($script, $args = [], $num_keys = 0): mixed + { + return $this->lazyObjectReal->eval(...\func_get_args()); + } + + public function evalsha($script_sha, $args = [], $num_keys = 0): mixed + { + return $this->lazyObjectReal->evalsha(...\func_get_args()); + } + + public function exec(): array + { + return $this->lazyObjectReal->exec(...\func_get_args()); + } + + public function exists($key): int + { + return $this->lazyObjectReal->exists(...\func_get_args()); + } + + public function expire($key, $timeout): bool + { + return $this->lazyObjectReal->expire(...\func_get_args()); + } + + public function expireat($key, $timestamp): bool + { + return $this->lazyObjectReal->expireat(...\func_get_args()); + } + + public function flushall($node, $async = false): bool + { + return $this->lazyObjectReal->flushall(...\func_get_args()); + } + + public function flushdb($node, $async = false): bool + { + return $this->lazyObjectReal->flushdb(...\func_get_args()); + } + + public function geoadd($key, $lng, $lat, $member, ...$other_triples): int + { + return $this->lazyObjectReal->geoadd(...\func_get_args()); + } + + public function geodist($key, $src, $dest, $unit = null): array + { + return $this->lazyObjectReal->geodist(...\func_get_args()); + } + + public function geohash($key, $member, ...$other_members): array + { + return $this->lazyObjectReal->geohash(...\func_get_args()); + } + + public function geopos($key, $member, ...$other_members): array + { + return $this->lazyObjectReal->geopos(...\func_get_args()); + } + + public function georadius($key, $lng, $lat, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadius(...\func_get_args()); + } + + public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadius_ro(...\func_get_args()); + } + + public function georadiusbymember($key, $member, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadiusbymember(...\func_get_args()); + } + + public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): array + { + return $this->lazyObjectReal->georadiusbymember_ro(...\func_get_args()); + } + + public function get($key): string + { + return $this->lazyObjectReal->get(...\func_get_args()); + } + + public function getbit($key, $value): int + { + return $this->lazyObjectReal->getbit(...\func_get_args()); + } + + public function getlasterror(): ?string + { + return $this->lazyObjectReal->getlasterror(...\func_get_args()); + } + + public function getmode(): int + { + return $this->lazyObjectReal->getmode(...\func_get_args()); + } + + public function getoption($option): mixed + { + return $this->lazyObjectReal->getoption(...\func_get_args()); + } + + public function getrange($key, $start, $end): string + { + return $this->lazyObjectReal->getrange(...\func_get_args()); + } + + public function getset($key, $value): string + { + return $this->lazyObjectReal->getset(...\func_get_args()); + } + + public function hdel($key, $member, ...$other_members): int + { + return $this->lazyObjectReal->hdel(...\func_get_args()); + } + + public function hexists($key, $member): bool + { + return $this->lazyObjectReal->hexists(...\func_get_args()); + } + + public function hget($key, $member): string + { + return $this->lazyObjectReal->hget(...\func_get_args()); + } + + public function hgetall($key): array + { + return $this->lazyObjectReal->hgetall(...\func_get_args()); + } + + public function hincrby($key, $member, $value): int + { + return $this->lazyObjectReal->hincrby(...\func_get_args()); + } + + public function hincrbyfloat($key, $member, $value): float + { + return $this->lazyObjectReal->hincrbyfloat(...\func_get_args()); + } + + public function hkeys($key): array + { + return $this->lazyObjectReal->hkeys(...\func_get_args()); + } + + public function hlen($key): int + { + return $this->lazyObjectReal->hlen(...\func_get_args()); + } + + public function hmget($key, $members): array + { + return $this->lazyObjectReal->hmget(...\func_get_args()); + } + + public function hmset($key, $key_values): bool + { + return $this->lazyObjectReal->hmset(...\func_get_args()); + } + + public function hscan($key, &$iterator, $pattern = null, $count = 0): array|bool + { + return $this->lazyObjectReal->hscan(...\func_get_args()); + } + + public function hset($key, $member, $value): int + { + return $this->lazyObjectReal->hset(...\func_get_args()); + } + + public function hsetnx($key, $member, $value): bool + { + return $this->lazyObjectReal->hsetnx(...\func_get_args()); + } + + public function hstrlen($key, $field): int + { + return $this->lazyObjectReal->hstrlen(...\func_get_args()); + } + + public function hvals($key): array + { + return $this->lazyObjectReal->hvals(...\func_get_args()); + } + + public function incr($key): int + { + return $this->lazyObjectReal->incr(...\func_get_args()); + } + + public function incrby($key, $value): int + { + return $this->lazyObjectReal->incrby(...\func_get_args()); + } + + public function incrbyfloat($key, $value): float + { + return $this->lazyObjectReal->incrbyfloat(...\func_get_args()); + } + + public function info($node, $section = null): array + { + return $this->lazyObjectReal->info(...\func_get_args()); + } + + public function keys($pattern): array + { + return $this->lazyObjectReal->keys(...\func_get_args()); + } + + public function lastsave($node): int + { + return $this->lazyObjectReal->lastsave(...\func_get_args()); + } + + public function lget($key, $index): bool|string + { + return $this->lazyObjectReal->lget(...\func_get_args()); + } + + public function lindex($key, $index): bool|string + { + return $this->lazyObjectReal->lindex(...\func_get_args()); + } + + public function linsert($key, $pos, $pivot, $value): int + { + return $this->lazyObjectReal->linsert(...\func_get_args()); + } + + public function llen($key): bool|int + { + return $this->lazyObjectReal->llen(...\func_get_args()); + } + + public function lpop($key, $count = 0): array|bool|string + { + return $this->lazyObjectReal->lpop(...\func_get_args()); + } + + public function lpush($key, $value, ...$other_values): bool|int + { + return $this->lazyObjectReal->lpush(...\func_get_args()); + } + + public function lpushx($key, $value): bool|int + { + return $this->lazyObjectReal->lpushx(...\func_get_args()); + } + + public function lrange($key, $start, $end): array + { + return $this->lazyObjectReal->lrange(...\func_get_args()); + } + + public function lrem($key, $count, $value): bool|int + { + return $this->lazyObjectReal->lrem(...\func_get_args()); + } + + public function lset($key, $index, $value): bool + { + return $this->lazyObjectReal->lset(...\func_get_args()); + } + + public function ltrim($key, $start, $end): bool + { + return $this->lazyObjectReal->ltrim(...\func_get_args()); + } + + public function mget($keys): array + { + return $this->lazyObjectReal->mget(...\func_get_args()); + } + + public function mset($key_values): bool + { + return $this->lazyObjectReal->mset(...\func_get_args()); + } + + public function msetnx($key_values): int + { + return $this->lazyObjectReal->msetnx(...\func_get_args()); + } + + public function multi(): \RedisCluster|bool + { + return $this->lazyObjectReal->multi(...\func_get_args()); + } + + public function object($subcommand, $key): int|string + { + return $this->lazyObjectReal->object(...\func_get_args()); + } + + public function persist($key): bool + { + return $this->lazyObjectReal->persist(...\func_get_args()); + } + + public function pexpire($key, $timeout): bool + { + return $this->lazyObjectReal->pexpire(...\func_get_args()); + } + + public function pexpireat($key, $timestamp): bool + { + return $this->lazyObjectReal->pexpireat(...\func_get_args()); + } + + public function pfadd($key, $elements): bool + { + return $this->lazyObjectReal->pfadd(...\func_get_args()); + } + + public function pfcount($key): int + { + return $this->lazyObjectReal->pfcount(...\func_get_args()); + } + + public function pfmerge($key, $keys): bool + { + return $this->lazyObjectReal->pfmerge(...\func_get_args()); + } + + public function ping($key_or_address, $message): mixed + { + return $this->lazyObjectReal->ping(...\func_get_args()); + } + + public function psetex($key, $timeout, $value): bool + { + return $this->lazyObjectReal->psetex(...\func_get_args()); + } + + public function psubscribe($patterns, $callback): void + { + $this->lazyObjectReal->psubscribe(...\func_get_args()); + } + + public function pttl($key): int + { + return $this->lazyObjectReal->pttl(...\func_get_args()); + } + + public function publish($channel, $message): bool + { + return $this->lazyObjectReal->publish(...\func_get_args()); + } + + public function pubsub($key_or_address, ...$values): mixed + { + return $this->lazyObjectReal->pubsub(...\func_get_args()); + } + + public function punsubscribe($pattern, ...$other_patterns): array|bool + { + return $this->lazyObjectReal->punsubscribe(...\func_get_args()); + } + + public function randomkey($key_or_address): bool|string + { + return $this->lazyObjectReal->randomkey(...\func_get_args()); + } + + public function rawcommand($key_or_address, $command, ...$args): mixed + { + return $this->lazyObjectReal->rawcommand(...\func_get_args()); + } + + public function rename($key, $newkey): bool + { + return $this->lazyObjectReal->rename(...\func_get_args()); + } + + public function renamenx($key, $newkey): bool + { + return $this->lazyObjectReal->renamenx(...\func_get_args()); + } + + public function restore($key, $timeout, $value): bool + { + return $this->lazyObjectReal->restore(...\func_get_args()); + } + + public function role($key_or_address): mixed + { + return $this->lazyObjectReal->role(...\func_get_args()); + } + + public function rpop($key, $count = 0): array|bool|string + { + return $this->lazyObjectReal->rpop(...\func_get_args()); + } + + public function rpoplpush($src, $dst): bool|string + { + return $this->lazyObjectReal->rpoplpush(...\func_get_args()); + } + + public function rpush($key, $value, ...$other_values): bool|int + { + return $this->lazyObjectReal->rpush(...\func_get_args()); + } + + public function rpushx($key, $value): bool|int + { + return $this->lazyObjectReal->rpushx(...\func_get_args()); + } + + public function sadd($key, $value, ...$other_values): bool|int + { + return $this->lazyObjectReal->sadd(...\func_get_args()); + } + + public function saddarray($key, $values): bool|int + { + return $this->lazyObjectReal->saddarray(...\func_get_args()); + } + + public function save($key_or_address): bool + { + return $this->lazyObjectReal->save(...\func_get_args()); + } + + public function scan(&$iterator, $node, $pattern = null, $count = 0): array|bool + { + return $this->lazyObjectReal->scan(...\func_get_args()); + } + + public function scard($key): int + { + return $this->lazyObjectReal->scard(...\func_get_args()); + } + + public function script($key_or_address, ...$args): mixed + { + return $this->lazyObjectReal->script(...\func_get_args()); + } + + public function sdiff($key, ...$other_keys): array + { + return $this->lazyObjectReal->sdiff(...\func_get_args()); + } + + public function sdiffstore($dst, $key, ...$other_keys): int + { + return $this->lazyObjectReal->sdiffstore(...\func_get_args()); + } + + public function set($key, $value): bool + { + return $this->lazyObjectReal->set(...\func_get_args()); + } + + public function setbit($key, $offset, $onoff): bool + { + return $this->lazyObjectReal->setbit(...\func_get_args()); + } + + public function setex($key, $value, $timeout): bool + { + return $this->lazyObjectReal->setex(...\func_get_args()); + } + + public function setnx($key, $value, $timeout): bool + { + return $this->lazyObjectReal->setnx(...\func_get_args()); + } + + public function setoption($option, $value): bool + { + return $this->lazyObjectReal->setoption(...\func_get_args()); + } + + public function setrange($key, $offset, $value): int + { + return $this->lazyObjectReal->setrange(...\func_get_args()); + } + + public function sinter($key, ...$other_keys): array + { + return $this->lazyObjectReal->sinter(...\func_get_args()); + } + + public function sinterstore($dst, $key, ...$other_keys): bool + { + return $this->lazyObjectReal->sinterstore(...\func_get_args()); + } + + public function sismember($key): int + { + return $this->lazyObjectReal->sismember(...\func_get_args()); + } + + public function slowlog($key_or_address, ...$args): mixed + { + return $this->lazyObjectReal->slowlog(...\func_get_args()); + } + + public function smembers($key): array + { + return $this->lazyObjectReal->smembers(...\func_get_args()); + } + + public function smove($src, $dst, $member): bool + { + return $this->lazyObjectReal->smove(...\func_get_args()); + } + + public function sort($key, $options): bool|int|string + { + return $this->lazyObjectReal->sort(...\func_get_args()); + } + + public function spop($key): array|string + { + return $this->lazyObjectReal->spop(...\func_get_args()); + } + + public function srandmember($key, $count = 0): array|string + { + return $this->lazyObjectReal->srandmember(...\func_get_args()); + } + + public function srem($key, $value, ...$other_values): int + { + return $this->lazyObjectReal->srem(...\func_get_args()); + } + + public function sscan($key, &$iterator, $node, $pattern = null, $count = 0): array|bool + { + return $this->lazyObjectReal->sscan(...\func_get_args()); + } + + public function strlen($key): int + { + return $this->lazyObjectReal->strlen(...\func_get_args()); + } + + public function subscribe($channels, $cb): void + { + $this->lazyObjectReal->subscribe(...\func_get_args()); + } + + public function sunion($key, ...$other_keys): array|bool + { + return $this->lazyObjectReal->sunion(...\func_get_args()); + } + + public function sunionstore($dst, $key, ...$other_keys): int + { + return $this->lazyObjectReal->sunionstore(...\func_get_args()); + } + + public function time($key_or_address): array|bool + { + return $this->lazyObjectReal->time(...\func_get_args()); + } + + public function ttl($key): int + { + return $this->lazyObjectReal->ttl(...\func_get_args()); + } + + public function type($key): int + { + return $this->lazyObjectReal->type(...\func_get_args()); + } + + public function unsubscribe($channels): array|bool + { + return $this->lazyObjectReal->unsubscribe(...\func_get_args()); + } + + public function unlink($key, ...$other_keys): array + { + return $this->lazyObjectReal->unlink(...\func_get_args()); + } + + public function unwatch(): bool + { + return $this->lazyObjectReal->unwatch(...\func_get_args()); + } + + public function watch($key, ...$other_keys): bool + { + return $this->lazyObjectReal->watch(...\func_get_args()); + } + + public function xack($key, $group, $ids): int + { + return $this->lazyObjectReal->xack(...\func_get_args()); + } + + public function xadd($key, $id, $values, $maxlen = 0, $approx = false): string + { + return $this->lazyObjectReal->xadd(...\func_get_args()); + } + + public function xclaim($key, $group, $consumer, $min_iddle, $ids, $options): array|string + { + return $this->lazyObjectReal->xclaim(...\func_get_args()); + } + + public function xdel($key, $ids): int + { + return $this->lazyObjectReal->xdel(...\func_get_args()); + } + + public function xgroup($operation, $key = null, $arg1 = null, $arg2 = null, $arg3 = false): mixed + { + return $this->lazyObjectReal->xgroup(...\func_get_args()); + } + + public function xinfo($operation, $arg1 = null, $arg2 = null): mixed + { + return $this->lazyObjectReal->xinfo(...\func_get_args()); + } + + public function xlen($key): int + { + return $this->lazyObjectReal->xlen(...\func_get_args()); + } + + public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): string + { + return $this->lazyObjectReal->xpending(...\func_get_args()); + } + + public function xrange($key, $start, $end, $count = -1): array|bool + { + return $this->lazyObjectReal->xrange(...\func_get_args()); + } + + public function xread($streams, $count = -1, $block = -1): array|bool + { + return $this->lazyObjectReal->xread(...\func_get_args()); + } + + public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): array|bool + { + return $this->lazyObjectReal->xreadgroup(...\func_get_args()); + } + + public function xrevrange($key, $start, $end, $count = -1): array|bool + { + return $this->lazyObjectReal->xrevrange(...\func_get_args()); + } + + public function xtrim($key, $maxlen, $approx = false): int + { + return $this->lazyObjectReal->xtrim(...\func_get_args()); + } + + public function zadd($key, $score, $member, ...$extra_args): int + { + return $this->lazyObjectReal->zadd(...\func_get_args()); + } + + public function zcard($key): int + { + return $this->lazyObjectReal->zcard(...\func_get_args()); + } + + public function zcount($key, $start, $end): int + { + return $this->lazyObjectReal->zcount(...\func_get_args()); + } + + public function zincrby($key, $value, $member): float + { + return $this->lazyObjectReal->zincrby(...\func_get_args()); + } + + public function zinterstore($key, $keys, $weights = null, $aggregate = null): int + { + return $this->lazyObjectReal->zinterstore(...\func_get_args()); + } + + public function zlexcount($key, $min, $max): int + { + return $this->lazyObjectReal->zlexcount(...\func_get_args()); + } + + public function zpopmax($key, $value = null): array|bool + { + return $this->lazyObjectReal->zpopmax(...\func_get_args()); + } + + public function zpopmin($key, $value = null): array|bool + { + return $this->lazyObjectReal->zpopmin(...\func_get_args()); + } + + public function zrange($key, $start, $end, $options = null): array|bool + { + return $this->lazyObjectReal->zrange(...\func_get_args()); + } + + public function zrangebylex($key, $start, $end, $options = null): array|bool + { + return $this->lazyObjectReal->zrangebylex(...\func_get_args()); + } + + public function zrangebyscore($key, $start, $end, $options = null): array|bool + { + return $this->lazyObjectReal->zrangebyscore(...\func_get_args()); + } + + public function zrank($key, $member): int + { + return $this->lazyObjectReal->zrank(...\func_get_args()); + } + + public function zrem($key, $value, ...$other_values): int + { + return $this->lazyObjectReal->zrem(...\func_get_args()); + } + + public function zremrangebylex($key, $min, $max): int + { + return $this->lazyObjectReal->zremrangebylex(...\func_get_args()); + } + + public function zremrangebyrank($key, $min, $max): int + { + return $this->lazyObjectReal->zremrangebyrank(...\func_get_args()); + } + + public function zremrangebyscore($key, $min, $max): int + { + return $this->lazyObjectReal->zremrangebyscore(...\func_get_args()); + } + + public function zrevrange($key, $min, $max, $options = null): array|bool + { + return $this->lazyObjectReal->zrevrange(...\func_get_args()); + } + + public function zrevrangebylex($key, $min, $max, $options = null): array|bool + { + return $this->lazyObjectReal->zrevrangebylex(...\func_get_args()); + } + + public function zrevrangebyscore($key, $min, $max, $options = null): array|bool + { + return $this->lazyObjectReal->zrevrangebyscore(...\func_get_args()); + } + + public function zrevrank($key, $member): int + { + return $this->lazyObjectReal->zrevrank(...\func_get_args()); + } + + public function zscan($key, &$iterator, $pattern = null, $count = 0): array|bool + { + return $this->lazyObjectReal->zscan(...\func_get_args()); + } + + public function zscore($key): float + { + return $this->lazyObjectReal->zscore(...\func_get_args()); + } + + public function zunionstore($key, $keys, $weights = null, $aggregate = null): int + { + return $this->lazyObjectReal->zunionstore(...\func_get_args()); + } +} diff --git a/src/Symfony/Component/Cache/Traits/RedisClusterNodeProxy.php b/src/Symfony/Component/Cache/Traits/RedisClusterNodeProxy.php index afcfb3a1392bf..f5c0baa3e506d 100644 --- a/src/Symfony/Component/Cache/Traits/RedisClusterNodeProxy.php +++ b/src/Symfony/Component/Cache/Traits/RedisClusterNodeProxy.php @@ -24,13 +24,10 @@ */ class RedisClusterNodeProxy { - private array $host; - private \RedisCluster|RedisClusterProxy $redis; - - public function __construct(array $host, \RedisCluster|RedisClusterProxy $redis) - { - $this->host = $host; - $this->redis = $redis; + public function __construct( + private array $host, + private \RedisCluster $redis, + ) { } public function __call(string $method, array $args) diff --git a/src/Symfony/Component/Cache/Traits/RedisClusterProxy.php b/src/Symfony/Component/Cache/Traits/RedisClusterProxy.php index 7ffaf342ba596..c67d5341c78f2 100644 --- a/src/Symfony/Component/Cache/Traits/RedisClusterProxy.php +++ b/src/Symfony/Component/Cache/Traits/RedisClusterProxy.php @@ -11,52 +11,13 @@ namespace Symfony\Component\Cache\Traits; -/** - * @author Alessandro Chitolina - * - * @internal - */ -class RedisClusterProxy -{ - private \RedisCluster $redis; - - public function __construct( - private \Closure $initializer, - ) { - } +class_alias(6.0 <= (float) phpversion('redis') ? RedisCluster6Proxy::class : RedisCluster5Proxy::class, RedisClusterProxy::class); - public function __call(string $method, array $args) +if (false) { + /** + * @internal + */ + class RedisClusterProxy extends \RedisCluster { - $this->redis ??= ($this->initializer)(); - - return $this->redis->{$method}(...$args); - } - - public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ??= ($this->initializer)(); - - return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ??= ($this->initializer)(); - - return $this->redis->scan($iIterator, $strPattern, $iCount); - } - - public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ??= ($this->initializer)(); - - return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ??= ($this->initializer)(); - - return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount); } } diff --git a/src/Symfony/Component/Cache/Traits/RedisProxy.php b/src/Symfony/Component/Cache/Traits/RedisProxy.php index a477dc87e7412..7f4537b1569f9 100644 --- a/src/Symfony/Component/Cache/Traits/RedisProxy.php +++ b/src/Symfony/Component/Cache/Traits/RedisProxy.php @@ -11,55 +11,13 @@ namespace Symfony\Component\Cache\Traits; -/** - * @author Nicolas Grekas - * - * @internal - */ -class RedisProxy -{ - private \Redis $redis; - private \Closure $initializer; - private bool $ready = false; - - public function __construct(\Redis $redis, \Closure $initializer) - { - $this->redis = $redis; - $this->initializer = $initializer; - } - - public function __call(string $method, array $args) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->{$method}(...$args); - } - - public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); +class_alias(6.0 <= (float) phpversion('redis') ? Redis6Proxy::class : Redis5Proxy::class, RedisProxy::class); - return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->scan($iIterator, $strPattern, $iCount); - } - - public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null) +if (false) { + /** + * @internal + */ + class RedisProxy extends \Redis { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount); } } diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index adc61f0048825..ccbcb0f9a5cdf 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -45,10 +45,10 @@ trait RedisTrait 'failover' => 'none', 'ssl' => null, // see https://php.net/context.ssl ]; - private \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis; + private \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis; private MarshallerInterface $marshaller; - private function init(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller) + private function init(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller) { parent::__construct($namespace, $defaultLifetime); @@ -80,7 +80,7 @@ private function init(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|R * * @throws InvalidArgumentException when the DSN is invalid */ - public static function createConnection(string $dsn, array $options = []): \Redis|\RedisArray|\RedisCluster|RedisClusterProxy|RedisProxy|\Predis\ClientInterface + public static function createConnection(string $dsn, array $options = []): \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface { if (str_starts_with($dsn, 'redis:')) { $scheme = 'redis'; @@ -185,9 +185,9 @@ public static function createConnection(string $dsn, array $options = []): \Redi if (is_a($class, \Redis::class, true)) { $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect'; - $redis = new $class(); - $initializer = static function ($redis) use ($connect, $params, $dsn, $auth, $hosts, $tls) { + $initializer = static function () use ($class, $connect, $params, $dsn, $auth, $hosts, $tls) { + $redis = new $class(); $hostIndex = 0; do { $host = $hosts[$hostIndex]['host'] ?? $hosts[$hostIndex]['path']; @@ -223,7 +223,7 @@ public static function createConnection(string $dsn, array $options = []): \Redi restore_error_handler(); } if (!$isConnected) { - $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error, $error) ? sprintf(' (%s)', $error[1]) : ''; + $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError(), $error) ? sprintf(' (%s)', $error[1]) : ''; throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$error.'.'); } @@ -241,14 +241,10 @@ public static function createConnection(string $dsn, array $options = []): \Redi throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$e->getMessage()); } - return true; + return $redis; }; - if ($params['lazy']) { - $redis = new RedisProxy($redis, $initializer); - } else { - $initializer($redis); - } + $redis = $params['lazy'] ? RedisProxy::createLazyProxy($initializer) : $initializer(); } elseif (is_a($class, \RedisArray::class, true)) { foreach ($hosts as $i => $host) { $hosts[$i] = match ($host['scheme']) { @@ -298,7 +294,7 @@ public static function createConnection(string $dsn, array $options = []): \Redi return $redis; }; - $redis = $params['lazy'] ? new RedisClusterProxy($initializer) : $initializer(); + $redis = $params['lazy'] ? RedisClusterProxy::createLazyProxy($initializer) : $initializer(); } elseif (is_a($class, \Predis\ClientInterface::class, true)) { if ($params['redis_cluster']) { $params['cluster'] = 'redis'; @@ -509,7 +505,7 @@ private function pipeline(\Closure $generator, object $redis = null): \Generator $ids = []; $redis ??= $this->redis; - if ($redis instanceof RedisClusterProxy || $redis instanceof \RedisCluster || ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof RedisCluster)) { + if ($redis instanceof \RedisCluster || ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof RedisCluster)) { // phpredis & predis don't support pipelining with RedisCluster // see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining // see https://github.com/nrk/predis/issues/267#issuecomment-123781423 @@ -578,7 +574,7 @@ private function getHosts(): array foreach ($this->redis->_hosts() as $host) { $hosts[] = $this->redis->_instance($host); } - } elseif ($this->redis instanceof RedisClusterProxy || $this->redis instanceof \RedisCluster) { + } elseif ($this->redis instanceof \RedisCluster) { $hosts = []; foreach ($this->redis->_masters() as $host) { $hosts[] = new RedisClusterNodeProxy($host, $this->redis); diff --git a/src/Symfony/Component/Cache/composer.json b/src/Symfony/Component/Cache/composer.json index fb077b9272595..cdccea3eb9cac 100644 --- a/src/Symfony/Component/Cache/composer.json +++ b/src/Symfony/Component/Cache/composer.json @@ -26,7 +26,7 @@ "psr/log": "^1.1|^2|^3", "symfony/cache-contracts": "^1.1.7|^2|^3", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^6.2" }, "require-dev": { "cache/integration-tests": "dev-master", diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php index 59f15b8b2c78c..38f488644deba 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; use Predis\Response\ErrorInterface; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; /** * Redis based session storage handler based on the Redis class @@ -23,8 +21,6 @@ */ class RedisSessionHandler extends AbstractSessionHandler { - private \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis; - /** * Key prefix for shared environments. */ @@ -42,13 +38,14 @@ class RedisSessionHandler extends AbstractSessionHandler * * @throws \InvalidArgumentException When unsupported client or options are passed */ - public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis, array $options = []) - { + public function __construct( + private \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, + array $options = [], + ) { if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) { throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff))); } - $this->redis = $redis; $this->prefix = $options['prefix'] ?? 'sf_s'; $this->ttl = $options['ttl'] ?? null; } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php index 9ad2a109083ac..e390c8feea5cf 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php @@ -13,8 +13,6 @@ use Doctrine\DBAL\DriverManager; use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; /** * @author Nicolas Grekas @@ -37,8 +35,6 @@ public static function createHandler(object|string $connection, array $options = case $connection instanceof \RedisArray: case $connection instanceof \RedisCluster: case $connection instanceof \Predis\ClientInterface: - case $connection instanceof RedisProxy: - case $connection instanceof RedisClusterProxy: return new RedisSessionHandler($connection); case $connection instanceof \Memcached: diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index 1b232eb5450cb..e333a23b7ab31 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -29,6 +29,9 @@ "symfony/expression-language": "^5.4|^6.0", "symfony/rate-limiter": "^5.2|^6.0" }, + "conflict": { + "symfony/cache": "<6.2" + }, "suggest" : { "symfony/mime": "To use the file extension guesser" }, diff --git a/src/Symfony/Component/Lock/Store/RedisStore.php b/src/Symfony/Component/Lock/Store/RedisStore.php index 05fb77b0ecc18..3b3267a5acb6c 100644 --- a/src/Symfony/Component/Lock/Store/RedisStore.php +++ b/src/Symfony/Component/Lock/Store/RedisStore.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Lock\Store; use Predis\Response\ServerException; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Lock\Exception\InvalidTtlException; use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Exception\LockStorageException; @@ -31,21 +29,18 @@ class RedisStore implements SharedLockStoreInterface { use ExpiringStoreTrait; - private \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis; - private float $initialTtl; private bool $supportTime; /** * @param float $initialTtl The expiration delay of locks in seconds */ - public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis, float $initialTtl = 300.0) - { + public function __construct( + private \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, + private float $initialTtl = 300.0, + ) { if ($initialTtl <= 0) { throw new InvalidTtlException(sprintf('"%s()" expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl)); } - - $this->redis = $redis; - $this->initialTtl = $initialTtl; } public function save(Key $key) @@ -231,12 +226,7 @@ public function exists(Key $key): bool private function evaluate(string $script, string $resource, array $args): mixed { - if ( - $this->redis instanceof \Redis || - $this->redis instanceof \RedisCluster || - $this->redis instanceof RedisProxy || - $this->redis instanceof RedisClusterProxy - ) { + if ($this->redis instanceof \Redis || $this->redis instanceof \RedisCluster) { $this->redis->clearLastError(); $result = $this->redis->eval($script, array_merge([$resource], $args), 1); if (null !== $err = $this->redis->getLastError()) { diff --git a/src/Symfony/Component/Lock/Store/StoreFactory.php b/src/Symfony/Component/Lock/Store/StoreFactory.php index 5d4ea0e186e60..94368cc53471a 100644 --- a/src/Symfony/Component/Lock/Store/StoreFactory.php +++ b/src/Symfony/Component/Lock/Store/StoreFactory.php @@ -13,8 +13,6 @@ use Doctrine\DBAL\Connection; use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\PersistingStoreInterface; @@ -32,8 +30,6 @@ public static function createStore(object|string $connection): PersistingStoreIn case $connection instanceof \RedisArray: case $connection instanceof \RedisCluster: case $connection instanceof \Predis\ClientInterface: - case $connection instanceof RedisProxy: - case $connection instanceof RedisClusterProxy: return new RedisStore($connection); case $connection instanceof \Memcached: diff --git a/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php index e6eb6ada19a04..08e5280ad13a9 100644 --- a/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Lock\Tests\Store; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Key; @@ -87,12 +85,7 @@ public function exists(Key $key) private function evaluate(string $script, string $resource, array $args) { - if ( - $this->redis instanceof \Redis || - $this->redis instanceof \RedisCluster || - $this->redis instanceof RedisProxy || - $this->redis instanceof RedisClusterProxy - ) { + if ($this->redis instanceof \Redis || $this->redis instanceof \RedisCluster) { return $this->redis->eval($script, array_merge([$resource], $args), 1); } diff --git a/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php b/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php index 9da56791861df..71cbbae3127c2 100644 --- a/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php @@ -15,7 +15,6 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Cache\Adapter\AbstractAdapter; use Symfony\Component\Cache\Adapter\MemcachedAdapter; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Lock\Store\DoctrineDbalPostgreSqlStore; use Symfony\Component\Lock\Store\DoctrineDbalStore; use Symfony\Component\Lock\Store\FlockStore; @@ -49,9 +48,6 @@ public function validConnections() if (class_exists(\Redis::class)) { yield [new \Redis(), RedisStore::class]; } - if (class_exists(RedisProxy::class)) { - yield [$this->createMock(RedisProxy::class), RedisStore::class]; - } yield [new \Predis\Client(), RedisStore::class]; if (class_exists(\Memcached::class)) { yield [new \Memcached(), MemcachedStore::class]; diff --git a/src/Symfony/Component/Lock/composer.json b/src/Symfony/Component/Lock/composer.json index 21661bbde496c..c7611dc6c7da4 100644 --- a/src/Symfony/Component/Lock/composer.json +++ b/src/Symfony/Component/Lock/composer.json @@ -24,7 +24,8 @@ "predis/predis": "~1.0" }, "conflict": { - "doctrine/dbal": "<2.13" + "doctrine/dbal": "<2.13", + "symfony/cache": "<6.2" }, "autoload": { "psr-4": { "Symfony\\Component\\Lock\\": "" }, diff --git a/src/Symfony/Component/Semaphore/Store/RedisStore.php b/src/Symfony/Component/Semaphore/Store/RedisStore.php index db5a2ef16d209..0b3652c5d9c11 100644 --- a/src/Symfony/Component/Semaphore/Store/RedisStore.php +++ b/src/Symfony/Component/Semaphore/Store/RedisStore.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Semaphore\Store; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Semaphore\Exception\InvalidArgumentException; use Symfony\Component\Semaphore\Exception\SemaphoreAcquiringException; use Symfony\Component\Semaphore\Exception\SemaphoreExpiredException; @@ -27,11 +25,9 @@ */ class RedisStore implements PersistingStoreInterface { - private $redis; - - public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis) - { - $this->redis = $redis; + public function __construct( + private \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, + ) { } public function save(Key $key, float $ttlInSecond) @@ -161,12 +157,7 @@ public function exists(Key $key): bool private function evaluate(string $script, string $resource, array $args): mixed { - if ( - $this->redis instanceof \Redis || - $this->redis instanceof \RedisCluster || - $this->redis instanceof RedisProxy || - $this->redis instanceof RedisClusterProxy - ) { + if ($this->redis instanceof \Redis || $this->redis instanceof \RedisCluster) { return $this->redis->eval($script, array_merge([$resource], $args), 1); } diff --git a/src/Symfony/Component/Semaphore/Store/StoreFactory.php b/src/Symfony/Component/Semaphore/Store/StoreFactory.php index 1d4ec3a72505c..6556f87504ace 100644 --- a/src/Symfony/Component/Semaphore/Store/StoreFactory.php +++ b/src/Symfony/Component/Semaphore/Store/StoreFactory.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Semaphore\Store; use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Semaphore\Exception\InvalidArgumentException; use Symfony\Component\Semaphore\PersistingStoreInterface; @@ -31,8 +29,6 @@ public static function createStore(object|string $connection): PersistingStoreIn case $connection instanceof \RedisArray: case $connection instanceof \RedisCluster: case $connection instanceof \Predis\ClientInterface: - case $connection instanceof RedisProxy: - case $connection instanceof RedisClusterProxy: return new RedisStore($connection); case !\is_string($connection): diff --git a/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php b/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php index 8deec34b444b9..9914dc14c54c0 100644 --- a/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php +++ b/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php @@ -13,7 +13,6 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Semaphore\Store\RedisStore; use Symfony\Component\Semaphore\Store\StoreFactory; @@ -37,9 +36,6 @@ public function validConnections() if (class_exists(\Redis::class)) { yield [$this->createMock(\Redis::class), RedisStore::class]; } - if (class_exists(RedisProxy::class)) { - yield [$this->createMock(RedisProxy::class), RedisStore::class]; - } yield [new \Predis\Client(), RedisStore::class]; if (class_exists(\Redis::class) && class_exists(AbstractAdapter::class)) { yield ['redis://localhost', RedisStore::class]; diff --git a/src/Symfony/Component/Semaphore/composer.json b/src/Symfony/Component/Semaphore/composer.json index b21edccb6b276..ef30494122109 100644 --- a/src/Symfony/Component/Semaphore/composer.json +++ b/src/Symfony/Component/Semaphore/composer.json @@ -26,6 +26,9 @@ "require-dev": { "predis/predis": "~1.0" }, + "conflict": { + "symfony/cache": "<6.2" + }, "autoload": { "psr-4": { "Symfony\\Component\\Semaphore\\": "" }, "exclude-from-classmap": [ From 17e5a5335d7f4809dc955c26aa87b9bf13f239e3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 6 Sep 2022 09:26:22 +0200 Subject: [PATCH 0077/1170] [Cache] update readme --- src/Symfony/Component/Cache/README.md | 12 ++++++------ src/Symfony/Component/Cache/composer.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Cache/README.md b/src/Symfony/Component/Cache/README.md index 74052052c8c33..c466d57883c2f 100644 --- a/src/Symfony/Component/Cache/README.md +++ b/src/Symfony/Component/Cache/README.md @@ -1,13 +1,13 @@ Symfony PSR-6 implementation for caching ======================================== -The Cache component provides an extended -[PSR-6](http://www.php-fig.org/psr/psr-6/) implementation for adding cache to +The Cache component provides extended +[PSR-6](https://www.php-fig.org/psr/psr-6/) implementations for adding cache to your applications. It is designed to have a low overhead so that caching is -fastest. It ships with a few caching adapters for the most widespread and -suited to caching backends. It also provides a `doctrine/cache` proxy adapter -to cover more advanced caching needs and a proxy adapter for greater -interoperability between PSR-6 implementations. +fastest. It ships with adapters for the most widespread caching backends. +It also provides a [PSR-16](https://www.php-fig.org/psr/psr-16/) adapter, +and implementations for [symfony/cache-contracts](https://github.com/symfony/cache-contracts)' +`CacheInterface` and `TagAwareCacheInterface`. Resources --------- diff --git a/src/Symfony/Component/Cache/composer.json b/src/Symfony/Component/Cache/composer.json index 6ef5eac991d20..7a9e8df5a40e4 100644 --- a/src/Symfony/Component/Cache/composer.json +++ b/src/Symfony/Component/Cache/composer.json @@ -1,7 +1,7 @@ { "name": "symfony/cache", "type": "library", - "description": "Provides an extended PSR-6, PSR-16 (and tags) implementation", + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", "keywords": ["caching", "psr6"], "homepage": "https://symfony.com", "license": "MIT", From cdb6c15618a0907a38445d56806d30041eca3bee Mon Sep 17 00:00:00 2001 From: andrey-tech Date: Tue, 6 Sep 2022 14:08:20 +0300 Subject: [PATCH 0078/1170] [Bridge] Fix mkdir() race condition in ProxyCacheWarmer --- src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php index 24cf25be59f3d..08f9fef880e51 100644 --- a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php +++ b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php @@ -49,7 +49,7 @@ public function warmUp($cacheDir) foreach ($this->registry->getManagers() as $em) { // we need the directory no matter the proxy cache generation strategy if (!is_dir($proxyCacheDir = $em->getConfiguration()->getProxyDir())) { - if (false === @mkdir($proxyCacheDir, 0777, true)) { + if (false === @mkdir($proxyCacheDir, 0777, true) && !is_dir($proxyCacheDir)) { throw new \RuntimeException(sprintf('Unable to create the Doctrine Proxy directory "%s".', $proxyCacheDir)); } } elseif (!is_writable($proxyCacheDir)) { From fdd73c7f99343242b9d921529a7ca62991e73f61 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Tue, 6 Sep 2022 14:53:09 +0200 Subject: [PATCH 0079/1170] [Validator][UID] Stop to first ULID format violation --- src/Symfony/Component/Validator/Constraints/UlidValidator.php | 4 ++++ .../Validator/Tests/Constraints/UlidValidatorTest.php | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Symfony/Component/Validator/Constraints/UlidValidator.php b/src/Symfony/Component/Validator/Constraints/UlidValidator.php index dedaabcfc5998..ad741244132c8 100644 --- a/src/Symfony/Component/Validator/Constraints/UlidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UlidValidator.php @@ -48,6 +48,8 @@ public function validate($value, Constraint $constraint) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(26 > \strlen($value) ? Ulid::TOO_SHORT_ERROR : Ulid::TOO_LONG_ERROR) ->addViolation(); + + return; } if (\strlen($value) !== strspn($value, '0123456789ABCDEFGHJKMNPQRSTVWXYZabcdefghjkmnpqrstvwxyz')) { @@ -55,6 +57,8 @@ public function validate($value, Constraint $constraint) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Ulid::INVALID_CHARACTERS_ERROR) ->addViolation(); + + return; } // Largest valid ULID is '7ZZZZZZZZZZZZZZZZZZZZZZZZZ' diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php index 2c97c97604e6e..8948cbabd8d9f 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php @@ -78,6 +78,7 @@ public function getInvalidUlids() ['01ARZ3NDEKTSV4RRFFQ69G5FAVA', Ulid::TOO_LONG_ERROR], ['01ARZ3NDEKTSV4RRFFQ69G5FAO', Ulid::INVALID_CHARACTERS_ERROR], ['Z1ARZ3NDEKTSV4RRFFQ69G5FAV', Ulid::TOO_LARGE_ERROR], + ['not-even-ulid-like', Ulid::TOO_SHORT_ERROR], ]; } From 4cb83841374d244ed55e3df20bdaf03978b25fad Mon Sep 17 00:00:00 2001 From: Julien Boudry Date: Sat, 27 Aug 2022 12:23:32 +0200 Subject: [PATCH 0080/1170] [Console] Terminal Color Mode refactoring: Adding a way to force color mode by user, fewer getenv() calls, simpler tests. It can be useful for example in the case of an environment where none of the expected environment variables are available (Docker container...) , but where the support of a specific mode is imperative. --- src/Symfony/Component/Console/Color.php | 2 +- src/Symfony/Component/Console/Terminal.php | 38 ++++++++++++++++--- .../Component/Console/Tests/ColorTest.php | 25 ++++-------- .../Component/Console/Tests/TerminalTest.php | 29 ++++++++++++-- 4 files changed, 67 insertions(+), 27 deletions(-) diff --git a/src/Symfony/Component/Console/Color.php b/src/Symfony/Component/Console/Color.php index 153d001334b9d..60ed046a660a2 100644 --- a/src/Symfony/Component/Console/Color.php +++ b/src/Symfony/Component/Console/Color.php @@ -117,7 +117,7 @@ private function parseColor(string $color, bool $background = false): string } if ('#' === $color[0]) { - return ($background ? '4' : '3').Terminal::getTermColorSupport()->convertFromHexToAnsiColorCode($color); + return ($background ? '4' : '3').Terminal::getColorMode()->convertFromHexToAnsiColorCode($color); } if (isset(self::COLORS[$color])) { diff --git a/src/Symfony/Component/Console/Terminal.php b/src/Symfony/Component/Console/Terminal.php index 5b8ca797da5ce..216c609faf504 100644 --- a/src/Symfony/Component/Console/Terminal.php +++ b/src/Symfony/Component/Console/Terminal.php @@ -15,6 +15,9 @@ class Terminal { + public const DEFAULT_COLOR_MODE = AnsiColorMode::Ansi4; + + private static ?AnsiColorMode $colorMode = null; private static ?int $width = null; private static ?int $height = null; private static ?bool $stty = null; @@ -23,18 +26,27 @@ class Terminal * About Ansi color types: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors * For more information about true color support with terminals https://github.com/termstandard/colors/. */ - public static function getTermColorSupport(): AnsiColorMode + public static function getColorMode(): AnsiColorMode { + // Use Cache from previous run (or user forced mode) + if (null !== self::$colorMode) { + return self::$colorMode; + } + // Try with $COLORTERM first if (\is_string($colorterm = getenv('COLORTERM'))) { $colorterm = strtolower($colorterm); if (str_contains($colorterm, 'truecolor')) { - return AnsiColorMode::Ansi24; + self::setColorMode(AnsiColorMode::Ansi24); + + return self::$colorMode; } if (str_contains($colorterm, '256color')) { - return AnsiColorMode::Ansi8; + self::setColorMode(AnsiColorMode::Ansi8); + + return self::$colorMode; } } @@ -43,15 +55,29 @@ public static function getTermColorSupport(): AnsiColorMode $term = strtolower($term); if (str_contains($term, 'truecolor')) { - return AnsiColorMode::Ansi24; + self::setColorMode(AnsiColorMode::Ansi24); + + return self::$colorMode; } if (str_contains($term, '256color')) { - return AnsiColorMode::Ansi8; + self::setColorMode(AnsiColorMode::Ansi8); + + return self::$colorMode; } } - return AnsiColorMode::Ansi4; + self::setColorMode(self::DEFAULT_COLOR_MODE); + + return self::$colorMode; + } + + /** + * Force a terminal color mode rendering. + */ + public static function setColorMode(?AnsiColorMode $colorMode): void + { + self::$colorMode = $colorMode; } /** diff --git a/src/Symfony/Component/Console/Tests/ColorTest.php b/src/Symfony/Component/Console/Tests/ColorTest.php index 1c088b768f190..2a47f73f5f8c7 100644 --- a/src/Symfony/Component/Console/Tests/ColorTest.php +++ b/src/Symfony/Component/Console/Tests/ColorTest.php @@ -13,6 +13,8 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Color; +use Symfony\Component\Console\Output\AnsiColorMode; +use Symfony\Component\Console\Terminal; class ColorTest extends TestCase { @@ -33,8 +35,7 @@ public function testAnsi4Colors() public function testTrueColors() { - $colorterm = getenv('COLORTERM'); - putenv('COLORTERM=truecolor'); + Terminal::setColorMode(AnsiColorMode::Ansi24); try { $color = new Color('#fff', '#000'); @@ -43,17 +44,13 @@ public function testTrueColors() $color = new Color('#ffffff', '#000000'); $this->assertSame("\033[38;2;255;255;255;48;2;0;0;0m \033[39;49m", $color->apply(' ')); } finally { - (false !== $colorterm) ? putenv('COLORTERM='.$colorterm) : putenv('COLORTERM'); + Terminal::setColorMode(null); } } public function testDegradedTrueColorsToAnsi4() { - $colorterm = getenv('COLORTERM'); - $term = getenv('TERM'); - - putenv('COLORTERM='); - putenv('TERM='); + Terminal::setColorMode(AnsiColorMode::Ansi4); try { $color = new Color('#f00', '#ff0'); @@ -62,18 +59,13 @@ public function testDegradedTrueColorsToAnsi4() $color = new Color('#c0392b', '#f1c40f'); $this->assertSame("\033[31;43m \033[39;49m", $color->apply(' ')); } finally { - (false !== $colorterm) ? putenv('COLORTERM='.$colorterm) : putenv('COLORTERM'); - (false !== $term) ? putenv('TERM='.$term) : putenv('TERM'); + Terminal::setColorMode(null); } } public function testDegradedTrueColorsToAnsi8() { - $colorterm = getenv('COLORTERM'); - $term = getenv('TERM'); - - putenv('COLORTERM='); - putenv('TERM=symfonyTest-256color'); + Terminal::setColorMode(AnsiColorMode::Ansi8); try { $color = new Color('#f57255', '#8993c0'); @@ -82,8 +74,7 @@ public function testDegradedTrueColorsToAnsi8() $color = new Color('#000000', '#ffffff'); $this->assertSame("\033[38;5;16;48;5;231m \033[39;49m", $color->apply(' ')); } finally { - (false !== $colorterm) ? putenv('COLORTERM='.$colorterm) : putenv('COLORTERM'); - (false !== $term) ? putenv('TERM='.$term) : putenv('TERM'); + Terminal::setColorMode(null); } } } diff --git a/src/Symfony/Component/Console/Tests/TerminalTest.php b/src/Symfony/Component/Console/Tests/TerminalTest.php index 510ab021c0531..5565ff51cc50f 100644 --- a/src/Symfony/Component/Console/Tests/TerminalTest.php +++ b/src/Symfony/Component/Console/Tests/TerminalTest.php @@ -98,7 +98,7 @@ public function testSttyOnWindows() /** * @dataProvider provideTerminalColorEnv */ - public function testGetTermColorSupport(?string $testColorTerm, ?string $testTerm, AnsiColorMode $expected) + public function testGetColorMode(?string $testColorTerm, ?string $testTerm, AnsiColorMode $expected) { $oriColorTerm = getenv('COLORTERM'); $oriTerm = getenv('TERM'); @@ -107,10 +107,11 @@ public function testGetTermColorSupport(?string $testColorTerm, ?string $testTer putenv($testColorTerm ? "COLORTERM={$testColorTerm}" : 'COLORTERM'); putenv($testTerm ? "TERM={$testTerm}" : 'TERM'); - $this->assertSame($expected, Terminal::getTermColorSupport()); + $this->assertSame($expected, Terminal::getColorMode()); } finally { (false !== $oriColorTerm) ? putenv('COLORTERM='.$oriColorTerm) : putenv('COLORTERM'); (false !== $oriTerm) ? putenv('TERM='.$oriTerm) : putenv('TERM'); + Terminal::setColorMode(null); } } @@ -123,6 +124,28 @@ public function provideTerminalColorEnv(): \Generator yield [null, 'xterm-TRUECOLOR', AnsiColorMode::Ansi24]; yield [null, 'xterm-256color', AnsiColorMode::Ansi8]; yield [null, 'xterm-256COLOR', AnsiColorMode::Ansi8]; - yield [null, null, AnsiColorMode::Ansi4]; + yield [null, null, Terminal::DEFAULT_COLOR_MODE]; + } + + public function testSetColorMode() + { + $oriColorTerm = getenv('COLORTERM'); + $oriTerm = getenv('TERM'); + + try { + putenv('COLORTERM'); + putenv('TERM'); + $this->assertSame(Terminal::DEFAULT_COLOR_MODE, Terminal::getColorMode()); + + putenv('COLORTERM=256color'); + $this->assertSame(Terminal::DEFAULT_COLOR_MODE, Terminal::getColorMode()); // Terminal color mode is cached at first call. Terminal cannot change during execution. + + Terminal::setColorMode(AnsiColorMode::Ansi24); // Force change by user. + $this->assertSame(AnsiColorMode::Ansi24, Terminal::getColorMode()); + } finally { + (false !== $oriColorTerm) ? putenv('COLORTERM='.$oriColorTerm) : putenv('COLORTERM'); + (false !== $oriTerm) ? putenv('TERM='.$oriTerm) : putenv('TERM'); + Terminal::setColorMode(null); + } } } From 0f1bc365946f6c749fa5c65dea3261515501947a Mon Sep 17 00:00:00 2001 From: Barney Hanlon <445227+shrikeh@users.noreply.github.com> Date: Wed, 7 Sep 2022 11:28:16 +0100 Subject: [PATCH 0081/1170] [Uid] Add interface for `getDateTime()` and apply to relevant UIDs --- src/Symfony/Component/Uid/CHANGELOG.md | 5 +++++ .../Uid/Factory/TimeBasedUuidFactory.php | 5 ++--- .../Component/Uid/TimeBasedUidInterface.php | 22 +++++++++++++++++++ src/Symfony/Component/Uid/Ulid.php | 2 +- src/Symfony/Component/Uid/UuidV1.php | 2 +- src/Symfony/Component/Uid/UuidV6.php | 2 +- 6 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 src/Symfony/Component/Uid/TimeBasedUidInterface.php diff --git a/src/Symfony/Component/Uid/CHANGELOG.md b/src/Symfony/Component/Uid/CHANGELOG.md index 6b6605bda3d03..ccf349411d48b 100644 --- a/src/Symfony/Component/Uid/CHANGELOG.md +++ b/src/Symfony/Component/Uid/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.2 +--- + + * Add `TimeBasedUidInterface` to `Ulid`, `UuidV1`, and `UuidV6` to describe that they present `getDateTime()` as an available method + 5.4 --- diff --git a/src/Symfony/Component/Uid/Factory/TimeBasedUuidFactory.php b/src/Symfony/Component/Uid/Factory/TimeBasedUuidFactory.php index dffb50e258baf..157b4dca75ab9 100644 --- a/src/Symfony/Component/Uid/Factory/TimeBasedUuidFactory.php +++ b/src/Symfony/Component/Uid/Factory/TimeBasedUuidFactory.php @@ -11,9 +11,8 @@ namespace Symfony\Component\Uid\Factory; +use Symfony\Component\Uid\TimeBasedUidInterface; use Symfony\Component\Uid\Uuid; -use Symfony\Component\Uid\UuidV1; -use Symfony\Component\Uid\UuidV6; class TimeBasedUuidFactory { @@ -26,7 +25,7 @@ public function __construct(string $class, Uuid $node = null) $this->node = $node; } - public function create(\DateTimeInterface $time = null): UuidV6|UuidV1 + public function create(\DateTimeInterface $time = null): Uuid&TimeBasedUidInterface { $class = $this->class; diff --git a/src/Symfony/Component/Uid/TimeBasedUidInterface.php b/src/Symfony/Component/Uid/TimeBasedUidInterface.php new file mode 100644 index 0000000000000..853ba4d111968 --- /dev/null +++ b/src/Symfony/Component/Uid/TimeBasedUidInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Uid; + +/** + * Interface to describe UIDs that contain a DateTimeImmutable as part of their behaviour. + * + * @author Barney Hanlon + */ +interface TimeBasedUidInterface +{ + public function getDateTime(): \DateTimeImmutable; +} diff --git a/src/Symfony/Component/Uid/Ulid.php b/src/Symfony/Component/Uid/Ulid.php index 3bd7e2bca3d25..e55cacfd3fd67 100644 --- a/src/Symfony/Component/Uid/Ulid.php +++ b/src/Symfony/Component/Uid/Ulid.php @@ -18,7 +18,7 @@ * * @author Nicolas Grekas */ -class Ulid extends AbstractUid +class Ulid extends AbstractUid implements TimeBasedUidInterface { protected const NIL = '00000000000000000000000000'; diff --git a/src/Symfony/Component/Uid/UuidV1.php b/src/Symfony/Component/Uid/UuidV1.php index 1f4ad3314a957..aedd70588b5e7 100644 --- a/src/Symfony/Component/Uid/UuidV1.php +++ b/src/Symfony/Component/Uid/UuidV1.php @@ -16,7 +16,7 @@ * * @author Grégoire Pineau */ -class UuidV1 extends Uuid +class UuidV1 extends Uuid implements TimeBasedUidInterface { protected const TYPE = 1; diff --git a/src/Symfony/Component/Uid/UuidV6.php b/src/Symfony/Component/Uid/UuidV6.php index 3e753f6a8ab90..83ba49daa2d73 100644 --- a/src/Symfony/Component/Uid/UuidV6.php +++ b/src/Symfony/Component/Uid/UuidV6.php @@ -18,7 +18,7 @@ * * @author Nicolas Grekas */ -class UuidV6 extends Uuid +class UuidV6 extends Uuid implements TimeBasedUidInterface { protected const TYPE = 6; From d822e41538d55c4f78092160f1e8c51fc8858f42 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 8 Sep 2022 10:19:33 +0200 Subject: [PATCH 0082/1170] [Uid] Fix validating UUID variant bits --- src/Symfony/Component/Uid/Tests/UuidTest.php | 26 ++++++++++++++++++++ src/Symfony/Component/Uid/Ulid.php | 4 +-- src/Symfony/Component/Uid/Uuid.php | 22 +++++++++++------ src/Symfony/Component/Uid/UuidV1.php | 2 +- src/Symfony/Component/Uid/UuidV3.php | 5 ++++ src/Symfony/Component/Uid/UuidV4.php | 2 +- src/Symfony/Component/Uid/UuidV5.php | 5 ++++ src/Symfony/Component/Uid/UuidV6.php | 2 +- 8 files changed, 55 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Component/Uid/Tests/UuidTest.php b/src/Symfony/Component/Uid/Tests/UuidTest.php index dad559f5a31ce..3e3c36c02ab03 100644 --- a/src/Symfony/Component/Uid/Tests/UuidTest.php +++ b/src/Symfony/Component/Uid/Tests/UuidTest.php @@ -44,6 +44,32 @@ public function provideInvalidUuids(): iterable yield ['these are just thirty-six characters']; } + /** + * @dataProvider provideInvalidVariant + */ + public function testInvalidVariant(string $uuid) + { + $uuid = new Uuid($uuid); + $this->assertFalse(Uuid::isValid($uuid)); + + $uuid = (string) $uuid; + $class = Uuid::class.'V'.$uuid[14]; + + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid UUIDv'.$uuid[14].': "'.$uuid.'".'); + + new $class($uuid); + } + + public function provideInvalidVariant(): iterable + { + yield ['8dac64d3-937a-1e7c-fa1d-d5d6c06a61f5']; + yield ['8dac64d3-937a-3e7c-fa1d-d5d6c06a61f5']; + yield ['8dac64d3-937a-4e7c-fa1d-d5d6c06a61f5']; + yield ['8dac64d3-937a-5e7c-fa1d-d5d6c06a61f5']; + yield ['8dac64d3-937a-6e7c-fa1d-d5d6c06a61f5']; + } + public function testConstructorWithValidUuid() { $uuid = new UuidV4(self::A_UUID_V4); diff --git a/src/Symfony/Component/Uid/Ulid.php b/src/Symfony/Component/Uid/Ulid.php index 0ed0673ee3183..a23481612745e 100644 --- a/src/Symfony/Component/Uid/Ulid.php +++ b/src/Symfony/Component/Uid/Ulid.php @@ -64,8 +64,8 @@ public static function isValid(string $ulid): bool */ public static function fromString(string $ulid): parent { - if (36 === \strlen($ulid) && Uuid::isValid($ulid)) { - $ulid = (new Uuid($ulid))->toBinary(); + if (36 === \strlen($ulid) && preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$}Di', $ulid)) { + $ulid = uuid_parse($ulid); } elseif (22 === \strlen($ulid) && 22 === strspn($ulid, BinaryUtil::BASE58[''])) { $ulid = str_pad(BinaryUtil::fromBase($ulid, BinaryUtil::BASE58), 16, "\0", \STR_PAD_LEFT); } diff --git a/src/Symfony/Component/Uid/Uuid.php b/src/Symfony/Component/Uid/Uuid.php index 58c2871c49665..a68c5092f09de 100644 --- a/src/Symfony/Component/Uid/Uuid.php +++ b/src/Symfony/Component/Uid/Uuid.php @@ -26,7 +26,7 @@ class Uuid extends AbstractUid protected const TYPE = 0; protected const NIL = '00000000-0000-0000-0000-000000000000'; - public function __construct(string $uuid) + public function __construct(string $uuid, bool $checkVariant = false) { $type = preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$}Di', $uuid) ? (int) $uuid[14] : false; @@ -35,6 +35,10 @@ public function __construct(string $uuid) } $this->uid = strtolower($uuid); + + if ($checkVariant && !\in_array($this->uid[19], ['8', '9', 'a', 'b'], true)) { + throw new \InvalidArgumentException(sprintf('Invalid UUID%s: "%s".', static::TYPE ? 'v'.static::TYPE : '', $uuid)); + } } /** @@ -67,12 +71,14 @@ public static function fromString(string $uuid): parent return new NilUuid(); } - switch ($uuid[14]) { - case UuidV1::TYPE: return new UuidV1($uuid); - case UuidV3::TYPE: return new UuidV3($uuid); - case UuidV4::TYPE: return new UuidV4($uuid); - case UuidV5::TYPE: return new UuidV5($uuid); - case UuidV6::TYPE: return new UuidV6($uuid); + if (\in_array($uuid[19], ['8', '9', 'a', 'b', 'A', 'B'], true)) { + switch ($uuid[14]) { + case UuidV1::TYPE: return new UuidV1($uuid); + case UuidV3::TYPE: return new UuidV3($uuid); + case UuidV4::TYPE: return new UuidV4($uuid); + case UuidV5::TYPE: return new UuidV5($uuid); + case UuidV6::TYPE: return new UuidV6($uuid); + } } return new self($uuid); @@ -111,7 +117,7 @@ final public static function v6(): UuidV6 public static function isValid(string $uuid): bool { - if (!preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$}Di', $uuid)) { + if (!preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){2}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$}Di', $uuid)) { return false; } diff --git a/src/Symfony/Component/Uid/UuidV1.php b/src/Symfony/Component/Uid/UuidV1.php index 7c1fceb9065e8..3b8cd5e3fc87a 100644 --- a/src/Symfony/Component/Uid/UuidV1.php +++ b/src/Symfony/Component/Uid/UuidV1.php @@ -27,7 +27,7 @@ public function __construct(string $uuid = null) if (null === $uuid) { $this->uid = uuid_create(static::TYPE); } else { - parent::__construct($uuid); + parent::__construct($uuid, true); } } diff --git a/src/Symfony/Component/Uid/UuidV3.php b/src/Symfony/Component/Uid/UuidV3.php index f89f2d7bb313b..cc9f016b47192 100644 --- a/src/Symfony/Component/Uid/UuidV3.php +++ b/src/Symfony/Component/Uid/UuidV3.php @@ -21,4 +21,9 @@ class UuidV3 extends Uuid { protected const TYPE = 3; + + public function __construct(string $uuid) + { + parent::__construct($uuid, true); + } } diff --git a/src/Symfony/Component/Uid/UuidV4.php b/src/Symfony/Component/Uid/UuidV4.php index 897e1ba627213..9724b67de2c59 100644 --- a/src/Symfony/Component/Uid/UuidV4.php +++ b/src/Symfony/Component/Uid/UuidV4.php @@ -30,7 +30,7 @@ public function __construct(string $uuid = null) $this->uid = substr($uuid, 0, 8).'-'.substr($uuid, 8, 4).'-'.substr($uuid, 12, 4).'-'.substr($uuid, 16, 4).'-'.substr($uuid, 20, 12); } else { - parent::__construct($uuid); + parent::__construct($uuid, true); } } } diff --git a/src/Symfony/Component/Uid/UuidV5.php b/src/Symfony/Component/Uid/UuidV5.php index f671f41250373..74ab133a296c8 100644 --- a/src/Symfony/Component/Uid/UuidV5.php +++ b/src/Symfony/Component/Uid/UuidV5.php @@ -21,4 +21,9 @@ class UuidV5 extends Uuid { protected const TYPE = 5; + + public function __construct(string $uuid) + { + parent::__construct($uuid, true); + } } diff --git a/src/Symfony/Component/Uid/UuidV6.php b/src/Symfony/Component/Uid/UuidV6.php index 5ba260e82a521..bf307ef41916a 100644 --- a/src/Symfony/Component/Uid/UuidV6.php +++ b/src/Symfony/Component/Uid/UuidV6.php @@ -29,7 +29,7 @@ public function __construct(string $uuid = null) if (null === $uuid) { $this->uid = static::generate(); } else { - parent::__construct($uuid); + parent::__construct($uuid, true); } } From 87738ba11894d740d76a157e723d34143f1c95ed Mon Sep 17 00:00:00 2001 From: martkop26 <112486711+martkop26@users.noreply.github.com> Date: Tue, 30 Aug 2022 15:50:25 +0200 Subject: [PATCH 0083/1170] [HttpClient] Fix computing retry delay when using RetryableHttpClient --- .../HttpClient/RetryableHttpClient.php | 2 +- .../Tests/RetryableHttpClientTest.php | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/RetryableHttpClient.php b/src/Symfony/Component/HttpClient/RetryableHttpClient.php index 4df466f4ceb31..9a5b503fa25fa 100644 --- a/src/Symfony/Component/HttpClient/RetryableHttpClient.php +++ b/src/Symfony/Component/HttpClient/RetryableHttpClient.php @@ -138,7 +138,7 @@ private function getDelayFromHeader(array $headers): ?int { if (null !== $after = $headers['retry-after'][0] ?? null) { if (is_numeric($after)) { - return (int) $after * 1000; + return (int) ($after * 1000); } if (false !== $time = strtotime($after)) { diff --git a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php index 6bd9a1f15e788..21e63badb9caa 100644 --- a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php @@ -187,4 +187,42 @@ public function testCancelOnTimeout() $response->cancel(); } } + + public function testRetryWithDelay() + { + $retryAfter = '0.46'; + + $client = new RetryableHttpClient( + new MockHttpClient([ + new MockResponse('', [ + 'http_code' => 503, + 'response_headers' => [ + 'retry-after' => $retryAfter, + ], + ]), + new MockResponse('', [ + 'http_code' => 200, + ]), + ]), + new GenericRetryStrategy(), + 1, + $logger = new class() extends TestLogger { + public array $context = []; + + public function log($level, $message, array $context = []): void + { + $this->context = $context; + parent::log($level, $message, $context); + } + }, + ); + + $client->request('GET', 'http://example.com/foo-bar')->getContent(); + + $delay = $logger->context['delay'] ?? null; + + $this->assertArrayHasKey('delay', $logger->context); + $this->assertNotNull($delay); + $this->assertSame((int) ($retryAfter * 1000), $delay); + } } From 1f4cfc799a7c50105ac0f99fe2d76e753e135a7b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 8 Sep 2022 11:37:16 +0200 Subject: [PATCH 0084/1170] [HttpClient] fix merge --- .../Component/HttpClient/Tests/RetryableHttpClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php index 21e63badb9caa..5c6e17ea31832 100644 --- a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php @@ -207,7 +207,7 @@ public function testRetryWithDelay() new GenericRetryStrategy(), 1, $logger = new class() extends TestLogger { - public array $context = []; + public $context = []; public function log($level, $message, array $context = []): void { From 23926cd63023f5046c0ac4c6faf130a12a2a7e19 Mon Sep 17 00:00:00 2001 From: Barney Hanlon <445227+shrikeh@users.noreply.github.com> Date: Thu, 8 Sep 2022 11:54:13 +0100 Subject: [PATCH 0085/1170] Change author email to better present this contribution was done on company time --- src/Symfony/Component/Uid/TimeBasedUidInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Uid/TimeBasedUidInterface.php b/src/Symfony/Component/Uid/TimeBasedUidInterface.php index 853ba4d111968..f296aefb93c53 100644 --- a/src/Symfony/Component/Uid/TimeBasedUidInterface.php +++ b/src/Symfony/Component/Uid/TimeBasedUidInterface.php @@ -14,7 +14,7 @@ /** * Interface to describe UIDs that contain a DateTimeImmutable as part of their behaviour. * - * @author Barney Hanlon + * @author Barney Hanlon */ interface TimeBasedUidInterface { From c6d455a6106fd5e5633b41270ebc3450a25b5ec7 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Thu, 8 Sep 2022 14:58:12 +0200 Subject: [PATCH 0086/1170] Remove `size` FormView variable --- src/Symfony/Component/Form/Extension/Core/Type/FormType.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php index 451e7381d12e3..7b5cffe821441 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php @@ -103,7 +103,6 @@ public function buildView(FormView $view, FormInterface $form, array $options) 'value' => $form->getViewData(), 'data' => $form->getNormData(), 'required' => $form->isRequired(), - 'size' => null, 'label_attr' => $options['label_attr'], 'help' => $options['help'], 'help_attr' => $options['help_attr'], From d3a81f9f00e27fee0c5341155eb4594df0e76819 Mon Sep 17 00:00:00 2001 From: k0d3r1s Date: Thu, 8 Sep 2022 20:40:29 +0300 Subject: [PATCH 0087/1170] [HttpKernel] add missing allowed interface --- .../Controller/ArgumentResolver/TraceableValueResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php index 2b9e71cb3beba..eb4ac7b06a217 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php @@ -24,7 +24,7 @@ */ final class TraceableValueResolver implements ArgumentValueResolverInterface, ValueResolverInterface { - private ArgumentValueResolverInterface $inner; + private ArgumentValueResolverInterface|ValueResolverInterface $inner; private Stopwatch $stopwatch; public function __construct(ArgumentValueResolverInterface|ValueResolverInterface $inner, Stopwatch $stopwatch) From 6e8fc95fe22cac87698684ca5c6812b99f58978a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 8 Sep 2022 20:41:21 +0200 Subject: [PATCH 0088/1170] [HttpClient] fix merge --- .../Component/HttpClient/Tests/RetryableHttpClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php index 5c6e17ea31832..85a03fd225183 100644 --- a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php @@ -214,7 +214,7 @@ public function log($level, $message, array $context = []): void $this->context = $context; parent::log($level, $message, $context); } - }, + } ); $client->request('GET', 'http://example.com/foo-bar')->getContent(); From 7ee57e951f3bd10b558d878799438dcabbe504d3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 7 Sep 2022 17:38:11 +0200 Subject: [PATCH 0089/1170] [Uid] Add MaxUuid and MaxUlid --- .github/workflows/psalm.yml | 2 + .../Tests/Functional/UidTest.php | 5 +-- src/Symfony/Component/Uid/CHANGELOG.md | 3 +- .../Uid/Command/InspectUuidCommand.php | 15 +++++--- src/Symfony/Component/Uid/MaxUlid.php | 20 ++++++++++ src/Symfony/Component/Uid/MaxUuid.php | 22 +++++++++++ .../Tests/Command/InspectUuidCommandTest.php | 8 ++-- src/Symfony/Component/Uid/Tests/UlidTest.php | 18 +++++++++ src/Symfony/Component/Uid/Tests/UuidTest.php | 18 +++++++++ src/Symfony/Component/Uid/Ulid.php | 37 ++++++++++--------- src/Symfony/Component/Uid/Uuid.php | 5 +++ 11 files changed, 120 insertions(+), 33 deletions(-) create mode 100644 src/Symfony/Component/Uid/MaxUlid.php create mode 100644 src/Symfony/Component/Uid/MaxUuid.php diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 771aae12a4f0f..6e866ce2e2c57 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -49,6 +49,8 @@ jobs: git checkout composer.json git checkout -m ${{ github.base_ref }} + # to be removed when psalm adds support for intersection types + sed -i 's/Uuid&/Uuid|/' src/Symfony/Component/Uid/Factory/TimeBasedUuidFactory.php ./vendor/bin/psalm.phar --set-baseline=.github/psalm/psalm.baseline.xml --no-progress git checkout -m FETCH_HEAD diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/UidTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/UidTest.php index 28406b65bd70c..642e363496b3b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/UidTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/UidTest.php @@ -18,9 +18,6 @@ use Symfony\Component\Uid\UuidV4; use Symfony\Component\Uid\UuidV6; -/** - * @see UidController - */ class UidTest extends AbstractWebTestCase { protected function setUp(): void @@ -41,7 +38,7 @@ public function testArgumentValueResolverDisabled() $exception = reset($exceptions); $this->assertInstanceOf(\TypeError::class, $exception); - $this->assertStringContainsString('Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller\UidController::anyFormat(): Argument #1 ($userId) must be of type Symfony\Component\Uid\UuidV1, string given', $exception->getMessage()); + $this->assertStringContainsString(UidController::class.'::anyFormat(): Argument #1 ($userId) must be of type Symfony\Component\Uid\UuidV1, string given', $exception->getMessage()); } public function testArgumentValueResolverEnabled() diff --git a/src/Symfony/Component/Uid/CHANGELOG.md b/src/Symfony/Component/Uid/CHANGELOG.md index ccf349411d48b..7b5142ba5c7d2 100644 --- a/src/Symfony/Component/Uid/CHANGELOG.md +++ b/src/Symfony/Component/Uid/CHANGELOG.md @@ -4,7 +4,8 @@ CHANGELOG 6.2 --- - * Add `TimeBasedUidInterface` to `Ulid`, `UuidV1`, and `UuidV6` to describe that they present `getDateTime()` as an available method + * Add `TimeBasedUidInterface` to describe UIDs that embed a timestamp + * Add `MaxUuid` and `MaxUlid` 5.4 --- diff --git a/src/Symfony/Component/Uid/Command/InspectUuidCommand.php b/src/Symfony/Component/Uid/Command/InspectUuidCommand.php index 25a7b6fda3025..cc830bc35f47d 100644 --- a/src/Symfony/Component/Uid/Command/InspectUuidCommand.php +++ b/src/Symfony/Component/Uid/Command/InspectUuidCommand.php @@ -19,9 +19,10 @@ use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Uid\MaxUuid; +use Symfony\Component\Uid\NilUuid; +use Symfony\Component\Uid\TimeBasedUidInterface; use Symfony\Component\Uid\Uuid; -use Symfony\Component\Uid\UuidV1; -use Symfony\Component\Uid\UuidV6; #[AsCommand(name: 'uuid:inspect', description: 'Inspect a UUID')] class InspectUuidCommand extends Command @@ -56,10 +57,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 1; } - if (-1 === $version = uuid_type($uuid)) { + if (new NilUuid() == $uuid) { $version = 'nil'; - } elseif (0 === $version || 2 === $version || 6 < $version) { - $version = 'unknown'; + } elseif (new MaxUuid() == $uuid) { + $version = 'max'; + } else { + $version = uuid_type($uuid); } $rows = [ @@ -70,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ['toHex', $uuid->toHex()], ]; - if ($uuid instanceof UuidV1 || $uuid instanceof UuidV6) { + if ($uuid instanceof TimeBasedUidInterface) { $rows[] = new TableSeparator(); $rows[] = ['Time', $uuid->getDateTime()->format('Y-m-d H:i:s.u \U\T\C')]; } diff --git a/src/Symfony/Component/Uid/MaxUlid.php b/src/Symfony/Component/Uid/MaxUlid.php new file mode 100644 index 0000000000000..9cc34576ed4fd --- /dev/null +++ b/src/Symfony/Component/Uid/MaxUlid.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Uid; + +class MaxUlid extends Ulid +{ + public function __construct() + { + $this->uid = parent::MAX; + } +} diff --git a/src/Symfony/Component/Uid/MaxUuid.php b/src/Symfony/Component/Uid/MaxUuid.php new file mode 100644 index 0000000000000..48eb656e159b9 --- /dev/null +++ b/src/Symfony/Component/Uid/MaxUuid.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Uid; + +class MaxUuid extends Uuid +{ + protected const TYPE = -1; + + public function __construct() + { + $this->uid = parent::MAX; + } +} diff --git a/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php b/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php index e1d70388e6381..f581b37a7a476 100644 --- a/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php +++ b/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php @@ -55,7 +55,7 @@ public function testUnknown() ----------------------- -------------------------------------- Label Value ----------------------- -------------------------------------- - Version unknown + Version 0 toRfc4122 (canonical) 461cc9b9-2397-0dba-91e9-33af4c63f7ec toBase58 9f9nftX6dw4oVPm5uT17um toBase32 263K4VJ8WQ1PX93T9KNX667XZC @@ -71,7 +71,7 @@ public function testUnknown() ----------------------- -------------------------------------- Label Value ----------------------- -------------------------------------- - Version unknown + Version 2 toRfc4122 (canonical) 461cc9b9-2397-2dba-91e9-33af4c63f7ec toBase58 9f9nftX6fjLfNnvSAHMV7Z toBase32 263K4VJ8WQ5PX93T9KNX667XZC @@ -87,7 +87,7 @@ public function testUnknown() ----------------------- -------------------------------------- Label Value ----------------------- -------------------------------------- - Version unknown + Version 7 toRfc4122 (canonical) 461cc9b9-2397-7dba-91e9-33af4c63f7ec toBase58 9f9nftX6kE2K6HpooNEQ83 toBase32 263K4VJ8WQFPX93T9KNX667XZC @@ -103,7 +103,7 @@ public function testUnknown() ----------------------- -------------------------------------- Label Value ----------------------- -------------------------------------- - Version unknown + Version 12 toRfc4122 (canonical) 461cc9b9-2397-cdba-91e9-33af4c63f7ec toBase58 9f9nftX6pihxonjBST7K8X toBase32 263K4VJ8WQSPX93T9KNX667XZC diff --git a/src/Symfony/Component/Uid/Tests/UlidTest.php b/src/Symfony/Component/Uid/Tests/UlidTest.php index 98ecaac2f9eab..f68922b1e5724 100644 --- a/src/Symfony/Component/Uid/Tests/UlidTest.php +++ b/src/Symfony/Component/Uid/Tests/UlidTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Uid\Tests; use PHPUnit\Framework\TestCase; +use Symfony\Component\Uid\MaxUlid; use Symfony\Component\Uid\NilUlid; use Symfony\Component\Uid\Tests\Fixtures\CustomUlid; use Symfony\Component\Uid\Ulid; @@ -267,4 +268,21 @@ public function testNewNilUlid() { $this->assertSame('00000000000000000000000000', (string) new NilUlid()); } + + /** + * @testWith ["ffffffff-ffff-ffff-ffff-ffffffffffff"] + * ["7zzzzzzzzzzzzzzzzzzzzzzzzz"] + */ + public function testMaxUlid(string $ulid) + { + $ulid = Ulid::fromString($ulid); + + $this->assertInstanceOf(MaxUlid::class, $ulid); + $this->assertSame('7ZZZZZZZZZZZZZZZZZZZZZZZZZ', (string) $ulid); + } + + public function testNewMaxUlid() + { + $this->assertSame('7ZZZZZZZZZZZZZZZZZZZZZZZZZ', (string) new MaxUlid()); + } } diff --git a/src/Symfony/Component/Uid/Tests/UuidTest.php b/src/Symfony/Component/Uid/Tests/UuidTest.php index 104a1ca6bfd91..93c2340ff9375 100644 --- a/src/Symfony/Component/Uid/Tests/UuidTest.php +++ b/src/Symfony/Component/Uid/Tests/UuidTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Uid\Tests; use PHPUnit\Framework\TestCase; +use Symfony\Component\Uid\MaxUuid; use Symfony\Component\Uid\NilUuid; use Symfony\Component\Uid\Tests\Fixtures\CustomUuid; use Symfony\Component\Uid\Ulid; @@ -238,6 +239,23 @@ public function testNewNilUuid() $this->assertSame('00000000-0000-0000-0000-000000000000', (string) new NilUuid()); } + /** + * @testWith ["ffffffff-ffff-ffff-ffff-ffffffffffff"] + * ["7zzzzzzzzzzzzzzzzzzzzzzzzz"] + */ + public function testMaxUuid(string $uuid) + { + $uuid = Uuid::fromString($uuid); + + $this->assertInstanceOf(MaxUuid::class, $uuid); + $this->assertSame('ffffffff-ffff-ffff-ffff-ffffffffffff', (string) $uuid); + } + + public function testNewMaxUuid() + { + $this->assertSame('ffffffff-ffff-ffff-ffff-ffffffffffff', (string) new MaxUuid()); + } + public function testFromBinary() { $this->assertEquals( diff --git a/src/Symfony/Component/Uid/Ulid.php b/src/Symfony/Component/Uid/Ulid.php index 5470a1ad1827f..bfa6599a11734 100644 --- a/src/Symfony/Component/Uid/Ulid.php +++ b/src/Symfony/Component/Uid/Ulid.php @@ -21,6 +21,7 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface { protected const NIL = '00000000000000000000000000'; + protected const MAX = '7ZZZZZZZZZZZZZZZZZZZZZZZZZ'; private static string $time = ''; private static array $rand = []; @@ -29,21 +30,17 @@ public function __construct(string $ulid = null) { if (null === $ulid) { $this->uid = static::generate(); - - return; - } - - if (self::NIL === $ulid) { + } elseif (self::NIL === $ulid) { $this->uid = $ulid; + } elseif (self::MAX === strtr($ulid, 'z', 'Z')) { + $this->uid = $ulid; + } else { + if (!self::isValid($ulid)) { + throw new \InvalidArgumentException(sprintf('Invalid ULID: "%s".', $ulid)); + } - return; - } - - if (!self::isValid($ulid)) { - throw new \InvalidArgumentException(sprintf('Invalid ULID: "%s".', $ulid)); + $this->uid = strtoupper($ulid); } - - $this->uid = strtoupper($ulid); } public static function isValid(string $ulid): bool @@ -68,11 +65,11 @@ public static function fromString(string $ulid): static } if (16 !== \strlen($ulid)) { - if (self::NIL === $ulid) { - return new NilUlid(); - } - - return new static($ulid); + return match (strtr($ulid, 'z', 'Z')) { + self::NIL => new NilUlid(), + self::MAX => new MaxUlid(), + default => new static($ulid), + }; } $ulid = bin2hex($ulid); @@ -90,8 +87,12 @@ public static function fromString(string $ulid): static return new NilUlid(); } + if (self::MAX === $ulid = strtr($ulid, 'abcdefghijklmnopqrstuv', 'ABCDEFGHJKMNPQRSTVWXYZ')) { + return new MaxUlid(); + } + $u = new static(self::NIL); - $u->uid = strtr($ulid, 'abcdefghijklmnopqrstuv', 'ABCDEFGHJKMNPQRSTVWXYZ'); + $u->uid = $ulid; return $u; } diff --git a/src/Symfony/Component/Uid/Uuid.php b/src/Symfony/Component/Uid/Uuid.php index 70f3476595b92..8f763c6588a4f 100644 --- a/src/Symfony/Component/Uid/Uuid.php +++ b/src/Symfony/Component/Uid/Uuid.php @@ -25,6 +25,7 @@ class Uuid extends AbstractUid protected const TYPE = 0; protected const NIL = '00000000-0000-0000-0000-000000000000'; + protected const MAX = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; public function __construct(string $uuid, bool $checkVariant = false) { @@ -68,6 +69,10 @@ public static function fromString(string $uuid): static return new NilUuid(); } + if (self::MAX === $uuid = strtr($uuid, 'F', 'f')) { + return new MaxUuid(); + } + if (!\in_array($uuid[19], ['8', '9', 'a', 'b', 'A', 'B'], true)) { return new self($uuid); } From 1cf5d37d5913b22589ca53a623a68f8f0130eb3f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 8 Sep 2022 18:30:24 +0200 Subject: [PATCH 0090/1170] [Uid] Ensure ULIDs are monotonic even when the time goes backward --- src/Symfony/Component/Uid/Tests/UlidTest.php | 5 +++ src/Symfony/Component/Uid/Ulid.php | 33 ++++++++------------ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/Symfony/Component/Uid/Tests/UlidTest.php b/src/Symfony/Component/Uid/Tests/UlidTest.php index 9a8ee9a78abe0..50801a840c326 100644 --- a/src/Symfony/Component/Uid/Tests/UlidTest.php +++ b/src/Symfony/Component/Uid/Tests/UlidTest.php @@ -26,11 +26,16 @@ public function testGenerate() { $a = new Ulid(); $b = new Ulid(); + usleep(-10000); + $c = new Ulid(); $this->assertSame(0, strncmp($a, $b, 20)); + $this->assertSame(0, strncmp($a, $c, 20)); $a = base_convert(strtr(substr($a, -6), 'ABCDEFGHJKMNPQRSTVWXYZ', 'abcdefghijklmnopqrstuv'), 32, 10); $b = base_convert(strtr(substr($b, -6), 'ABCDEFGHJKMNPQRSTVWXYZ', 'abcdefghijklmnopqrstuv'), 32, 10); + $c = base_convert(strtr(substr($c, -6), 'ABCDEFGHJKMNPQRSTVWXYZ', 'abcdefghijklmnopqrstuv'), 32, 10); $this->assertSame(1, $b - $a); + $this->assertSame(1, $c - $b); } public function testWithInvalidUlid() diff --git a/src/Symfony/Component/Uid/Ulid.php b/src/Symfony/Component/Uid/Ulid.php index a23481612745e..bda82ef6856c9 100644 --- a/src/Symfony/Component/Uid/Ulid.php +++ b/src/Symfony/Component/Uid/Ulid.php @@ -137,7 +137,7 @@ public function getDateTime(): \DateTimeImmutable } if (4 > \strlen($time)) { - $time = str_pad($time, 4, '0', \STR_PAD_LEFT); + $time = '000'.$time; } return \DateTimeImmutable::createFromFormat('U.u', substr_replace($time, '.', -3, 0)); @@ -145,25 +145,15 @@ public function getDateTime(): \DateTimeImmutable public static function generate(\DateTimeInterface $time = null): string { - if (null === $time) { - return self::doGenerate(); - } - - if (0 > $time = substr($time->format('Uu'), 0, -3)) { - throw new \InvalidArgumentException('The timestamp must be positive.'); - } - - return self::doGenerate($time); - } - - private static function doGenerate(string $mtime = null): string - { - if (null === $time = $mtime) { + if (null === $mtime = $time) { $time = microtime(false); $time = substr($time, 11).substr($time, 2, 3); + } elseif (0 > $time = $time->format('Uv')) { + throw new \InvalidArgumentException('The timestamp must be positive.'); } - if ($time !== self::$time) { + if ($time > self::$time || (null !== $mtime && $time !== self::$time)) { + randomize: $r = unpack('nr1/nr2/nr3/nr4/nr', random_bytes(10)); $r['r1'] |= ($r['r'] <<= 4) & 0xF0000; $r['r2'] |= ($r['r'] <<= 4) & 0xF0000; @@ -173,19 +163,22 @@ private static function doGenerate(string $mtime = null): string self::$rand = array_values($r); self::$time = $time; } elseif ([0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF] === self::$rand) { - if (null === $mtime) { - usleep(100); + if (\PHP_INT_SIZE >= 8 || 10 > \strlen($time = self::$time)) { + $time = (string) (1 + $time); + } elseif ('999999999' === $mtime = substr($time, -9)) { + $time = (1 + substr($time, 0, -9)).'000000000'; } else { - self::$rand = [0, 0, 0, 0]; + $time = substr_replace($time, str_pad(++$mtime, 9, '0', \STR_PAD_LEFT), -9); } - return self::doGenerate($mtime); + goto randomize; } else { for ($i = 3; $i >= 0 && 0xFFFFF === self::$rand[$i]; --$i) { self::$rand[$i] = 0; } ++self::$rand[$i]; + $time = self::$time; } if (\PHP_INT_SIZE >= 8) { From 4760265edd7a3f3127c508e80eedd70c261df693 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 9 Sep 2022 11:14:45 +0200 Subject: [PATCH 0091/1170] [Form] fix UUID tranformer --- .../UuidToStringTransformer.php | 8 +++-- .../UuidToStringTransformerTest.php | 30 +++++-------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/UuidToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/UuidToStringTransformer.php index 1ccf04b223c09..c4775bb12bca5 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/UuidToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/UuidToStringTransformer.php @@ -64,12 +64,14 @@ public function reverseTransform($value) throw new TransformationFailedException('Expected a string.'); } + if (!Uuid::isValid($value)) { + throw new TransformationFailedException(sprintf('The value "%s" is not a valid UUID.', $value)); + } + try { - $uuid = new Uuid($value); + return Uuid::fromString($value); } catch (\InvalidArgumentException $e) { throw new TransformationFailedException(sprintf('The value "%s" is not a valid UUID.', $value), $e->getCode(), $e); } - - return $uuid; } } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UuidToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UuidToStringTransformerTest.php index f7a93beca8fb9..cb4374535ed70 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UuidToStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UuidToStringTransformerTest.php @@ -15,26 +15,15 @@ use Symfony\Component\Form\Exception\TransformationFailedException; use Symfony\Component\Form\Extension\Core\DataTransformer\UuidToStringTransformer; use Symfony\Component\Uid\Uuid; +use Symfony\Component\Uid\UuidV1; class UuidToStringTransformerTest extends TestCase { - public function provideValidUuid() - { - return [ - ['123e4567-e89b-12d3-a456-426655440000', new Uuid('123e4567-e89b-12d3-a456-426655440000')], - ]; - } - - /** - * @dataProvider provideValidUuid - */ - public function testTransform($output, $input) + public function testTransform() { $transformer = new UuidToStringTransformer(); - $input = new Uuid($input); - - $this->assertEquals($output, $transformer->transform($input)); + $this->assertEquals('123e4567-e89b-12d3-a456-426655440000', $transformer->transform(new UuidV1('123e4567-e89b-12d3-a456-426655440000'))); } public function testTransformEmpty() @@ -53,16 +42,11 @@ public function testTransformExpectsUuid() $transformer->transform('1234'); } - /** - * @dataProvider provideValidUuid - */ - public function testReverseTransform($input, $output) + public function testReverseTransform() { - $reverseTransformer = new UuidToStringTransformer(); - - $output = new Uuid($output); + $transformer = new UuidToStringTransformer(); - $this->assertEquals($output, $reverseTransformer->reverseTransform($input)); + $this->assertEquals(new UuidV1('123e4567-e89b-12d3-a456-426655440000'), $transformer->reverseTransform('123e4567-e89b-12d3-a456-426655440000')); } public function testReverseTransformEmpty() @@ -78,7 +62,7 @@ public function testReverseTransformExpectsString() $this->expectException(TransformationFailedException::class); - $reverseTransformer->reverseTransform(1234); + $reverseTransformer->reverseTransform(Uuid::fromString('123e4567-e89b-12d3-a456-426655440000')->toBase32()); } public function testReverseTransformExpectsValidUuidString() From 33a1479c7cf4535f354baa531370e8d7d6db3c72 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 9 Sep 2022 11:26:14 +0200 Subject: [PATCH 0092/1170] [Routing] Reject v2 UUIDs --- src/Symfony/Component/Routing/Requirement/Requirement.php | 2 +- .../Component/Routing/Tests/Requirement/RequirementTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Routing/Requirement/Requirement.php b/src/Symfony/Component/Routing/Requirement/Requirement.php index aa5e464e72603..d6b27ff6fd60c 100644 --- a/src/Symfony/Component/Routing/Requirement/Requirement.php +++ b/src/Symfony/Component/Routing/Requirement/Requirement.php @@ -24,7 +24,7 @@ enum Requirement public const UID_BASE58 = '[1-9A-HJ-NP-Za-km-z]{22}'; public const UID_RFC4122 = '[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}'; public const ULID = '[0-7][0-9A-HJKMNP-TV-Z]{25}'; - public const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-[1-6][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; + public const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-[13-6][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V1 = '[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V3 = '[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V4 = '[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; diff --git a/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php b/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php index 17fe691b7fb60..30ee70b1a2311 100644 --- a/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php +++ b/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php @@ -272,6 +272,7 @@ public function testUuidOK(string $uuid) * ["e55a29be-ba25-46e0-a5e5-85b78a6f9a1"] * ["e55a29bh-ba25-46e0-a5e5-85b78a6f9a11"] * ["e55a29beba2546e0a5e585b78a6f9a11"] + * ["21902510-bc96-21ec-8422-0242ac120002"] */ public function testUuidKO(string $uuid) { From 432fdf5b2a55385ae9f5cc02c58af67e45912ed3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 7 Sep 2022 17:52:46 +0200 Subject: [PATCH 0093/1170] [Uid] Add UuidV7 and UuidV8 --- .../Routing/Requirement/Requirement.php | 4 +- src/Symfony/Component/Uid/CHANGELOG.md | 1 + .../Component/Uid/Factory/UuidFactory.php | 2 +- src/Symfony/Component/Uid/README.md | 3 + .../Tests/Command/InspectUuidCommandTest.php | 56 ++++++++- src/Symfony/Component/Uid/Tests/UuidTest.php | 26 ++++ src/Symfony/Component/Uid/Ulid.php | 22 ++-- src/Symfony/Component/Uid/Uuid.php | 12 ++ src/Symfony/Component/Uid/UuidV1.php | 8 +- src/Symfony/Component/Uid/UuidV7.php | 114 ++++++++++++++++++ src/Symfony/Component/Uid/UuidV8.php | 27 +++++ .../Component/Validator/Constraints/Uuid.php | 4 + .../Validator/Constraints/UuidValidator.php | 2 +- .../Tests/Constraints/UuidValidatorTest.php | 4 +- 14 files changed, 259 insertions(+), 26 deletions(-) create mode 100644 src/Symfony/Component/Uid/UuidV7.php create mode 100644 src/Symfony/Component/Uid/UuidV8.php diff --git a/src/Symfony/Component/Routing/Requirement/Requirement.php b/src/Symfony/Component/Routing/Requirement/Requirement.php index ccba5ec41d320..54ad86b610182 100644 --- a/src/Symfony/Component/Routing/Requirement/Requirement.php +++ b/src/Symfony/Component/Routing/Requirement/Requirement.php @@ -25,10 +25,12 @@ enum Requirement public const UID_BASE58 = '[1-9A-HJ-NP-Za-km-z]{22}'; public const UID_RFC4122 = '[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}'; public const ULID = '[0-7][0-9A-HJKMNP-TV-Z]{25}'; - public const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-[13-6][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; + public const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V1 = '[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V3 = '[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V4 = '[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V5 = '[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; public const UUID_V6 = '[0-9a-f]{8}-[0-9a-f]{4}-6[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; + public const UUID_V7 = '[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; + public const UUID_V8 = '[0-9a-f]{8}-[0-9a-f]{4}-8[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'; } diff --git a/src/Symfony/Component/Uid/CHANGELOG.md b/src/Symfony/Component/Uid/CHANGELOG.md index 7b5142ba5c7d2..b82133751c0a9 100644 --- a/src/Symfony/Component/Uid/CHANGELOG.md +++ b/src/Symfony/Component/Uid/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 6.2 --- + * Add `UuidV7` and `UuidV8` * Add `TimeBasedUidInterface` to describe UIDs that embed a timestamp * Add `MaxUuid` and `MaxUlid` diff --git a/src/Symfony/Component/Uid/Factory/UuidFactory.php b/src/Symfony/Component/Uid/Factory/UuidFactory.php index aac35386e95f5..0255d51bf37b0 100644 --- a/src/Symfony/Component/Uid/Factory/UuidFactory.php +++ b/src/Symfony/Component/Uid/Factory/UuidFactory.php @@ -44,7 +44,7 @@ public function __construct(string|int $defaultClass = UuidV6::class, string|int $this->nameBasedNamespace = $nameBasedNamespace; } - public function create(): UuidV6|UuidV4|UuidV1 + public function create(): Uuid { $class = $this->defaultClass; diff --git a/src/Symfony/Component/Uid/README.md b/src/Symfony/Component/Uid/README.md index 2ec5b761bc7b1..ce0fb18612d65 100644 --- a/src/Symfony/Component/Uid/README.md +++ b/src/Symfony/Component/Uid/README.md @@ -3,6 +3,9 @@ Uid Component The UID component provides an object-oriented API to generate and represent UIDs. +It provides implementations for UUIDs version 1 and versions 3 to 8, +for ULIDs and for related factories. + Resources --------- diff --git a/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php b/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php index f581b37a7a476..c9061b5a861d0 100644 --- a/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php +++ b/src/Symfony/Component/Uid/Tests/Command/InspectUuidCommandTest.php @@ -82,16 +82,16 @@ public function testUnknown() EOF , $commandTester->getDisplay(true)); - $this->assertSame(0, $commandTester->execute(['uuid' => '461cc9b9-2397-7dba-91e9-33af4c63f7ec'])); + $this->assertSame(0, $commandTester->execute(['uuid' => '461cc9b9-2397-adba-91e9-33af4c63f7ec'])); $this->assertSame(<<getDisplay(true)); + } + + public function testV7() + { + $commandTester = new CommandTester(new InspectUuidCommand()); + + $this->assertSame(0, $commandTester->execute(['uuid' => '017f22e2-79b0-7cc3-98c4-dc0c0c07398f'])); + $this->assertSame(<<getDisplay(true)); + } + + public function testV8() + { + $commandTester = new CommandTester(new InspectUuidCommand()); + + $this->assertSame(0, $commandTester->execute(['uuid' => '017f22e2-79b0-8cc3-98c4-dc0c0c07398f'])); + $this->assertSame(<<getDisplay(true)); } diff --git a/src/Symfony/Component/Uid/Tests/UuidTest.php b/src/Symfony/Component/Uid/Tests/UuidTest.php index 93c2340ff9375..3ac925aa4194a 100644 --- a/src/Symfony/Component/Uid/Tests/UuidTest.php +++ b/src/Symfony/Component/Uid/Tests/UuidTest.php @@ -22,11 +22,13 @@ use Symfony\Component\Uid\UuidV4; use Symfony\Component\Uid\UuidV5; use Symfony\Component\Uid\UuidV6; +use Symfony\Component\Uid\UuidV7; class UuidTest extends TestCase { private const A_UUID_V1 = 'd9e7a184-5d5b-11ea-a62a-3499710062d0'; private const A_UUID_V4 = 'd6b3345b-2905-4048-a83c-b5988e765d98'; + private const A_UUID_V7 = '017f22e2-79b0-7cc3-98c4-dc0c0c07398f'; /** * @dataProvider provideInvalidUuids @@ -69,6 +71,8 @@ public function provideInvalidVariant(): iterable yield ['8dac64d3-937a-4e7c-fa1d-d5d6c06a61f5']; yield ['8dac64d3-937a-5e7c-fa1d-d5d6c06a61f5']; yield ['8dac64d3-937a-6e7c-fa1d-d5d6c06a61f5']; + yield ['8dac64d3-937a-7e7c-fa1d-d5d6c06a61f5']; + yield ['8dac64d3-937a-8e7c-fa1d-d5d6c06a61f5']; } public function testConstructorWithValidUuid() @@ -134,6 +138,28 @@ public function testV6IsSeeded() $this->assertNotSame(substr($uuidV1, 24), substr($uuidV6, 24)); } + public function testV7() + { + $uuid = Uuid::fromString(self::A_UUID_V7); + + $this->assertInstanceOf(UuidV7::class, $uuid); + $this->assertSame(1645557742, $uuid->getDateTime()->getTimeStamp()); + + $prev = UuidV7::generate(); + + for ($i = 0; $i < 25; ++$i) { + $uuid = UuidV7::generate(); + $now = gmdate('Y-m-d H:i'); + $this->assertGreaterThan($prev, $uuid); + $prev = $uuid; + } + + $this->assertTrue(Uuid::isValid($uuid)); + $uuid = Uuid::fromString($uuid); + $this->assertInstanceOf(UuidV7::class, $uuid); + $this->assertSame($now, $uuid->getDateTime()->format('Y-m-d H:i')); + } + public function testBinary() { $uuid = new UuidV4(self::A_UUID_V4); diff --git a/src/Symfony/Component/Uid/Ulid.php b/src/Symfony/Component/Uid/Ulid.php index 6a9b21cf4cc5f..81610a00d4210 100644 --- a/src/Symfony/Component/Uid/Ulid.php +++ b/src/Symfony/Component/Uid/Ulid.php @@ -152,15 +152,15 @@ public static function generate(\DateTimeInterface $time = null): string if ($time > self::$time || (null !== $mtime && $time !== self::$time)) { randomize: - $r = unpack('nr1/nr2/nr3/nr4/nr', random_bytes(10)); - $r['r1'] |= ($r['r'] <<= 4) & 0xF0000; - $r['r2'] |= ($r['r'] <<= 4) & 0xF0000; - $r['r3'] |= ($r['r'] <<= 4) & 0xF0000; - $r['r4'] |= ($r['r'] <<= 4) & 0xF0000; - unset($r['r']); - self::$rand = array_values($r); + $r = unpack('n*', random_bytes(10)); + $r[1] |= ($r[5] <<= 4) & 0xF0000; + $r[2] |= ($r[5] <<= 4) & 0xF0000; + $r[3] |= ($r[5] <<= 4) & 0xF0000; + $r[4] |= ($r[5] <<= 4) & 0xF0000; + unset($r[5]); + self::$rand = $r; self::$time = $time; - } elseif ([0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF] === self::$rand) { + } elseif ([1 => 0xFFFFF, 0xFFFFF, 0xFFFFF, 0xFFFFF] === self::$rand) { if (\PHP_INT_SIZE >= 8 || 10 > \strlen($time = self::$time)) { $time = (string) (1 + $time); } elseif ('999999999' === $mtime = substr($time, -9)) { @@ -171,7 +171,7 @@ public static function generate(\DateTimeInterface $time = null): string goto randomize; } else { - for ($i = 3; $i >= 0 && 0xFFFFF === self::$rand[$i]; --$i) { + for ($i = 4; $i > 0 && 0xFFFFF === self::$rand[$i]; --$i) { self::$rand[$i] = 0; } @@ -192,10 +192,10 @@ public static function generate(\DateTimeInterface $time = null): string return strtr(sprintf('%010s%04s%04s%04s%04s', $time, - base_convert(self::$rand[0], 10, 32), base_convert(self::$rand[1], 10, 32), base_convert(self::$rand[2], 10, 32), - base_convert(self::$rand[3], 10, 32) + base_convert(self::$rand[3], 10, 32), + base_convert(self::$rand[4], 10, 32) ), 'abcdefghijklmnopqrstuv', 'ABCDEFGHJKMNPQRSTVWXYZ'); } } diff --git a/src/Symfony/Component/Uid/Uuid.php b/src/Symfony/Component/Uid/Uuid.php index 8f763c6588a4f..da0bfcb39957a 100644 --- a/src/Symfony/Component/Uid/Uuid.php +++ b/src/Symfony/Component/Uid/Uuid.php @@ -83,6 +83,8 @@ public static function fromString(string $uuid): static UuidV4::TYPE => new UuidV4($uuid), UuidV5::TYPE => new UuidV5($uuid), UuidV6::TYPE => new UuidV6($uuid), + UuidV7::TYPE => new UuidV7($uuid), + UuidV8::TYPE => new UuidV8($uuid), default => new self($uuid), }; } @@ -118,6 +120,16 @@ final public static function v6(): UuidV6 return new UuidV6(); } + final public static function v7(): UuidV7 + { + return new UuidV7(); + } + + final public static function v8(string $uuid): UuidV8 + { + return new UuidV8($uuid); + } + public static function isValid(string $uuid): bool { if (!preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){2}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$}Di', $uuid)) { diff --git a/src/Symfony/Component/Uid/UuidV1.php b/src/Symfony/Component/Uid/UuidV1.php index 045f667b4c526..8c03792113741 100644 --- a/src/Symfony/Component/Uid/UuidV1.php +++ b/src/Symfony/Component/Uid/UuidV1.php @@ -20,7 +20,7 @@ class UuidV1 extends Uuid implements TimeBasedUidInterface { protected const TYPE = 1; - private static ?string $clockSeq = null; + private static string $clockSeq; public function __construct(string $uuid = null) { @@ -49,13 +49,13 @@ public static function generate(\DateTimeInterface $time = null, Uuid $node = nu if ($node) { // use clock_seq from the node $seq = substr($node->uid, 19, 4); - } else { + } elseif (!$seq = self::$clockSeq ?? '') { // generate a static random clock_seq to prevent any collisions with the real one $seq = substr($uuid, 19, 4); - while (null === self::$clockSeq || $seq === self::$clockSeq) { + do { self::$clockSeq = sprintf('%04x', random_int(0, 0x3FFF) | 0x8000); - } + } while ($seq === self::$clockSeq); $seq = self::$clockSeq; } diff --git a/src/Symfony/Component/Uid/UuidV7.php b/src/Symfony/Component/Uid/UuidV7.php new file mode 100644 index 0000000000000..718b35ff9ade7 --- /dev/null +++ b/src/Symfony/Component/Uid/UuidV7.php @@ -0,0 +1,114 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Uid; + +/** + * A v7 UUID is lexicographically sortable and contains a 48-bit timestamp and 74 extra unique bits. + * + * Within the same millisecond, monotonicity is ensured by incrementing the random part by a random increment. + * + * @author Nicolas Grekas + */ +class UuidV7 extends Uuid implements TimeBasedUidInterface +{ + protected const TYPE = 7; + + private static string $time = ''; + private static array $rand = []; + private static string $seed; + private static array $seedParts; + private static int $seedIndex = 0; + + public function __construct(string $uuid = null) + { + if (null === $uuid) { + $this->uid = static::generate(); + } else { + parent::__construct($uuid, true); + } + } + + public function getDateTime(): \DateTimeImmutable + { + $time = substr($this->uid, 0, 8).substr($this->uid, 9, 4); + $time = \PHP_INT_SIZE >= 8 ? (string) hexdec($time) : BinaryUtil::toBase(hex2bin($time), BinaryUtil::BASE10); + + if (4 > \strlen($time)) { + $time = '000'.$time; + } + + return \DateTimeImmutable::createFromFormat('U.v', substr_replace($time, '.', -3, 0)); + } + + public static function generate(\DateTimeInterface $time = null): string + { + if (null === $mtime = $time) { + $time = microtime(false); + $time = substr($time, 11).substr($time, 2, 3); + } elseif (0 > $time = $time->format('Uv')) { + throw new \InvalidArgumentException('The timestamp must be positive.'); + } + + if ($time > self::$time || (null !== $mtime && $time !== self::$time)) { + randomize: + self::$rand = unpack('n*', isset(self::$seed) ? random_bytes(10) : self::$seed = random_bytes(16)); + self::$rand[1] &= 0x03FF; + self::$time = $time; + } else { + if (!self::$seedIndex) { + $s = unpack('l*', self::$seed = hash('sha512', self::$seed, true)); + $s[] = ($s[1] >> 8 & 0xFF0000) | ($s[2] >> 16 & 0xFF00) | ($s[3] >> 24 & 0xFF); + $s[] = ($s[4] >> 8 & 0xFF0000) | ($s[5] >> 16 & 0xFF00) | ($s[6] >> 24 & 0xFF); + $s[] = ($s[7] >> 8 & 0xFF0000) | ($s[8] >> 16 & 0xFF00) | ($s[9] >> 24 & 0xFF); + $s[] = ($s[10] >> 8 & 0xFF0000) | ($s[11] >> 16 & 0xFF00) | ($s[12] >> 24 & 0xFF); + $s[] = ($s[13] >> 8 & 0xFF0000) | ($s[14] >> 16 & 0xFF00) | ($s[15] >> 24 & 0xFF); + self::$seedParts = $s; + self::$seedIndex = 21; + } + + self::$rand[5] = 0xFFFF & $carry = self::$rand[5] + (self::$seedParts[self::$seedIndex--] & 0xFFFFFF); + self::$rand[4] = 0xFFFF & $carry = self::$rand[4] + ($carry >> 16); + self::$rand[3] = 0xFFFF & $carry = self::$rand[3] + ($carry >> 16); + self::$rand[2] = 0xFFFF & $carry = self::$rand[2] + ($carry >> 16); + self::$rand[1] += $carry >> 16; + + if (0xFC00 & self::$rand[1]) { + if (\PHP_INT_SIZE >= 8 || 10 > \strlen($time = self::$time)) { + $time = (string) (1 + $time); + } elseif ('999999999' === $mtime = substr($time, -9)) { + $time = (1 + substr($time, 0, -9)).'000000000'; + } else { + $time = substr_replace($time, str_pad(++$mtime, 9, '0', \STR_PAD_LEFT), -9); + } + + goto randomize; + } + + $time = self::$time; + } + + if (\PHP_INT_SIZE >= 8) { + $time = base_convert($time, 10, 16); + } else { + $time = bin2hex(BinaryUtil::fromBase($time, BinaryUtil::BASE10)); + } + + return substr_replace(sprintf('%012s-%04x-%04x-%04x%04x%04x', + $time, + 0x7000 | (self::$rand[1] << 2) | (self::$rand[2] >> 14), + 0x8000 | (self::$rand[2] & 0x3FFF), + self::$rand[3], + self::$rand[4], + self::$rand[5], + ), '-', 8, 0); + } +} diff --git a/src/Symfony/Component/Uid/UuidV8.php b/src/Symfony/Component/Uid/UuidV8.php new file mode 100644 index 0000000000000..c194a6f699eee --- /dev/null +++ b/src/Symfony/Component/Uid/UuidV8.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Uid; + +/** + * A v8 UUID has no explicit requirements except embedding its version + variant bits. + * + * @author Nicolas Grekas + */ +class UuidV8 extends Uuid +{ + protected const TYPE = 8; + + public function __construct(string $uuid) + { + parent::__construct($uuid, true); + } +} diff --git a/src/Symfony/Component/Validator/Constraints/Uuid.php b/src/Symfony/Component/Validator/Constraints/Uuid.php index 82b790578378d..89067fdd47881 100644 --- a/src/Symfony/Component/Validator/Constraints/Uuid.php +++ b/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -51,6 +51,8 @@ class Uuid extends Constraint public const V4_RANDOM = 4; public const V5_SHA1 = 5; public const V6_SORTABLE = 6; + public const V7_SORTABLE = 7; + public const V8_CUSTOM = 8; public const ALL_VERSIONS = [ self::V1_MAC, @@ -59,6 +61,8 @@ class Uuid extends Constraint self::V4_RANDOM, self::V5_SHA1, self::V6_SORTABLE, + self::V7_SORTABLE, + self::V8_CUSTOM, ]; /** diff --git a/src/Symfony/Component/Validator/Constraints/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/UuidValidator.php index af4ae413a9b9c..c4ccfb27dee9d 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -35,7 +35,7 @@ class UuidValidator extends ConstraintValidator // Roughly speaking: // x = any hexadecimal character - // M = any allowed version {1..6} + // M = any allowed version {1..8} // N = any allowed variant {8, 9, a, b} public const STRICT_LENGTH = 36; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php index 347980eecea74..9a1e0183b7f02 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php @@ -82,6 +82,8 @@ public function getValidStrictUuids() ['456daEFb-5AA6-41B5-8DBC-068B05A8B201'], // Version 4 UUID in mixed case ['456daEFb-5AA6-41B5-8DBC-068B05A8B201', [Uuid::V4_RANDOM]], ['1eb01932-4c0b-6570-aa34-d179cdf481ae', [Uuid::V6_SORTABLE]], + ['216fff40-98d9-71e3-a5e2-0800200c9a66', [Uuid::V7_SORTABLE]], + ['216fff40-98d9-81e3-a5e2-0800200c9a66', [Uuid::V8_CUSTOM]], ]; } @@ -159,8 +161,6 @@ public function getInvalidStrictUuids() ['216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR], ['216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR], ['216fff40-98d9-01e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], - ['216fff40-98d9-71e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], - ['216fff40-98d9-81e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], ['216fff40-98d9-91e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], ['216fff40-98d9-a1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], ['216fff40-98d9-b1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR], From 5f55af8e18e4420822c9d0cee2fc5bafeac77d0b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 9 Sep 2022 14:50:35 +0200 Subject: [PATCH 0094/1170] [Uid] tweak README --- src/Symfony/Component/Uid/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Uid/README.md b/src/Symfony/Component/Uid/README.md index ce0fb18612d65..acea6c75be248 100644 --- a/src/Symfony/Component/Uid/README.md +++ b/src/Symfony/Component/Uid/README.md @@ -3,8 +3,8 @@ Uid Component The UID component provides an object-oriented API to generate and represent UIDs. -It provides implementations for UUIDs version 1 and versions 3 to 8, -for ULIDs and for related factories. +It provides implementations that work on 32-bit and 64-bit CPUs +for ULIDs and for UUIDs version 1 and versions 3 to 8. Resources --------- From 821d17673480d155a36078d1d3f1c0263f94ea9b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 9 Sep 2022 17:04:33 +0200 Subject: [PATCH 0095/1170] [Security/Http] cs fixes --- .../Security/Core/Signature/SignatureHasher.php | 12 ++++++------ .../Security/Http/LoginLink/LoginLinkHandler.php | 10 +++++----- .../Http/RememberMe/AbstractRememberMeHandler.php | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php b/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php index b578d77c9b638..e2b5dcb31f655 100644 --- a/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php +++ b/src/Symfony/Component/Security/Core/Signature/SignatureHasher.php @@ -31,9 +31,9 @@ class SignatureHasher private $maxUses; /** - * @param array $signatureProperties properties of the User; the hash is invalidated if these properties change - * @param ExpiredSignatureStorage|null $expiredSignaturesStorage if provided, secures a sequence of hashes that are expired - * @param int|null $maxUses used together with $expiredSignatureStorage to allow a maximum usage of a hash + * @param array $signatureProperties Properties of the User; the hash is invalidated if these properties change + * @param ExpiredSignatureStorage|null $expiredSignaturesStorage If provided, secures a sequence of hashes that are expired + * @param int|null $maxUses Used together with $expiredSignatureStorage to allow a maximum usage of a hash */ public function __construct(PropertyAccessorInterface $propertyAccessor, array $signatureProperties, string $secret, ExpiredSignatureStorage $expiredSignaturesStorage = null, int $maxUses = null) { @@ -47,8 +47,8 @@ public function __construct(PropertyAccessorInterface $propertyAccessor, array $ /** * Verifies the hash using the provided user and expire time. * - * @param int $expires the expiry time as a unix timestamp - * @param string $hash the plaintext hash provided by the request + * @param int $expires The expiry time as a unix timestamp + * @param string $hash The plaintext hash provided by the request * * @throws InvalidSignatureException If the signature does not match the provided parameters * @throws ExpiredSignatureException If the signature is no longer valid @@ -75,7 +75,7 @@ public function verifySignatureHash(UserInterface $user, int $expires, string $h /** * Computes the secure hash for the provided user and expire time. * - * @param int $expires the expiry time as a unix timestamp + * @param int $expires The expiry time as a unix timestamp */ public function computeSignatureHash(UserInterface $user, int $expires): string { diff --git a/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandler.php b/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandler.php index b55e8aa6becf9..e245ad5f8bd3c 100644 --- a/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandler.php +++ b/src/Symfony/Component/Security/Http/LoginLink/LoginLinkHandler.php @@ -31,13 +31,13 @@ final class LoginLinkHandler implements LoginLinkHandlerInterface private $urlGenerator; private $userProvider; private $options; - private $signatureHashUtil; + private $signatureHasher; - public function __construct(UrlGeneratorInterface $urlGenerator, UserProviderInterface $userProvider, SignatureHasher $signatureHashUtil, array $options) + public function __construct(UrlGeneratorInterface $urlGenerator, UserProviderInterface $userProvider, SignatureHasher $signatureHasher, array $options) { $this->urlGenerator = $urlGenerator; $this->userProvider = $userProvider; - $this->signatureHashUtil = $signatureHashUtil; + $this->signatureHasher = $signatureHasher; $this->options = array_merge([ 'route_name' => null, 'lifetime' => 600, @@ -53,7 +53,7 @@ public function createLoginLink(UserInterface $user, Request $request = null): L // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 'user' => method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), 'expires' => $expires, - 'hash' => $this->signatureHashUtil->computeSignatureHash($user, $expires), + 'hash' => $this->signatureHasher->computeSignatureHash($user, $expires), ]; if ($request) { @@ -101,7 +101,7 @@ public function consumeLoginLink(Request $request): UserInterface $expires = $request->get('expires'); try { - $this->signatureHashUtil->verifySignatureHash($user, $expires, $hash); + $this->signatureHasher->verifySignatureHash($user, $expires, $hash); } catch (ExpiredSignatureException $e) { throw new ExpiredLoginLinkException(ucfirst(str_ireplace('signature', 'login link', $e->getMessage())), 0, $e); } catch (InvalidSignatureException $e) { diff --git a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php index 97918c86cb8b4..d9c9d8327a197 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php +++ b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeHandler.php @@ -53,7 +53,7 @@ public function __construct(UserProviderInterface $userProvider, RequestStack $r * - Create a new remember-me cookie to be sent with the response (using {@see createCookie()}); * - If you store the token somewhere else (e.g. in a database), invalidate the stored token. * - * @throws AuthenticationException throw this exception if the remember me details are not accepted + * @throws AuthenticationException If the remember-me details are not accepted */ abstract protected function processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user): void; From 7ae7d7bb3c60872e801bc35a7571dfbb8a8895c7 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 9 Sep 2022 18:38:54 +0300 Subject: [PATCH 0096/1170] decode URL-encoded characters in DSN's usernames/passwords --- .../Component/Messenger/Transport/AmqpExt/Connection.php | 4 ++-- .../Component/Messenger/Transport/RedisExt/Connection.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Messenger/Transport/AmqpExt/Connection.php b/src/Symfony/Component/Messenger/Transport/AmqpExt/Connection.php index 2dba7d9f1045b..6f36a39250b36 100644 --- a/src/Symfony/Component/Messenger/Transport/AmqpExt/Connection.php +++ b/src/Symfony/Component/Messenger/Transport/AmqpExt/Connection.php @@ -126,11 +126,11 @@ public static function fromDsn(string $dsn, array $options = [], AmqpFactory $am ], $options, $parsedQuery); if (isset($parsedUrl['user'])) { - $amqpOptions['login'] = $parsedUrl['user']; + $amqpOptions['login'] = urldecode($parsedUrl['user']); } if (isset($parsedUrl['pass'])) { - $amqpOptions['password'] = $parsedUrl['pass']; + $amqpOptions['password'] = urldecode($parsedUrl['pass']); } if (!isset($amqpOptions['queues'])) { diff --git a/src/Symfony/Component/Messenger/Transport/RedisExt/Connection.php b/src/Symfony/Component/Messenger/Transport/RedisExt/Connection.php index 29eb6cb12e0d9..7f9f876dc54f4 100644 --- a/src/Symfony/Component/Messenger/Transport/RedisExt/Connection.php +++ b/src/Symfony/Component/Messenger/Transport/RedisExt/Connection.php @@ -93,8 +93,8 @@ public static function fromDsn(string $dsn, array $redisOptions = [], \Redis $re $stream = $pathParts[1] ?? $redisOptions['stream'] ?? null; $group = $pathParts[2] ?? $redisOptions['group'] ?? null; $consumer = $pathParts[3] ?? $redisOptions['consumer'] ?? null; - $pass = '' !== ($parsedUrl['pass'] ?? '') ? $parsedUrl['pass'] : null; - $user = '' !== ($parsedUrl['user'] ?? '') ? $parsedUrl['user'] : null; + $pass = '' !== ($parsedUrl['pass'] ?? '') ? urldecode($parsedUrl['pass']) : null; + $user = '' !== ($parsedUrl['user'] ?? '') ? urldecode($parsedUrl['user']) : null; $connectionCredentials = [ 'host' => $parsedUrl['host'] ?? '127.0.0.1', From abddada74bb1edf2edca4ed3c14a9e03e9353e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Fri, 9 Sep 2022 13:48:55 +0200 Subject: [PATCH 0097/1170] [HttpFoundation] Always return strings from accept headers --- src/Symfony/Component/HttpFoundation/Request.php | 9 +++++---- .../Component/HttpFoundation/Tests/RequestTest.php | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 4b2c4d96752c4..32e07b532e379 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1646,7 +1646,8 @@ public function getLanguages() $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); $this->languages = []; - foreach ($languages as $lang => $acceptHeaderItem) { + foreach ($languages as $acceptHeaderItem) { + $lang = $acceptHeaderItem->getValue(); if (str_contains($lang, '-')) { $codes = explode('-', $lang); if ('i' === $codes[0]) { @@ -1684,7 +1685,7 @@ public function getCharsets() return $this->charsets; } - return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); + return $this->charsets = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all())); } /** @@ -1698,7 +1699,7 @@ public function getEncodings() return $this->encodings; } - return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); + return $this->encodings = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all())); } /** @@ -1712,7 +1713,7 @@ public function getAcceptableContentTypes() return $this->acceptableContentTypes; } - return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); + return $this->acceptableContentTypes = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all())); } /** diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 6035dd5d32da9..060de405e58ae 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -1582,6 +1582,20 @@ public function testGetLanguages() $this->assertEquals(['zh', 'cherokee'], $request->getLanguages()); } + public function testGetAcceptHeadersReturnString() + { + $request = new Request(); + $request->headers->set('Accept', '123'); + $request->headers->set('Accept-Charset', '123'); + $request->headers->set('Accept-Encoding', '123'); + $request->headers->set('Accept-Language', '123'); + + $this->assertSame(['123'], $request->getAcceptableContentTypes()); + $this->assertSame(['123'], $request->getCharsets()); + $this->assertSame(['123'], $request->getEncodings()); + $this->assertSame(['123'], $request->getLanguages()); + } + public function testGetRequestFormat() { $request = new Request(); From 1608caea37417f2fd9b32ac82306ce9862662a99 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 10 Sep 2022 13:29:44 +0300 Subject: [PATCH 0098/1170] fix typo --- src/Symfony/Component/Messenger/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Messenger/CHANGELOG.md b/src/Symfony/Component/Messenger/CHANGELOG.md index 8d6c34c8ddb11..7dabc08efebc2 100644 --- a/src/Symfony/Component/Messenger/CHANGELOG.md +++ b/src/Symfony/Component/Messenger/CHANGELOG.md @@ -4,7 +4,7 @@ CHANGELOG 6.2 --- - * Add new `messenger:stats` command that return a list of transports with their "to be processed" message count + * Add new `messenger:stats` command that returns a list of transports with their "to be processed" message count * Add `TransportNamesStamp` to change the transport while dispatching a message * Add support for rate limited transports by using the RateLimiter component. From be2c313d6ae62a2763d3fd1f37c51c23bf0c50d4 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 11 Sep 2022 11:46:17 +0300 Subject: [PATCH 0099/1170] move changelog entry The command is not part of the DependencyInjection component, but lives inside the FrameworkBundle. --- src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md | 1 + src/Symfony/Component/DependencyInjection/CHANGELOG.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index d738ac9cae80b..51e40a942244d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 6.2 --- + * Add `resolve-env` option to `debug:config` command to display actual values of environment variables in dumped configuration * Add `NotificationAssertionsTrait` * Add option `framework.catch_all_throwables` to allow `Symfony\Component\HttpKernel\HttpKernel` to catch all kinds of `Throwable` * Make `AbstractController::render()` able to deal with forms and deprecate `renderForm()` diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md index bfb69b9547e23..6a3a4c9f1d446 100644 --- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -8,7 +8,6 @@ CHANGELOG * Add arguments `&$asGhostObject` and `$id` to LazyProxy's `DumperInterface` to allow using ghost objects for lazy loading services * Add `enum` env var processor * Add `shuffle` env var processor - * Add `resolve-env` option to `debug:config` command to display actual values of environment variables in dumped configuration * Allow #[When] to be extended 6.1 From 746cf35379505cb124c59ba15b42cc34b88ee66f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 11 Sep 2022 11:52:31 +0300 Subject: [PATCH 0100/1170] remove unused getDisposition() method This method was introduced in #47034, but its usage was removed again when merging #47437 up into the 6.2 branch. --- src/Symfony/Component/Mime/Part/TextPart.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Symfony/Component/Mime/Part/TextPart.php b/src/Symfony/Component/Mime/Part/TextPart.php index 5b951e0122fec..8219ab52c2125 100644 --- a/src/Symfony/Component/Mime/Part/TextPart.php +++ b/src/Symfony/Component/Mime/Part/TextPart.php @@ -89,11 +89,6 @@ public function setDisposition(string $disposition): static return $this; } - public function getDisposition(): ?string - { - return $this->disposition; - } - /** * Sets the name of the file (used by FormDataPart). * From 0b325376e8acb8114c557e3e3684c0b0d3d9b6e0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 11 Sep 2022 17:09:35 +0200 Subject: [PATCH 0101/1170] [Uid] minor perf optim --- src/Symfony/Component/Uid/UuidV7.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Uid/UuidV7.php b/src/Symfony/Component/Uid/UuidV7.php index 718b35ff9ade7..5e9c0801ae967 100644 --- a/src/Symfony/Component/Uid/UuidV7.php +++ b/src/Symfony/Component/Uid/UuidV7.php @@ -97,7 +97,7 @@ public static function generate(\DateTimeInterface $time = null): string } if (\PHP_INT_SIZE >= 8) { - $time = base_convert($time, 10, 16); + $time = dechex($time); } else { $time = bin2hex(BinaryUtil::fromBase($time, BinaryUtil::BASE10)); } From 0a514a908955f1af406a0c17def1a84c4bc9f571 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 12 Sep 2022 10:52:12 +0200 Subject: [PATCH 0102/1170] Add a few more ??= --- src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php | 2 +- src/Symfony/Component/ErrorHandler/ErrorHandler.php | 2 +- .../Core/EventListener/MergeCollectionListenerTest.php | 2 +- src/Symfony/Component/HttpKernel/HttpKernel.php | 2 +- src/Symfony/Component/Notifier/Channel/EmailChannel.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index bf21d6059bee3..9e75dcefb1c3f 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1026,7 +1026,7 @@ private function addInlineService(string $id, Definition $definition, Definition } } - if (isset($this->definitionVariables[$inlineDef = $inlineDef ?: $definition])) { + if (isset($this->definitionVariables[$inlineDef ??= $definition])) { return $code; } diff --git a/src/Symfony/Component/ErrorHandler/ErrorHandler.php b/src/Symfony/Component/ErrorHandler/ErrorHandler.php index 491e129ea2645..f8e4ebdc5aed5 100644 --- a/src/Symfony/Component/ErrorHandler/ErrorHandler.php +++ b/src/Symfony/Component/ErrorHandler/ErrorHandler.php @@ -539,7 +539,7 @@ public function handleException(\Throwable $exception) if (null !== $exceptionHandler) { return $exceptionHandler($exception); } - $handlerException = $handlerException ?: $exception; + $handlerException ??= $exception; } catch (\Throwable $handlerException) { } if ($exception === $handlerException && null === $this->exceptionHandler) { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php index 0be62fa1532f1..4cb0970ababd2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php @@ -34,7 +34,7 @@ abstract protected function getBuilder($name = 'name'); protected function getForm($name = 'name', $propertyPath = null) { - $propertyPath = $propertyPath ?: $name; + $propertyPath ??= $name; return $this->getBuilder($name)->setAttribute('property_path', $propertyPath)->getForm(); } diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index 9a64e64f38ad4..df5e83ec96442 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -105,7 +105,7 @@ public function terminate(Request $request, Response $response) */ public function terminateWithException(\Throwable $exception, Request $request = null) { - if (!$request = $request ?: $this->requestStack->getMainRequest()) { + if (!$request ??= $this->requestStack->getMainRequest()) { throw $exception; } diff --git a/src/Symfony/Component/Notifier/Channel/EmailChannel.php b/src/Symfony/Component/Notifier/Channel/EmailChannel.php index 474b38142c27b..5ac1ad8eae277 100644 --- a/src/Symfony/Component/Notifier/Channel/EmailChannel.php +++ b/src/Symfony/Component/Notifier/Channel/EmailChannel.php @@ -53,7 +53,7 @@ public function notify(Notification $notification, RecipientInterface $recipient $message = $notification->asEmailMessage($recipient, $transportName); } - $message = $message ?: EmailMessage::fromNotification($notification, $recipient, $transportName); + $message ??= EmailMessage::fromNotification($notification, $recipient, $transportName); $email = $message->getMessage(); if ($email instanceof Email) { if (!$email->getFrom()) { From 917ffde1412813e6035d855b467045354edbeeb6 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 5 Nov 2020 00:19:24 +0100 Subject: [PATCH 0103/1170] Remove the default values from setters with a nullable parameter. --- UPGRADE-6.2.md | 6 ++ .../DependencyInjection/CHANGELOG.md | 2 + .../ContainerAwareInterface.php | 2 +- .../ContainerAwareTrait.php | 4 ++ .../Tests/ContainerAwareTraitTest.php | 64 +++++++++++++++++++ .../Token/Storage/TokenStorage.php | 4 ++ .../Token/Storage/TokenStorageInterface.php | 2 +- .../Storage/UsageTrackingTokenStorage.php | 4 ++ .../Component/Security/Core/CHANGELOG.md | 4 +- .../Token/Storage/TokenStorageTest.php | 21 ++++++ 10 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php diff --git a/UPGRADE-6.2.md b/UPGRADE-6.2.md index 682ad84ff89dc..8a8cb3bbcec76 100644 --- a/UPGRADE-6.2.md +++ b/UPGRADE-6.2.md @@ -1,6 +1,11 @@ UPGRADE FROM 6.1 to 6.2 ======================= +DependencyInjection +------------------- + + * The signature of `ContainerAwareInterface::setContainer()` has been updated to `setContainer(?ContainerInterface $container)`; explicitly pass `null` if you want to unset the container + FrameworkBundle --------------- @@ -37,6 +42,7 @@ Security * Deprecate the `Symfony\Component\Security\Core\Security` class and service, use `Symfony\Bundle\SecurityBundle\Security\Security` instead * Passing empty username or password parameter when using `JsonLoginAuthenticator` is not supported anymore * Add `$lifetime` parameter to `LoginLinkHandlerInterface::createLoginLink()` + * The signature of `TokenStorageInterface::setToken()` has been updated to `setToken(?TokenInterface $token)`; explicitly pass `null` if you want to unset the token Validator --------- diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md index 6a3a4c9f1d446..cac51da64f300 100644 --- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -9,6 +9,8 @@ CHANGELOG * Add `enum` env var processor * Add `shuffle` env var processor * Allow #[When] to be extended + * Change the signature of `ContainerAwareInterface::setContainer()` to `setContainer(?ContainerInterface $container)` + * Deprecate calling `ContainerAwareTrait::setContainer()` without arguments 6.1 --- diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php index e7b9d575ece50..c2280a22fd07b 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php @@ -21,5 +21,5 @@ interface ContainerAwareInterface /** * Sets the container. */ - public function setContainer(ContainerInterface $container = null); + public function setContainer(?ContainerInterface $container); } diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php index ee1ea2cb3d148..8921ba2a52287 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php @@ -25,6 +25,10 @@ trait ContainerAwareTrait public function setContainer(ContainerInterface $container = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/dependency-injection', '6.2', 'Calling "%s::%s()" without any arguments is deprecated. Please explicitly pass null if you want to unset the container.', static::class, __FUNCTION__); + } + $this->container = $container; } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php new file mode 100644 index 0000000000000..4c8507b2fb560 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\DependencyInjection\ContainerInterface; + +class ContainerAwareTraitTest extends TestCase +{ + use ExpectDeprecationTrait; + + /** + * @group legacy + */ + public function testSetContainerLegacy() + { + $container = $this->createMock(ContainerInterface::class); + + $dummy = new ContainerAwareDummy(); + $dummy->setContainer($container); + + self::assertSame($container, $dummy->getContainer()); + + $this->expectDeprecation('Since symfony/dependency-injection 6.2: Calling "Symfony\Component\DependencyInjection\Tests\ContainerAwareDummy::setContainer()" without any arguments is deprecated. Please explicitly pass null if you want to unset the container.'); + + $dummy->setContainer(); + self::assertNull($dummy->getContainer()); + } + + public function testSetContainer() + { + $container = $this->createMock(ContainerInterface::class); + + $dummy = new ContainerAwareDummy(); + $dummy->setContainer($container); + + self::assertSame($container, $dummy->getContainer()); + + $dummy->setContainer(null); + self::assertNull($dummy->getContainer()); + } +} + +class ContainerAwareDummy implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function getContainer(): ?ContainerInterface + { + return $this->container; + } +} diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php index 73f536cbf0be7..84d665a9bd670 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php @@ -39,6 +39,10 @@ public function getToken(): ?TokenInterface public function setToken(TokenInterface $token = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/security-core', '6.2', 'Calling "%s()" without any arguments is deprecated. Please explicitly pass null if you want to unset the token.', __METHOD__); + } + if ($token) { // ensure any initializer is called $this->getToken(); diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.php index 340f57d862db9..7d184d04d68b4 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.php @@ -30,5 +30,5 @@ public function getToken(): ?TokenInterface; * * @param TokenInterface|null $token A TokenInterface token, or null if no further authentication information should be stored */ - public function setToken(TokenInterface $token = null); + public function setToken(?TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php index b66671270ee7e..ef1a99a1e439e 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php @@ -46,6 +46,10 @@ public function getToken(): ?TokenInterface public function setToken(TokenInterface $token = null): void { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/security-core', '6.2', 'Calling "%s()" without any arguments is deprecated. Please explicitly pass null if you want to unset the token.', __METHOD__); + } + $this->storage->setToken($token); if ($token && $this->shouldTrackUsage()) { diff --git a/src/Symfony/Component/Security/Core/CHANGELOG.md b/src/Symfony/Component/Security/Core/CHANGELOG.md index 92f4cccaecb07..cc5719dcb1b43 100644 --- a/src/Symfony/Component/Security/Core/CHANGELOG.md +++ b/src/Symfony/Component/Security/Core/CHANGELOG.md @@ -4,7 +4,9 @@ CHANGELOG 6.2 --- -* Deprecate the `Security` class, use `Symfony\Bundle\SecurityBundle\Security\Security` instead + * Deprecate the `Security` class, use `Symfony\Bundle\SecurityBundle\Security\Security` instead + * Change the signature of `TokenStorageInterface::setToken()` to `setToken(?TokenInterface $token)` + * Deprecate calling `TokenStorage::setToken()` or `UsageTrackingTokenStorage::setToken()` without arguments 6.0 --- diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php index a08f90cd05e9f..4cddf50ced890 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php @@ -12,12 +12,31 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Token\Storage; use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\User\InMemoryUser; class TokenStorageTest extends TestCase { + use ExpectDeprecationTrait; + + /** + * @group legacy + */ + public function testGetSetTokenLegacy() + { + $tokenStorage = new TokenStorage(); + $token = new UsernamePasswordToken('username', 'password', 'provider'); + $tokenStorage->setToken($token); + $this->assertSame($token, $tokenStorage->getToken()); + + $this->expectDeprecation('Since symfony/security-core 6.2: Calling "Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage::setToken()" without any arguments is deprecated. Please explicitly pass null if you want to unset the token.'); + + $tokenStorage->setToken(); + $this->assertNull($tokenStorage->getToken()); + } + public function testGetSetToken() { $tokenStorage = new TokenStorage(); @@ -25,5 +44,7 @@ public function testGetSetToken() $token = new UsernamePasswordToken(new InMemoryUser('username', 'password'), 'provider'); $tokenStorage->setToken($token); $this->assertSame($token, $tokenStorage->getToken()); + $tokenStorage->setToken(null); + $this->assertNull($tokenStorage->getToken()); } } From 05697ca95747b9964e985a1cc19acc6596d8c0d7 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 12 Sep 2022 16:01:21 +0200 Subject: [PATCH 0104/1170] [Cache] sync Redis6Proxy with upstream --- src/Symfony/Component/Cache/Traits/Redis6Proxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Cache/Traits/Redis6Proxy.php b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php index 010468844b85b..728fcee4ec2d8 100644 --- a/src/Symfony/Component/Cache/Traits/Redis6Proxy.php +++ b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php @@ -147,7 +147,7 @@ public function clearLastError(): bool return $this->lazyObjectReal->clearLastError(...\func_get_args()); } - public function client($opt, $arg = null): mixed + public function client($opt, ...$args): mixed { return $this->lazyObjectReal->client(...\func_get_args()); } From 78803b296260967395711f052203dd8ea1442178 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 12 Sep 2022 14:32:45 +0200 Subject: [PATCH 0105/1170] Remove all "nullable-by-default-value" setters --- UPGRADE-6.2.md | 50 ++++++++++++++++++- .../Tests/Fixtures/ContainerAwareFixture.php | 2 +- .../Controller/ControllerResolverTest.php | 2 +- src/Symfony/Component/Config/CHANGELOG.md | 5 ++ .../Config/Definition/Builder/NodeBuilder.php | 3 ++ src/Symfony/Component/Console/CHANGELOG.md | 7 ++- .../Component/Console/Command/Command.php | 3 ++ .../Component/Console/Command/LazyCommand.php | 3 ++ .../Formatter/NullOutputFormatterStyle.php | 6 +++ .../Formatter/OutputFormatterStyle.php | 6 +++ .../OutputFormatterStyleInterface.php | 4 +- .../Component/Console/Helper/Helper.php | 3 ++ .../Console/Helper/HelperInterface.php | 2 +- .../Component/Console/Input/InputArgument.php | 3 ++ .../Component/Console/Input/InputOption.php | 3 ++ .../Component/Console/Question/Question.php | 6 +++ .../DependencyInjection/CHANGELOG.md | 2 +- .../ContainerAwareTrait.php | 2 +- .../Tests/ContainerAwareTraitTest.php | 2 +- src/Symfony/Component/Form/Button.php | 3 ++ src/Symfony/Component/Form/ButtonBuilder.php | 4 ++ src/Symfony/Component/Form/CHANGELOG.md | 7 ++- .../TransformationFailedException.php | 3 ++ src/Symfony/Component/Form/Form.php | 4 ++ .../Component/Form/FormConfigBuilder.php | 3 ++ .../Form/FormConfigBuilderInterface.php | 2 +- src/Symfony/Component/Form/FormInterface.php | 2 +- .../Component/HttpFoundation/CHANGELOG.md | 1 + .../Component/HttpFoundation/JsonResponse.php | 3 ++ .../Component/HttpFoundation/Response.php | 9 ++++ .../Storage/MockArraySessionStorage.php | 3 ++ .../Session/Storage/NativeSessionStorage.php | 9 ++-- .../HttpFoundation/Tests/ResponseTest.php | 2 +- .../Storage/NativeSessionStorageTest.php | 2 - src/Symfony/Component/HttpKernel/CHANGELOG.md | 1 + .../DataCollector/ConfigDataCollector.php | 4 ++ .../EventListener/RouterListener.php | 2 +- .../HttpCache/ResponseCacheStrategy.php | 2 +- src/Symfony/Component/Mime/CHANGELOG.md | 5 ++ src/Symfony/Component/Mime/Message.php | 3 ++ .../Component/PropertyAccess/CHANGELOG.md | 5 ++ .../PropertyAccessorBuilder.php | 3 ++ .../Tests/Fixtures/TestClass.php | 2 +- .../Token/Storage/TokenStorage.php | 2 +- .../Storage/UsageTrackingTokenStorage.php | 4 -- .../Component/Security/Core/CHANGELOG.md | 2 +- .../Token/Storage/TokenStorageTest.php | 4 +- src/Symfony/Component/Serializer/CHANGELOG.md | 9 ++-- .../Serializer/Mapping/AttributeMetadata.php | 4 ++ .../Mapping/AttributeMetadataInterface.php | 2 +- .../Serializer/Mapping/ClassMetadata.php | 3 ++ .../Mapping/ClassMetadataInterface.php | 2 +- src/Symfony/Component/VarDumper/CHANGELOG.md | 1 + src/Symfony/Component/VarDumper/VarDumper.php | 3 ++ src/Symfony/Component/Workflow/CHANGELOG.md | 1 + src/Symfony/Component/Workflow/Definition.php | 3 ++ 56 files changed, 199 insertions(+), 39 deletions(-) diff --git a/UPGRADE-6.2.md b/UPGRADE-6.2.md index 8a8cb3bbcec76..e1b49e3821caf 100644 --- a/UPGRADE-6.2.md +++ b/UPGRADE-6.2.md @@ -1,10 +1,30 @@ UPGRADE FROM 6.1 to 6.2 ======================= +Config +------ + + * Deprecate calling `NodeBuilder::setParent()` without any arguments + +Console +------- + + * Deprecate calling `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()`, `Question::setAutocompleterCallback/setValidator()`without any arguments + * Change the signature of `OutputFormatterStyleInterface::setForeground/setBackground()` to `setForeground/setBackground(?string)` + * Change the signature of `HelperInterface::setHelperSet()` to `setHelperSet(?HelperSet)` + DependencyInjection ------------------- - * The signature of `ContainerAwareInterface::setContainer()` has been updated to `setContainer(?ContainerInterface $container)`; explicitly pass `null` if you want to unset the container + * Change the signature of `ContainerAwareInterface::setContainer()` to `setContainer(?ContainerInterface)` + * Deprecate calling `ContainerAwareTrait::setContainer()` without arguments + +Form +---- + + * Deprecate calling `Button/Form::setParent()`, `ButtonBuilder/FormConfigBuilder::setDataMapper()`, `TransformationFailedException::setInvalidMessage()` without arguments + * Change the signature of `FormConfigBuilderInterface::setDataMapper()` to `setDataMapper(?DataMapperInterface)` + * Change the signature of `FormInterface::setParent()` to `setParent(?self)` FrameworkBundle --------------- @@ -18,11 +38,13 @@ HttpFoundation -------------- * Deprecate `Request::getContentType()`, use `Request::getContentTypeFormat()` instead + * Deprecate calling `JsonResponse::setCallback()`, `Response::setExpires/setLastModified/setEtag()`, `MockArraySessionStorage/NativeSessionStorage::setMetadataBag()`, `NativeSessionStorage::setSaveHandler()` without arguments HttpKernel ---------- * Deprecate `ArgumentValueResolverInterface`, use `ValueResolverInterface` instead + * Deprecate calling `ConfigDataCollector::setKernel()`, `RouterListener::setCurrentRequest()` without arguments Ldap ---- @@ -34,6 +56,16 @@ Mailer * Deprecate the `OhMySMTP` transport, use `MailPace` instead +Mime +---- + + * Deprecate calling `Message::setBody()` without arguments + +PropertyAccess +-------------- + + * Deprecate calling `PropertyAccessorBuilder::setCacheItemPool()` without arguments + Security -------- @@ -42,13 +74,26 @@ Security * Deprecate the `Symfony\Component\Security\Core\Security` class and service, use `Symfony\Bundle\SecurityBundle\Security\Security` instead * Passing empty username or password parameter when using `JsonLoginAuthenticator` is not supported anymore * Add `$lifetime` parameter to `LoginLinkHandlerInterface::createLoginLink()` - * The signature of `TokenStorageInterface::setToken()` has been updated to `setToken(?TokenInterface $token)`; explicitly pass `null` if you want to unset the token + * Change the signature of `TokenStorageInterface::setToken()` to `setToken(?TokenInterface $token)` + * Deprecate calling `TokenStorage::setToken()` or `UsageTrackingTokenStorage::setToken()` without arguments + +Serializer +---------- + + * Deprecate calling `AttributeMetadata::setSerializedName()`, `ClassMetadata::setClassDiscriminatorMapping()` without arguments + * Change the signature of `AttributeMetadataInterface::setSerializedName()` to `setSerializedName(?string)` + * Change the signature of `ClassMetadataInterface::setClassDiscriminatorMapping()` to `setClassDiscriminatorMapping(?ClassDiscriminatorMapping)` Validator --------- * Deprecate the `loose` e-mail validation mode, use `html5` instead +VarDumper +--------- + + * Deprecate calling `VarDumper::setHandler()` without arguments + Workflow -------- @@ -58,3 +103,4 @@ Workflow ``` * The first argument of `WorkflowDumpCommand` should be a `ServiceLocator` of all workflows indexed by names + * Deprecate calling `Definition::setInitialPlaces()` without arguments diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/ContainerAwareFixture.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/ContainerAwareFixture.php index 6655033ab4999..fbad8e05c56f6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/ContainerAwareFixture.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/ContainerAwareFixture.php @@ -20,7 +20,7 @@ class ContainerAwareFixture implements FixtureInterface, ContainerAwareInterface { public $container; - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container) { $this->container = $container; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php index 5fb3e774a709d..6f5b870e3350e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php @@ -172,7 +172,7 @@ class ContainerAwareController implements ContainerAwareInterface { private $container; - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container) { $this->container = $container; } diff --git a/src/Symfony/Component/Config/CHANGELOG.md b/src/Symfony/Component/Config/CHANGELOG.md index ffb278bd030e3..c88f2a321dc15 100644 --- a/src/Symfony/Component/Config/CHANGELOG.md +++ b/src/Symfony/Component/Config/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.2 +--- + + * Deprecate calling `NodeBuilder::setParent()` without any arguments + 6.1 --- diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php index 89d6adb70e337..7cda0bc7d8b1e 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php @@ -41,6 +41,9 @@ public function __construct() */ public function setParent(ParentNodeDefinitionInterface $parent = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->parent = $parent; return $this; diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 5c37be6d3a21c..61c36b0e06ab7 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -4,8 +4,11 @@ CHANGELOG 6.2 --- -* Improve truecolor terminal detection in some cases -* Add support for 256 color terminals (conversion from Ansi24 to Ansi8 if terminal is capable of it) + * Improve truecolor terminal detection in some cases + * Add support for 256 color terminals (conversion from Ansi24 to Ansi8 if terminal is capable of it) + * Deprecate calling `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()`, `Question::setAutocompleterCallback/setValidator()`without any arguments + * Change the signature of `OutputFormatterStyleInterface::setForeground/setBackground()` to `setForeground/setBackground(?string)` + * Change the signature of `HelperInterface::setHelperSet()` to `setHelperSet(?HelperSet)` 6.1 --- diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 3c5074933d6a2..1e3c1a5a2be68 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -149,6 +149,9 @@ public function ignoreValidationErrors() public function setApplication(Application $application = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->application = $application; if ($application) { $this->setHelperSet($application->getHelperSet()); diff --git a/src/Symfony/Component/Console/Command/LazyCommand.php b/src/Symfony/Component/Console/Command/LazyCommand.php index ca5a8f4cebfae..d56058221386c 100644 --- a/src/Symfony/Component/Console/Command/LazyCommand.php +++ b/src/Symfony/Component/Console/Command/LazyCommand.php @@ -47,6 +47,9 @@ public function ignoreValidationErrors(): void public function setApplication(Application $application = null): void { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if ($this->command instanceof parent) { $this->command->setApplication($application); } diff --git a/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php index 52d92ff872c9d..c2ce7d14cc904 100644 --- a/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/NullOutputFormatterStyle.php @@ -23,11 +23,17 @@ public function apply(string $text): string public function setBackground(string $color = null): void { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } // do nothing } public function setForeground(string $color = null): void { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } // do nothing } diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index c0029f821a0f0..1659986ef7bda 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -40,11 +40,17 @@ public function __construct(string $foreground = null, string $background = null public function setForeground(string $color = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options); } public function setBackground(string $color = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options); } diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php index 91d50aad2c506..7ed67d9a1120b 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php @@ -21,12 +21,12 @@ interface OutputFormatterStyleInterface /** * Sets style foreground color. */ - public function setForeground(string $color = null); + public function setForeground(?string $color); /** * Sets style background color. */ - public function setBackground(string $color = null); + public function setBackground(?string $color); /** * Sets some specific style option. diff --git a/src/Symfony/Component/Console/Helper/Helper.php b/src/Symfony/Component/Console/Helper/Helper.php index 7eff29a3f877e..9454b6a9b08e6 100644 --- a/src/Symfony/Component/Console/Helper/Helper.php +++ b/src/Symfony/Component/Console/Helper/Helper.php @@ -25,6 +25,9 @@ abstract class Helper implements HelperInterface public function setHelperSet(HelperSet $helperSet = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->helperSet = $helperSet; } diff --git a/src/Symfony/Component/Console/Helper/HelperInterface.php b/src/Symfony/Component/Console/Helper/HelperInterface.php index 1d2b7bfb84c24..2762cdf05ca06 100644 --- a/src/Symfony/Component/Console/Helper/HelperInterface.php +++ b/src/Symfony/Component/Console/Helper/HelperInterface.php @@ -21,7 +21,7 @@ interface HelperInterface /** * Sets the helper set associated with this helper. */ - public function setHelperSet(HelperSet $helperSet = null); + public function setHelperSet(?HelperSet $helperSet); /** * Gets the helper set associated with this helper. diff --git a/src/Symfony/Component/Console/Input/InputArgument.php b/src/Symfony/Component/Console/Input/InputArgument.php index 381be9316027d..f0867193e58bd 100644 --- a/src/Symfony/Component/Console/Input/InputArgument.php +++ b/src/Symfony/Component/Console/Input/InputArgument.php @@ -95,6 +95,9 @@ public function isArray(): bool */ public function setDefault(string|bool|int|float|array $default = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if ($this->isRequired() && null !== $default) { throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); } diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 5ea4a7f47e7e8..452c9f7fdec3b 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -180,6 +180,9 @@ public function isNegatable(): bool public function setDefault(string|bool|int|float|array $default = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) { throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.'); } diff --git a/src/Symfony/Component/Console/Question/Question.php b/src/Symfony/Component/Console/Question/Question.php index 972732b394be8..b06db9459bccf 100644 --- a/src/Symfony/Component/Console/Question/Question.php +++ b/src/Symfony/Component/Console/Question/Question.php @@ -178,6 +178,9 @@ public function getAutocompleterCallback(): ?callable */ public function setAutocompleterCallback(callable $callback = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if ($this->hidden && null !== $callback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } @@ -194,6 +197,9 @@ public function setAutocompleterCallback(callable $callback = null): static */ public function setValidator(callable $validator = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->validator = null === $validator ? null : $validator(...); return $this; diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md index cac51da64f300..9dc2c9816dfa3 100644 --- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -9,7 +9,7 @@ CHANGELOG * Add `enum` env var processor * Add `shuffle` env var processor * Allow #[When] to be extended - * Change the signature of `ContainerAwareInterface::setContainer()` to `setContainer(?ContainerInterface $container)` + * Change the signature of `ContainerAwareInterface::setContainer()` to `setContainer(?ContainerInterface)` * Deprecate calling `ContainerAwareTrait::setContainer()` without arguments 6.1 diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php index 8921ba2a52287..122fa07d10281 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php @@ -26,7 +26,7 @@ trait ContainerAwareTrait public function setContainer(ContainerInterface $container = null) { if (1 > \func_num_args()) { - trigger_deprecation('symfony/dependency-injection', '6.2', 'Calling "%s::%s()" without any arguments is deprecated. Please explicitly pass null if you want to unset the container.', static::class, __FUNCTION__); + trigger_deprecation('symfony/dependency-injection', '6.2', 'Calling "%s::%s()" without any arguments is deprecated, pass null explicitly instead.', __CLASS__, __FUNCTION__); } $this->container = $container; diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php index 4c8507b2fb560..2eb61c64ffb0c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php @@ -33,7 +33,7 @@ public function testSetContainerLegacy() self::assertSame($container, $dummy->getContainer()); - $this->expectDeprecation('Since symfony/dependency-injection 6.2: Calling "Symfony\Component\DependencyInjection\Tests\ContainerAwareDummy::setContainer()" without any arguments is deprecated. Please explicitly pass null if you want to unset the container.'); + $this->expectDeprecation('Since symfony/dependency-injection 6.2: Calling "Symfony\Component\DependencyInjection\Tests\ContainerAwareDummy::setContainer()" without any arguments is deprecated, pass null explicitly instead.'); $dummy->setContainer(); self::assertNull($dummy->getContainer()); diff --git a/src/Symfony/Component/Form/Button.php b/src/Symfony/Component/Form/Button.php index 58a77a7763687..00373b3770452 100644 --- a/src/Symfony/Component/Form/Button.php +++ b/src/Symfony/Component/Form/Button.php @@ -83,6 +83,9 @@ public function offsetUnset(mixed $offset): void public function setParent(FormInterface $parent = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if ($this->submitted) { throw new AlreadySubmittedException('You cannot set the parent of a submitted button.'); } diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index 387c3571fcb9a..bfba1d6cd0970 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -194,6 +194,10 @@ public function setAttributes(array $attributes): static */ public function setDataMapper(DataMapperInterface $dataMapper = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } + throw new BadMethodCallException('Buttons do not support data mappers.'); } diff --git a/src/Symfony/Component/Form/CHANGELOG.md b/src/Symfony/Component/Form/CHANGELOG.md index b5150a4c847a3..2475b005bed83 100644 --- a/src/Symfony/Component/Form/CHANGELOG.md +++ b/src/Symfony/Component/Form/CHANGELOG.md @@ -4,8 +4,11 @@ CHANGELOG 6.2 --- -* Allow passing `TranslatableInterface` objects to the `ChoiceView` label -* Allow passing `TranslatableInterface` objects to the `help` option + * Allow passing `TranslatableInterface` objects to the `ChoiceView` label + * Allow passing `TranslatableInterface` objects to the `help` option + * Deprecate calling `Button/Form::setParent()`, `ButtonBuilder/FormConfigBuilder::setDataMapper()`, `TransformationFailedException::setInvalidMessage()` without arguments + * Change the signature of `FormConfigBuilderInterface::setDataMapper()` to `setDataMapper(?DataMapperInterface)` + * Change the signature of `FormInterface::setParent()` to `setParent(?self)` 6.1 --- diff --git a/src/Symfony/Component/Form/Exception/TransformationFailedException.php b/src/Symfony/Component/Form/Exception/TransformationFailedException.php index e34a6e5ec7bee..409b51517a674 100644 --- a/src/Symfony/Component/Form/Exception/TransformationFailedException.php +++ b/src/Symfony/Component/Form/Exception/TransformationFailedException.php @@ -36,6 +36,9 @@ public function __construct(string $message = '', int $code = 0, \Throwable $pre */ public function setInvalidMessage(string $invalidMessage = null, array $invalidMessageParameters = []): void { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->invalidMessage = $invalidMessage; $this->invalidMessageParameters = $invalidMessageParameters; } diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index b2b96a0a1f701..4b634802426b0 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -220,6 +220,10 @@ public function isDisabled(): bool public function setParent(FormInterface $parent = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } + if ($this->submitted) { throw new AlreadySubmittedException('You cannot set the parent of a submitted form.'); } diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index 094bb8846302a..e18db7ed8e320 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -340,6 +340,9 @@ public function setAttributes(array $attributes): static public function setDataMapper(DataMapperInterface $dataMapper = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/form', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if ($this->locked) { throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } diff --git a/src/Symfony/Component/Form/FormConfigBuilderInterface.php b/src/Symfony/Component/Form/FormConfigBuilderInterface.php index a0858c7d3ff6c..84f40d3711f6b 100644 --- a/src/Symfony/Component/Form/FormConfigBuilderInterface.php +++ b/src/Symfony/Component/Form/FormConfigBuilderInterface.php @@ -100,7 +100,7 @@ public function setAttributes(array $attributes): static; * * @return $this */ - public function setDataMapper(DataMapperInterface $dataMapper = null): static; + public function setDataMapper(?DataMapperInterface $dataMapper): static; /** * Sets whether the form is disabled. diff --git a/src/Symfony/Component/Form/FormInterface.php b/src/Symfony/Component/Form/FormInterface.php index 292984215df89..a66cf420c95e9 100644 --- a/src/Symfony/Component/Form/FormInterface.php +++ b/src/Symfony/Component/Form/FormInterface.php @@ -34,7 +34,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable * @throws Exception\LogicException when trying to set a parent for a form with * an empty name */ - public function setParent(self $parent = null): static; + public function setParent(?self $parent): static; /** * Returns the parent form. diff --git a/src/Symfony/Component/HttpFoundation/CHANGELOG.md b/src/Symfony/Component/HttpFoundation/CHANGELOG.md index 8c69bc1dea4a1..1879ad24e3e70 100644 --- a/src/Symfony/Component/HttpFoundation/CHANGELOG.md +++ b/src/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -5,6 +5,7 @@ CHANGELOG --- * The HTTP cache store uses the `xxh128` algorithm + * Deprecate calling `JsonResponse::setCallback()`, `Response::setExpires/setLastModified/setEtag()`, `MockArraySessionStorage/NativeSessionStorage::setMetadataBag()`, `NativeSessionStorage::setSaveHandler()` without arguments 6.1 --- diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index 81278931545a8..b7870bd6a7d8a 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -79,6 +79,9 @@ public static function fromJsonString(string $data, int $status = 200, array $he */ public function setCallback(string $callback = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-foundation', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (null !== $callback) { // partially taken from https://geekality.net/2011/08/03/valid-javascript-identifier/ // partially taken from https://github.com/willdurand/JsonpCallbackValidator diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index a710fccdc75bd..d5c7129a5fa5a 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -720,6 +720,9 @@ public function getExpires(): ?\DateTimeInterface */ public function setExpires(\DateTimeInterface $date = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-foundation', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (null === $date) { $this->headers->remove('Expires'); @@ -899,6 +902,9 @@ public function getLastModified(): ?\DateTimeInterface */ public function setLastModified(\DateTimeInterface $date = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-foundation', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (null === $date) { $this->headers->remove('Last-Modified'); @@ -937,6 +943,9 @@ public function getEtag(): ?string */ public function setEtag(string $etag = null, bool $weak = false): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-foundation', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (null === $etag) { $this->headers->remove('Etag'); } else { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php index 2a98eeb5bb89e..d45510856c656 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php @@ -173,6 +173,9 @@ public function isStarted(): bool public function setMetadataBag(MetadataBag $bag = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-foundation', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (null === $bag) { $bag = new MetadataBag(); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index 7090209a3a971..b30cbd8adebcc 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -301,6 +301,9 @@ public function getBag(string $name): SessionBagInterface public function setMetadataBag(MetadataBag $metaBag = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-foundation', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (null === $metaBag) { $metaBag = new MetadataBag(); } @@ -377,10 +380,8 @@ public function setOptions(array $options) */ public function setSaveHandler(AbstractProxy|\SessionHandlerInterface $saveHandler = null) { - if (!$saveHandler instanceof AbstractProxy && - !$saveHandler instanceof \SessionHandlerInterface && - null !== $saveHandler) { - throw new \InvalidArgumentException('Must be instance of AbstractProxy; implement \SessionHandlerInterface; or be null.'); + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-foundation', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); } // Wrap $saveHandler in proxy and prevent double wrapping of proxy diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index d3905c8f9d3aa..72d2a7f5cf67d 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -995,7 +995,7 @@ public function testHasVary() public function testSetEtag() { $response = new Response('', 200, ['ETag' => '"12345"']); - $response->setEtag(); + $response->setEtag(null); $this->assertNull($response->headers->get('Etag'), '->setEtag() removes Etags when call with null'); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 3aa9c5bdd905b..717c6773cd658 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -206,8 +206,6 @@ public function testSetSaveHandler() { $this->iniSet('session.save_handler', 'files'); $storage = $this->getStorage(); - $storage->setSaveHandler(); - $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler()); $storage->setSaveHandler(null); $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler()); $storage->setSaveHandler(new SessionHandlerProxy(new NativeFileSessionHandler())); diff --git a/src/Symfony/Component/HttpKernel/CHANGELOG.md b/src/Symfony/Component/HttpKernel/CHANGELOG.md index 5ff615301a0e3..3c3926c5351b5 100644 --- a/src/Symfony/Component/HttpKernel/CHANGELOG.md +++ b/src/Symfony/Component/HttpKernel/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG * Add `absolute_uri` option to surrogate fragment renderers * Add `ValueResolverInterface` and deprecate `ArgumentValueResolverInterface` * Add argument `$reflector` to `ArgumentResolverInterface` and `ArgumentMetadataFactoryInterface` + * Deprecate calling `ConfigDataCollector::setKernel()`, `RouterListener::setCurrentRequest()` without arguments 6.1 --- diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 828037a3897b2..321fee2790204 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -31,6 +31,10 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte */ public function setKernel(KernelInterface $kernel = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/http-kernel', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } + $this->kernel = $kernel; } diff --git a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php index 155adde855804..81f83f0029ddd 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -68,7 +68,7 @@ public function __construct(UrlMatcherInterface|RequestMatcherInterface $matcher $this->debug = $debug; } - private function setCurrentRequest(Request $request = null) + private function setCurrentRequest(?Request $request) { if (null !== $request) { try { diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php index e579248c8d4c2..0c9f10823a5c4 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php @@ -110,7 +110,7 @@ public function update(Response $response) $response->headers->set('Age', $this->age); if ($this->isNotCacheableResponseEmbedded) { - $response->setLastModified(); + $response->setLastModified(null); if ($this->flagDirectives['no-store']) { $response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); diff --git a/src/Symfony/Component/Mime/CHANGELOG.md b/src/Symfony/Component/Mime/CHANGELOG.md index 6c6d2c3c1a007..a017114ad06b9 100644 --- a/src/Symfony/Component/Mime/CHANGELOG.md +++ b/src/Symfony/Component/Mime/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.2 +--- + + * Deprecate calling `Message::setBody()` without arguments + 6.1 --- diff --git a/src/Symfony/Component/Mime/Message.php b/src/Symfony/Component/Mime/Message.php index 9205f45025814..55435d7d72bf4 100644 --- a/src/Symfony/Component/Mime/Message.php +++ b/src/Symfony/Component/Mime/Message.php @@ -44,6 +44,9 @@ public function __clone() */ public function setBody(AbstractPart $body = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/mime', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->body = $body; return $this; diff --git a/src/Symfony/Component/PropertyAccess/CHANGELOG.md b/src/Symfony/Component/PropertyAccess/CHANGELOG.md index 018dabde05061..49c78c09e2ebc 100644 --- a/src/Symfony/Component/PropertyAccess/CHANGELOG.md +++ b/src/Symfony/Component/PropertyAccess/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.2 +--- + + * Deprecate calling `PropertyAccessorBuilder::setCacheItemPool()` without arguments + 6.0 --- diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php b/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php index d062b08200908..51362afeb93a8 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php @@ -241,6 +241,9 @@ public function isExceptionOnInvalidPropertyPath(): bool */ public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null): static { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/property-access', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->cacheItemPool = $cacheItemPool; return $this; diff --git a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php index baf377427d384..fbfc24030f49b 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php +++ b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php @@ -49,7 +49,7 @@ public function setPublicAccessor($value) $this->publicAccessor = $value; } - public function setPublicAccessorWithDefaultValue($value = null) + public function setPublicAccessorWithDefaultValue($value) { $this->publicAccessorWithDefaultValue = $value; } diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php index 84d665a9bd670..e1f619a6b8865 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php @@ -40,7 +40,7 @@ public function getToken(): ?TokenInterface public function setToken(TokenInterface $token = null) { if (1 > \func_num_args()) { - trigger_deprecation('symfony/security-core', '6.2', 'Calling "%s()" without any arguments is deprecated. Please explicitly pass null if you want to unset the token.', __METHOD__); + trigger_deprecation('symfony/security-core', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); } if ($token) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php index ef1a99a1e439e..b66671270ee7e 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/UsageTrackingTokenStorage.php @@ -46,10 +46,6 @@ public function getToken(): ?TokenInterface public function setToken(TokenInterface $token = null): void { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/security-core', '6.2', 'Calling "%s()" without any arguments is deprecated. Please explicitly pass null if you want to unset the token.', __METHOD__); - } - $this->storage->setToken($token); if ($token && $this->shouldTrackUsage()) { diff --git a/src/Symfony/Component/Security/Core/CHANGELOG.md b/src/Symfony/Component/Security/Core/CHANGELOG.md index cc5719dcb1b43..82af50cfc06ef 100644 --- a/src/Symfony/Component/Security/Core/CHANGELOG.md +++ b/src/Symfony/Component/Security/Core/CHANGELOG.md @@ -6,7 +6,7 @@ CHANGELOG * Deprecate the `Security` class, use `Symfony\Bundle\SecurityBundle\Security\Security` instead * Change the signature of `TokenStorageInterface::setToken()` to `setToken(?TokenInterface $token)` - * Deprecate calling `TokenStorage::setToken()` or `UsageTrackingTokenStorage::setToken()` without arguments + * Deprecate calling `TokenStorage::setToken()` without arguments 6.0 --- diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php index 4cddf50ced890..5b260b50a18c7 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php @@ -27,11 +27,11 @@ class TokenStorageTest extends TestCase public function testGetSetTokenLegacy() { $tokenStorage = new TokenStorage(); - $token = new UsernamePasswordToken('username', 'password', 'provider'); + $token = new UsernamePasswordToken(new InMemoryUser('username', 'password'), 'provider'); $tokenStorage->setToken($token); $this->assertSame($token, $tokenStorage->getToken()); - $this->expectDeprecation('Since symfony/security-core 6.2: Calling "Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage::setToken()" without any arguments is deprecated. Please explicitly pass null if you want to unset the token.'); + $this->expectDeprecation('Since symfony/security-core 6.2: Calling "Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage::setToken()" without any arguments is deprecated, pass null explicitly instead.'); $tokenStorage->setToken(); $this->assertNull($tokenStorage->getToken()); diff --git a/src/Symfony/Component/Serializer/CHANGELOG.md b/src/Symfony/Component/Serializer/CHANGELOG.md index f2ced003914be..9175ac1e468e2 100644 --- a/src/Symfony/Component/Serializer/CHANGELOG.md +++ b/src/Symfony/Component/Serializer/CHANGELOG.md @@ -4,9 +4,12 @@ CHANGELOG 6.2 --- -* Add support for constructor promoted properties to `Context` attribute -* Add context option `PropertyNormalizer::NORMALIZE_VISIBILITY` with bitmask flags `PropertyNormalizer::NORMALIZE_PUBLIC`, `PropertyNormalizer::NORMALIZE_PROTECTED`, `PropertyNormalizer::NORMALIZE_PRIVATE` -* Add method `withNormalizeVisibility` to `PropertyNormalizerContextBuilder` + * Add support for constructor promoted properties to `Context` attribute + * Add context option `PropertyNormalizer::NORMALIZE_VISIBILITY` with bitmask flags `PropertyNormalizer::NORMALIZE_PUBLIC`, `PropertyNormalizer::NORMALIZE_PROTECTED`, `PropertyNormalizer::NORMALIZE_PRIVATE` + * Add method `withNormalizeVisibility` to `PropertyNormalizerContextBuilder` + * Deprecate calling `AttributeMetadata::setSerializedName()`, `ClassMetadata::setClassDiscriminatorMapping()` without arguments + * Change the signature of `AttributeMetadataInterface::setSerializedName()` to `setSerializedName(?string)` + * Change the signature of `ClassMetadataInterface::setClassDiscriminatorMapping()` to `setClassDiscriminatorMapping(?ClassDiscriminatorMapping)` 6.1 --- diff --git a/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php b/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php index 7c644c272f53b..180909b9f7b30 100644 --- a/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php +++ b/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php @@ -109,6 +109,10 @@ public function getMaxDepth(): ?int public function setSerializedName(string $serializedName = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/serializer', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } + $this->serializedName = $serializedName; } diff --git a/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php b/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php index 492beb1b4c19c..6a215e0ea4299 100644 --- a/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php +++ b/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php @@ -52,7 +52,7 @@ public function getMaxDepth(): ?int; /** * Sets the serialization name for this attribute. */ - public function setSerializedName(string $serializedName = null); + public function setSerializedName(?string $serializedName); /** * Gets the serialization name for this attribute. diff --git a/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php b/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php index d27ee31a35920..cb166b2128cf3 100644 --- a/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php @@ -97,6 +97,9 @@ public function getClassDiscriminatorMapping(): ?ClassDiscriminatorMapping public function setClassDiscriminatorMapping(ClassDiscriminatorMapping $mapping = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/serializer', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $this->classDiscriminatorMapping = $mapping; } diff --git a/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php b/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php index e0a445d6a2ce1..14ab4bb417347 100644 --- a/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php +++ b/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php @@ -53,5 +53,5 @@ public function getReflectionClass(): \ReflectionClass; public function getClassDiscriminatorMapping(): ?ClassDiscriminatorMapping; - public function setClassDiscriminatorMapping(ClassDiscriminatorMapping $mapping = null); + public function setClassDiscriminatorMapping(?ClassDiscriminatorMapping $mapping); } diff --git a/src/Symfony/Component/VarDumper/CHANGELOG.md b/src/Symfony/Component/VarDumper/CHANGELOG.md index a9ea31d364da4..ffa4daf2b5a91 100644 --- a/src/Symfony/Component/VarDumper/CHANGELOG.md +++ b/src/Symfony/Component/VarDumper/CHANGELOG.md @@ -5,6 +5,7 @@ CHANGELOG --- * Add support for `FFI\CData` and `FFI\CType` + * Deprecate calling `VarDumper::setHandler()` without arguments 5.4 --- diff --git a/src/Symfony/Component/VarDumper/VarDumper.php b/src/Symfony/Component/VarDumper/VarDumper.php index c0d0741d24160..e9fdae59b970e 100644 --- a/src/Symfony/Component/VarDumper/VarDumper.php +++ b/src/Symfony/Component/VarDumper/VarDumper.php @@ -48,6 +48,9 @@ public static function dump(mixed $var) public static function setHandler(callable $callable = null): ?callable { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/va-dumper', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } $prevHandler = self::$handler; // Prevent replacing the handler with expected format as soon as the env var was set: diff --git a/src/Symfony/Component/Workflow/CHANGELOG.md b/src/Symfony/Component/Workflow/CHANGELOG.md index 758606b3eb68f..808ad77eb2e39 100644 --- a/src/Symfony/Component/Workflow/CHANGELOG.md +++ b/src/Symfony/Component/Workflow/CHANGELOG.md @@ -5,6 +5,7 @@ CHANGELOG --- * Mark `Symfony\Component\Workflow\Registry` as internal + * Deprecate calling `Definition::setInitialPlaces()` without arguments 6.0 --- diff --git a/src/Symfony/Component/Workflow/Definition.php b/src/Symfony/Component/Workflow/Definition.php index 45de623d5a386..c3a0637b0c59a 100644 --- a/src/Symfony/Component/Workflow/Definition.php +++ b/src/Symfony/Component/Workflow/Definition.php @@ -78,6 +78,9 @@ public function getMetadataStore(): MetadataStoreInterface private function setInitialPlaces(string|array $places = null) { + if (1 > \func_num_args()) { + trigger_deprecation('symfony/workflow', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); + } if (!$places) { return; } From 45c15f60c7cc610269cfa16c1032cdaecb8cc8d3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 2 Aug 2022 08:45:59 +0200 Subject: [PATCH 0106/1170] [WebProfilerBundle] Profiler redesign --- .../Resources/views/Profiler/icon.svg | 10 +- .../Resources/views/Collector/icon.svg | 6 +- .../Controller/ProfilerController.php | 7 +- .../EventListener/WebDebugToolbarListener.php | 2 +- .../Resources/views/Collector/cache.html.twig | 135 +- .../views/Collector/config.html.twig | 24 +- .../views/Collector/events.html.twig | 2 +- .../views/Collector/exception.html.twig | 2 +- .../Resources/views/Collector/form.html.twig | 500 +++--- .../views/Collector/http_client.html.twig | 25 +- .../views/Collector/logger.html.twig | 2 +- .../views/Collector/mailer.html.twig | 28 +- .../views/Collector/messenger.html.twig | 2 +- .../views/Collector/notifier.html.twig | 2 +- .../views/Collector/request.html.twig | 80 +- .../views/Collector/serializer.html.twig | 4 +- .../Resources/views/Collector/time.css.twig | 9 +- .../Resources/views/Collector/time.html.twig | 56 +- .../Resources/views/Collector/time.js | 28 +- .../views/Collector/translation.html.twig | 4 +- .../Resources/views/Collector/twig.html.twig | 45 +- .../views/Collector/validator.html.twig | 2 +- .../Resources/views/Icon/LICENSE.txt | 26 + .../Resources/views/Icon/ajax.svg | 8 +- .../Resources/views/Icon/alert-circle.svg | 6 + .../Resources/views/Icon/cache.svg | 7 +- .../Resources/views/Icon/close.svg | 6 +- .../Resources/views/Icon/config.svg | 13 +- .../Resources/views/Icon/event.svg | 9 +- .../Resources/views/Icon/exception.svg | 8 +- .../Resources/views/Icon/filter.svg | 5 +- .../Resources/views/Icon/form.svg | 10 +- .../Resources/views/Icon/forward.svg | 7 +- .../Resources/views/Icon/http-client.svg | 10 +- .../Resources/views/Icon/logger.svg | 8 +- .../Resources/views/Icon/mailer.svg | 6 +- .../Resources/views/Icon/memory.svg | 14 +- .../Resources/views/Icon/menu.svg | 7 +- .../Resources/views/Icon/messenger.svg | 9 +- .../Resources/views/Icon/no-gray.svg | 1 - .../Resources/views/Icon/no.svg | 6 +- .../Resources/views/Icon/notifier.svg | 8 +- .../Resources/views/Icon/redirect.svg | 5 +- .../Resources/views/Icon/referrer.svg | 4 + .../Resources/views/Icon/request.svg | 7 +- .../Resources/views/Icon/router.svg | 10 +- .../Resources/views/Icon/search.svg | 6 +- .../Resources/views/Icon/serializer.svg | 11 +- .../views/Icon/settings-theme-dark.svg | 4 + .../views/Icon/settings-theme-light.svg | 12 + .../views/Icon/settings-theme-system.svg | 5 + .../views/Icon/settings-width-fitted.svg | 8 + .../views/Icon/settings-width-fixed.svg | 4 + .../Resources/views/Icon/settings.svg | 5 + .../Resources/views/Icon/symfony.svg | 2 +- .../Resources/views/Icon/time.svg | 10 +- .../Resources/views/Icon/translation.svg | 9 +- .../Resources/views/Icon/twig.svg | 7 +- .../Resources/views/Icon/validator.svg | 8 +- .../Resources/views/Icon/yes.svg | 5 +- .../Resources/views/Profiler/fonts.css.twig | 7 + .../Resources/views/Profiler/header.html.twig | 17 +- .../Resources/views/Profiler/layout.html.twig | 228 +-- .../Resources/views/Profiler/open.css.twig | 124 +- .../Resources/views/Profiler/open.html.twig | 64 +- .../views/Profiler/profiler.css.twig | 1440 ++++++++++++----- .../views/Profiler/results.html.twig | 5 +- .../Resources/views/Profiler/search.html.twig | 52 +- .../views/Profiler/settings.html.twig | 197 ++- .../Resources/views/Profiler/toolbar.css.twig | 281 +++- .../views/Profiler/toolbar_js.html.twig | 2 +- .../views/Profiler/toolbar_redirect.html.twig | 52 +- .../Tests/Resources/IconTest.php | 11 +- 73 files changed, 2517 insertions(+), 1234 deletions(-) create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/LICENSE.txt create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/alert-circle.svg delete mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no-gray.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/referrer.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-dark.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-light.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-system.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fitted.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fixed.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings.svg create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/fonts.css.twig diff --git a/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg index d6cedd8a19dc3..9ba3a7d94d8f3 100644 --- a/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg +++ b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg @@ -1 +1,9 @@ - + + + + + + + + + diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg index 1110c10a037d2..b11d1a4637476 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg @@ -1 +1,5 @@ - + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 3cdec828217b5..3c6ec28523aed 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -113,7 +113,7 @@ public function panelAction(Request $request, string $token): Response 'request' => $request, 'templates' => $this->getTemplateManager()->getNames($profile), 'is_ajax' => $request->isXmlHttpRequest(), - 'profiler_markup_version' => 2, // 1 = original profiler, 2 = Symfony 2.8+ profiler + 'profiler_markup_version' => 3, // 1 = original profiler, 2 = Symfony 2.8+ profiler, 3 = Symfony 6.2+ profiler ]); } @@ -157,7 +157,7 @@ public function toolbarAction(Request $request, string $token = null): Response 'templates' => $this->getTemplateManager()->getNames($profile), 'profiler_url' => $url, 'token' => $token, - 'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar + 'profiler_markup_version' => 3, // 1 = original toolbar, 2 = Symfony 2.8+ profiler, 3 = Symfony 6.2+ profiler ]); } @@ -205,6 +205,7 @@ public function searchBarAction(Request $request): Response 'end' => $end, 'limit' => $limit, 'request' => $request, + 'render_hidden_by_default' => false, ]), 200, ['Content-Type' => 'text/html'] @@ -360,7 +361,7 @@ public function openAction(Request $request): Response } return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/open.html.twig', [ - 'filename' => $filename, + 'file_info' => new \SplFileInfo($filename), 'file' => $file, 'line' => $line, ]); diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index 8e0366e15340c..efaa98e0ca50f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -113,7 +113,7 @@ public function onKernelResponse(ResponseEvent $event) $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); } - $response->setContent($this->twig->render('@WebProfiler/Profiler/toolbar_redirect.html.twig', ['location' => $response->headers->get('Location')])); + $response->setContent($this->twig->render('@WebProfiler/Profiler/toolbar_redirect.html.twig', ['location' => $response->headers->get('Location'), 'host' => $request->getSchemeAndHttpHost()])); $response->setStatusCode(200); $response->headers->remove('Location'); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/cache.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/cache.html.twig index 8f029d51e6dc5..3f307c8b81b49 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/cache.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/cache.html.twig @@ -47,52 +47,17 @@

Cache

{% if collector.totals.calls == 0 %} -
+

No cache calls were made.

{% else %} -
-
- {{ collector.totals.calls }} - Total calls -
-
- {{ '%0.2f'|format(collector.totals.time * 1000) }} ms - Total time -
-
-
- {{ collector.totals.reads }} - Total reads -
-
- {{ collector.totals.writes }} - Total writes -
-
- {{ collector.totals.deletes }} - Total deletes -
-
-
- {{ collector.totals.hits }} - Total hits -
-
- {{ collector.totals.misses }} - Total misses -
-
- - {{ collector.totals.hit_read_ratio ?? 0 }} % - - Hits/reads -
-
+ {{ _self.render_metrics(collector.totals, true) }}

Pools

- {% for name, calls in collector.calls %} + {# the empty merge is needed to turn the iterator into an array #} + {% set cache_pools_with_calls = collector.calls|filter(calls => calls|length > 0)|merge([]) %} + {% for name, calls in cache_pools_with_calls %}

{{ name }} {{ collector.statistics[name].calls }}

@@ -111,25 +76,7 @@
{% else %}

Metrics

-
- {% for key, value in collector.statistics[name] %} -
- - {% if key == 'time' %} - {{ '%0.2f'|format(1000 * value) }} ms - {% elseif key == 'hit_read_ratio' %} - {{ value ?? 0 }} % - {% else %} - {{ value }} - {% endif %} - - {{ key == 'hit_read_ratio' ? 'Hits/reads' : key|capitalize }} -
- {% if key == 'time' or key == 'deletes' %} -
- {% endif %} - {% endfor %} -
+ {{ _self.render_metrics(collector.statistics[name]) }}

Calls

@@ -155,7 +102,77 @@ {% endif %} + + {% if loop.last %} +
+

Pools without calls {{ collector.calls|filter(calls => 0 == calls|length)|length }}

+ +
+
+ + + + + + + {% for cache_pool in collector.calls|filter(calls => 0 == calls|length)|keys|sort %} + + {% endfor %} + +
Cache pools that received no calls
{{ cache_pool }}
+
+
+ {% endif %} {% endfor %} {% endif %} {% endblock %} + +{% macro render_metrics(pool, is_total = false) %} +
+
+ {{ pool.calls }} + {{ is_total ? 'Total calls' : 'Calls' }} +
+
+ {{ '%0.2f'|format(pool.time * 1000) }} ms + {{ is_total ? 'Total time' : 'Time' }} +
+ +
+ +
+
+ {{ pool.reads }} + {{ is_total ? 'Total reads' : 'Reads' }} +
+
+ {{ pool.writes }} + {{ is_total ? 'Total writes' : 'Writes' }} +
+
+ {{ pool.deletes }} + {{ is_total ? 'Total deletes' : 'Deletes' }} +
+
+ +
+ +
+
+ {{ pool.hits }} + {{ is_total ? 'Total hits' : 'Hits' }} +
+
+ {{ pool.misses }} + {{ is_total ? 'Total misses' : 'Misses' }} +
+
+ + {{ pool.hit_read_ratio ?? 0 }} % + + Hits/reads +
+
+
+{% endmacro %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index 5f8cf89b2225e..a4800d4ca52f0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -190,19 +190,21 @@
-
- {{ source('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }} - OPcache -
+
+
+ {{ source('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }} + OPcache +
-
- {{ source('@WebProfiler/Icon/' ~ (collector.hasapcu ? 'yes' : 'no-gray') ~ '.svg') }} - APCu -
+
+ {{ source('@WebProfiler/Icon/' ~ (collector.hasapcu ? 'yes' : 'no') ~ '.svg') }} + APCu +
-
- {{ source('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no-gray') ~ '.svg') }} - Xdebug +
+ {{ source('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no') ~ '.svg') }} + Xdebug +
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig index af4f8b5e73ef0..33f33b235963a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig @@ -13,7 +13,7 @@

Event Dispatcher

{% if collector.calledlisteners is empty %} -
+

No events have been recorded. Check that debugging is enabled in the kernel.

{% else %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig index e27200d7abdf7..baea464527975 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig @@ -26,7 +26,7 @@

Exceptions

{% if not collector.hasexception %} -
+

No exception was thrown and caught during the request.

{% else %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig index c568d894f3053..f151590c5d2cf 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -46,7 +46,7 @@ #tree-menu { float: left; padding-right: 10px; - width: 230px; + width: 220px; } #tree-menu ul { list-style: none; @@ -60,11 +60,12 @@ } #tree-menu .empty { border: 0; + box-shadow: none !important; padding: 0; } #tree-details-container { - border-left: 1px solid #DDD; - margin-left: 250px; + border-left: 1px solid var(--table-border-color); + margin-left: 230px; padding-left: 20px; } .tree-details { @@ -77,13 +78,14 @@ .toggle-icon { display: inline-block; - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgBAMAAADpp+X/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDgwx4LcKwAAAABVQTFRFAAAA////////////////ZmZm////bvjBwAAAAAV0Uk5TABZwsuCVEUjgAAAAAWJLR0QF+G/pxwAAAE1JREFUGNNjSHMSYGBgUEljSGYAAzMGBwiDhUEBwmBiEIAwGBmwgTQgQGWgA7h2uIFwK+CWwp1BpHvYEqDuATEYkBlY3IOmBq6dCPcAAIT5Eg2IksjQAAAAAElFTkSuQmCC") no-repeat top left #5eb5e0; + background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' data-icon-name='icon-tabler-square-plus' width='24' height='24' viewBox='0 0 24 24' stroke-width='2px' stroke='currentColor' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Crect x='4' y='4' width='16' height='16' rx='2'%3E%3C/rect%3E%3Cline x1='9' y1='12' x2='15' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='9' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E") no-repeat; + background-size: 18px 18px; } .closed .toggle-icon, .closed.toggle-icon { background-position: bottom left; } .toggle-icon.empty { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QAZgBmAGYHukptAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDhIf6CA40AAAAFRJREFUOMvtk7ENACEMA61vfx767MROWfO+AdGBHlNyTZrYUZRYDBII4NWE1pNdpFarfgLUbpDaBEgBYRiEVjsvDLa1l6O4Z3wkFWN+OfLKdpisOH/TlICzukmUJwAAAABJRU5ErkJggg=="); + background-image: none; } .tree .tree-inner { @@ -93,58 +95,45 @@ } .tree .toggle-button { - /* provide a bigger clickable area than just 10x10px */ width: 16px; height: 16px; margin-left: -18px; } .tree .toggle-icon { - width: 10px; - height: 10px; - /* position the icon in the center of the clickable area */ - margin-left: 3px; - margin-top: 3px; - background-size: 10px 20px; - background-color: #AAA; + width: 18px; + height: 18px; + vertical-align: bottom; } .tree .toggle-icon.empty { - width: 10px; - height: 10px; + width: 5px; + height: 5px; position: absolute; top: 50%; - margin-top: -5px; - margin-left: -15px; - background-size: 10px 10px; + margin-top: -2px; + margin-left: -13px; + } + .tree .tree-inner { + border-radius: 4px; } .tree ul ul .tree-inner { - padding-left: 37px; + padding-left: 32px; } .tree ul ul ul .tree-inner { - padding-left: 52px; + padding-left: 48px; } .tree ul ul ul ul .tree-inner { - padding-left: 67px; + padding-left: 64px; } .tree ul ul ul ul ul .tree-inner { - padding-left: 82px; + padding-left: 72px; } .tree .tree-inner:hover { - background: #dfdfdf; - } - .tree .tree-inner:hover span:not(.has-error) { - color: var(--base-0); + background: var(--gray-200); } .tree .tree-inner.active, .tree .tree-inner.active:hover { background: var(--tree-active-background); font-weight: bold; } - .tree .tree-inner.active .toggle-icon, .tree .tree-inner:hover .toggle-icon, .tree .tree-inner.active:hover .toggle-icon { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgBAMAAADpp+X/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDhEYXWn+sAAAABhQTFRFAAAA39/f39/f39/f39/fZmZm39/f////gc3YPwAAAAV0Uk5TAAtAc6ZeVyCYAAAAAWJLR0QF+G/pxwAAAE1JREFUGNNjSHMSYGBgUEljSGYAAzMGBwiDhUEBwmBiEIAwGBmwgXIgQGWgA7h2uIFwK+CWwp1BpHvYC6DuATEYkBlY3IOmBq6dCPcAADqLE4MnBi/fAAAAAElFTkSuQmCC"); - background-color: #999; - } - .tree .tree-inner.active .toggle-icon.empty, .tree .tree-inner:hover .toggle-icon.empty, .tree .tree-inner.active:hover .toggle-icon.empty { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDhoucSey4gAAABVQTFRFAAAA39/f39/f39/f39/fZmZm39/fD5Dx2AAAAAV0Uk5TAAtAc6ZeVyCYAAAAAWJLR0QF+G/pxwAAADJJREFUCNdjSHMSYGBgUEljSGYAAzMGBwiDhUEBwmBiEIAwGBnIA3DtcAPhVsAthTkDAFOfBKW9C1iqAAAAAElFTkSuQmCC"); - } .tree-details .toggle-icon { width: 16px; height: 16px; @@ -180,26 +169,6 @@ color: inherit; text-decoration: inherit; } - h2 + h3.form-data-type { - margin-top: 0; - } - h3.form-data-type + h3 { - margin-top: 1em; - } - .theme-dark .toggle-icon { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgBAMAAADpp+X/AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTH+Ag0lNUZiYmGRmbP///zU5P2n9VV4AAAAFdFJOUwCv+yror0g1sQAAAE1JREFUGNNjSFM0YGBgEEpjSGEAAzcGBQiDiUEAwmBkMIAwmBmwgVAgQGWgA7h2uIFwK+CWwp1BpHtYA6DuATEYkBlY3IOmBq6dCPcAAKMtEEs3tfChAAAAAElFTkSuQmCC'); - } - .theme-dark .toggle-icon.empty { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAASUExURUdwTDI3OzQ5PS4uLjU3PzU5P4keoyIAAAAFdFJOUwBApgtzrnKGEwAAADJJREFUCNdjCFU0YGBgEAplCGEAA1cGBQiDiUEAwmBkMIAwmBnIA3DtcAPhVsAthTkDACsZBBmrTTSxAAAAAElFTkSuQmCC'); - } - .theme-dark .tree .tree-inner.active .toggle-icon, .theme-dark .tree .tree-inner:hover .toggle-icon, .theme-dark .tree .tree-inner.active:hover .toggle-icon { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgBAMAAADpp+X/AAAAD1BMVEVHcEx/gIOYmJiZmZn///+IJ2wIAAAAA3RSTlMAryoIUq0uAAAAUElEQVQY02NgYFQ2NjYWYGBgMAYDBgZmCMOAQRjCMGRQhjCMoEqAipAYLkCAykBXA9cONxBuBdxShDOIc4+JM9Q9IIYxMgOLe9DUwLUT4R4AznguG0qfEa0AAAAASUVORK5CYII='); - background-color: transparent; - } - .theme-dark .tree .tree-inner.active .toggle-icon.empty, .theme-dark .tree .tree-inner:hover .toggle-icon.empty, .theme-dark .tree .tree-inner.active:hover .toggle-icon.empty { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEVHcEwyNzuqqqrd9nIgAAAAAnRSTlMAQABPjKgAAAArSURBVAjXY2BctcqBgWvVqgUMWqtWrWDIWrVqJcMqICCGACsGawMbADIKANflJYEoGMqtAAAAAElFTkSuQmCC'); - background-color: transparent; - } {% endblock %} @@ -221,7 +190,7 @@ {% endfor %}
{% else %} -
+

No forms were submitted for this request.

{% endif %} @@ -441,7 +410,6 @@ }; tabTarget.initTabs(document.querySelectorAll('.tree .tree-inner')); - toggler.initButtons(document.querySelectorAll('a.toggle-button')); {% endblock %} @@ -480,10 +448,71 @@

{{ name|default('(no name)') }}

{% if data.type_class is defined %} -

{{ profiler_dump(data.type_class) }}

+
+ Form type: + {{ profiler_dump(data.type_class) }} +
{% endif %} - {% if data.errors is defined and data.errors|length > 0 %} + {% set form_has_errors = data.errors ?? [] is not empty %} +
+
+

Errors

+ +
+ {{ _self.render_form_errors(data) }} +
+
+ +
+

Default Data

+ +
+ {{ _self.render_form_default_data(data) }} +
+
+ +
+

Submitted Data

+ +
+ {{ _self.render_form_submitted_data(data) }} +
+
+ +
+

Passed Options

+ +
+ {{ _self.render_form_passed_options(data) }} +
+
+ +
+

Resolved Options

+ +
+ {{ _self.render_form_resolved_options(data) }} +
+
+ +
+

View Variables

+ +
+ {{ _self.render_form_view_variables(data) }} +
+
+
+
+ + {% for childName, childData in data.children %} + {{ tree.form_tree_details(childName, childData, forms_by_hash) }} + {% endfor %} +{% endmacro %} + +{% macro render_form_errors(data) %} + {% if data.errors is defined and data.errors|length > 0 %} - {% endif %} - - {% if data.default_data is defined %} -

- - Default Data - -

- -
- - - - - - + {% for error in data.errors %} - + - - - - - - - + {% endfor %}
PropertyValue
Model Format{{ error.message }} - {% if data.default_data.model is defined %} - {{ profiler_dump(data.default_data.seek('model')) }} + {% if error.origin is empty %} + This form. + {% elseif forms_by_hash[error.origin] is not defined %} + Unknown. {% else %} - same as normalized format + {{ forms_by_hash[error.origin].name }} {% endif %}
Normalized Format{{ profiler_dump(data.default_data.seek('norm')) }}
View Format - {% if data.default_data.view is defined %} - {{ profiler_dump(data.default_data.seek('view')) }} + {% if error.trace %} + Caused by: + {% for stacked in error.trace %} + {{ profiler_dump(stacked) }} + {% endfor %} {% else %} - same as normalized format + Unknown. {% endif %}
- {% endif %} - - {% if data.submitted_data is defined %} -

- - Submitted Data - -

+ {% else %} +
+

This form has no errors.

+
+ {% endif %} +{% endmacro %} -
- {% if data.submitted_data.norm is defined %} - - - - - - - - - - - - - - - - - - - - - -
PropertyValue
View Format - {% if data.submitted_data.view is defined %} - {{ profiler_dump(data.submitted_data.seek('view')) }} - {% else %} - same as normalized format - {% endif %} -
Normalized Format{{ profiler_dump(data.submitted_data.seek('norm')) }}
Model Format - {% if data.submitted_data.model is defined %} - {{ profiler_dump(data.submitted_data.seek('model')) }} - {% else %} - same as normalized format - {% endif %} -
- {% else %} -
-

This form was not submitted.

-
- {% endif %} +{% macro render_form_default_data(data) %} + {% if data.default_data is defined %} + + + + + + + + + + + + + + + + + + + + + +
PropertyValue
Model Format + {% if data.default_data.model is defined %} + {{ profiler_dump(data.default_data.seek('model')) }} + {% else %} + same as normalized format + {% endif %} +
Normalized Format{{ profiler_dump(data.default_data.seek('norm')) }}
View Format + {% if data.default_data.view is defined %} + {{ profiler_dump(data.default_data.seek('view')) }} + {% else %} + same as normalized format + {% endif %} +
+ {% else %} +
+

This form has default data defined.

- {% endif %} + {% endif %} +{% endmacro %} - {% if data.passed_options is defined %} -

- - Passed Options - -

+{% macro render_form_submitted_data(data) %} + {% if data.submitted_data.norm is defined %} + + + + + + + + + + + + + + + + + + + + + +
PropertyValue
View Format + {% if data.submitted_data.view is defined %} + {{ profiler_dump(data.submitted_data.seek('view')) }} + {% else %} + same as normalized format + {% endif %} +
Normalized Format{{ profiler_dump(data.submitted_data.seek('norm')) }}
Model Format + {% if data.submitted_data.model is defined %} + {{ profiler_dump(data.submitted_data.seek('model')) }} + {% else %} + same as normalized format + {% endif %} +
+ {% else %} +
+

This form was not submitted.

+
+ {% endif %} +{% endmacro %} -
- {% if data.passed_options|length %} - - - - - - - - - - {% for option, value in data.passed_options %} +{% macro render_form_passed_options(data) %} + {% if data.passed_options ?? [] is not empty %} +
OptionPassed ValueResolved Value
+ + + + + + + + + {% for option, value in data.passed_options %} @@ -658,73 +675,50 @@ {% endif %} - {% endfor %} - -
OptionPassed ValueResolved Value
{{ option }} {{ profiler_dump(value) }}
- {% else %} -
-

No options were passed when constructing this form.

-
- {% endif %} -
- {% endif %} - - {% if data.resolved_options is defined %} -

- - Resolved Options - -

- - +{% macro render_form_resolved_options(data) %} + + + + + + + + + {% for option, value in data.resolved_options ?? [] %} + + + + + {% endfor %} + +
OptionValue
{{ option }}{{ profiler_dump(value) }}
+{% endmacro %} - {% for childName, childData in data.children %} - {{ tree.form_tree_details(childName, childData, forms_by_hash) }} - {% endfor %} +{% macro render_form_view_variables(data) %} + + + + + + + + + {% for variable, value in data.view_vars %} + + + + + {% endfor %} + +
VariableValue
{{ variable }}{{ profiler_dump(value) }}
{% endmacro %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig index f409a2dc03fde..ed926bf8c2fcc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig @@ -38,7 +38,7 @@ {% block panel %}

HTTP Client

{% if collector.requestCount == 0 %} -
+

No HTTP requests were made.

{% else %} @@ -77,17 +77,14 @@ {% endif %} {% endfor %} {% endif %} - +
{% if profiler_token and profiler_link %} {% endif %} + {% if trace.options is not empty %} + + + + + {% endif %} - + {% if trace.http_code >= 500 %} {% set responseStatus = 'error' %} {% elseif trace.http_code >= 400 %} @@ -111,11 +115,10 @@ {% else %} {% set responseStatus = 'success' %} {% endif %} - + {{ trace.http_code }} - - + {{ profiler_dump(trace.info, maxDepth=1) }} {% if profiler_token and profiler_link %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 5246dc1049f0f..cf82587dd284f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -47,7 +47,7 @@

Log Messages

{% if collector.processedLogs is empty %} -
+

No log messages available.

{% else %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig index 1b898ad5397ec..5a80c5e12b9d5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/mailer.html.twig @@ -82,22 +82,24 @@

Emails

{% if not events.messages|length %} -
+

No emails were sent.

- {% endif %} - -
-
- {{ events.events|filter(e => e.isQueued())|length }} - Queued -
- -
- {{ events.events|filter(e => not e.isQueued())|length }} - Sent + {% else %} +
+
+
+ {{ events.events|filter(e => e.isQueued())|length }} + Queued +
+ +
+ {{ events.events|filter(e => not e.isQueued())|length }} + Sent +
+
-
+ {% endif %} {% for transport in events.transports %}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig index 0d0f11457f408..da4b84b124b92 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messenger.html.twig @@ -68,7 +68,7 @@

Messages

{% if collector.messages is empty %} -
+

No messages have been collected.

{% else %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig index 5c77585d489a9..b0c9219b02b79 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/notifier.html.twig @@ -85,7 +85,7 @@

Notifications

{% if not events.messages|length %} -
+

No notifications were sent.

{% endif %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index ec15223b0bc26..595ea63175e68 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -1,21 +1,20 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} - {% import _self as helper %} {% set request_handler %} - {{ helper.set_handler(collector.controller) }} + {{ _self.set_handler(collector.controller) }} {% endset %} {% if collector.redirect %} {% set redirect_handler %} - {{ helper.set_handler(collector.redirect.controller, collector.redirect.route, 'GET' != collector.redirect.method ? collector.redirect.method) }} + {{ _self.set_handler(collector.redirect.controller, collector.redirect.route, 'GET' != collector.redirect.method ? collector.redirect.method) }} {% endset %} {% endif %} {% if collector.forwardtoken %} {% set forward_profile = profile.childByToken(collector.forwardtoken) %} {% set forward_handler %} - {{ helper.set_handler(forward_profile ? forward_profile.collector('request').controller : 'n/a') }} + {{ _self.set_handler(forward_profile ? forward_profile.collector('request').controller : 'n/a') }} {% endset %} {% endif %} @@ -24,8 +23,8 @@ {% set icon %} {{ collector.statuscode }} {% if collector.route %} - {% if collector.redirect %}{{ source('@WebProfiler/Icon/redirect.svg') }}{% endif %} - {% if collector.forwardtoken %}{{ source('@WebProfiler/Icon/forward.svg') }}{% endif %} + {% if collector.redirect %}{{ source('@WebProfiler/Icon/redirect.svg') }}{% endif %} + {% if collector.forwardtoken %}{{ source('@WebProfiler/Icon/forward.svg') }}{% endif %} {{ 'GET' != collector.method ? collector.method }} @ {{ collector.route }} {% endif %} @@ -105,10 +104,9 @@ {% endblock %} {% block panel %} - {% import _self as helper %} - + {% set controller_name = _self.set_handler(collector.controller) %}

- {{ helper.set_handler(collector.controller) }} + {{ 'n/a' in controller_name ? 'Request / Response' : controller_name }}

@@ -116,34 +114,52 @@

Request

-

GET Parameters

- - {% if collector.requestquery.all is empty %} -
-

No GET parameters

+ {% set has_no_query_post_or_files = collector.requestquery.all is empty and collector.requestrequest.all is empty and collector.requestfiles is empty %} + {% if has_no_query_post_or_files %} +
+
+

GET Parameters

+

None

+
+
+

POST Parameters

+

None

+
+
+

Uploaded Files

+

None

+
{% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestquery, maxDepth: 1 }, with_context = false) }} - {% endif %} +

GET Parameters

-

POST Parameters

+ {% if collector.requestquery.all is empty %} +
+

No GET parameters

+
+ {% else %} + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestquery, maxDepth: 1 }, with_context = false) }} + {% endif %} - {% if collector.requestrequest.all is empty %} -
-

No POST parameters

-
- {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestrequest, maxDepth: 1 }, with_context = false) }} - {% endif %} +

POST Parameters

-

Uploaded Files

+ {% if collector.requestrequest.all is empty %} +
+

No POST parameters

+
+ {% else %} + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestrequest, maxDepth: 1 }, with_context = false) }} + {% endif %} - {% if collector.requestfiles is empty %} -
-

No files were uploaded

-
- {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestfiles, maxDepth: 1 }, with_context = false) }} +

Uploaded Files

+ + {% if collector.requestfiles is empty %} +
+

No files were uploaded

+
+ {% else %} + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestfiles, maxDepth: 1 }, with_context = false) }} + {% endif %} {% endif %}

Request Attributes

@@ -360,7 +376,7 @@
{% for child in profile.children %}

- {{ helper.set_handler(child.getcollector('request').controller) }} + {{ _self.set_handler(child.getcollector('request').controller) }} (token = {{ child.token }})

diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig index 1e5fbc05164b7..455c49839d296 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/serializer.html.twig @@ -63,7 +63,7 @@ {% block menu %} - {{ include('@WebProfiler/Icon/serializer.svg') }} + {{ source('@WebProfiler/Icon/serializer.svg') }} Serializer {% endblock %} @@ -72,7 +72,7 @@

Serializer

{% if not collector.handledCount %} -
+

Nothing was handled by the serializer for this request.

{% else %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.css.twig index b64b6ff869280..c2cb5b0ddbf53 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.css.twig @@ -23,7 +23,7 @@ margin: 1em 0; width: 100%; background-color: var(--table-background); - border: 1px solid var(--table-border); + border: 1px solid var(--table-border-color); } /* Typography */ @@ -44,7 +44,7 @@ .timeline-graph .timeline-subrequest, .timeline-graph .timeline-border { fill: none; - stroke: var(--table-border); + stroke: var(--table-border-color); stroke-width: 1px; } @@ -54,7 +54,10 @@ } .timeline-subrequest-pattern { - fill: var(--table-border); + fill: var(--gray-200); +} +.theme-dark .timeline-subrequest-pattern { + fill: var(--gray-600); } /* Timeline periods */ diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index dbc32962310b2..9db62e5b439a7 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -40,17 +40,21 @@

Performance metrics

-
- {{ '%.0f'|format(collector.duration) }} ms - Total execution time -
+
+
+ {{ '%.0f'|format(collector.duration) }} ms + Total execution time +
-
- {{ '%.0f'|format(collector.inittime) }} ms - Symfony initialization +
+ {{ '%.0f'|format(collector.inittime) }} ms + Symfony initialization +
{% if profile.collectors.memory %} +
+
{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} MiB Peak memory usage @@ -60,23 +64,25 @@ {% if profile.children|length > 0 %}
-
- {{ profile.children|length }} - Sub-Request{{ profile.children|length > 1 ? 's' }} -
- - {% if has_time_events %} - {% set subrequests_time = 0 %} - {% for child in profile.children %} - {% set subrequests_time = subrequests_time + child.getcollector('time').events.__section__.duration %} - {% endfor %} - {% else %} - {% set subrequests_time = 'n/a' %} - {% endif %} - -
- {{ subrequests_time }} ms - Sub-Request{{ profile.children|length > 1 ? 's' }} time +
+
+ {{ profile.children|length }} + Sub-Request{{ profile.children|length > 1 ? 's' }} +
+ + {% if has_time_events %} + {% set subrequests_time = 0 %} + {% for child in profile.children %} + {% set subrequests_time = subrequests_time + child.getcollector('time').events.__section__.duration %} + {% endfor %} + {% else %} + {% set subrequests_time = 'n/a' %} + {% endif %} + +
+ {{ subrequests_time }} ms + Sub-Request{{ profile.children|length > 1 ? 's' }} time +
{% endif %}
@@ -84,7 +90,7 @@

Execution timeline

{% if not collector.isStopwatchInstalled() %} -
+

The Stopwatch component is not installed. If you want to see timing events, run: composer require symfony/stopwatch.

{% elseif collector.events is empty %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.js b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.js index 156c9343ff139..6f627a3b9efa0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.js +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.js @@ -406,23 +406,23 @@ class SvgRenderer { class Theme { constructor(element) { this.reservedCategoryColors = { - 'default': '#777', - 'section': '#999', - 'event_listener': '#00b8f5', - 'template': '#66cc00', - 'doctrine': '#ff6633', - 'messenger_middleware': '#bdb81e', - 'controller.argument_value_resolver': '#8c5de6', - 'http_client': '#ffa333', + 'default': '#737373', + 'section': '#a3a3a3', + 'event_listener': '#54aeff', + 'template': '#4ac26b', + 'doctrine': '#fd8c73', + 'messenger_middleware': '#ff8182', + 'controller.argument_value_resolver': '#c297ff', + 'http_client': '#d4a72c', }; this.customCategoryColors = [ - '#dbab09', // dark yellow - '#ea4aaa', // pink - '#964b00', // brown - '#22863a', // dark green - '#0366d6', // dark blue - '#17a2b8', // teal + '#d4a72c', // dark yellow + '#ffaba8', // light red + '#e6af05', // yellow + '#6fdd8b', // light green + '#76e3ea', // cyan + '#a475f9', // light purple ]; this.getCategoryColor = this.getCategoryColor.bind(this); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig index e468ce2e82fe3..13503feeb4c05 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig @@ -72,7 +72,7 @@

Messages

{% if collector.messages is empty %} -
+

No translations have been called.

{% else %} @@ -186,7 +186,7 @@
{% for template, count in collector.templates %} - {%- set file = collector.templatePaths[template]|default(false) -%} - {%- set link = file ? file|file_link(1) : false -%} -
- {{ trace.method }} + {{ trace.method }} {{ trace.url }} - {% if trace.options is not empty %} - {{ profiler_dump(trace.options, maxDepth=1) }} - {% endif %} @@ -96,14 +93,21 @@ {% endif %} {% if trace.curlCommand is not null %} - +
Request options{{ profiler_dump(trace.options, maxDepth=1) }}
+ Response{{ message.domain }} {{ message.count }} - {{ message.id }} + {{ message.id }} {% if message.transChoiceNumber is not null %} (pluralization is used) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 0210ca012fed3..f4626403a88d8 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -41,7 +41,7 @@ {% if collector.templatecount == 0 %}

Twig

-
+

No Twig templates were rendered for this request.

{% else %} @@ -53,19 +53,23 @@ Render time
-
- {{ collector.templatecount }} - Template calls -
+
-
- {{ collector.blockcount }} - Block calls -
+
+
+ {{ collector.templatecount }} + Template calls +
-
- {{ collector.macrocount }} - Macro calls +
+ {{ collector.blockcount }} + Block calls +
+ +
+ {{ collector.macrocount }} + Macro calls +
@@ -85,17 +89,14 @@
- {{ source('@WebProfiler/Icon/twig.svg') }} + {% set file = collector.templatePaths[template]|default(false) %} + {% set link = file ? file|file_link(1) : false %} + {% if link %} - {{ template }} - + + {{ template }} + {{ file|file_relative|default(file) }} + {% else %} {{ template }} {% endif %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/validator.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/validator.html.twig index 0bb3ecf37ef6c..a473ac2372bac 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/validator.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/validator.html.twig @@ -96,7 +96,7 @@ {% endif %} {% else %} -
+

No calls to the validator were collected during this request.

{% endfor %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/LICENSE.txt b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/LICENSE.txt new file mode 100644 index 0000000000000..c3b6e47ddf2cb --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/LICENSE.txt @@ -0,0 +1,26 @@ +Icons are from "Tabler Icons" (https://github.com/tabler/tabler-icons), a set of +free MIT-licensed high-quality SVG icons. + +----- + +MIT License + +Copyright (c) 2020-2022 Paweł Kuna + +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. diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg index 4019e3249bb22..ba7dcfd49724c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg @@ -1 +1,7 @@ - + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/alert-circle.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/alert-circle.svg new file mode 100644 index 0000000000000..0251e8624e5f6 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/alert-circle.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/cache.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/cache.svg index 798198928a6fb..f357a626a0281 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/cache.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/cache.svg @@ -1 +1,6 @@ - + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg index 6038d73f9ab5b..d19c88baadad7 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg @@ -1 +1,5 @@ - + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg index ba51407d12d32..e28a1c6aa8c15 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg @@ -1 +1,12 @@ - + + + + + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg index 76eaa32453453..77d01735daf92 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg @@ -1 +1,8 @@ - + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg index 0e4df2b23a23c..a7a79696dfc63 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg @@ -1 +1,7 @@ - + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/filter.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/filter.svg index 8800f1c05d75c..cfe2246d91bea 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/filter.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/filter.svg @@ -1 +1,4 @@ - + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg index e1307960bd568..5a5cee29486e0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg @@ -1 +1,9 @@ - + + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg index 28a960a5bf835..57420af87a438 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg @@ -1 +1,6 @@ - + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/http-client.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/http-client.svg index e6b1fb2fe903c..f7d612b759663 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/http-client.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/http-client.svg @@ -1 +1,9 @@ - + + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg index ae8c5aae4447c..ee72a2c5f329d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg @@ -1 +1,7 @@ - + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/mailer.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/mailer.svg index ed649d0681073..38ae01c830b84 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/mailer.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/mailer.svg @@ -1 +1,5 @@ - + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg index deb047fc4a0ba..e489e1122a819 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg @@ -1 +1,13 @@ - + + + + + + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/menu.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/menu.svg index afccc7f629bb5..838deca87a298 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/menu.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/menu.svg @@ -1 +1,6 @@ - + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/messenger.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/messenger.svg index 3af5178135f42..e239e85dcfb7f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/messenger.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/messenger.svg @@ -1 +1,8 @@ - + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no-gray.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no-gray.svg deleted file mode 100644 index ea0089159380a..0000000000000 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no-gray.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg index 5ffc020f4efe8..e2280c7aa98dd 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg @@ -1 +1,5 @@ - + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/notifier.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/notifier.svg index 0648f126e99d7..35823f6eb41c9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/notifier.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/notifier.svg @@ -1 +1,7 @@ - + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg index 8c329d052f2c1..ebf9b6479b32d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg @@ -1 +1,4 @@ - + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/referrer.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/referrer.svg new file mode 100644 index 0000000000000..771edddeebc10 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/referrer.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg index 67d6c643fced5..b7486df097a69 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg @@ -1 +1,6 @@ - + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg index e16c617ebe18c..7d27edc1952ce 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg @@ -1 +1,9 @@ - + + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg index cae0a67f9120b..8a45c12779a0f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg @@ -1 +1,5 @@ - + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/serializer.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/serializer.svg index 332ed031cec08..50f4a097a70ac 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/serializer.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/serializer.svg @@ -1,6 +1,7 @@ - - - - - + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-dark.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-dark.svg new file mode 100644 index 0000000000000..8d9b5f27f8011 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-light.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-light.svg new file mode 100644 index 0000000000000..11ad643b4282c --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-light.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-system.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-system.svg new file mode 100644 index 0000000000000..6b6d22928fe14 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-theme-system.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fitted.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fitted.svg new file mode 100644 index 0000000000000..6d9f6e8d68817 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fitted.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fixed.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fixed.svg new file mode 100644 index 0000000000000..238ef2a4c2c35 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings-width-fixed.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings.svg new file mode 100644 index 0000000000000..ff36b510eaccd --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/settings.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg index c3beff6c8ddfd..ad38fdf924224 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg @@ -1 +1 @@ - + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg index d49851d440be4..64bdeac785005 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg @@ -1 +1,9 @@ - + + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg index 735bb92c78b70..84cec341dab88 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg @@ -1 +1,8 @@ - + + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg index 4a6ef7ab320f0..1211c61066b18 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg @@ -1 +1,6 @@ - + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/validator.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/validator.svg index 6a81d92daa786..d1db492d58b39 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/validator.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/validator.svg @@ -1 +1,7 @@ - + + + + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg index dbbff93d007d7..dbd70f68a5f09 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg @@ -1 +1,4 @@ - + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/fonts.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/fonts.css.twig new file mode 100644 index 0000000000000..cbf832ea3dc9d --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/fonts.css.twig @@ -0,0 +1,7 @@ +@font-face { + font-family: 'Ubuntu Mono'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(data:font/opentype;base64,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) format('woff2'); +} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig index a2c826ab6efb5..ac62bdcf5387a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig @@ -1,14 +1,11 @@
{% else %} -
+

The query returned no result.

{% endif %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig index 7494b4ec7f279..6e40d03946da4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig @@ -1,23 +1,25 @@ -