-
-
Notifications
You must be signed in to change notification settings - Fork 451
Replace Zend_Log with monolog
#5126
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
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
30316d1
Replace `Zend_Log` with `monolog`
sreichel e2ea859
Added rector rule
sreichel 761e0eb
updated tests
sreichel bad0a0f
replace Zend_Log
sreichel c4e7b5a
update config
sreichel 4538666
phpcsfixer
sreichel ad674aa
typos
sreichel d145e24
phpcsfixer
sreichel 20c5df8
minor?
sreichel fdba0b9
minor
sreichel 93c4f73
minor
sreichel c39554f
minor
sreichel 4b03c81
minor
sreichel 7c6be16
Merge branch 'main' into zend/log
sreichel d6bb7c5
Merge branch 'main' into zend/log
sreichel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.10-1.6.0.11.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * @copyright For copyright and license information, read the COPYING.txt file. | ||
| * @link /COPYING.txt | ||
| * @license Open Software License (OSL 3.0) | ||
| * @package Mage_Core | ||
| */ | ||
|
|
||
| use Monolog\Level; | ||
|
|
||
| /** @var Mage_Core_Model_Resource_Setup $this */ | ||
| $installer = $this; | ||
| $installer->startSetup(); | ||
|
|
||
| $connection = $installer->getConnection(); | ||
| $table = $installer->getTable('core/config_data'); | ||
|
|
||
| $select = $connection->select() | ||
| ->from($table) | ||
| ->where('path = ?', Mage_Core_Helper_Data::XML_PATH_DEV_LOG_MAX_LEVEL); | ||
|
|
||
| $logConfig = $connection->fetchAll($select); | ||
|
|
||
| foreach ($logConfig as $config) { | ||
| $zendValue = (int) $config['value']; | ||
| $monologValue = match ($zendValue) { | ||
| 0 => Level::Emergency->value, | ||
| 1 => Level::Alert->value, | ||
| 2 => Level::Critical->value, | ||
| 3 => Level::Error->value, | ||
| 4 => Level::Warning->value, | ||
| 5 => Level::Notice->value, | ||
| 6 => Level::Info->value, | ||
| default => Level::Debug->value, | ||
| }; | ||
|
|
||
| $connection->insertOnDuplicate( | ||
| $table, | ||
| [ | ||
| 'scope' => $config['scope'], | ||
| 'scope_id' => $config['scope_id'], | ||
| 'path' => Mage_Core_Helper_Data::XML_PATH_DEV_LOG_MAX_LEVEL, | ||
| 'value' => $monologValue, | ||
| ], | ||
| ['value'], | ||
| ); | ||
| } | ||
sreichel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| $installer->endSetup(); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.