Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jul 3, 2024
1 parent caa72cf commit eb4ab82
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/OpenApi/Factory/OpenApiFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ private function collectPaths(ApiResource $resource, ResourceMetadataCollection
}

$openapiOperation = $openapiOperation->withParameters($openapiParameters);

$existingResponses = $openapiOperation?->getResponses() ?: [];
$existingResponses = $openapiOperation->getResponses() ?: [];
$overrideResponses = $operation->getExtraProperties()[self::OVERRIDE_OPENAPI_RESPONSES] ?? $this->openApiOptions->getOverrideResponses();
if ($overrideResponses || !$existingResponses) {
// Create responses
Expand Down
8 changes: 0 additions & 8 deletions src/Symfony/Bundle/Resources/config/api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@

<service id="api_platform.metadata.inflector" class="ApiPlatform\Metadata\Util\Inflector" public="false" />

<!-- Action -->
<service id="api_platform.action.exception" class="ApiPlatform\Action\ExceptionAction" public="true">
<argument type="service" id="api_platform.serializer" />
<argument>%api_platform.error_formats%</argument>
<argument>%api_platform.exception_to_status%</argument>
<argument type="service" id="api_platform.metadata.resource.metadata_collection_factory" />
</service>

<!-- Cache -->
<service id="api_platform.cache.route_name_resolver" parent="cache.system" public="false">
<tag name="cache.pool" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ public function testCommonConfiguration(): void
$services = [
'api_platform.action.documentation',
'api_platform.action.entrypoint',
'api_platform.action.exception',
'api_platform.action.not_found',
'api_platform.api.identifiers_extractor',
'api_platform.filter_locator',
Expand Down
11 changes: 2 additions & 9 deletions tests/Behat/CoverageContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,8 @@ final class CoverageContext implements Context
public static function setup(): void
{
$filter = new Filter();
if (method_exists($filter, 'includeDirectory')) {
$filter->includeDirectory(__DIR__.'/../../src');
self::$coverage = new CodeCoverage((new Selector())->forLineCoverage($filter), $filter);

return;
}

$filter->addDirectoryToWhitelist(__DIR__.'/../../src'); // @phpstan-ignore-line
self::$coverage = new CodeCoverage(null, $filter); // @phpstan-ignore-line
$filter->includeDirectory(__DIR__.'/../../src');

Check failure on line 43 in tests/Behat/CoverageContext.php

View workflow job for this annotation

GitHub Actions / PHPStan (PHP 8.3)

Call to an undefined method SebastianBergmann\CodeCoverage\Filter::includeDirectory().
self::$coverage = new CodeCoverage((new Selector())->forLineCoverage($filter), $filter);
}

/**
Expand Down

0 comments on commit eb4ab82

Please sign in to comment.