phorge/scripts/init/lib.php
Andre Klapper 6619fef2ff Remove use of deprecated E_STRICT PHP constant
Summary:
The `E_STRICT` PHP constant is deprecated since PHP 8.4 per https://www.php.net/manual/en/migration84.deprecated.php.
Per https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant, the `E_STRICT` constant was still in use in-between PHP 7.0 and 7.4 for PHP's `mysqli` extension and PHP's `htmlentities()` function.

The `E_STRICT` notice was removed from PHP's `mysqli` extension in e895e96286 for PHP 7.4.0.
Since rP23a49eb403c9ea6c58f4ae2f22416e90a9d24c14, Phorge requires 7.2.25.
Phorge does not call PHP's `htmlentities()` function.

`E_STRICT` is a part of `E_ALL` since PHP 5.4.0 per https://github.com/php/php-src/blob/php-5.4.0/NEWS#L69, thus there is no gain in keeping it.

Closes T15989

Test Plan: None.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, keithzg, mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15989

Differential Revision: https://we.phorge.it/D25887
2025-05-09 11:23:36 +02:00

28 lines
705 B
PHP

<?php
function init_phabricator_script(array $options) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
$include_path = ini_get('include_path');
ini_set(
'include_path',
$include_path.PATH_SEPARATOR.dirname(__FILE__).'/../../../');
$ok = @include_once 'arcanist/support/init/init-script.php';
if (!$ok) {
echo
'FATAL ERROR: Unable to load the "Arcanist" library. '.
'Put "arcanist/" next to "phorge/" on disk.';
echo "\n";
exit(1);
}
phutil_load_library('arcanist/src');
phutil_load_library(dirname(__FILE__).'/../../src/');
$config_optional = $options['config.optional'];
PhabricatorEnv::initializeScriptEnvironment($config_optional);
}