Skip to content

Commit

Permalink
Merge pull request #1059 from spiral/annotations-require-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Jan 11, 2024
1 parent e3390e9 commit 6b8c41e
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 113 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
}
},
"require-dev": {
"doctrine/annotations": "^1.12 || ^2.0",
"phpunit/phpunit": "^10.1",
"mockery/mockery": "^1.5",
"spiral/boot": "^3.12",
Expand Down
4 changes: 0 additions & 4 deletions tests/Attribute/JobHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
use Spiral\Attributes\Factory;
use Spiral\Queue\Attribute\JobHandler;
use Spiral\Tests\Queue\Attribute\Stub\ExtendedJobHandler;
use Spiral\Tests\Queue\Attribute\Stub\JobHandlerAnnotation;
use Spiral\Tests\Queue\Attribute\Stub\JobHandlerAttribute;
use Spiral\Tests\Queue\Attribute\Stub\WithExtendedJobHandlerAnnotation;
use Spiral\Tests\Queue\Attribute\Stub\WithExtendedJobHandlerAttribute;
use Spiral\Tests\Queue\Attribute\Stub\WithoutJobHandler;

Expand All @@ -28,9 +26,7 @@ public function testJobHandler(string $class, ?JobHandler $expected): void
public static function classesProvider(): \Traversable
{
yield [WithoutJobHandler::class, null];
yield [JobHandlerAnnotation::class, new JobHandler('test')];
yield [JobHandlerAttribute::class, new JobHandler('test')];
yield [WithExtendedJobHandlerAnnotation::class, new ExtendedJobHandler()];
yield [WithExtendedJobHandlerAttribute::class, new ExtendedJobHandler()];
}
}
6 changes: 0 additions & 6 deletions tests/Attribute/RetryPolicyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
use Spiral\Attributes\Factory;
use Spiral\Queue\Attribute\RetryPolicy;
use Spiral\Tests\Queue\Attribute\Stub\ExtendedRetryPolicy;
use Spiral\Tests\Queue\Attribute\Stub\WithDefaultRetryPolicyAnnotation;
use Spiral\Tests\Queue\Attribute\Stub\WithDefaultRetryPolicyAttribute;
use Spiral\Tests\Queue\Attribute\Stub\WithExtendedRetryPolicyAnnotation;
use Spiral\Tests\Queue\Attribute\Stub\WithExtendedRetryPolicyAttribute;
use Spiral\Tests\Queue\Attribute\Stub\WithoutRetryPolicy;
use Spiral\Tests\Queue\Attribute\Stub\WithRetryPolicyAnnotation;
use Spiral\Tests\Queue\Attribute\Stub\WithRetryPolicyAttribute;

final class RetryPolicyTest extends TestCase
Expand All @@ -30,11 +27,8 @@ public function testRetryPolicy(string $class, ?RetryPolicy $expected): void
public static function classesProvider(): \Traversable
{
yield [WithoutRetryPolicy::class, null];
yield [WithDefaultRetryPolicyAnnotation::class, new RetryPolicy()];
yield [WithDefaultRetryPolicyAttribute::class, new RetryPolicy()];
yield [WithRetryPolicyAnnotation::class, new RetryPolicy(5, 3_000, 2.5)];
yield [WithRetryPolicyAttribute::class, new RetryPolicy(5, 3_000, 2.5)];
yield [WithExtendedRetryPolicyAttribute::class, new ExtendedRetryPolicy()];
yield [WithExtendedRetryPolicyAnnotation::class, new ExtendedRetryPolicy()];
}
}
4 changes: 0 additions & 4 deletions tests/Attribute/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
use Spiral\Attributes\Factory;
use Spiral\Queue\Attribute\Serializer;
use Spiral\Tests\Queue\Attribute\Stub\ExtendedSerializer;
use Spiral\Tests\Queue\Attribute\Stub\SerializerAnnotation;
use Spiral\Tests\Queue\Attribute\Stub\SerializerAttribute;
use Spiral\Tests\Queue\Attribute\Stub\WithExtendedSerializerAnnotation;
use Spiral\Tests\Queue\Attribute\Stub\WithExtendedSerializerAttribute;
use Spiral\Tests\Queue\Attribute\Stub\WithoutSerializer;

Expand All @@ -28,9 +26,7 @@ public function testSerializer(string $class, ?Serializer $expected): void
public static function classesProvider(): \Traversable
{
yield [WithoutSerializer::class, null];
yield [SerializerAnnotation::class, new Serializer('test')];
yield [SerializerAttribute::class, new Serializer('test')];
yield [WithExtendedSerializerAnnotation::class, new ExtendedSerializer()];
yield [WithExtendedSerializerAttribute::class, new ExtendedSerializer()];
}
}
14 changes: 0 additions & 14 deletions tests/Attribute/Stub/JobHandlerAnnotation.php

This file was deleted.

4 changes: 1 addition & 3 deletions tests/Attribute/Stub/Queueable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

use Spiral\Queue\Attribute\Queueable as QueueableAttribute;

/**
* @QueueableAttribute
*/
#[QueueableAttribute]
final class Queueable
{
}
4 changes: 1 addition & 3 deletions tests/Attribute/Stub/QueueableWithQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

use Spiral\Queue\Attribute\Queueable;

/**
* @Queueable(queue="test")
*/
#[Queueable(queue: 'test')]
final class QueueableWithQueue
{
}
14 changes: 0 additions & 14 deletions tests/Attribute/Stub/SerializerAnnotation.php

This file was deleted.

14 changes: 0 additions & 14 deletions tests/Attribute/Stub/WithDefaultRetryPolicyAnnotation.php

This file was deleted.

12 changes: 0 additions & 12 deletions tests/Attribute/Stub/WithExtendedJobHandlerAnnotation.php

This file was deleted.

12 changes: 0 additions & 12 deletions tests/Attribute/Stub/WithExtendedRetryPolicyAnnotation.php

This file was deleted.

12 changes: 0 additions & 12 deletions tests/Attribute/Stub/WithExtendedSerializerAnnotation.php

This file was deleted.

14 changes: 0 additions & 14 deletions tests/Attribute/Stub/WithRetryPolicyAnnotation.php

This file was deleted.

0 comments on commit 6b8c41e

Please sign in to comment.