Skip to content

Commit

Permalink
MAGETWO-32645: Fix L* builds failures
Browse files Browse the repository at this point in the history
 - Fix PHP fatal error by using \Psr\Log\LoggerInterface in replace of recently removed \Magento\Framework\Logger
  • Loading branch information
marcozheng committed Jan 13, 2015
1 parent 2f7ebd6 commit 0e4e745
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/code/Magento/Integration/Model/Oauth/Token/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Provider implements TokenProviderInterface
protected $_date;

/**
* @var \Magento\Framework\Logger
* @var \Psr\Log\LoggerInterface
*/
protected $logger;

Expand All @@ -42,14 +42,14 @@ class Provider implements TokenProviderInterface
* @param \Magento\Integration\Model\Oauth\TokenFactory $tokenFactory
* @param \Magento\Integration\Helper\Oauth\Data $dataHelper
* @param \Magento\Framework\Stdlib\DateTime\DateTime $date
* @param \Magento\Framework\Logger $logger
* @param \Psr\Log\LoggerInterface $logger
*/
public function __construct(
\Magento\Integration\Model\Oauth\Consumer\Factory $consumerFactory,
\Magento\Integration\Model\Oauth\TokenFactory $tokenFactory,
\Magento\Integration\Helper\Oauth\Data $dataHelper,
\Magento\Framework\Stdlib\DateTime\DateTime $date,
\Magento\Framework\Logger $logger
\Psr\Log\LoggerInterface $logger
) {
$this->_consumerFactory = $consumerFactory;
$this->_tokenFactory = $tokenFactory;
Expand Down Expand Up @@ -128,7 +128,7 @@ public function getAccessToken($consumer)
);
}
$accessToken = $token->convertToAccess();
$this->logger->log(
$this->logger->info(
'Request token ' . $token->getToken() . ' was exchanged to obtain access token for consumer ' . $consumerId
);
return ['oauth_token' => $accessToken->getToken(), 'oauth_token_secret' => $accessToken->getSecret()];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class OauthTest extends \PHPUnit_Framework_TestCase
private $_dateMock;

/**
* @var \Magento\Framework\Logger
* @var \Psr\Log\LoggerInterface
*/
private $_loggerMock;

Expand Down Expand Up @@ -118,7 +118,7 @@ public function setUp()
$this->_dateMock = $this->getMockBuilder('Magento\Framework\Stdlib\DateTime\DateTime')
->disableOriginalConstructor()
->getMock();
$this->_loggerMock = $this->getMockBuilder('Magento\Framework\Logger')
$this->_loggerMock = $this->getMockBuilder('Psr\Log\LoggerInterface')
->disableOriginalConstructor()
->getMock();

Expand Down

0 comments on commit 0e4e745

Please sign in to comment.