1
0
Fork 0

Make IOInterface implement psr-4 LoggerInterface, fixes #5180

pull/7906/head^2
Jordi Boggiano 2019-02-19 10:54:42 +01:00
parent 1b7e957cc1
commit 6c782599f1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
5 changed files with 5 additions and 10 deletions

View File

@ -14,10 +14,9 @@ namespace Composer\IO;
use Composer\Config;
use Composer\Util\ProcessExecutor;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
abstract class BaseIO implements IOInterface, LoggerInterface
abstract class BaseIO implements IOInterface
{
protected $authentications = array();

View File

@ -13,13 +13,14 @@
namespace Composer\IO;
use Composer\Config;
use Psr\Log\LoggerInterface;
/**
* The Input/Output helper interface.
*
* @author François Pluchino <francois.pluchino@opendisplay.com>
*/
interface IOInterface
interface IOInterface extends LoggerInterface
{
const QUIET = 1;
const NORMAL = 2;

View File

@ -20,7 +20,6 @@ use Composer\Util\RemoteFilesystem;
use Composer\Util\StreamContextFactory;
use Composer\Util\AuthHelper;
use Composer\Util\Url;
use Psr\Log\LoggerInterface;
use React\Promise\Promise;
/**

View File

@ -17,7 +17,6 @@ use Composer\IO\IOInterface;
use Composer\Downloader\TransportException;
use Composer\CaBundle\CaBundle;
use Composer\Util\Http\Response;
use Psr\Log\LoggerInterface;
use React\Promise\Promise;
/**
@ -58,8 +57,7 @@ class HttpDownloader
// Setup TLS options
// The cafile option can be set via config.json
if ($disableTls === false) {
$logger = $io instanceof LoggerInterface ? $io : null;
$this->options = StreamContextFactory::getTlsDefaults($options, $logger);
$this->options = StreamContextFactory::getTlsDefaults($options, $io);
} else {
$this->disableTls = true;
}

View File

@ -16,7 +16,6 @@ use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Downloader\TransportException;
use Composer\CaBundle\CaBundle;
use Psr\Log\LoggerInterface;
/**
* @author François Pluchino <francois.pluchino@opendisplay.com>
@ -61,8 +60,7 @@ class RemoteFilesystem
// Setup TLS options
// The cafile option can be set via config.json
if ($disableTls === false) {
$logger = $io instanceof LoggerInterface ? $io : null;
$this->options = StreamContextFactory::getTlsDefaults($options, $logger);
$this->options = StreamContextFactory::getTlsDefaults($options, $io);
} else {
$this->disableTls = true;
}