Skip to content

Commit b0a559d

Browse files
committed
minor #495 Fix test with symfony/config:^7.2 (alexandre-daubois)
This PR was merged into the 3.x-dev branch. Discussion ---------- Fix test with `symfony/config:^7.2` Following symfony/symfony#58490 (comment). Until the Symfony PR, null wasn't supported in boolean nodes and defaulted to true. Commits ------- 3fd3da1 Fix test with `symfony/config:^7.2`
2 parents ed0e4a2 + 3fd3da1 commit b0a559d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/DependencyInjection/ConfigurationTest.php

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

1212
namespace Symfony\Bundle\MonologBundle\Tests\DependencyInjection;
1313

14+
use Composer\InstalledVersions;
1415
use Monolog\Logger;
1516
use PHPUnit\Framework\TestCase;
1617
use Symfony\Bundle\MonologBundle\DependencyInjection\Configuration;
@@ -534,7 +535,13 @@ public function testWithProcessPsr3Messages(array $configuration, array $process
534535
public function processPsr3MessagesProvider(): iterable
535536
{
536537
yield 'Not specified' => [[], ['enabled' => null]];
537-
yield 'Null' => [['process_psr_3_messages' => null], ['enabled' => true]];
538+
539+
if (version_compare(InstalledVersions::getVersion('symfony/config'), '7.2', '>=')) {
540+
yield 'Null' => [['process_psr_3_messages' => null], ['enabled' => null]];
541+
} else {
542+
yield 'Null' => [['process_psr_3_messages' => null], ['enabled' => true]];
543+
}
544+
538545
yield 'True' => [['process_psr_3_messages' => true], ['enabled' => true]];
539546
yield 'False' => [['process_psr_3_messages' => false], ['enabled' => false]];
540547

0 commit comments

Comments
 (0)