-
-
Notifications
You must be signed in to change notification settings - Fork 238
Remove legacy code paths #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../config')); | ||
$loader->load('monolog.php'); | ||
|
||
if (!class_exists(DebugLoggerConfigurator::class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Min Symfony always has this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added in Symfony 6.4 with symfony/symfony#51284. I wonder if we should think about bumping the minimum required version of Symfony components in the 3.x
branch to 6.4 and do some of the clean up work there already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with the idea, if needed I'll open a PR that bumps Symfony in 3.x.
$container->registerForAutoconfiguration(ProcessorInterface::class) | ||
->addTag('monolog.processor'); | ||
$container->registerForAutoconfiguration(ResettableInterface::class) | ||
->addTag('kernel.reset', ['method' => 'reset']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Min Monolog always has these interfaces.
|
||
if (!empty($processorOptions)) { | ||
if (!$hasConstructorArguments) { | ||
throw new \RuntimeException('Monolog 1.26 or higher is required for the "date_format" and "remove_used_context_fields" options to be used.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Min Monolog always has PsrLogMessageProcessor
with these args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree to remove Symfony 5.4 compatibility on the 3.x branch to ease maintenance by backporting some of these changes.
Thank you @HypeMC. |
This PR was merged into the 3.x branch. Discussion ---------- Require Symfony 6.4 and PHP 8.1 | Q | A | ------------- | --- | Branch? | 3.x | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Fix #519 (comment) | License | MIT Bumping Symfony to 6.4 also means bumping PHP to 8.1, as that's the min version supported by that Symfony version. Commits ------- d576ff5 Require Symfony 6.4 and PHP 8.1
This PR was merged into the 4.x branch. Discussion ---------- Removed redundant check | Q | A | ------------- | --- | Branch? | 4.x | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Missed this one in #519, the `SwitchUserTokenProcessor` class is always available ([was added in Symfony 5.2](symfony/symfony#37704), min supported is 7.3). Commits ------- 00b7149 Removed redundant check
Removes some legacy code paths/conditions for older versions of Symfony, Monolog & PHP.