Skip to content

Commit

Permalink
fix version compare
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Jan 17, 2025
1 parent 44d7629 commit b953c20
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Nelmio\ApiDocBundle\Tests\Functional\ModelDescriber;

use Nelmio\ApiDocBundle\Tests\Functional\TestKernel;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\TypeInfo\Type;

final class ObjectModelDescriberTypeInfoTest extends ObjectModelDescriberTest
{
Expand All @@ -24,11 +24,11 @@ protected static function createKernel(array $options = []): KernelInterface

protected function setUp(): void
{
if (!class_exists(Type::class)) {
self::markTestSkipped('The "symfony/type-info" package is not available.');
if (!version_compare(Kernel::VERSION, '7.2.0', '>=')) {
self::markTestSkipped('TypeInfo component is only available in Symfony 7.2 and later');
}

parent::setUp(); // TODO: Change the autogenerated stub
parent::setUp();
}

public static function provideFixtures(): \Generator
Expand Down

0 comments on commit b953c20

Please sign in to comment.