Skip to content

Commit 9a87abd

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 42f3a10 + 684084f commit 9a87abd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/simple-phpunit.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// Please update when phpunit needs to be reinstalled with fresh deps:
1313
// Cache-Id: 2021-02-04 11:00 UTC
1414

15+
if ('cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI) {
16+
throw new Exception('This script must be run from the command line.');
17+
}
18+
1519
error_reporting(-1);
1620

1721
global $argv, $argc;

0 commit comments

Comments
 (0)