8000 Typo in console formatter option name by HypeMC · Pull Request #384 · symfony/monolog-bundle · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

HypeMC
Copy link
Member
@HypeMC HypeMC commented Jan 20, 2021

The console_formater_options has a typo. This PR deprecates the option and replaces it with console_formatter_options while maintaining backwards compatibility.

chalasr added a commit to symfony/symfony that referenced this pull request Jan 20, 2021
… 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()
Copy link
Member

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.

Copy link
Member Author

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()
Copy link
Member

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.

Copy link
Member

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

Copy link
Member Author

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']);
Copy link
Member

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

< 8000 div class="ml-n1 flex-items-center flex-row-reverse clearfix d-flex" data-morpheus-enabled="false">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@jderusse
Copy link
Member

Thank you @HypeMC.

@jderusse jderusse merged commit fae3ad7 into symfony:master Mar 17, 2021
@HypeMC HypeMC deleted the formatter-typo branch March 17, 2021 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0