Page MenuHomePhabricator

Update mw-tools-codesniffer-mwcore-testrun to run with php8.2+
Closed, ResolvedPublic

Description

The repo mediawiki/tools/codesniffer now requires php8.2 (719255ced59bbbf189897b7aad9cd5add72e4856)

The non-voting job mw-tools-codesniffer-mwcore-testrun fails now with:
https://integration.wikimedia.org/ci/job/mw-tools-codesniffer-mwcore-testrun/3277/console

21:06:21 [12.7MiB/0.11s] No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
21:06:21 [12.7MiB/0.11s] Loading composer repositories with package information
21:06:22 [17.6MiB/0.85s] Updating dependencies
21:06:22 [19.1MiB/0.86s] Your requirements could not be resolved to an installable set of packages.
21:06:22 [19.1MiB/0.86s] 
21:06:22   Problem 1
21:06:22     - Root composer.json requires php >=8.2.0 but your php version (8.1.33) does not satisfy that requirement.
21:06:22 
21:06:22 [19.1MiB/0.86s] Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
21:06:22 [16.0MiB/0.87s] Memory usage: 16MiB (peak: 24.51MiB), time: 0.87s

Please update the php version of this job, maybe to php8.3 or php8.4.

Event Timeline

Possibly relevant lines of the integration/config/layout.yaml file:

- name: mediawiki/tools/codesniffer
  template:
    # (T410941) Not running in PHP 8.5 yet; waiting on Phan support
    - name: mediawiki-php-library-php82-to-php84
  test:
    - mw-tools-codesniffer-mwcore-testrun

The comment is interesting, and references T410941: PHP 8.5: "Phan 5.5.2 crashed when parsing/analyzing 'plugins/RedundantExistenceChecksPlugin/empty-miscnodes/test.php')"

Change #1225296 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] dockerfiles: [mediawiki-phan-testrun] upgrade to PHP 8.3

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

Change #1225297 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: update mediawiki-phan-testrun to PHP 8.3

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

zuul/layout.yaml
- name: mediawiki/tools/codesniffer
  template:
    # (T410941) Not running in PHP 8.5 yet; waiting on Phan support
    - name: mediawiki-php-library-php82-to-php84

The template adds the jobs to run linters/tests under PHP 8.2, 8.3 and 8.4.

test:
  - mw-tools-codesniffer-mwcore-testrun

This add a job that runs solely for new patchsets. The job uses the image docker-registry.wikimedia.org/releng/mediawiki-phan-testrun:8.1.33 which is based on PHP 8.1. I will switch the image to 8.3 and switch the job to it ;)

Change #1225296 merged by jenkins-bot:

[integration/config@master] dockerfiles: [mediawiki-phan-testrun] upgrade to PHP 8.3

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

Change #1225297 merged by jenkins-bot:

[integration/config@master] jjb: update Phan testrun jobs to PHP 8.3

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

I have built the image and switched the two jobs to php 8.3. I have rebuilt the job and it passes now :]

hashar claimed this task.
hashar removed a project: Patch-For-Review.