Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 11, 2024
1 parent acb9c5d commit 3a56d27
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"require": {
"php": ">=8.1",
"ext-json": "*",
"spiral/core": "^3.15",
"spiral/hmvc": "^3.15",
"spiral/serializer": "^3.15",
"spiral/snapshots": "^3.15",
"spiral/telemetry": "^3.15",
"spiral/tokenizer": "^3.15",
"spiral/core": "^3.14.8",
"spiral/hmvc": "^3.14.8",
"spiral/serializer": "^3.14.8",
"spiral/snapshots": "^3.14.8",
"spiral/telemetry": "^3.14.8",
"spiral/tokenizer": "^3.14.8",
"spiral/attributes": "^2.8|^3.0",
"doctrine/inflector": "^1.4|^2.0",
"ramsey/uuid": "^4.2.3",
Expand All @@ -59,7 +59,7 @@
"require-dev": {
"phpunit/phpunit": "^10.1",
"mockery/mockery": "^1.5",
"spiral/boot": "^3.15",
"spiral/boot": "^3.14.8",
"vimeo/psalm": "^5.9"
},
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion src/Core/QueueInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
) {
}

public function createInjection(ReflectionClass $class, string $context = null): QueueInterface
public function createInjection(ReflectionClass $class, ?string $context = null): QueueInterface
{
try {
if ($context === null) {
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/NullDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class NullDriver implements QueueInterface
{
use QueueTrait;

public function push(string $name, mixed $payload = [], OptionsInterface $options = null): string
public function push(string $name, mixed $payload = [], ?OptionsInterface $options = null): string
{
// Do nothing

Expand Down
2 changes: 1 addition & 1 deletion src/Driver/SyncDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(
}

/** @inheritdoc */
public function push(string $name, mixed $payload = [], OptionsInterface $options = null): string
public function push(string $name, mixed $payload = [], ?OptionsInterface $options = null): string
{
if ($options !== null && $options->getDelay()) {
\sleep($options->getDelay());
Expand Down
3 changes: 1 addition & 2 deletions src/QueueInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ interface QueueInterface
{
/**
* @param string|class-string<HandlerInterface> $name
* @param OptionsInterface|null $options
*/
public function push(string $name, array $payload = [], OptionsInterface $options = null): string;
public function push(string $name, array $payload = [], ?OptionsInterface $options = null): string;
}
2 changes: 1 addition & 1 deletion tests/Core/Stub/TestQueueClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

final class TestQueueClass implements QueueInterface
{
public function push(string $name, mixed $payload = [], OptionsInterface $options = null): string
public function push(string $name, mixed $payload = [], ?OptionsInterface $options = null): string
{
return $name;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Interceptor/Push/CoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testCallActionWithNullOptions(mixed $payload): void
}

$queue->shouldReceive('push')->once()
->withArgs(fn(string $name, mixed $p = [], OptionsInterface $options = null) => $name === 'foo'
->withArgs(fn(string $name, mixed $p = [], ?OptionsInterface $options = null) => $name === 'foo'
&& $payload === $p
&& $options instanceof Options,
);
Expand Down Expand Up @@ -80,7 +80,7 @@ public function testCallWithTracerContext(): void
$tracer->shouldReceive('trace')->once()->andReturnUsing(fn($name, $callback) => $callback());

$queue->shouldReceive('push')->once()
->withArgs(fn(string $name, array $payload = [], OptionsInterface $options = null) => $name === 'foo'
->withArgs(fn(string $name, array $payload = [], ?OptionsInterface $options = null) => $name === 'foo'
&& $payload === ['baz' => 'baf']
&& $options->getHeader('foo') === ['bar']);

Expand All @@ -103,7 +103,7 @@ public function testCallWithTracerContextWitoutOptionsWithHeadersSupport(): void
$tracer->shouldNotReceive('getContext');

$queue->shouldReceive('push')->once()
->withArgs(fn(string $name, array $payload = [], OptionsInterface $options = null) => $name === 'foo'
->withArgs(fn(string $name, array $payload = [], ?OptionsInterface $options = null) => $name === 'foo'
&& $payload === ['baz' => 'baf']
&& $options !== null);

Expand Down

0 comments on commit 3a56d27

Please sign in to comment.