Page MenuHomePhabricator

Provide a job template for phan jobs for php libraries
Closed, ResolvedPublic

Description

Followup to @hashar comment we need a job in CI to run phan for php library repositories.

Event Timeline

Change 628900 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Phan jobs for libraries

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

The jobs above run phan with php-ast which makes them faster. Then Phan has a pure PHP parser which works just fine, albeit being slower. @cscott
used that for mediawiki/services/parsoid and that looks like:

composer.json
{
    "scripts": {
        "test": [
            "@phan",
        },
        "phan": "phan -p --allow-polyfill-parser --config-file=.phan/standalone.php --long-progress-bar",
        "phan-integrated": "phan -p --allow-polyfill-parser --long-progress-bar",
}

Which might be fast enough for your use case :]

Change 628900 merged by jenkins-bot:
[integration/config@master] Phan jobs for libraries

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

Running phan from composer test is fine for us -- we just need to (apparently) make sure ext-ast is installed when running composer test.