Skip to content

Commit 8a91c14

Browse files
author
tcoch
committed
Check version of symfony/yaml instead of symfony/http-kernel
1 parent b87779a commit 8a91c14

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/Util/YamlSourceManipulatorTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bundle\MakerBundle\Tests\Util;
1313

14+
use Composer\InstalledVersions;
15+
use Composer\Semver\VersionParser;
1416
use PHPUnit\Framework\Attributes\DataProvider;
1517
use PHPUnit\Framework\TestCase;
1618
use Psr\Log\LogLevel;
@@ -49,7 +51,7 @@ public function testSetData(string $startingSource, array $newData, string $expe
4951
*/
5052
$actualContents = $manipulator->getContents();
5153
$actualContents = str_replace("\r\n", "\n", $actualContents);
52-
if (Kernel::VERSION_ID < 81000) {
54+
if (InstalledVersions::satisfies(new VersionParser(), 'symfony/yaml', '<8.1')) {
5355
$this->assertSame(preg_replace('/\s+/', '', $expectedSource), preg_replace('/\s+/', '', $actualContents));
5456
} else {
5557
$this->assertSame($expectedSource, $actualContents);

0 commit comments

Comments
 (0)