PHPStan Container https://phpstan.org/
  • Dockerfile 100%
Find a file
2025-12-20 17:48:39 +01:00
conf Handle ext opcache being moved to core with php 8.5 2025-12-20 17:45:04 +01:00
composer.json Update dependencies 2025-12-20 17:48:39 +01:00
Containerfile Handle ext opcache being moved to core with php 8.5 2025-12-20 17:45:04 +01:00
readme.md Use composer from docker.io/library 2025-12-20 17:43:30 +01:00

PHPStan Static Analysis container image

Container image containing php and PHPStan.

Intended image contents

  • php
  • phpstan

Run

podman container run \
    --rm \
    --interactive --tty \
    --volume=.:/src \
    code.netztechniker.at/ludwig/phpstan:latest \
        --configuration=path-to-config \
        analyse

# or the short variant
podman run --rm -it -v .:/src code.netztechniker.at/ludwig/phpstan:latest --configuration=path-to-config analyse

Build

  • switch to the directory of Containerfile
  • execute
    PHP_VERSION=x.y \
    podman image build . \
        --pull \
        --build-arg PHP_VERSION=$PHP_VERSION \
        --tag code.netztechniker.at/ludwig/phpstan:some-tag
    
  • recommended tags:
    • :x.y.z
    • :x.y
    • :x
    • if PHPStan is the latest version, additionally: :latest
  • push the tagged images: podman image push code.netztechniker.at/ludwig/phpstan:some-tag