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 c1108eb + a579e67 commit 14b1c0f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Exception/AssetNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AssetNotFoundException extends RuntimeException
* @param int $code Exception code
* @param \Throwable $previous Previous exception used for the exception chaining
*/
public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null)
public function __construct(string $message, array $alternatives = [], int $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);

Expand Down
2 changes: 1 addition & 1 deletion Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Package implements PackageInterface
private VersionStrategyInterface $versionStrategy;
private ContextInterface $context;

public function __construct(VersionStrategyInterface $versionStrategy, ContextInterface $context = null)
public function __construct(VersionStrategyInterface $versionStrategy, ?ContextInterface $context = null)
{
$this->versionStrategy = $versionStrategy;
$this->context = $context ?? new NullContext();
Expand Down
8 changes: 4 additions & 4 deletions Packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Packages
/**
* @param PackageInterface[] $packages Additional packages indexed by name
*/
public function __construct(PackageInterface $defaultPackage = null, iterable $packages = [])
public function __construct(?PackageInterface $defaultPackage = null, iterable $packages = [])
{
$this->defaultPackage = $defaultPackage;

Expand Down Expand Up @@ -61,7 +61,7 @@ public function addPackage(string $name, PackageInterface $package)
* @throws InvalidArgumentException If there is no package by that name
* @throws LogicException If no default package is defined
*/
public function getPackage(string $name = null): PackageInterface
public function getPackage(?string $name = null): PackageInterface
{
if (null === $name) {
if (null === $this->defaultPackage) {
Expand All @@ -84,7 +84,7 @@ public function getPackage(string $name = null): PackageInterface
* @param string $path A public path
* @param string|null $packageName A package name
*/
public function getVersion(string $path, string $packageName = null): string
public function getVersion(string $path, ?string $packageName = null): string
{
return $this->getPackage($packageName)->getVersion($path);
}
Expand All @@ -99,7 +99,7 @@ public function getVersion(string $path, string $packageName = null): string
*
* @return string A public path which takes into account the base path and URL path
*/
public function getUrl(string $path, string $packageName = null): string
public function getUrl(string $path, ?string $packageName = null): string
{
return $this->getPackage($packageName)->getUrl($path);
}
Expand Down
2 changes: 1 addition & 1 deletion PathPackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PathPackage extends Package
/**
* @param string $basePath The base path to be prepended to relative paths
*/
public function __construct(string $basePath, VersionStrategyInterface $versionStrategy, ContextInterface $context = null)
public function __construct(string $basePath, VersionStrategyInterface $versionStrategy, ?ContextInterface $context = null)
{
parent::__construct($versionStrategy, $context);

Expand Down
2 changes: 1 addition & 1 deletion UrlPackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class UrlPackage extends Package
/**
* @param string|string[] $baseUrls Base asset URLs
*/
public function __construct(string|array $baseUrls, VersionStrategyInterface $versionStrategy, ContextInterface $context = null)
public function __construct(string|array $baseUrls, VersionStrategyInterface $versionStrategy, ?ContextInterface $context = null)
{
parent::__construct($versionStrategy, $context);

Expand Down
2 changes: 1 addition & 1 deletion VersionStrategy/JsonManifestVersionStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class JsonManifestVersionStrategy implements VersionStrategyInterface
* @param string $manifestPath Absolute path to the manifest file
* @param bool $strictMode Throws an exception for unknown paths
*/
public function __construct(string $manifestPath, HttpClientInterface $httpClient = null, bool $strictMode = false)
public function __construct(string $manifestPath, ?HttpClientInterface $httpClient = null, bool $strictMode = false)
{
$this->manifestPath = $manifestPath;
$this->httpClient = $httpClient;
Expand Down
2 changes: 1 addition & 1 deletion VersionStrategy/StaticVersionStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class StaticVersionStrategy implements VersionStrategyInterface
* @param string $version Version number
* @param string $format Url format
*/
public function __construct(string $version, string $format = null)
public function __construct(string $version, ?string $format = null)
{
$this->version = $version;
$this->format = $format ?: '%s?%s';
Expand Down

0 comments on commit 14b1c0f

Please sign in to comment.