Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: apply breaking changes to HttpCache #37

Draft
wants to merge 10 commits into
base: 3.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
407 changes: 5 additions & 402 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

128 changes: 64 additions & 64 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ default:
suites:
default:
contexts:
- 'ApiPlatform\Core\Tests\Behat\CommandContext'
- 'ApiPlatform\Core\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Core\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Core\Tests\Behat\JsonContext'
- 'ApiPlatform\Core\Tests\Behat\HydraContext'
- 'ApiPlatform\Core\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\MercureContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'ApiPlatform\Tests\Behat\CommandContext'
- 'ApiPlatform\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Tests\Behat\JsonContext'
- 'ApiPlatform\Tests\Behat\HydraContext'
- 'ApiPlatform\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Tests\Behat\MercureContext'
- 'ApiPlatform\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
filters:
Expand All @@ -38,17 +38,17 @@ postgres:
default: false
postgres: &postgres-suite
contexts:
- 'ApiPlatform\Core\Tests\Behat\CommandContext'
- 'ApiPlatform\Core\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Core\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Core\Tests\Behat\JsonContext'
- 'ApiPlatform\Core\Tests\Behat\HydraContext'
- 'ApiPlatform\Core\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\MercureContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'ApiPlatform\Tests\Behat\CommandContext'
- 'ApiPlatform\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Tests\Behat\JsonContext'
- 'ApiPlatform\Tests\Behat\HydraContext'
- 'ApiPlatform\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Tests\Behat\MercureContext'
- 'ApiPlatform\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
filters:
Expand All @@ -59,17 +59,17 @@ mongodb:
default: false
mongodb: &mongodb-suite
contexts:
- 'ApiPlatform\Core\Tests\Behat\CommandContext'
- 'ApiPlatform\Core\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Core\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Core\Tests\Behat\JsonContext'
- 'ApiPlatform\Core\Tests\Behat\HydraContext'
- 'ApiPlatform\Core\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\MercureContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'ApiPlatform\Tests\Behat\CommandContext'
- 'ApiPlatform\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Tests\Behat\JsonContext'
- 'ApiPlatform\Tests\Behat\HydraContext'
- 'ApiPlatform\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Tests\Behat\MercureContext'
- 'ApiPlatform\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
filters:
Expand All @@ -82,9 +82,9 @@ elasticsearch:
paths:
- '%paths.base%/features/elasticsearch'
contexts:
- 'ApiPlatform\Core\Tests\Behat\CommandContext'
- 'ApiPlatform\Core\Tests\Behat\ElasticsearchContext'
- 'ApiPlatform\Core\Tests\Behat\JsonContext'
- 'ApiPlatform\Tests\Behat\CommandContext'
- 'ApiPlatform\Tests\Behat\ElasticsearchContext'
- 'ApiPlatform\Tests\Behat\JsonContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
filters:
Expand All @@ -94,18 +94,18 @@ default-coverage:
suites:
default: &default-coverage-suite
contexts:
- 'ApiPlatform\Core\Tests\Behat\CommandContext'
- 'ApiPlatform\Core\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Core\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Core\Tests\Behat\JsonContext'
- 'ApiPlatform\Core\Tests\Behat\HydraContext'
- 'ApiPlatform\Core\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\MercureContext'
- 'ApiPlatform\Core\Tests\Behat\CoverageContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'ApiPlatform\Tests\Behat\CommandContext'
- 'ApiPlatform\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Tests\Behat\JsonContext'
- 'ApiPlatform\Tests\Behat\HydraContext'
- 'ApiPlatform\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Tests\Behat\MercureContext'
- 'ApiPlatform\Tests\Behat\CoverageContext'
- 'ApiPlatform\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'

