Arcanist errors on Ubuntu 20: ERROR 8192: implode(): Passing glue string after array is deprecated. Swap the parameters at [/usr/share/libphutil/src/utils/utils.php:1572]

Hello,

I installed arc on Ubuntu 20 via apt and I get errors:

rhaley@rbm1:~/git/TEST1$ arc diff
[2020-09-04 18:46:07] ERROR 8192: implode(): Passing glue string after array is deprecated. Swap the parameters at [/usr/share/libphutil/src/utils/utils.php:1572]
arcanist(), phutil()
  #0 implode(array, string) called at [<phutil>/src/utils/utils.php:1572]
  #1 phutil_build_http_querystring(array) called at [<phutil>/src/future/http/HTTPSFuture.php:526]
  #2 HTTPSFuture::formatRequestDataForCURL() called at [<phutil>/src/future/http/HTTPSFuture.php:247]
  #3 HTTPSFuture::isReady() called at [<phutil>/src/future/Future.php:37]
  #4 Future::resolve(NULL) called at [<phutil>/src/future/FutureProxy.php:34]
  #5 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:64]
  #6 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:332]
  #7 ArcanistWorkflow::authenticateConduit() called at [<arcanist>/scripts/arcanist.php:356]
[2020-09-04 18:46:07] ERROR 8192: implode(): Passing glue string after array is deprecated. Swap the parameters at [/usr/share/libphutil/src/utils/utils.php:1572]
arcanist(), phutil()
  #0 implode(array, string) called at [<phutil>/src/utils/utils.php:1572]
  #1 phutil_build_http_querystring(array) called at [<phutil>/src/future/http/HTTPSFuture.php:526]
  #2 HTTPSFuture::formatRequestDataForCURL() called at [<phutil>/src/future/http/HTTPSFuture.php:247]
  #3 HTTPSFuture::isReady() called at [<phutil>/src/future/Future.php:37]
  #4 Future::resolve(NULL) called at [<phutil>/src/future/FutureProxy.php:34]
  #5 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:64]
  #6 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1597]
  #7 ArcanistDiffWorkflow::getCommitMessageFromUser() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1501]
  #8 ArcanistDiffWorkflow::buildCommitMessage() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:469]
  #9 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

I’m unable to run the arc version command because it refuses to recognise the git repo I cloned from my phabricator test instance. This is the apt version info:

rhaley@rbm1:~/git/TEST1$ apt search arcanist
Sorting... Done
Full Text Search... Done
arcanist/focal,focal,now 0~git20190207-1 all [installed]
  Command line interface for Phabricator (review platform)

This is the install output from apt:

sudo apt install arcanist
[sudo] password for rhaley: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libphutil php-cli php-common php-curl php-xml php7.4-cli php7.4-common php7.4-curl php7.4-json php7.4-opcache php7.4-readline php7.4-xml
Suggested packages:
  php-pear
The following NEW packages will be installed:
  arcanist libphutil php-cli php-common php-curl php-xml php7.4-cli php7.4-common php7.4-curl php7.4-json php7.4-opcache php7.4-readline php7.4-xml
