mediawiki/tools/phan/PerfCheckPlugin (master)

sourcepatches
$ date
Thu Mar  4 14:04:36 UTC 2021

$ git clone file:///srv/git/mediawiki-tools-phan-PerfCheckPlugin.git repo --depth=1 -b master
Cloning into 'repo'...

$ git config user.name libraryupgrader

$ git config user.email tools.libraryupgrader@tools.wmflabs.org

$ git submodule update --init

$ grr init
Installed commit-msg hook.

$ git show-ref refs/heads/master
82ce74b70b2207abb2ca997e825e511b4791135c refs/heads/master

$ composer install
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 53 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-php80 (v1.22.1): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.22.1): Loading from cache
  - Installing symfony/polyfill-intl-normalizer (v1.22.1): Loading from cache
  - Installing symfony/polyfill-intl-grapheme (v1.22.1): Loading from cache
  - Installing symfony/polyfill-ctype (v1.22.1): Loading from cache
  - Installing symfony/string (v5.2.3): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/service-contracts (v2.2.0): Loading from cache
  - Installing symfony/polyfill-php73 (v1.22.1): Loading from cache
  - Installing symfony/console (v5.2.3): Loading from cache
  - Installing psr/log (1.1.3): Loading from cache
  - Installing sabre/event (5.1.2): Loading from cache
  - Installing netresearch/jsonmapper (v2.1.0): Loading from cache
  - Installing microsoft/tolerant-php-parser (v0.0.23): Loading from cache
  - Installing phpdocumentor/reflection-common (2.2.0): Loading from cache
  - Installing webmozart/assert (1.9.1): Loading from cache
  - Installing phpdocumentor/type-resolver (1.4.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (5.2.2): Loading from cache
  - Installing felixfbecker/advanced-json-rpc (v3.2.0): Loading from cache
  - Installing composer/xdebug-handler (1.4.5): Loading from cache
  - Installing composer/semver (3.2.4): Loading from cache
  - Installing phan/phan (3.2.6): Loading from cache
  - Installing squizlabs/php_codesniffer (3.5.8): Loading from cache
  - Installing composer/spdx-licenses (1.5.5): Loading from cache
  - Installing mediawiki/mediawiki-codesniffer (v34.0.0): Loading from cache
  - Installing mediawiki/minus-x (1.1.0): Loading from cache
  - Installing php-parallel-lint/php-parallel-lint (v1.2.0): Loading from cache
  - Installing php-parallel-lint/php-console-color (v0.3): Loading from cache
  - Installing php-parallel-lint/php-console-highlighter (v0.5): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/type (1.1.4): Loading from cache
  - Installing sebastian/resource-operations (2.0.2): Loading from cache
  - Installing sebastian/recursion-context (3.0.1): Loading from cache
  - Installing sebastian/object-reflector (1.1.2): Loading from cache
  - Installing sebastian/object-enumerator (3.0.4): Loading from cache
  - Installing sebastian/global-state (3.0.1): Loading from cache
  - Installing sebastian/exporter (3.1.3): Loading from cache
  - Installing sebastian/environment (4.2.4): Loading from cache
  - Installing sebastian/diff (3.0.3): Loading from cache
  - Installing sebastian/comparator (3.0.3): Loading from cache
  - Installing phpunit/php-timer (2.1.3): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing phpunit/php-file-iterator (2.0.3): Loading from cache
  - Installing theseer/tokenizer (1.2.0): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.2): Loading from cache
  - Installing phpunit/php-token-stream (4.0.4): Loading from cache
  - Installing phpunit/php-code-coverage (7.0.14): Loading from cache
  - Installing doctrine/instantiator (1.4.0): Loading from cache
  - Installing phpspec/prophecy (1.12.2): Loading from cache
  - Installing phar-io/version (3.1.0): Loading from cache
  - Installing phar-io/manifest (2.0.1): Loading from cache
  - Installing myclabs/deep-copy (1.10.2): Loading from cache
  - Installing phpunit/phpunit (8.5.14): Loading from cache
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing symfony/process
phan/phan suggests installing ext-ast (Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.8+ is recommended.)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.7.2)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0)
phpunit/phpunit suggests installing ext-soap (*)
phpunit/phpunit suggests installing ext-xdebug (*)
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
31 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Upgrading c:mediawiki/mediawiki-codesniffer from 34.0.0 -> 35.0.0
Upgrading c:mediawiki/minus-x from 1.1.0 -> 1.1.1
$ composer update
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals
  - Updating mediawiki/mediawiki-codesniffer (v34.0.0 => v35.0.0): Loading from cache
  - Updating mediawiki/minus-x (1.1.0 => 1.1.1): Loading from cache
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
31 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

{'MediaWiki.PHP70Features.ScalarTypeHintUsage.Found', 'MediaWiki.PHP71Features.VoidReturnType.NotAllowed', 'MediaWiki.Usage.ForbiddenFunctions.assert', 'MediaWiki.PHP70Features.ScalarTypeHintUsage.ReturnTypeFound'}
Tests fail!
$ git checkout .phpcs.xml

Tests still failing. Skipping
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
31 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ composer test
> parallel-lint . --exclude vendor
PHP 7.3.19 | 10 parallel jobs
...............                                              15/15 (100 %)


Checked 15 files in 0.1 seconds
No syntax error found
> composer phpcs
> phpcs -p -s
....... 7 / 7 (100%)


Time: 349ms; Memory: 10MB

> composer minus-x
> minus-x check .
MinusX
======
Processing /src/repo...
...............................
All good!
> ./tests/run-phan-on-plugin.sh -p
Starting phan
ERROR: The php-ast extension must be loaded in order for Phan to work. Either install and enable php-ast, or invoke Phan with the CLI option --allow-polyfill-parser (which is noticeably slower)
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

Script ./tests/run-phan-on-plugin.sh -p handling the test event returned with error code 1

Traceback (most recent call last):
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 1188, in main
    libup.run(args.repo, args.output, args.branch)
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 1131, in run
    self.composer_upgrade(plan)
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 684, in composer_upgrade
    self.composer_test()
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 246, in composer_test
    self.check_call(['composer', 'test'])
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/shell.py", line 38, in check_call
    res.check_returncode()
  File "/usr/lib/python3.7/subprocess.py", line 428, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['composer', 'test']' returned non-zero exit status 1.

composer dependencies

Dependencies
Development dependencies

Logs

Source code is licensed under the AGPL.