Skip to content

Commit

Permalink
Merge branch '4.4' into 5.4
Browse files Browse the repository at this point in the history
* 4.4:
  [Console] Fix `Helper::removeDecoration` hyperlink bug
  Guard scripts from being run in non-CLI contexts
  a readonly property must not be reported as being writable
  • Loading branch information
fabpot committed Oct 7, 2022
2 parents d305c0c + f1d0f9d commit dd26864
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Resources/bin/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
* file that was distributed with this source code.
*/

if ('cli' !== \PHP_SAPI) {
throw new Exception('This script must be run from the command line.');
}

define('LINE_WIDTH', 75);

define('LINE', str_repeat('-', LINE_WIDTH)."\n");
Expand Down
4 changes: 4 additions & 0 deletions Resources/bin/update-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
use Symfony\Component\Intl\Locale;
use Symfony\Component\Intl\Util\GitRepository;

if ('cli' !== \PHP_SAPI) {
throw new Exception('This script must be run from the command line.');
}

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

Expand Down

0 comments on commit dd26864

Please sign in to comment.