Skip to content

Commit

Permalink
Use Psr\Log from Composer, add phpunit.xml and bootstrap
Browse files Browse the repository at this point in the history
This commit removes a duplicated version of Psr\Log, which could have
caused applications to use a different version than expected. Instead,
we list psr/log as a composer dependency.

To facilitate unit tests, a phpunit-bootstrap file is added which
includes vendor/autoload.php, and a phpunit.xml file is added to point
to the bootstrap.

Running unit tests now requires 'composer install', but afterward you
simply run 'phpunit' in the root directory of the project.
'composer test' also works.

Phpunit is also added to the require-dev section of composer.json, as
the unit tests do depend on it.

Fixes #58
  • Loading branch information
ejegg committed Dec 15, 2017
1 parent 0b96d1e commit e197b8e
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 634 deletions.
6 changes: 0 additions & 6 deletions AmazonPay/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
require_once 'HttpCurl.php';
require_once 'ClientInterface.php';
require_once 'Regions.php';
if (!interface_exists('\Psr\Log\LoggerAwareInterface')) {
require_once(__DIR__.'/../Psr/Log/LoggerAwareInterface.php');
}

if (!interface_exists('\Psr\Log\LoggerInterface')) {
require_once(__DIR__.'/../Psr/Log/LoggerInterface.php');
}
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;

Expand Down
6 changes: 0 additions & 6 deletions AmazonPay/IpnHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@

require_once 'HttpCurl.php';
require_once 'IpnHandlerInterface.php';
if (!interface_exists('\Psr\Log\LoggerAwareInterface')) {
require_once(__DIR__.'/../Psr/Log/LoggerAwareInterface.php');
}
if (!interface_exists('\Psr\Log\LoggerInterface')) {
require_once(__DIR__.'/../Psr/Log/LoggerInterface.php');
}
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;

Expand Down
128 changes: 0 additions & 128 deletions Psr/Log/AbstractLogger.php

This file was deleted.

7 changes: 0 additions & 7 deletions Psr/Log/InvalidArgumentException.php

This file was deleted.

18 changes: 0 additions & 18 deletions Psr/Log/LogLevel.php

This file was deleted.

18 changes: 0 additions & 18 deletions Psr/Log/LoggerAwareInterface.php

This file was deleted.

26 changes: 0 additions & 26 deletions Psr/Log/LoggerAwareTrait.php

This file was deleted.

123 changes: 0 additions & 123 deletions Psr/Log/LoggerInterface.php

This file was deleted.

Loading

0 comments on commit e197b8e

Please sign in to comment.