Setup PHP GitHub Workflows
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffolds or updates the CI/CD and security pipeline for a PHP repository of one of four flavors — a Laravel
application, a WordPress plugin, a WordPress block theme, or a PrestaShop module — driving everything through the
composer scripts that the matching iru-setup-php-* scaffold defines.
Purpose
iru-setup-php-github-workflows writes the GitHub Actions files a PHP repository needs, matched to its flavor and to
cost-aware choices made up front:
-
build.yml— runs on pushes to the integration/stable branches, pull requests, andworkflow_dispatch. It usesshivammathur/setup-phpwith PCOV,composer validate --strict, a cachedcomposer install,composer audit, static analysis and coding style, and fast tests with Clover/JUnit coverage across a PHP matrix from the floor to the newest supported release. Withci-tests: fullit adds an integration job per flavor: Laravel against a MySQL or PostgreSQL service container, WordPress inside the@wordpress/envtest environment across a WordPress matrix, PrestaShop inside the Docker shop oftests/Integration/docker-compose.yml. Each integration job also runs the scaffold’s Playwright browser UI tests (npm run test:e2e, guarded on aplaywright.config.*) against the environment it already starts (Laravel’sphp artisan serve,wp-envon the latest-WordPress entry, the running PrestaShop shop) and uploads.ui-screenshots/as a 7-day artifact, with no extra job or runner. Withci-tests: unitthe browser tests stay local behind.integration-test.lock(see Building user interfaces). It also adds an optional SonarCloud/SonarQube job (skipped on fork pull requests) and a docs job (Antora, plus phpDocumentor only whenphpdoc.dist.xmlexists) deployed to GitHub Pages or uploaded as an artifact. -
release.ymlperdistribution— a WordPress or PrestaShop zip attached to the GitHub Release (withstore, also a WordPress.org deploy or manual PrestaShop Addons upload instructions), or a Laravel image pushed to GHCR. Not written withdistribution: none. -
sync.ymlplus.github/scripts/php_version.pyand.github/scripts/sync_versions.py— after a release from the stable branch, a pull request merges it back into the integration branch with the nextx.(y+1).0-devversion, the conventioniru-php-bump-versionandiru-releaseuse. -
The shared security block —
security.yml(dependency-review, CodeQL foractionsand, when present, JS/TS, a Psalm taint-analysis SARIF upload as the PHP code-scanning substitute because CodeQL has no PHP support, OSV-Scanner, gitleaks) and.github/dependabot.yml.
It announces whether it is creating the pipeline from scratch or updating an existing one, and asks per workflow file
whether to Update, Keep as is, or Replace. Templates are validated with actionlint, and the commands the workflows
contain are run locally first, so nothing is a guess.
Plugin
Shipped by the iru-php plugin of the ai-catalog marketplace (install with /plugin install iru-php@ai-catalog; see Plugins).
Invocation
/iru-setup-php-github-workflows
/iru-setup-php-github-workflows <args>
args is a block of key: value lines, one per line.
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
Detected from |
|
No |
Branch that receives development work and the |
|
|
No |
Branch releases are cut from; docs deploy from it. |
|
|
No |
The PHP floor used for the test matrix. |
|
|
No |
|
|
|
No |
|
Asked; |
|
No |
|
|
|
No |
|
Asked; |
|
No |
|
Asked; |
|
No |
|
None |
|
No |
|
|
|
No |
Each |
|
Any other key (including ci) is ignored — invoking the skill means CI is wanted.
Outputs
-
.github/workflows/build.yml(withci-tests: full, the integration jobs include the browser UI test steps and theui-screenshots-integration*artifact uploads) (no accessibility reports when.ui-quality.ymlsaysaccessibility: none), andrelease.ymlunlessdistribution: none. -
.github/workflows/sync.ymlwith.github/scripts/php_version.pyand.github/scripts/sync_versions.py(made executable). -
.github/workflows/security.yml,.github/psalm/configuration, and.github/dependabot.yml. -
A report with the required secrets (
SONAR_TOKEN, WordPress.orgSVN_USERNAME/SVN_PASSWORD), repository settings to check, the choices made, per-unit created / updated / replaced / kept as is, and every open gap (missing composer scripts, no Antora setup, unverified integration jobs and browser UI test steps), including whether the integration jobs run the browser UI tests and upload.ui-screenshots/.
The generated files' bytes come from template files under templates/ (and, where a template needs variant-specific notes, reference/) in .claude/skills/iru-setup-php-github-workflows/; the skill reads only the files for the variant it resolved, not the whole set, which keeps its SKILL.md small.
Execution flow
Dependencies
Invokes
None — this skill calls no other skill. It only mentions iru-setup-antora (the Antora toolchain the docs job builds),
iru-php-code-quality (flavor detection markers), and the iru-setup-php-* scaffolds (which define the composer
scripts) as prerequisites to recommend, not to run.
Invoked by
-
Setup PHP Repository — Step 8, CI/CD and security workflows, skipped when ci is no, via the
iru-isolated-skill-executoragent.
Related agents
-
iru-gate-runner— Step 5, runs the workflows' own commands locally (composer validate --strict,composer audit, lint, format check, coverage, version helper) and returns compact results.
Source
SKILL.md on GitHub — the file this page was generated from.