diff --git a/Tests/ModelDescriber/ApplyOpenApiDiscriminatorTraitTest.php b/Tests/ModelDescriber/ApplyOpenApiDiscriminatorTraitTest.php index 30ab59bed..49271dffb 100644 --- a/Tests/ModelDescriber/ApplyOpenApiDiscriminatorTraitTest.php +++ b/Tests/ModelDescriber/ApplyOpenApiDiscriminatorTraitTest.php @@ -31,6 +31,11 @@ class ApplyOpenApiDiscriminatorTraitTest extends TestCase private $model; + /** + * @var ModelRegistry + */ + private $modelRegistry; + public function testApplyAddsDiscriminatorProperty() { $this->applyOpenApiDiscriminator($this->model, $this->schema, $this->modelRegistry, 'type', [ diff --git a/Tests/Render/RenderOpenApiTest.php b/Tests/Render/RenderOpenApiTest.php index d24e4f7cd..514b0c822 100644 --- a/Tests/Render/RenderOpenApiTest.php +++ b/Tests/Render/RenderOpenApiTest.php @@ -35,16 +35,14 @@ public function testRender() public function testUnknownFormat() { $availableOpenApiRenderers = []; - $this->expectException(InvalidArgumentException::class); - $this->expectErrorMessage(sprintf('Format "%s" is not supported.', $this->format)); + $this->expectExceptionObject(new InvalidArgumentException(sprintf('Format "%s" is not supported.', $this->format))); $this->renderOpenApi(...$availableOpenApiRenderers); } public function testUnknownArea() { $this->hasArea = false; - $this->expectException(InvalidArgumentException::class); - $this->expectErrorMessage(sprintf('Area "%s" is not supported.', $this->area)); + $this->expectExceptionObject(new InvalidArgumentException(sprintf('Area "%s" is not supported.', $this->area))); $this->renderOpenApi(); } diff --git a/composer.json b/composer.json index 774cee62e..e332fa6bb 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "symfony/browser-kit": "^5.4|^6.0", "symfony/cache": "^5.4|^6.0", "symfony/form": "^5.4|^6.0", - "symfony/phpunit-bridge": "^5.4.23", + "symfony/phpunit-bridge": "^6.3.2", "symfony/property-access": "^5.4|^6.0", "symfony/serializer": "^5.4|^6.0", "symfony/stopwatch": "^5.4|^6.0", @@ -48,7 +48,7 @@ "symfony/twig-bundle": "^5.4|^6.0", "symfony/validator": "^5.4|^6.0", - "api-platform/core": "^2.7.0|^3@dev", + "api-platform/core": "^2.7.0|^3", "symfony/deprecation-contracts": "^2.1|^3", "friendsofsymfony/rest-bundle": "^2.8|^3.0", diff --git a/phpunit-baseline.json b/phpunit-baseline.json new file mode 100644 index 000000000..3160830e3 --- /dev/null +++ b/phpunit-baseline.json @@ -0,0 +1,27 @@ +[ + { + "location": "Nelmio\\ApiDocBundle\\Tests\\Functional\\SwaggerUiTest::testSwaggerUi", + "message": "Since api-platform/core 2.7: Using \"api_platform.iri_converter.legacy\" is deprecated since API Platform 2.7. Use \"ApiPlatform\\Api\\IriConverterInterface\" instead.", + "count": 1 + }, + { + "location": "Nelmio\\ApiDocBundle\\Tests\\Functional\\SwaggerUiTest::testApiPlatformSwaggerUi", + "message": "Since api-platform/core 2.7: Using \"api_platform.iri_converter.legacy\" is deprecated since API Platform 2.7. Use \"ApiPlatform\\Api\\IriConverterInterface\" instead.", + "count": 1 + }, + { + "location": "Nelmio\\ApiDocBundle\\Tests\\Functional\\SwaggerUiTest::testJsonDocs", + "message": "Since api-platform/core 2.7: Using \"api_platform.iri_converter.legacy\" is deprecated since API Platform 2.7. Use \"ApiPlatform\\Api\\IriConverterInterface\" instead.", + "count": 1 + }, + { + "location": "Nelmio\\ApiDocBundle\\Tests\\Functional\\SwaggerUiTest::testInvalidJsonArea", + "message": "Since api-platform/core 2.7: Using \"api_platform.iri_converter.legacy\" is deprecated since API Platform 2.7. Use \"ApiPlatform\\Api\\IriConverterInterface\" instead.", + "count": 1 + }, + { + "location": "Nelmio\\ApiDocBundle\\Tests\\Functional\\SwaggerUiTest::testYamlDocs", + "message": "Since api-platform/core 2.7: Using \"api_platform.iri_converter.legacy\" is deprecated since API Platform 2.7. Use \"ApiPlatform\\Api\\IriConverterInterface\" instead.", + "count": 1 + } +] diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 695969160..6c45a8afa 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,7 +14,7 @@ - +