Expand All @@ -115,18 +115,18 @@ mongodb-coverage:
mongodb: &mongodb-coverage-suite
<<: *mongodb-suite
contexts:
- 'ApiPlatform\Core\Tests\Behat\CommandContext'
- 'ApiPlatform\Core\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Core\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Core\Tests\Behat\JsonContext'
- 'ApiPlatform\Core\Tests\Behat\HydraContext'
- 'ApiPlatform\Core\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Core\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Core\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Core\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Core\Tests\Behat\MercureContext'
- 'ApiPlatform\Core\Tests\Behat\CoverageContext'
- 'ApiPlatform\Core\Tests\Behat\XmlContext'
- 'ApiPlatform\Tests\Behat\CommandContext'
- 'ApiPlatform\Tests\Behat\DoctrineContext'
- 'ApiPlatform\Tests\Behat\GraphqlContext'
- 'ApiPlatform\Tests\Behat\JsonContext'
- 'ApiPlatform\Tests\Behat\HydraContext'
- 'ApiPlatform\Tests\Behat\OpenApiContext'
- 'ApiPlatform\Tests\Behat\HttpCacheContext'
- 'ApiPlatform\Tests\Behat\JsonApiContext'
- 'ApiPlatform\Tests\Behat\JsonHalContext'
- 'ApiPlatform\Tests\Behat\MercureContext'
- 'ApiPlatform\Tests\Behat\CoverageContext'
- 'ApiPlatform\Tests\Behat\XmlContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'

Expand All @@ -136,9 +136,9 @@ elasticsearch-coverage:
elasticsearch: &elasticsearch-coverage-suite
<<: *elasticsearch-suite
contexts:
- 'ApiPlatform\Core\Tests\Behat\CommandContext'
- 'ApiPlatform\Core\Tests\Behat\ElasticsearchContext'
- 'ApiPlatform\Core\Tests\Behat\JsonContext'
- 'ApiPlatform\Core\Tests\Behat\CoverageContext'
- 'ApiPlatform\Tests\Behat\CommandContext'
- 'ApiPlatform\Tests\Behat\ElasticsearchContext'
- 'ApiPlatform\Tests\Behat\JsonContext'
- 'ApiPlatform\Tests\Behat\CoverageContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'
9 changes: 2 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"require-dev": {
"behat/behat": "^3.1",
"behat/mink": "^1.9@dev",
"doctrine/annotations": "^1.7",
"doctrine/cache": "^1.11 || ^2.1",
"doctrine/common": "^2.11 || ^3.0",
"doctrine/data-fixtures": "^1.2.2",
Expand Down Expand Up @@ -115,14 +114,10 @@
"autoload": {
"psr-4": {
"ApiPlatform\\": "src/"
},
"files": [
"src/deprecation.php"
]
}
},
"autoload-dev": {
"psr-4": {
"ApiPlatform\\Core\\Tests\\": "tests/Core/",
"ApiPlatform\\Tests\\": "tests/",
"App\\": "tests/Fixtures/app/var/tmp/src/"
}
Expand All @@ -139,7 +134,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "2.7.x-dev"
"dev-main": "3.0.x-dev"
},
"symfony": {
"require": "^3.4 || ^4.4 || ^5.1 || ^6.0"
Expand Down
5 changes: 0 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
<directory phpVersion="8.0" phpVersionOperator=">=">tests/Metadata/Resource/Factory</directory>
<exclude>tests/Metadata/Resource/Factory</exclude>
</testsuite>
</testsuites>

Expand All @@ -29,9 +27,6 @@
<directory>features</directory>
<directory>tests</directory>
<directory>vendor</directory>
<directory>src/Core/Bridge/NelmioApiDoc</directory>
<directory>src/Core/Bridge/FosUser</directory>
<directory>src/Core/Bridge/Symfony/Maker/Resources/skeleton</directory>
<file>.php-cs-fixer.dist.php</file>
<file>src/Symfony/Bundle/Test/Constraint/ArraySubsetLegacy.php</file>
<file>src/Core/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetLegacy.php</file>
Expand Down
2 changes: 0 additions & 2 deletions src/Action/EntrypointAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ public function __invoke(): Entrypoint
return new Entrypoint($this->resourceNameCollectionFactory->create());
}
}