0 upgraded, 13 newly installed, 0 to remove and 74 not upgraded.
Need to get 4,097 kB of archives.
After this operation, 24.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y 
Get:1 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 php-common all 2:75 [11.9 kB]
Get:2 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-common amd64 7.4.3-4ubuntu2.2 [979 kB]
Get:3 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-xml amd64 7.4.3-4ubuntu2.2 [97.3 kB]
Get:4 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 php-xml all 2:7.4+75 [2,028 B]
Get:5 http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 libphutil all 0~git20190207-1 [760 kB]
Get:6 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-json amd64 7.4.3-4ubuntu2.2 [19.2 kB]
Get:7 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-opcache amd64 7.4.3-4ubuntu2.2 [198 kB]
Get:8 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-readline amd64 7.4.3-4ubuntu2.2 [12.6 kB]
Get:9 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-cli amd64 7.4.3-4ubuntu2.2 [1,421 kB]
Get:10 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 php-cli all 2:7.4+75 [2,792 B]
Get:11 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-curl amd64 7.4.3-4ubuntu2.2 [30.4 kB]
Get:12 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 php-curl all 2:7.4+75 [2,000 B]
Get:13 http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 arcanist all 0~git20190207-1 [561 kB]
Fetched 4,097 kB in 1s (3,016 kB/s)
Selecting previously unselected package php-common.
(Reading database ... 245775 files and directories currently installed.)
Preparing to unpack .../00-php-common_2%3a75_all.deb ...
Unpacking php-common (2:75) ...
Selecting previously unselected package php7.4-common.
Preparing to unpack .../01-php7.4-common_7.4.3-4ubuntu2.2_amd64.deb ...
Unpacking php7.4-common (7.4.3-4ubuntu2.2) ...
Selecting previously unselected package php7.4-xml.
Preparing to unpack .../02-php7.4-xml_7.4.3-4ubuntu2.2_amd64.deb ...
Unpacking php7.4-xml (7.4.3-4ubuntu2.2) ...
Selecting previously unselected package php-xml.
Preparing to unpack .../03-php-xml_2%3a7.4+75_all.deb ...
Unpacking php-xml (2:7.4+75) ...
Selecting previously unselected package libphutil.
Preparing to unpack .../04-libphutil_0~git20190207-1_all.deb ...
Unpacking libphutil (0~git20190207-1) ...
Selecting previously unselected package php7.4-json.
Preparing to unpack .../05-php7.4-json_7.4.3-4ubuntu2.2_amd64.deb ...
Unpacking php7.4-json (7.4.3-4ubuntu2.2) ...
Selecting previously unselected package php7.4-opcache.
Preparing to unpack .../06-php7.4-opcache_7.4.3-4ubuntu2.2_amd64.deb ...
Unpacking php7.4-opcache (7.4.3-4ubuntu2.2) ...
Selecting previously unselected package php7.4-readline.
Preparing to unpack .../07-php7.4-readline_7.4.3-4ubuntu2.2_amd64.deb ...
Unpacking php7.4-readline (7.4.3-4ubuntu2.2) ...
Selecting previously unselected package php7.4-cli.
Preparing to unpack .../08-php7.4-cli_7.4.3-4ubuntu2.2_amd64.deb ...
Unpacking php7.4-cli (7.4.3-4ubuntu2.2) ...
Selecting previously unselected package php-cli.
Preparing to unpack .../09-php-cli_2%3a7.4+75_all.deb ...
Unpacking php-cli (2:7.4+75) ...
Selecting previously unselected package php7.4-curl.
Preparing to unpack .../10-php7.4-curl_7.4.3-4ubuntu2.2_amd64.deb ...
Unpacking php7.4-curl (7.4.3-4ubuntu2.2) ...
Selecting previously unselected package php-curl.
Preparing to unpack .../11-php-curl_2%3a7.4+75_all.deb ...
Unpacking php-curl (2:7.4+75) ...
Selecting previously unselected package arcanist.
Preparing to unpack .../12-arcanist_0~git20190207-1_all.deb ...
Unpacking arcanist (0~git20190207-1) ...
Setting up php-common (2:75) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer → /lib/systemd/system/phpsessionclean.timer.
Setting up php7.4-common (7.4.3-4ubuntu2.2) ...

Creating config file /etc/php/7.4/mods-available/calendar.ini with new version

Creating config file /etc/php/7.4/mods-available/ctype.ini with new version

Creating config file /etc/php/7.4/mods-available/exif.ini with new version

Creating config file /etc/php/7.4/mods-available/fileinfo.ini with new version

Creating config file /etc/php/7.4/mods-available/ffi.ini with new version

Creating config file /etc/php/7.4/mods-available/ftp.ini with new version

Creating config file /etc/php/7.4/mods-available/gettext.ini with new version

Creating config file /etc/php/7.4/mods-available/iconv.ini with new version

Creating config file /etc/php/7.4/mods-available/pdo.ini with new version

Creating config file /etc/php/7.4/mods-available/phar.ini with new version

Creating config file /etc/php/7.4/mods-available/posix.ini with new version

Creating config file /etc/php/7.4/mods-available/shmop.ini with new version

Creating config file /etc/php/7.4/mods-available/sockets.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvsem.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvshm.ini with new version

Creating config file /etc/php/7.4/mods-available/tokenizer.ini with new version
Setting up php7.4-curl (7.4.3-4ubuntu2.2) ...

Creating config file /etc/php/7.4/mods-available/curl.ini with new version
Setting up php7.4-readline (7.4.3-4ubuntu2.2) ...

Creating config file /etc/php/7.4/mods-available/readline.ini with new version
Setting up php7.4-opcache (7.4.3-4ubuntu2.2) ...

Creating config file /etc/php/7.4/mods-available/opcache.ini with new version
Setting up php-curl (2:7.4+75) ...
Setting up php7.4-json (7.4.3-4ubuntu2.2) ...

Creating config file /etc/php/7.4/mods-available/json.ini with new version
Setting up php7.4-xml (7.4.3-4ubuntu2.2) ...

Creating config file /etc/php/7.4/mods-available/dom.ini with new version

Creating config file /etc/php/7.4/mods-available/simplexml.ini with new version

Creating config file /etc/php/7.4/mods-available/xml.ini with new version

Creating config file /etc/php/7.4/mods-available/xmlreader.ini with new version

Creating config file /etc/php/7.4/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/7.4/mods-available/xsl.ini with new version
Setting up libphutil (0~git20190207-1) ...
Setting up php7.4-cli (7.4.3-4ubuntu2.2) ...
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.4 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.4 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/7.4/cli/php.ini with new version
Setting up arcanist (0~git20190207-1) ...
Setting up php-cli (2:7.4+75) ...
Setting up php-xml (2:7.4+75) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for php7.4-cli (7.4.3-4ubuntu2.2) ...

This seems to be an issue with the php version and I see there are patches for other similar problems? Should I grab arc from a git repo or something to ensure I get the latest?

Regards,
Russ

Do not install arc via apt. The only supported method of installing arc is described here: Installing Arcanist.
Note that these instructions are a little out-dated; There’s no need to clone libphutil any more.

If anybody told you you can get Arcanist using apt-get, let them know they are wrong.