Make IOInterface implement psr-4 LoggerInterface, fixes #5180
parent
1b7e957cc1
commit
6c782599f1
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue