Skip to content

Commit

Permalink
Merge branch 'nelmio:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DidierLmn authored Oct 12, 2023
2 parents 341b7cf + bd10c34 commit 34794f0
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Tests/ModelDescriber/ApplyOpenApiDiscriminatorTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
6 changes: 2 additions & 4 deletions Tests/Render/RenderOpenApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
"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",
"symfony/templating": "^5.4|^6.0",
"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",
Expand Down
27 changes: 27 additions & 0 deletions phpunit-baseline.json
Original file line number Diff line number Diff line change
@@ -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
}
]
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<env name="SHELL_VERBOSITY" value="-1" />
<ini name="error_reporting" value="-1" />
<ini name="memory_limit" value="512M" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="baselineFile=./phpunit-baseline.json&amp;max[self]=0" />
</php>

<testsuites>
Expand Down

0 comments on commit 34794f0

Please sign in to comment.