Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e003460

Browse files
committed
[Console] Runtime conflict for psr/log >= 3.0 instead of composer conflict
1 parent d4e409d commit e003460

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Logger/ConsoleLogger.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
use Symfony\Component\Console\Output\ConsoleOutputInterface;
1818
use Symfony\Component\Console\Output\OutputInterface;
1919

20+
if ((new \ReflectionMethod(AbstractLogger::class, 'log'))->hasReturnType()) {
21+
throw new \RuntimeException(sprintf('The "%s" logger is not compatible with psr/log >= 3.0. Try running "composer require psr/log:^2.".', ConsoleLogger::class));
22+
}
23+
2024
/**
2125
* PSR-3 compliant console logger.
2226
*

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"psr/log": "For using the console logger"
4444
},
4545
"conflict": {
46-
"psr/log": ">=3",
4746
"symfony/dependency-injection": "<4.4",
4847
"symfony/dotenv": "<5.1",
4948
"symfony/event-dispatcher": "<4.4",

0 commit comments

Comments
 (0)