Page MenuHomePhabricator

The default mediawiki docker environment cannot run phan v6
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

[...]
> phan -d . --long-progress-bar
ERROR: Phan 6.x requires php-ast 1.1.3+ because it depends on AST version 120. php-ast '1.1.2' is installed.
php-ast can be installed in the following ways:

1. Unix (PECL): Run 'pecl install ast' and add extension=ast.so to your php.ini.

2. Unix (Compile): Download https://github.com/nikic/php-ast then compile and install the extension as follows:

   cd path/to/php-ast
   phpize
   ./configure
   make
   sudo make install

   Additionally, add extension=ast.so to your php.ini file.
For more information, see https://github.com/phan/phan/wiki/Getting-Started#installing-dependencies
Exiting without analyzing files.
Script phan -d . --long-progress-bar handling the phan event returned with error code 1

What should have happened instead?:

phan should run normally

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

MW 7b57bfc

Other information (browser name/version, screenshots, etc.):

Event Timeline

Daimona subscribed.

I think a refresh of bookworm-php83 should be enough to pull the new version. Then we can update docker-compose.yml to use the new version.

Change #1247072 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/core@master] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247072

While playing with this locally I noticed some errors upon running apt update due to an expired GPG key for sury. I then realized the key has been updated a few days ago for T417711, and the image got rebuilt for that. This is already enough to get the latest php-ast (and other packages), so we only need to start using that in docker-compose. I have made a patch, tested it locally, and confirmed that it now installs php-ast 1.1.3.

Change #1247072 merged by jenkins-bot:

[mediawiki/core@master] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247072

Change #1247580 had a related patch set uploaded (by Reedy; author: Daimona Eaytoy):

[mediawiki/core@REL1_45] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247580

Change #1247581 had a related patch set uploaded (by Reedy; author: Daimona Eaytoy):

[mediawiki/core@REL1_44] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247581

Change #1247582 had a related patch set uploaded (by Reedy; author: Daimona Eaytoy):

[mediawiki/core@REL1_43] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247582

Change #1247580 merged by jenkins-bot:

[mediawiki/core@REL1_45] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247580

Change #1247582 merged by jenkins-bot:

[mediawiki/core@REL1_43] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247582

Change #1247581 merged by jenkins-bot:

[mediawiki/core@REL1_44] docker: Switch to latest bookworm-php83-fpm:1.0.0-s1

https://gerrit.wikimedia.org/r/1247581