diff --git a/.github/workflows/common/composer-install/action.yaml b/.github/workflows/common/composer-install/action.yaml index f41cb8b65..5a39e634a 100644 --- a/.github/workflows/common/composer-install/action.yaml +++ b/.github/workflows/common/composer-install/action.yaml @@ -39,11 +39,6 @@ runs: run: composer require --no-update doctrine/annotations shell: bash - - name: Remove packages not compatible Symfony 7 - if: ${{ inputs.symfony-version == '7.0.*' }} - run: composer remove --dev --no-update friendsofsymfony/rest-bundle - shell: bash - - name: Install dependencies with Composer env: SYMFONY_REQUIRE: ${{ inputs.symfony-version }} diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3ea01054a..44573a0ee 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -55,71 +55,6 @@ parameters: count: 1 path: src/Render/Html/HtmlOpenApiRenderer.php - - - message: "#^Access to property \\$allowBlank on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$description on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$key on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$key on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\RequestParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$map on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam\\.$#" - count: 2 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$nullable on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam\\.$#" - count: 2 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$nullable on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\RequestParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$strict on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Access to property \\$strict on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\RequestParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Call to method getName\\(\\) on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Call to method getName\\(\\) on an unknown class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\RequestParam\\.$#" - count: 1 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\QueryParam not found\\.$#" - count: 3 - path: src/RouteDescriber/FosRestDescriber.php - - - - message: "#^Class FOS\\\\RestBundle\\\\Controller\\\\Annotations\\\\RequestParam not found\\.$#" - count: 2 - path: src/RouteDescriber/FosRestDescriber.php - - message: "#^Call to function method_exists\\(\\) with 'Hateoas\\\\\\\\Configuration\\\\\\\\Embedded' and 'getType' will always evaluate to true\\.$#" count: 1 diff --git a/tests/Functional/FOSRestTest.php b/tests/Functional/FOSRestTest.php index a2b4f6ffc..d87eb8976 100644 --- a/tests/Functional/FOSRestTest.php +++ b/tests/Functional/FOSRestTest.php @@ -13,7 +13,6 @@ use OpenApi\Annotations as OA; use OpenApi\Generator; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\KernelInterface; class FOSRestTest extends WebTestCase @@ -25,10 +24,6 @@ protected static function createKernel(array $options = []): KernelInterface protected function setUp(): void { - if (Kernel::MAJOR_VERSION >= 7) { - self::markTestSkipped('Not supported in symfony 7'); - } - parent::setUp(); static::createClient([], ['HTTP_HOST' => 'api.example.com']); diff --git a/tests/RouteDescriber/FosRestDescriberTest.php b/tests/RouteDescriber/FosRestDescriberTest.php index 09f7d9322..6770d6096 100644 --- a/tests/RouteDescriber/FosRestDescriberTest.php +++ b/tests/RouteDescriber/FosRestDescriberTest.php @@ -16,7 +16,6 @@ use Nelmio\ApiDocBundle\RouteDescriber\FosRestDescriber; use OpenApi\Annotations\OpenApi; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Routing\Route; use Symfony\Component\Validator\Constraints\Choice; @@ -24,14 +23,6 @@ class FosRestDescriberTest extends TestCase { public function testQueryParamWithChoiceConstraintIsAddedAsEnum() { - if (Kernel::MAJOR_VERSION >= 7) { - self::markTestSkipped('FosRest is not supported in symfony 7'); - } - - if (!class_exists(QueryParam::class)) { - self::markTestSkipped('FOSRestBundle is not installed'); - } - $choices = ['foo', 'bar']; $queryParam = new QueryParam();