New git commit processing fails on PHP 7.3


#1

Observed Behavior:
After switching from PHP 7.2.x to PHP 7.3.0 RC4, new commits to a git repository hosted in Diffusion are not being processed and I can see on the Daemons page that the PhabricatorRepositoryGitCommitMessageParserWorker task is failing constantly.

Found the following in the PhabricatorTaskmasterDaemon log:

Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:31 +0000] [2018-12-04 07:05:31] EXCEPTION: (PhutilProxyException) Error while executing Task ID 707670. {>} (Exception) Error while loading file “/o
pt/phabricator/src/applications/maniphest/editor/ManiphestTransactionEditor.php”: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? at [/src/moduleutils/PhutilBootloader.php:277]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:31 +0000] arcanist(head=stable, ref.stable=45a8d22c74a6), harbormaster-gocd-buildstep(), phabricator(head=stable, ref.stable=8ef2f4086ee3), phutil(head=stable, ref.stable=2a2d4fce881e)
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:31 +0000] #0 <#2> PhutilBootloader::executeInclude(string) called at [/src/moduleutils/PhutilBootloader.php:213]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:31 +0000] #1 <#2> PhutilBootloader::loadLibrarySource(string, string) called at [/src/symbols/PhutilSymbolLoader.php:381]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:31 +0000] #2 <#2> PhutilSymbolLoader::loadSymbol(array) called at [/src/symbols/PhutilSymbolLoader.php:256]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:31 +0000] #3 <#2> PhutilSymbolLoader::selectAndLoadSymbols() called at [/src/phutil_library_init.php:22]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #4 <#2> __phutil_autoload(string)
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #5 <#2> spl_autoload_call(string) called at [/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:417]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #6 <#2> PhabricatorRepositoryCommitMessageParserWorker::closeTasks(PhabricatorUser, string, PhabricatorRepository, PhabricatorRepositoryCommit, string, PhabricatorUser) called at [/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:298]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #7 <#2> PhabricatorRepositoryCommitMessageParserWorker::updateCommitData(DiffusionCommitRef) called at [/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:42]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #8 <#2> PhabricatorRepositoryCommitMessageParserWorker::parseCommit(PhabricatorRepository, PhabricatorRepositoryCommit) called at [/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php:51]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #9 <#2> PhabricatorRepositoryCommitParserWorker::doWork() called at [/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #10 <#2> PhabricatorWorker::executeTask() called at [/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #11 <#2> PhabricatorWorkerActiveTask::executeTask() called at [/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #12 PhabricatorTaskmasterDaemon::run() called at [/src/daemon/PhutilDaemon.php:219]
Daemon 82705 STDE [Tue, 04 Dec 2018 07:05:32 +0000] #13 PhutilDaemon::execute() called at [/scripts/daemon/exec/exec_daemon.php:131]
Daemon 82705 FAIL [Tue, 04 Dec 2018 07:05:32 +0000] Process exited with error 255.

Expected Behavior:
I would expect the git commit to be processed and any referenced Maniphest tasks to be updated accordingly.

Phabricator Version:
phabricator 8ef2f4086ee3479853f045d0fa1457bebd833bbd (Mon, Dec 3)
arcanist 45a8d22c74a62624e69f5cd6ce901c9ab2658904 (Mon, Nov 12)
phutil 2a2d4fce881ea48974e7356ca4cf3d33105998f0 (Mon, Dec 3)

Reproduction Steps:

  1. Run Phabricator on PHP 7.3
  2. Set up git repository in Diffusion
  3. Push a commit to the git repository
  4. Observe the status of the commit on the respective Diffusion page

#2

I believe this issue is pretty much the same thing as reported here:
https://discourse.phabricator-community.org/t/unhandled-exception-on-create-task/2062

There is another switch ... continue block in src/applications/maniphest/editor/ManiphestTransactionEditor.php. I replaced the continue on line 652 with a break and now the pending git commits finished processing without any further issues.


#3

Thanks, see https://secure.phabricator.com/D19844.

As a workaround, your change is correct.


#4