Skip to content

Commit daeeb20

Browse files
committed
Merge branch 'sw-26772/resolve-deprecations' into '5.7'
SW-26772 - Revert "SW-26770 - Suppress deprecation warnings in installer/updater" See merge request shopware/5/product/shopware!844
2 parents 924b1ec + c7c6e20 commit daeeb20

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

recovery/common/src/DumpIterator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public function seek($position)
102102
/**
103103
* @return int
104104
*/
105+
#[\ReturnTypeWillChange]
105106
public function count()
106107
{
107108
return $this->count;
@@ -115,6 +116,7 @@ public function rewind()
115116
$this->position = 0;
116117
}
117118

119+
#[\ReturnTypeWillChange]
118120
public function current()
119121
{
120122
return $this->current;
@@ -123,6 +125,7 @@ public function current()
123125
/**
124126
* @return int
125127
*/
128+
#[\ReturnTypeWillChange]
126129
public function key()
127130
{
128131
return $this->position;
@@ -139,6 +142,7 @@ public function next()
139142
/**
140143
* @return bool
141144
*/
145+
#[\ReturnTypeWillChange]
142146
public function valid()
143147
{
144148
return !feof($this->stream);

recovery/install/check.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* our trademarks remain entirely with us.
2323
*/
2424

25-
error_reporting(E_ALL ^ E_DEPRECATED);
25+
error_reporting(-1);
2626
ini_set('display_errors', true);
2727

2828
$tokenFile = __DIR__ . '/tmp/token';

recovery/install/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
require_once __DIR__ . '/../common/autoload.php';
4444

45-
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE ^ E_DEPRECATED);
45+
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
4646
ini_set('display_errors', 1);
4747
date_default_timezone_set('UTC');
4848
set_time_limit(0);

recovery/update/index.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
$isManual = is_dir(SW_PATH . '/update-assets');
2929
if ($isManual) {
3030
\define('UPDATE_IS_MANUAL', true);
31-
\define('UPDATE_FILES_PATH', null);
31+
\define('UPDATE_FILES_PATH', '');
3232
\define('UPDATE_ASSET_PATH', SW_PATH . '/update-assets');
33-
\define('UPDATE_META_FILE', null);
33+
\define('UPDATE_META_FILE', '');
3434
} else {
3535
\define('UPDATE_IS_MANUAL', false);
3636
\define('UPDATE_FILES_PATH', SW_PATH . '/files/update/files');
@@ -41,9 +41,8 @@
4141
use Shopware\Recovery\Update\Console\Application;
4242
use Symfony\Component\Console\Input\ArgvInput;
4343

44-
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE ^ E_DEPRECATED);
45-
4644
if (PHP_SAPI === 'cli') {
45+
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
4746
ini_set('display_errors', 1);
4847

4948
$input = new ArgvInput();

recovery/update/src/Console/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ private function registerErrorHandler()
108108
{
109109
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
110110
// error was suppressed with the @-operator
111-
if (error_reporting() === 0) {
111+
if (error_reporting() === 0 || $errno === E_USER_DEPRECATED) {
112112
return false;
113113
}
114114

115115
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
116-
}, E_ALL ^ E_DEPRECATED ^ E_USER_DEPRECATED);
116+
});
117117
}
118118
}

recovery/update/src/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
date_default_timezone_set('Europe/Berlin');
3535
ini_set('display_errors', 1);
36-
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE ^ E_DEPRECATED);
36+
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
3737

3838
$config = require __DIR__ . '/../config/config.php';
3939
$container = new Container(new PimpleContainer(), $config);

0 commit comments

Comments
 (0)