From 0e1fe1963bdd355a7feddd8d9796304415577d29 Mon Sep 17 00:00:00 2001 From: DerManoMann Date: Fri, 29 Nov 2024 13:20:38 +1300 Subject: [PATCH 1/2] Merge Sample fixtures into Scratch tests --- tests/Fixtures/TypedProperties.php | 2 +- tests/Processors/DocBlockDescriptionsTest.php | 3 +- tests/Samples/AnyOf.php | 38 ------------------- tests/Samples/Readme.md | 3 -- tests/Samples/VendorExtensions.php | 25 ------------ tests/ScratchTest.php | 2 +- 6 files changed, 4 insertions(+), 69 deletions(-) delete mode 100644 tests/Samples/AnyOf.php delete mode 100644 tests/Samples/Readme.md delete mode 100644 tests/Samples/VendorExtensions.php diff --git a/tests/Fixtures/TypedProperties.php b/tests/Fixtures/TypedProperties.php index 501b2643e..4d7c7baa3 100644 --- a/tests/Fixtures/TypedProperties.php +++ b/tests/Fixtures/TypedProperties.php @@ -29,7 +29,7 @@ class TypedProperties public ?string $nullableString; /** - * @var \OpenApi\Tests\Fixtures\TypedProperties[] + * @var TypedProperties[] * * @OA\Property() */ diff --git a/tests/Processors/DocBlockDescriptionsTest.php b/tests/Processors/DocBlockDescriptionsTest.php index 94b9d9583..ffd3ce9a1 100644 --- a/tests/Processors/DocBlockDescriptionsTest.php +++ b/tests/Processors/DocBlockDescriptionsTest.php @@ -8,12 +8,13 @@ use OpenApi\Annotations as OA; use OpenApi\Generator; +use OpenApi\Processors\Concerns\DocblockTrait; use OpenApi\Processors\DocBlockDescriptions; use OpenApi\Tests\OpenApiTestCase; class DocBlockDescriptionsTest extends OpenApiTestCase { - use \OpenApi\Processors\Concerns\DocblockTrait; + use DocblockTrait; public function testDocBlockDescription(): void { diff --git a/tests/Samples/AnyOf.php b/tests/Samples/AnyOf.php deleted file mode 100644 index 116bc371f..000000000 --- a/tests/Samples/AnyOf.php +++ /dev/null @@ -1,38 +0,0 @@ - false], -)] -#[OA\Tag( - name: 'int', - x: ['custom-tag' => 2], -)] -#[OA\Tag( - name: 'string', - x: ['custom-tag' => 'foo'], -)] -class VendorExtensions -{ -} diff --git a/tests/ScratchTest.php b/tests/ScratchTest.php index a60aa87c5..56d6acf8e 100644 --- a/tests/ScratchTest.php +++ b/tests/ScratchTest.php @@ -63,7 +63,7 @@ public function testScratch(string $scratch, string $spec, string $version, arra ->setVersion($version) ->generate([$scratch]); - // file_put_contents($spec, $openapi->toYaml()); + file_put_contents($spec, $openapi->toYaml()); $this->assertSpecEquals($openapi, file_get_contents($spec)); } } From e9474f6f7bee94bf13579c7e708fb9bcf8e685e5 Mon Sep 17 00:00:00 2001 From: DerManoMann Date: Fri, 29 Nov 2024 13:34:40 +1300 Subject: [PATCH 2/2] Add security exclusion --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 023e912f8..624144024 100644 --- a/composer.json +++ b/composer.json @@ -64,6 +64,9 @@ "phpunit/phpunit": ">=8", "vimeo/psalm": "^4.23" }, + "conflict": { + "symfony/process": ">=6, <6.4.14" + }, "suggest": { "doctrine/annotations": "^1.7 || ^2.0" },