Skip to content

Let Renovate detect phpcs and phive versions - #21

Merged
mathroc merged 1 commit into
mainfrom
renovate-detect-phpcs-version
Dec 4, 2026
Merged

mathroc merged 1 commit into
mainfrom
renovate-detect-phpcs-version

Conversation

@mathroc

@mathroc mathroc commented Dec 4, 2026

Copy link
Copy Markdown
Member

Until now the phpcs/phpcbf version only lived in a VERSION=4.0.4 build-arg in .github/workflows/build.yml, so Renovate never saw it. phive was downloaded unversioned from phar.io.

Changes

  • Dockerfile: ARG PHPCS_VERSION=4.0.4 with # renovate: datasource=packagist depName=squizlabs/php_codesniffer, used by the phive install lines for phpcs and phpcbf. 4.0.4 is the latest release on Packagist.
  • Dockerfile: phive is pinned with ARG PHIVE_VERSION=0.16.0 (latest release), annotated # renovate: datasource=github-releases depName=phar-io/phive. It is downloaded from github.com/phar-io/phive/releases/download/<ver>/phive-<ver>.phar, along with the .asc. The GPG signature check is unchanged.
  • build.yml: the VERSION build-arg is removed. Image tags come from git refs and semver tags through docker/metadata-action, which never read VERSION, so tagging is unchanged.
  • renovate.json: extends customManagers:dockerfileVersions.

What Renovate now detects

depName datasource current
squizlabs/php_codesniffer packagist 4.0.4
phar-io/phive github-releases 0.16.0

Verification

  • renovate-config-validator --strict renovate.json passes.
  • renovate --platform=local --dry-run=extract lists both deps above in Dockerfile.
  • docker build . with no build args succeeds, including the GPG verification. phpcs --version and phpcbf --version in the image both print PHP_CodeSniffer version 4.0.4.

🤖 Generated with Claude Code

Move the phpcs version from the workflow build-arg into the Dockerfile
with a renovate annotation, pin phive to a versioned GitHub release
asset (GPG signature check kept), and enable customManagers:dockerfileVersions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mathroc
mathroc merged commit 0be10bf into main Dec 4, 2026
1 check passed
@mathroc
mathroc deleted the renovate-detect-phpcs-version branch December 4, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant