Skip to content

Commit

Permalink
[CI] Install friendsofsymfony/rest-bundle with Symfony 7 (#2257)
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Apr 6, 2024
1 parent fc5d60d commit 43519f4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 84 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/common/composer-install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
65 changes: 0 additions & 65 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions tests/Functional/FOSRestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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']);
Expand Down
9 changes: 0 additions & 9 deletions tests/RouteDescriber/FosRestDescriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,13 @@
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;

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();
Expand Down

0 comments on commit 43519f4

Please sign in to comment.