-
-
Notifications
You must be signed in to change notification settings - Fork 237
Typo in console formatter option name #384
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
… name (HypeMC) This PR was merged into the 4.4 branch. Discussion ---------- [MonologBridge] Typo in consoleFormatterOptions property name | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Fixes a typo in the property name, see also symfony/monolog-bundle#384 Commits ------- a70b71b Fix typo in property name
@@ -946,6 +954,17 @@ public function getConfigTreeBuilder() | |||
->ifTrue(function ($v) { return 'predis' === $v['type'] && empty($v['redis']); }) | |||
->thenInvalid('The host has to be specified to use a RedisLogHandler') | |||
->end() | |||
->validate() |
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 should be done in beforeNormalization
, not in validate
IMO, so that the copy of the options to the new name is done before merging various configs together. This ensures that each config file can migrate independently, instead of loosing all non-migrated config as soon as one file gets migrated.
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.
Makes sense, switched to beforeNormalization
.
/** | ||
* @group legacy | ||
*/ | ||
public function testConsoleFormatterOptionsRename() |
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.
please add another legacy test involving 2 configs, one migrated and one not migrated for the same handler.
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.
or maybe just another handler in this test
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.
Test updated
$v['console_formatter_options'] = $v['console_formater_options']; | ||
} | ||
|
||
unset($v['console_formater_options']); |
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.
if you unset the node here, the deprecation won't ever be triggered by the node itself
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.
Fixed
3f4bb1f
to
7124611
Compare
7124611
to
979580a
Compare
Thank you @HypeMC. |
The
console_formater_options
has a typo. This PR deprecates the option and replaces it withconsole_formatter_options
while maintaining backwards compatibility.