diff --git a/recovery/install/check.php b/recovery/install/check.php index 2bbef0b5e0f..0db11b30a0f 100644 --- a/recovery/install/check.php +++ b/recovery/install/check.php @@ -22,7 +22,7 @@ * our trademarks remain entirely with us. */ -error_reporting(-1); +error_reporting(E_ALL ^ E_DEPRECATED); ini_set('display_errors', true); $tokenFile = __DIR__ . '/tmp/token'; diff --git a/recovery/install/index.php b/recovery/install/index.php index d725cffd68f..5e9d30cbdbe 100644 --- a/recovery/install/index.php +++ b/recovery/install/index.php @@ -42,7 +42,7 @@ require_once __DIR__ . '/../common/autoload.php'; -error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); +error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE ^ E_DEPRECATED); ini_set('display_errors', 1); date_default_timezone_set('UTC'); set_time_limit(0); diff --git a/recovery/update/index.php b/recovery/update/index.php index 959bf821015..65c7d8c5845 100644 --- a/recovery/update/index.php +++ b/recovery/update/index.php @@ -41,8 +41,9 @@ use Shopware\Recovery\Update\Console\Application; use Symfony\Component\Console\Input\ArgvInput; +error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE ^ E_DEPRECATED); + if (PHP_SAPI === 'cli') { - error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); ini_set('display_errors', 1); $input = new ArgvInput(); diff --git a/recovery/update/src/Command/UpdateCommand.php b/recovery/update/src/Command/UpdateCommand.php index 08ca86225e0..60ac3786286 100644 --- a/recovery/update/src/Command/UpdateCommand.php +++ b/recovery/update/src/Command/UpdateCommand.php @@ -80,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->getHelper('question') ); - if (!is_dir(UPDATE_FILES_PATH ?? '') && !is_dir(UPDATE_ASSET_PATH ?? '')) { + if (!is_dir(UPDATE_FILES_PATH) && !is_dir(UPDATE_ASSET_PATH)) { $ioService->writeln('No update files found.'); return 1; diff --git a/recovery/update/src/Console/Application.php b/recovery/update/src/Console/Application.php index c36280ddc57..c5f5d2f175a 100644 --- a/recovery/update/src/Console/Application.php +++ b/recovery/update/src/Console/Application.php @@ -108,11 +108,11 @@ private function registerErrorHandler() { set_error_handler(function ($errno, $errstr, $errfile, $errline) { // error was suppressed with the @-operator - if (error_reporting() === 0 || $errno === E_USER_DEPRECATED) { + if (error_reporting() === 0) { return false; } throw new ErrorException($errstr, 0, $errno, $errfile, $errline); - }); + }, E_ALL ^ E_DEPRECATED ^ E_USER_DEPRECATED); } } diff --git a/recovery/update/src/app.php b/recovery/update/src/app.php index 9e4fe1e4d2a..44424a5f451 100644 --- a/recovery/update/src/app.php +++ b/recovery/update/src/app.php @@ -33,7 +33,7 @@ date_default_timezone_set('Europe/Berlin'); ini_set('display_errors', 1); -error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); +error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE ^ E_DEPRECATED); $config = require __DIR__ . '/../config/config.php'; $container = new Container(new PimpleContainer(), $config);