Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 6.3:
  minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
  Fix bad merge
  List CS fix in .git-blame-ignore-revs
  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
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
2 parents 75f6990 + bbf7228 commit dd22c92
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions PropertyAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PropertyAccessor implements PropertyAccessorInterface
* @param int $throw A bitwise combination of the THROW_* constants
* to specify when exceptions should be thrown
*/
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)
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)
{
$this->magicMethodsFlags = $magicMethods;
$this->ignoreInvalidIndices = 0 === ($throw & self::THROW_ON_INVALID_INDEX);
Expand Down Expand Up @@ -187,7 +187,7 @@ public function setValue(object|array &$objectOrArray, string|PropertyPathInterf
}
}

private static function throwInvalidArgumentException(string $message, array $trace, int $i, string $propertyPath, \Throwable $previous = null): void
private static function throwInvalidArgumentException(string $message, array $trace, int $i, string $propertyPath, ?\Throwable $previous = null): void
{
if (!isset($trace[$i]['file']) || __FILE__ !== $trace[$i]['file']) {
return;
Expand Down Expand Up @@ -662,7 +662,7 @@ private function getPropertyPath(string|PropertyPath $propertyPath): PropertyPat
*
* @throws \LogicException When the Cache Component isn't available
*/
public static function createCache(string $namespace, int $defaultLifetime, string $version, LoggerInterface $logger = null): AdapterInterface
public static function createCache(string $namespace, int $defaultLifetime, string $version, ?LoggerInterface $logger = null): AdapterInterface
{
if (!class_exists(ApcuAdapter::class)) {
throw new \LogicException(sprintf('The Symfony Cache component must be installed to use "%s()".', __METHOD__));
Expand Down
2 changes: 1 addition & 1 deletion PropertyAccessorBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function isExceptionOnInvalidPropertyPath(): bool
*
* @return $this
*/
public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null): static
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__);
Expand Down
6 changes: 3 additions & 3 deletions PropertyPathBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PropertyPathBuilder
private array $elements = [];
private array $isIndex = [];

public function __construct(PropertyPathInterface|string $path = null)
public function __construct(PropertyPathInterface|string|null $path = null)
{
if (null !== $path) {
$this->append($path);
Expand Down Expand Up @@ -134,7 +134,7 @@ public function replace(int $offset, int $length, PropertyPathInterface|string $
*
* @throws OutOfBoundsException If the offset is invalid
*/
public function replaceByIndex(int $offset, string $name = null)
public function replaceByIndex(int $offset, ?string $name = null)
{
if (!isset($this->elements[$offset])) {
throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset));
Expand All @@ -154,7 +154,7 @@ public function replaceByIndex(int $offset, string $name = null)
*
* @throws OutOfBoundsException If the offset is invalid
*/
public function replaceByProperty(int $offset, string $name = null)
public function replaceByProperty(int $offset, ?string $name = null)
{
if (!isset($this->elements[$offset])) {
throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset));
Expand Down

0 comments on commit dd22c92

Please sign in to comment.