Skip to content

Commit bbf7228

Browse files
Merge branch '5.4' into 6.3
* 5.4: Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2 parents 2dc4f9d + f134175 commit bbf7228

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

PropertyAccessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class PropertyAccessor implements PropertyAccessorInterface
9292
* @param int $throw A bitwise combination of the THROW_* constants
9393
* to specify when exceptions should be thrown
9494
*/
95-
public function __construct(int $magicMethods = self::MAGIC_GET | self::MAGIC_SET, int $throw = self::THROW_ON_INVALID_PROPERTY_PATH, CacheItemPoolInterface $cacheItemPool = null, PropertyReadInfoExtractorInterface $readInfoExtractor = null, PropertyWriteInfoExtractorInterface $writeInfoExtractor = null)
95+
public function __construct(int $magicMethods = self::MAGIC_GET | self::MAGIC_SET, int $throw = self::THROW_ON_INVALID_PROPERTY_PATH, ?CacheItemPoolInterface $cacheItemPool = null, ?PropertyReadInfoExtractorInterface $readInfoExtractor = null, ?PropertyWriteInfoExtractorInterface $writeInfoExtractor = null)
9696
{
9797
$this->magicMethodsFlags = $magicMethods;
9898
$this->ignoreInvalidIndices = 0 === ($throw & self::THROW_ON_INVALID_INDEX);
@@ -200,7 +200,7 @@ public function setValue(object|array &$objectOrArray, string|PropertyPathInterf
200200
}
201201
}
202202

203-
private static function throwInvalidArgumentException(string $message, array $trace, int $i, string $propertyPath, \Throwable $previous = null): void
203+
private static function throwInvalidArgumentException(string $message, array $trace, int $i, string $propertyPath, ?\Throwable $previous = null): void
204204
{
205205
if (!isset($trace[$i]['file']) || __FILE__ !== $trace[$i]['file']) {
206206
return;
@@ -662,7 +662,7 @@ private function getPropertyPath(string|PropertyPath $propertyPath): PropertyPat
662662
*
663663
* @throws \LogicException When the Cache Component isn't available
664664
*/
665-
public static function createCache(string $namespace, int $defaultLifetime, string $version, LoggerInterface $logger = null): AdapterInterface
665+
public static function createCache(string $namespace, int $defaultLifetime, string $version, ?LoggerInterface $logger = null): AdapterInterface
666666
{
667667
if (!class_exists(ApcuAdapter::class)) {
668668
throw new \LogicException(sprintf('The Symfony Cache component must be installed to use "%s()".', __METHOD__));

PropertyAccessorBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public function isExceptionOnInvalidPropertyPath(): bool
239239
*
240240
* @return $this
241241
*/
242-
public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null): static
242+
public function setCacheItemPool(?CacheItemPoolInterface $cacheItemPool = null): static
243243
{
244244
if (1 > \func_num_args()) {
245245
trigger_deprecation('symfony/property-access', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);

PropertyPathBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PropertyPathBuilder
2121
private $elements = [];
2222
private $isIndex = [];
2323

24-
public function __construct(PropertyPathInterface|string $path = null)
24+
public function __construct(PropertyPathInterface|string|null $path = null)
2525
{
2626
if (null !== $path) {
2727
$this->append($path);
@@ -134,7 +134,7 @@ public function replace(int $offset, int $length, PropertyPathInterface|string $
134134
*
135135
* @throws OutOfBoundsException If the offset is invalid
136136
*/
137-
public function replaceByIndex(int $offset, string $name = null)
137+
public function replaceByIndex(int $offset, ?string $name = null)
138138
{
139139
if (!isset($this->elements[$offset])) {
140140
throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset));
@@ -154,7 +154,7 @@ public function replaceByIndex(int $offset, string $name = null)
154154
*
155155
* @throws OutOfBoundsException If the offset is invalid
156156
*/
157-
public function replaceByProperty(int $offset, string $name = null)
157+
public function replaceByProperty(int $offset, ?string $name = null)
158158
{
159159
if (!isset($this->elements[$offset])) {
160160
throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset));

0 commit comments

Comments
 (0)