class_alias(EntrypointAction::class, \ApiPlatform\Core\Action\EntrypointAction::class);
2 changes: 0 additions & 2 deletions src/Action/ExceptionAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,3 @@ private function getOperationExceptionToStatus(Request $request): array
);
}
}

class_alias(ExceptionAction::class, \ApiPlatform\Core\Action\ExceptionAction::class);
2 changes: 0 additions & 2 deletions src/Action/NotFoundAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ public function __invoke()
throw new NotFoundHttpException();
}
}

class_alias(NotFoundAction::class, \ApiPlatform\Core\Action\NotFoundAction::class);
2 changes: 0 additions & 2 deletions src/Action/PlaceholderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ public function __invoke($data)
return $data;
}
}

class_alias(PlaceholderAction::class, \ApiPlatform\Core\Action\PlaceholderAction::class);
2 changes: 0 additions & 2 deletions src/Api/Entrypoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ public function getResourceNameCollection(): ResourceNameCollection
return $this->resourceNameCollection;
}
}

class_alias(Entrypoint::class, \ApiPlatform\Core\Api\Entrypoint::class);
2 changes: 0 additions & 2 deletions src/Api/FilterLocatorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,3 @@ private function getFilter(string $filterId): ?FilterInterface
return null;
}
}

class_alias(FilterLocatorTrait::class, \ApiPlatform\Core\Api\FilterLocatorTrait::class);
2 changes: 0 additions & 2 deletions src/Api/FormatMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,3 @@ public function getFormat(string $mimeType): ?string
return null;
}
}

class_alias(FormatMatcher::class, \ApiPlatform\Core\Api\FormatMatcher::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/QueryParameterValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,3 @@ public function validateFilters(string $resourceClass, array $resourceFilters, a
}
}
}

class_alias(QueryParameterValidator::class, \ApiPlatform\Core\Filter\QueryParameterValidator::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/Validator/ArrayItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,3 @@ private static function getSeparator(string $collectionFormat): string
}
}
}

class_alias(ArrayItems::class, \ApiPlatform\Core\Filter\Validator\ArrayItems::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/Validator/Bounds.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ public function validate(string $name, array $filterDescription, array $queryPar
return $errorList;
}
}

class_alias(Bounds::class, \ApiPlatform\Core\Filter\Validator\Bounds::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/Validator/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ public function validate(string $name, array $filterDescription, array $queryPar
return [];
}
}

class_alias(Enum::class, \ApiPlatform\Core\Filter\Validator\Enum::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/Validator/Length.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ public function validate(string $name, array $filterDescription, array $queryPar
return $errorList;
}
}

class_alias(Length::class, \ApiPlatform\Core\Filter\Validator\Length::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/Validator/MultipleOf.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ public function validate(string $name, array $filterDescription, array $queryPar
return [];
}
}

class_alias(MultipleOf::class, \ApiPlatform\Core\Filter\Validator\MultipleOf::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/Validator/Pattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ public function validate(string $name, array $filterDescription, array $queryPar
return [];
}
}

class_alias(Pattern::class, \ApiPlatform\Core\Filter\Validator\Pattern::class);
2 changes: 0 additions & 2 deletions src/Api/QueryParameterValidator/Validator/Required.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,3 @@ private function requestGetQueryParameter(array $queryParameters, string $name)
return $queryParameters[(string) $rootName];
}
}

class_alias(Required::class, \ApiPlatform\Core\Filter\Validator\Required::class);
2 changes: 0 additions & 2 deletions src/Api/ResourceClassResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,3 @@ public function isResourceClass(string $type): bool
return $this->localIsResourceClassCache[$type] = false;
}
}

class_alias(ResourceClassResolver::class, \ApiPlatform\Core\Api\ResourceClassResolver::class);
22 changes: 0 additions & 22 deletions src/Core/Action/EntrypointAction.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/Core/Action/ExceptionAction.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/Core/Action/NotFoundAction.php

This file was deleted.

Loading