Skip to content

Commit b26a32b

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 7b53a9f + db1adb0 commit b26a32b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+233
-48
lines changed

Adapter/AbstractAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static function ($deferred, $namespace, &$expiredIds, $getId, $defaultLifetime)
8787
*
8888
* Using ApcuAdapter makes system caches compatible with read-only filesystems.
8989
*/
90-
public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null): AdapterInterface
90+
public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, ?LoggerInterface $logger = null): AdapterInterface
9191
{
9292
$opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true);
9393
if (null !== $logger) {

Adapter/ApcuAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ApcuAdapter extends AbstractAdapter
2525
/**
2626
* @throws CacheException if APCu is not enabled
2727
*/
28-
public function __construct(string $namespace = '', int $defaultLifetime = 0, string $version = null, MarshallerInterface $marshaller = null)
28+
public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $version = null, ?MarshallerInterface $marshaller = null)
2929
{
3030
if (!static::isSupported()) {
3131
throw new CacheException('APCu is not enabled.');

Adapter/ArrayAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static function ($key, $value, $isHit, $tags) {
7474
);
7575
}
7676

77-
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
77+
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
7878
{
7979
$item = $this->getItem($key);
8080
$metadata = $item->getMetadata();

Adapter/ChainAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static function ($sourceItem, $item, $defaultLifetime, $sourceMetadata = null) {
8888
);
8989
}
9090

91-
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
91+
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
9292
{
9393
$doSave = true;
9494
$callback = static function (CacheItem $item, bool &$save) use ($callback, &$doSave) {
@@ -98,7 +98,7 @@ public function get(string $key, callable $callback, float $beta = null, array &
9898
return $value;
9999
};
100100

101-
$wrap = function (CacheItem $item = null, bool &$save = true) use ($key, $callback, $beta, &$wrap, &$doSave, &$metadata) {
101+
$wrap = function (?CacheItem $item = null, bool &$save = true) use ($key, $callback, $beta, &$wrap, &$doSave, &$metadata) {
102102
static $lastItem;
103103
static $i = 0;
104104
$adapter = $this->adapters[$i];

Adapter/CouchbaseBucketAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CouchbaseBucketAdapter extends AbstractAdapter
3939
private \CouchbaseBucket $bucket;
4040
private MarshallerInterface $marshaller;
4141

42-
public function __construct(\CouchbaseBucket $bucket, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
42+
public function __construct(\CouchbaseBucket $bucket, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null)
4343
{
4444
if (!static::isSupported()) {
4545
throw new CacheException('Couchbase >= 2.6.0 < 3.0.0 is required.');

Adapter/CouchbaseCollectionAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class CouchbaseCollectionAdapter extends AbstractAdapter
3232
private Collection $connection;
3333
private MarshallerInterface $marshaller;
3434

35-
public function __construct(Collection $connection, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
35+
public function __construct(Collection $connection, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null)
3636
{
3737
if (!static::isSupported()) {
3838
throw new CacheException('Couchbase >= 3.0.5 < 4.0.0 is required.');

Adapter/DoctrineDbalAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface
5959
*
6060
* @throws InvalidArgumentException When namespace contains invalid characters
6161
*/
62-
public function __construct(Connection|string $connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], MarshallerInterface $marshaller = null)
62+
public function __construct(Connection|string $connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], ?MarshallerInterface $marshaller = null)
6363
{
6464
if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) {
6565
throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0]));

Adapter/FilesystemAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class FilesystemAdapter extends AbstractAdapter implements PruneableInterface
2020
{
2121
use FilesystemTrait;
2222

23-
public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, MarshallerInterface $marshaller = null)
23+
public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, ?MarshallerInterface $marshaller = null)
2424
{
2525
$this->marshaller = $marshaller ?? new DefaultMarshaller();
2626
parent::__construct('', $defaultLifetime);

Adapter/FilesystemTagAwareAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class FilesystemTagAwareAdapter extends AbstractTagAwareAdapter implements Prune
3535
*/
3636
private const TAG_FOLDER = 'tags';
3737

38-
public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, MarshallerInterface $marshaller = null)
38+
public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, ?MarshallerInterface $marshaller = null)
3939
{
4040
$this->marshaller = new TagAwareMarshaller($marshaller);
4141
parent::__construct('', $defaultLifetime);

Adapter/MemcachedAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class MemcachedAdapter extends AbstractAdapter
4646
*
4747
* Using a MemcachedAdapter as a pure items store is fine.
4848
*/
49-
public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
49+
public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null)
5050
{
5151
if (!static::isSupported()) {
5252
throw new CacheException('Memcached > 3.1.5 is required.');

0 commit comments

Comments
 (0)