Register ErrorHandler early to catch deprecation notices while the Application is being initialized
parent
5413faec49
commit
29a52ff463
|
@ -11,6 +11,7 @@ require __DIR__.'/../src/bootstrap.php';
|
||||||
use Composer\Console\Application;
|
use Composer\Console\Application;
|
||||||
use Composer\XdebugHandler\XdebugHandler;
|
use Composer\XdebugHandler\XdebugHandler;
|
||||||
use Composer\Util\Platform;
|
use Composer\Util\Platform;
|
||||||
|
use Composer\Util\ErrorHandler;
|
||||||
|
|
||||||
error_reporting(-1);
|
error_reporting(-1);
|
||||||
|
|
||||||
|
@ -60,6 +61,8 @@ if (function_exists('ini_set')) {
|
||||||
|
|
||||||
Platform::putEnv('COMPOSER_BINARY', realpath($_SERVER['argv'][0]));
|
Platform::putEnv('COMPOSER_BINARY', realpath($_SERVER['argv'][0]));
|
||||||
|
|
||||||
|
ErrorHandler::register();
|
||||||
|
|
||||||
// run the command application
|
// run the command application
|
||||||
$application = new Application();
|
$application = new Application();
|
||||||
$application->run();
|
$application->run();
|
||||||
|
|
|
@ -139,6 +139,8 @@ class Application extends BaseApplication
|
||||||
$io = $this->io = new ConsoleIO($input, $output, new HelperSet(array(
|
$io = $this->io = new ConsoleIO($input, $output, new HelperSet(array(
|
||||||
new QuestionHelper(),
|
new QuestionHelper(),
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
// Register error handler again to pass it the IO instance
|
||||||
ErrorHandler::register($io);
|
ErrorHandler::register($io);
|
||||||
|
|
||||||
if ($input->hasParameterOption('--no-cache')) {
|
if ($input->hasParameterOption('--no-cache')) {
|
||||||
|
|
Loading…
Reference in New Issue