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

[CI] Install friendsofsymfony/rest-bundle with Symfony 7 #2257

Merged
merged 1 commit into from Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/common/composer-install/action.yaml
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
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
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
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