Page MenuHomePhorge

`arc unit`: Constant E_STRICT is deprecated (with PHP 8.4)
Open, NormalPublic

Description

$ ../arcanist/bin/arc unit
[2025-02-04 12:30:55] ERROR 8192: Constant E_STRICT is deprecated at [/home/taavi/src/phorge/docker-phorge/phorge/scripts/init/lib.php:4]
arcanist(), phorge()
  #0 init_phabricator_script(array) called at [<phorge>/scripts/init/init-script.php:7]
  #1 require_once(string) called at [<phorge>/scripts/__init_script__.php:3]
  #2 require_once(string) called at [<phorge>/src/infrastructure/testing/PhabricatorTestCase.php:62]
  #3 PhabricatorTestCase::willRunTestCases(array) called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:64]
  #4 PhutilUnitTestEngine::run() called at [<arcanist>/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:148]
  #5 ArcanistConfigurationDrivenUnitTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:170]
  #6 ArcanistUnitWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427]

Event Timeline

taavi created this object in space S1 Public.
valerio.bozzolan subscribed.

Welcome PHP 8.4

https://php.watch/versions/8.4/E_STRICT-deprecated

And compliment to PHP RFC folks for this proposed fix that looks very PHP...

if (PHP_VERSION_ID >= 70400) {
   error_reporting(E_ALL & ~E_DEPRECATED);
 } else {
   error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
 }