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 4e00f84 + 2de81b4 commit 1cabf3c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Lock.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function acquireRead(bool $blocking = false): bool
}
}

public function refresh(float $ttl = null): void
public function refresh(?float $ttl = null): void
{
if (!$ttl ??= $this->ttl) {
throw new InvalidArgumentException('You have to define an expiration duration.');
Expand Down
2 changes: 1 addition & 1 deletion LockInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function acquire(bool $blocking = false): bool;
* @throws LockConflictedException If the lock is acquired by someone else
* @throws LockAcquiringException If the lock cannot be refreshed
*/
public function refresh(float $ttl = null);
public function refresh(?float $ttl = null);

/**
* Returns whether or not the lock is acquired.
Expand Down
2 changes: 1 addition & 1 deletion NoLock.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function acquire(bool $blocking = false): bool
return true;
}

public function refresh(float $ttl = null): void
public function refresh(?float $ttl = null): void
{
}

Expand Down
2 changes: 1 addition & 1 deletion Store/FlockStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FlockStore implements BlockingStoreInterface, SharedLockStoreInterface
*
* @throws LockStorageException If the lock directory doesn’t exist or is not writable
*/
public function __construct(string $lockPath = null)
public function __construct(?string $lockPath = null)
{
if (!is_dir($lockPath ??= sys_get_temp_dir())) {
if (false === @mkdir($lockPath, 0777, true) && !is_dir($lockPath)) {
Expand Down
2 changes: 1 addition & 1 deletion Tests/Store/DoctrineDbalStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testAbortAfterExpiration()
/**
* @dataProvider provideDsnWithSQLite
*/
public function testDsnWithSQLite(string $dsn, string $file = null)
public function testDsnWithSQLite(string $dsn, ?string $file = null)
{
$key = new Key(uniqid(__METHOD__, true));

Expand Down
2 changes: 1 addition & 1 deletion Tests/Store/PdoStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function testInvalidTtlConstruct()
/**
* @dataProvider provideDsnWithSQLite
*/
public function testDsnWithSQLite(string $dsn, string $file = null)
public function testDsnWithSQLite(string $dsn, ?string $file = null)
{
$key = new Key(uniqid(__METHOD__, true));

Expand Down

0 comments on commit 1cabf3c

Please sign in to comment.