Skip to content

Commit 0550a1f

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Console] Fix `Helper::removeDecoration` hyperlink bug Guard scripts from being run in non-CLI contexts Guard scripts from being run in non-CLI contexts a readonly property must not be reported as being writable
2 parents 2ef7cb9 + dd26864 commit 0550a1f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Resources/bin/common.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
if ('cli' !== \PHP_SAPI) {
13+
throw new Exception('This script must be run from the command line.');
14+
}
15+
1216
define('LINE_WIDTH', 75);
1317

1418
define('LINE', str_repeat('-', LINE_WIDTH)."\n");

Resources/bin/update-data.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
use Symfony\Component\Intl\Locale;
2424
use Symfony\Component\Intl\Util\GitRepository;
2525

26+
if ('cli' !== \PHP_SAPI) {
27+
throw new Exception('This script must be run from the command line.');
28+
}
29+
2630
require_once __DIR__.'/common.php';
2731
require_once __DIR__.'/autoload.php';
2832

0 commit comments

Comments
 (0)