Skip to content
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

Replace Zend_Log with Psr\Log\LoggerInterface #9285

Merged

Conversation

tdgroot
Copy link
Member

@tdgroot tdgroot commented Apr 17, 2017

Replace Zend_Log with Psr\Log\LoggerInterface to prepare for upgrade to higher ZF versions.

Description

I replaced Zend_Log with Psr\Log\LoggerInterface in Magento Framework.

To simplify the conversion I changed method call
$logger->log($message, \Zend_Log::INFO)
into
$logger->info($message).

Obviously, I had to change the ShellTest a bit to make it compatible with the Psr\Log\LoggerInterface.

Fixed Issues

  1. Upgrade ZF components. Zend_Log #9237: Upgrade ZF components. Zend_Log

Testing scenarios

Run the unit test \Magento\Framework\Test\Unit\ShellTest.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Apr 17, 2017

CLA assistant check
All committers have signed the CLA.

@okorshenko okorshenko self-assigned this Apr 19, 2017
@okorshenko okorshenko added this to the April 2017 milestone Apr 19, 2017
@okorshenko
Copy link
Contributor

Hi @tdgroot
Thank you for your contribution. Unfortunately we have a fatal error caused by this PR here:
Could you please align your implementation with client code?

Please, look at this file: https://github.com/magento/magento2/blob/develop/dev/tests/api-functional/framework/bootstrap.php#L28

@tdgroot
Copy link
Member Author

tdgroot commented Apr 21, 2017

Hey @okorshenko

The fatal error happenened in the bootstrap of the integration test as well.
I refactored the logger code and also made the integration bootstrap file look a bit more like the api-functional bootstrap file.

@magento-team
Copy link
Contributor

@tdgroot Thank you for the contribution

@tdgroot tdgroot deleted the develop-upgrade_zf_components_zend_log branch June 2, 2018 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants