Skip to content

Commit

Permalink
fix annotation check
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Mar 4, 2024
1 parent 5d4d6e6 commit 32ecc80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/Functional/Controller/TestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

namespace Nelmio\ApiDocBundle\Tests\Functional\Controller;

use Nelmio\ApiDocBundle\Tests\Functional\TestKernel;
use OpenApi\Annotations as OA;
use OpenApi\Attributes as OAT;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Routing\Annotation\Route;

if (Kernel::MAJOR_VERSION < 7) {
if (TestKernel::isAnnotationsAvailable()) {
/**
* @Route("/test", host="api-test.example.com")
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,6 @@ public static function isAnnotationsAvailable(): bool

public static function isAttributesAvailable(): bool
{
return !Helper::isAnnotationsAvailable();
return PHP_VERSION_ID >= 80100 || !Helper::isAnnotationsAvailable();
}
}

0 comments on commit 32ecc80

Please sign in to comment.