Docker image that provides static analysis tools for PHP

Overview

Static Analysis Tools for PHP

Docker image providing static analysis tools for PHP. The list of available tools and the installer are actually managed in the jakzal/toolbox repository.

Build Status Docker Pulls

Supported platforms and PHP versions

Docker hub repository: https://hub.docker.com/r/jakzal/phpqa/

Nightly builds: https://hub.docker.com/r/jakzal/phpqa-nightly/

Debian

Alpine

Legacy

These are the latest tags for PHP versions that are no longer supported:

Available tools

Name Description PHP 7.4 PHP 8.0 PHP 8.1
analyze Visualizes metrics and source code
behat Helps to test business expectations
box Fast, zero config application bundler with PHARs
box-legacy Legacy version of box
churn Discovers good candidates for refactoring
codeception Codeception is a BDD-styled PHP testing framework
composer Dependency Manager for PHP
composer-bin-plugin Composer plugin to install bin vendors in isolated locations
composer-normalize Composer plugin to normalize composer.json files
composer-require-checker Verify that no unknown symbols are used in the sources of a package.
composer-require-checker-3 Verify that no unknown symbols are used in the sources of a package.
composer-unused Show unused packages by scanning your code
dephpend Detect flaws in your architecture
deprecation-detector Finds usages of deprecated code
deptrac Enforces dependency rules between software layers
diffFilter Applies QA tools to run on a single pull request
ecs Sets up and runs coding standard checks
infection AST based PHP Mutation Testing Framework
larastan PHPStan extension for Laravel
local-php-security-checker Checks composer dependencies for known security vulnerabilities
parallel-lint Checks PHP file syntax
paratest Parallel testing for PHPUnit
pdepend Static Analysis Tool
phan Static Analysis Tool
phive PHAR Installation and Verification Environment
php-coupling-detector Detects code coupling issues
php-cs-fixer PHP Coding Standards Fixer
php-formatter Custom coding standards fixer
php-fuzzer A fuzzer for PHP, which can be used to find bugs in libraries by feeding them 'random' inputs
php-semver-checker Suggests a next version according to semantic versioning
phpa Checks for weak assumptions
phpat Easy to use architecture testing tool
phpbench PHP Benchmarking framework
phpca Finds usage of non-built-in extensions
phpcb PHP Code Browser
phpcbf Automatically corrects coding standard violations
phpcodesniffer-composer-install Easy installation of PHP_CodeSniffer coding standards (rulesets).
phpcov a command-line frontend for the PHP_CodeCoverage library
phpcpd Copy/Paste Detector
phpcs Detects coding standard violations
phpcs-security-audit Finds vulnerabilities and weaknesses related to security in PHP code
phpda Generates dependency graphs
phpdd Finds usage of deprecated features
phpdoc-to-typehint Automatically adds type hints and return types based on PHPDocs
phpDocumentor Documentation generator
phpinsights Analyses code quality, style, architecture and complexity
phplint Lints php files in parallel
phploc A tool for quickly measuring the size of a PHP project
phpmd A tool for finding problems in PHP code
phpmetrics Static Analysis Tool
phpmnd Helps to detect magic numbers
phpspec SpecBDD Framework
phpstan Static Analysis Tool
phpstan-beberlei-assert PHPStan extension for beberlei/assert
phpstan-deprecation-rules PHPStan rules for detecting deprecated code
phpstan-doctrine Doctrine extensions for PHPStan
phpstan-ergebnis-rules Additional rules for PHPstan
phpstan-exception-rules PHPStan rules for checked and unchecked exceptions
phpstan-larastan Separate installation of phpstan for larastan
phpstan-phpunit PHPUnit extensions and rules for PHPStan
phpstan-strict-rules Extra strict and opinionated rules for PHPStan
phpstan-symfony Symfony extension for PHPStan
phpstan-webmozart-assert PHPStan extension for webmozart/assert
phpunit The PHP testing framework
phpunit-5 The PHP testing framework (5.x version)
phpunit-7 The PHP testing framework (7.x version)
phpunit-8 The PHP testing framework (8.x version)
psalm Finds errors in PHP applications
psalm-plugin-doctrine Stubs to let Psalm understand Doctrine better
psalm-plugin-phpunit Psalm plugin for PHPUnit
psalm-plugin-symfony Psalm Plugin for Symfony
psecio-parse Scans code for potential security-related issues
rector Tool for instant code upgrades and refactoring
roave-backward-compatibility-check Tool to compare two revisions of a class API to check for BC breaks
simple-phpunit Provides utilities to report legacy tests and usage of deprecated code
twig-lint Standalone twig linter
twigcs The missing checkstyle for twig!
yaml-lint Compact command line utility for checking YAML file syntax

More tools

Some tools are not included in the docker image, to use them refer to their documentation:

Removed tools

Name Summary
composer-normalize Composer plugin to normalize composer.json files
design-pattern Detects design patterns
parallel-lint Checks PHP file syntax
phpcf Finds usage of deprecated features
phpstan-localheinz-rules Additional rules for PHPstan
security-checker Checks composer dependencies for known security vulnerabilities
testability Analyses and reports testability issues of a php codebase

Running tools

Pull the image:

docker pull jakzal/phpqa

The default command will list available tools:

docker run -it --rm jakzal/phpqa

To run the selected tool inside the container, you'll need to mount the project directory on the container with -v "$(pwd):/project". Some tools like to write to the /tmp directory (like PHPStan, or Behat in some cases), therefore it's often useful to share it between docker runs, i.e. with -v "$(pwd)/tmp-phpqa:/tmp". If you want to be able to interrupt the selected tool if it takes too much time to complete, you can use the --init option. Please refer to the docker run documentation for more information.

docker run --init -it --rm -v "$(pwd):/project" -v "$(pwd)/tmp-phpqa:/tmp" -w /project jakzal/phpqa phpstan analyse src

You might want to tweak this command to your needs and create an alias for convenience:

alias phpqa='docker run --init -it --rm -v "$(pwd):/project" -v "$(pwd)/tmp-phpqa:/tmp" -w /project jakzal/phpqa:alpine'

Add it to your ~/.bashrc so it's defined every time you start a new terminal session.

Now the command becomes a lot simpler:

phpqa phpstan analyse src

GitHub actions

The image can be used with GitHub actions. Below is an example for several static analysis tools.

# .github/workflows/static-code-analysis.yml
name: Static code analysis

on: [pull_request]

jobs:
  static-code-analysis:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: PHPStan
        uses: docker://jakzal/phpqa:php8.0-alpine
        with:
          args: phpstan analyze src/ -l 1
      - name: PHP-CS-Fixer
        uses: docker://jakzal/phpqa:php8.0-alpine
        with:
          args: php-cs-fixer --dry-run --allow-risky=yes --no-interaction --ansi fix
      - name: Deptrac
        uses: docker://jakzal/phpqa:php8.0-alpine
        with:
          args: deptrac --no-interaction --ansi --formatter-graphviz-display=0

Bitbucket Pipelines

Here is an example configuration of a bitbucket pipeline using the phpqa image:

# bitbucket-pipelines.yml
image: jakzal/phpqa:php8.0-alpine
pipelines:
  default:
    - step:
        name: Static analysis
        caches:
          - composer
        script:
          - composer install --no-scripts --no-progress
          - phpstan analyze src/ -l 1
          - php-cs-fixer --dry-run --allow-risky=yes --no-interaction --ansi fix
          - deptrac --no-interaction --ansi --formatter-graphviz-display=0

Unfortunately, bitbucket overrides the docker entrypoint so composer needs to be explicitly invoked as in the above example.

Starter-kits / Templates

ro0NL/php-package-starter-kit

A template repository for agnostic PHP libraries. It utilizes the PHPQA image into a Makefile and configures some tools by default.

ro0NL/symfony-docker

A template repository for Docker based Symfony applications. It utilizes the PHPQA image into a Dockerfile and integrates in the composed landscape.

Building the image

git clone https://github.com/jakzal/phpqa.git
cd phpqa
make build-debian

To build the alpine version:

make build-alpine

Customising the image

It's often needed to customise the image with project specific extensions. To achieve that simply create a new image based on jakzal/phpqa:

FROM jakzal/phpqa:alpine

RUN apk add --no-cache libxml2-dev \
 && docker-php-ext-install soap

Next, build it:

docker build -t foo/phpqa .

Finally, use your customised image instead of the default one:

docker run --init -it --rm -v "$(pwd):/project" -w /project foo/phpqa phpmetrics .

Adding PHPStan extensions

A number of PHPStan extensions is available on the image in /tools/.composer/vendor-bin/phpstan/vendor out of the box. You can find them with the command below:

phpqa find /tools/.composer/vendor-bin/phpstan/vendor/ -iname 'rules.neon' -or -iname 'extension.neon'

Use the composer-bin-plugin to install any additional PHPStan extensions in the phpstan namespace:

FROM jakzal/phpqa:alpine

RUN composer global bin phpstan require phpstan/phpstan-phpunit

You'll be able to include them in your PHPStan configuration from the /tools/.composer/vendor-bin/phpstan/vendor path:

includes:
    - /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon

Debugger & Code Coverage

The pcov code coverage extension, as well as the php-dbg debugger, are provided on the image out of the box.

pcov is disabled by default so it doesn't affect performance when it's not needed, and doesn't break interoperability with other coverage extensions. It can be enabled by setting pcov.enabled=1:

phpqa php -d pcov.enabled=1 ./vendor/bin/phpunit --coverage-text

Infection users will need to define initial php options:

phpqa /tools/infection run --initial-tests-php-options='-dpcov.enabled=1'

Contributing

Please read the Contributing guide to learn about contributing to this project. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Comments
  • Provide separate images per PHP version

    Provide separate images per PHP version

    The project currently provides only PHP 7.2:

    https://github.com/jakzal/phpqa/blob/8e0d36a915f85f9bf9e8d47ffb4f7aab67b9f8af/Dockerfile#L1 https://github.com/jakzal/phpqa/blob/8e0d36a915f85f9bf9e8d47ffb4f7aab67b9f8af/Dockerfile-alpine#L1

    This was also mentioned as a problem here: https://twitter.com/mwop/status/1012417504319279107

    It might make sense to provide an image for each officially supported PHP Docker image currently available. If you're running on Travis, you'd just pass the version through your env vars, wouldn't even need to request PHP.

    opened by dkarlovi 21
  • Switch to the multi-stage build pattern

    Switch to the multi-stage build pattern

    Looking at the Dockerfile and the image's history (see below), it seems we can save quite a bit of space by switching to the multi-stage build pattern.

    It should allow us to avoid having a 250MB+ intermediate layer in the image:

    $ docker history jakzal/phpqa:alpine 
    IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
    76b1555a30f9        19 hours ago        /bin/sh -c #(nop)  CMD ["/bin/sh" "-c" "php …   0B                  
    <missing>           19 hours ago        /bin/sh -c apk add --no-cache --virtual .too…   252MB               
    <missing>           19 hours ago        /bin/sh -c #(nop) COPY file:60fad6cf4445b0d0…   1.88MB              
    <missing>           19 hours ago        /bin/sh -c #(nop) COPY file:287ae7377cdad1b1…   23.6kB              
    <missing>           19 hours ago        /bin/sh -c #(nop) COPY file:850923d8354d1f73…   18.7kB              
    <missing>           19 hours ago        /bin/sh -c #(nop)  ENV TOOLS_JSON=/tools/too…   0B                  
    <missing>           19 hours ago        /bin/sh -c #(nop)  ENV PATH=/usr/local/sbin:…   0B                  
    <missing>           19 hours ago        /bin/sh -c #(nop)  ENV TOOL_DEPS=git graphvi…   0B                  
    <missing>           19 hours ago        /bin/sh -c #(nop)  ENV LIB_DEPS=zlib-dev        0B                  
    <missing>           19 hours ago        /bin/sh -c #(nop)  ENV BUILD_DEPS=autoconf f…   0B                  
    <missing>           19 hours ago        /bin/sh -c #(nop)  ENV COMPOSER_HOME=/tools/…   0B                  
    <missing>           19 hours ago        /bin/sh -c #(nop)  ENV COMPOSER_ALLOW_SUPERU…   0B                  
    <missing>           19 hours ago        /bin/sh -c #(nop)  LABEL maintainer=Jakub Za…   0B                  
    <missing>           2 weeks ago         /bin/sh -c #(nop)  CMD ["php" "-a"]             0B                  
    <missing>           2 weeks ago         /bin/sh -c #(nop)  ENTRYPOINT ["docker-php-e…   0B                  
    <missing>           2 weeks ago         /bin/sh -c docker-php-ext-enable sodium         168kB               
    <missing>           2 weeks ago         /bin/sh -c #(nop) COPY multi:2cdcedabcf5a3b9…   6.42kB              
    <missing>           2 weeks ago         /bin/sh -c set -xe  && apk add --no-cache --…   58.1MB              
    <missing>           2 weeks ago         /bin/sh -c #(nop) COPY file:207c686e3fed4f71…   587B                
    <missing>           2 weeks ago         /bin/sh -c set -xe;   apk add --no-cache --v…   12.2MB              
    <missing>           2 weeks ago         /bin/sh -c #(nop)  ENV PHP_SHA256=da1a705c0b…   0B                  
    <missing>           2 weeks ago         /bin/sh -c #(nop)  ENV PHP_URL=https://secur…   0B                  
    <missing>           2 weeks ago         /bin/sh -c #(nop)  ENV PHP_VERSION=7.2.11       0B                  
    <missing>           6 weeks ago         /bin/sh -c #(nop)  ENV GPG_KEYS=1729F83938DA…   0B                  
    <missing>           6 weeks ago         /bin/sh -c #(nop)  ENV PHP_LDFLAGS=-Wl,-O1 -…   0B                  
    <missing>           6 weeks ago         /bin/sh -c #(nop)  ENV PHP_CPPFLAGS=-fstack-…   0B                  
    <missing>           6 weeks ago         /bin/sh -c #(nop)  ENV PHP_CFLAGS=-fstack-pr…   0B                  
    <missing>           6 weeks ago         /bin/sh -c mkdir -p $PHP_INI_DIR/conf.d         0B                  
    <missing>           6 weeks ago         /bin/sh -c #(nop)  ENV PHP_INI_DIR=/usr/loca…   0B                  
    <missing>           6 weeks ago         /bin/sh -c set -x  && addgroup -g 82 -S www-…   4.85kB              
    <missing>           6 weeks ago         /bin/sh -c apk add --no-cache --virtual .per…   2.69MB              
    <missing>           6 weeks ago         /bin/sh -c #(nop)  ENV PHPIZE_DEPS=autoconf …   0B                  
    <missing>           6 weeks ago         /bin/sh -c #(nop)  CMD ["/bin/sh"]              0B                  
    <missing>           6 weeks ago         /bin/sh -c #(nop) ADD file:25c10b1d1b41d46a1…   4.41MB   
    
    opened by dkarlovi 12
  • Add a mention to docker run --init option in the README

    Add a mention to docker run --init option in the README

    Hello,

    Thank you for creating this docker image, it's really convenient to have all these tools in a single image.

    Today I was using it to run a bunch of tools on my code and at some point one of them took too much time to run. So I tried to cancel it, using a Control-C as usual but of course, it's not working the same way when running in a container.

    docker run -it --rm -v $PWD:/project -v $PWD/tmp-phpqa:/tmp -w /project jakzal/phpqa deprecation-detector
    Checking your application for deprecations - this could take a while ...

    Loading RuleSet...

    ^C^C^C^C^C^C^CRuleSet loaded.

    Parsing files & Searching for deprecations...

    Finished searching for deprecations.

    Rendering output...

    Most of the time I use dumb-init to handle these kind of issues so I added it and I thought maybe it will please everyone to benefit from it. With these changes you can now Control-C any tools you run using this image.

    I thought that maybe other users might find this useful.

    opened by pylebecq 11
  • phan - php8.1 versus latest

    phan - php8.1 versus latest

    Hello

    I was running the following command and get an error.

    docker run -it --rm -v $(pwd):/project -w /project -u 1000:1000 jakzal/phpqa:php8.1 phan --config-file=.config/phan.php
    
    ERROR: AssertionError: The pcntl extension must be loaded in order for Phan to be able to fork. in phar:///tools/.phive/phars/phan-5.4.0.phar/src/Phan/Phan.php:239
    Stack trace:
    #0 phar:///tools/.phive/phars/phan-5.4.0.phar/src/phan.php(38): Phan\Phan::analyzeFileList(Object(Phan\CodeBase), Object(Closure))
    #1 /tools/.phive/phars/phan-5.4.0.phar(6): require('phar:///tools/....')
    #2 {main}
    (Phan 5.4.0 crashed due to an uncaught Throwable)
    More details:
    #0: Phan\Phan::analyzeFileList() called at [phar:///tools/.phive/phars/phan-5.4.0.phar/src/phan.php:38] Args: [Phan\CodeBase({}), Closure]
    #1: require() called at [/tools/.phive/phars/phan-5.4.0.phar:6] Args: ["phar:///tools/.phive/phars/phan-5.4.0.phar/src/phan.php"]
    

    This didn't happens when running phpqa:latest like this:

    docker run -it --rm -v $(pwd):/project -w /project -u 1000:1000 jakzal/phpqa:latest phan --config-file=.config/phan.php
    

    Can you advice me: I'm wish to run PHAN against php 8.1 codebase, should I use jakzal/phpqa:php8.1 or the latest version? I'm not sure to know when to use latest and when a dedicated one.

    Thanks

    opened by cavo789 10
  • Is it possible to upgrade PHPMD?

    Is it possible to upgrade PHPMD?

    Hello

    I encounter a problem with PHPMD (https://github.com/phpmd/phpmd/issues/853) and then, I see that the last released version is 2.12.0(https://github.com/phpmd/phpmd/releases/tag/2.12.0).

    When I run docker run -it --rm -v $(pwd):/project -w /project -u 1000:1000 jakzal/phpqa:php8.1 phpmd --version I get version PHPMD 2.9.1snapshot202009232245.

    So, is it possible to upgrade PHPMD?

    Thanks!

    opened by cavo789 10
  • [DX] Tools curation

    [DX] Tools curation

    Since the added value with this image is the selection and discovery of actually valuable PHP related QA and similar tools (which you might not know about), it might make sense to make that more prominent.

    1. For example, there are tools which don't seem to work:
    $ phpqa churn run
    
    Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Yaml\Yaml::parse() must be of the type string, boolean given, called in /tools/.composer/vendor-bin/tools/vendor/bmitch/churn-php/src/Commands/ChurnCommand.php on line 81 and defined in /tools/.composer/vendor-bin/tools/vendor/symfony/yaml/Yaml.php:76
    
    1. There are also tools which were added, but in the meantime a better candidate for the same task appeared, example phpca vs. ComposerRequireChecker
    2. some tools might be obsoleted upstream in the meantime

    What I propose is this:

    1. introduce a way to mark tools as broken or deprecated (with optional suggestion for an alternative)
    2. introduce a way to tag tools (with tags such as composer, util, analysis, style, test, phpstan, etc).
    3. introduce a way to list tools by tag, example phpqa list style
    4. introduce a way to provide a short help about the tool, example phpqa info phpstan-doctrine would explain how to enable it, with even a short example
    5. have a bit of a nicer CLI for the listing (can we use Symfony Console here?)

    It would probably be best if we separated tools out ftom the JSON into something else to make it more maintainable in te future.

    Overall, I think this project might gain some traction as other projects start using it for their CI more so it would benefit from these kind of small tweaks which raise the value quite a bit.

    WDYT?

    opened by dkarlovi 10
  • Nightly builds

    Nightly builds

    Would be nice to schedule nightly build which builds new image with latest tools each day. I often find myself checking your releases, but I would feel being rude to ask you constantly to update it.

    opened by ostrolucky 10
  • Build arm64 images

    Build arm64 images

    Previous attempts: https://github.com/jakzal/phpqa/pull/303 https://github.com/jakzal/phpqa/pull/306 https://github.com/jakzal/phpqa/pull/318 were reverted in https://github.com/jakzal/phpqa/commit/8034af81a5a435c9d921a51d74bdffe6ebe3b583.

    opened by jakzal 9
  • Add intl extension

    Add intl extension

    Latest version of Rector complains about missing intl extension. I would consider it reasonable to add this to the PHP builds.

    Notice: RectorPrefix20210124\Nette\Utils\Strings::toAscii(): it is recommended to enable PHP extensions 'intl'. in /tools/.composer/vendor-bin/rector/vendor/rector/rector-prefixed/vendor/nette/utils/src/Utils/Strings.php on line 124

    opened by benr77 9
  • ECS isn't included with PHP8 image

    ECS isn't included with PHP8 image

    Thanks for this great resource!

    I have just pulled the php8 image and tried to set up my dev environment, phpstan, ECS, PHPUnit etc. But was unable to get ECS to run, I searched the /tools/ directory and it is not installed. I manually installed it Ok:

    cd /tools/.composer/
    composer global require symplify/easy-coding-standard-prefixed
    

    Note: The prefixed version is a phar to help with conflicts.

    I pulled the PHP7.4 image and ECS was installed fine.

    I read issue #283 , if there are compatibility issues with other PHP8 packages, would it be possible to add the known issues to the readme?

    I would be happy to update the README, if this will help. I can see the installed packages on PHP7.4 and PHP8, thanks to your helpful available packages list. I wish I had spotted that earlier :)

    Possibly your output can be turned into a pivot table and create a summary:

    | Package | php7.4 | php8.0 | | :------ | :----- | :----- | | analyze | ✓ | | |behat| ✓| ✓ | |behat| ✓| ✓ | |behat| ✓| ✓ | |box| ✓| | |behat| ✓| ✓ | |box| ✓| | |box-legacy| ✓| ✓ | |churn| ✓| ✓ | |composer| ✓| ✓ | |composer-bin-plugin| ✓| ✓ | |composer-normalize| ✓| ✓ | |composer-unused| ✓| ✓ | |dephpend| ✓| ✓ | |deprecation-detector| ✓| ✓ | |deptrac| ✓| ✓ | |diffFilter| ✓| | |doctrine-psalm-plugin| ✓| | |ecs| ✓| | |infection| ✓| ✓ | |larastan| ✓| ✓ | |local-php-security-checker| ✓| ✓ | |parallel-lint| ✓| | |paratest| ✓| | |pdepend| ✓| ✓ | |phan| ✓| ✓ | |php-coupling-detector| ✓| | |php-cs-fixer| ✓| ✓ | |php-formatter| ✓| | |php-semver-checker| ✓| ✓ | |phpa| ✓| ✓ | |phpat| ✓| | |phpbench| ✓| ✓ | |phpca| ✓| ✓ | |phpcb| ✓| ✓ | |phpcbf| ✓| ✓ | |phpcov| ✓| ✓ | |phpcpd| ✓| ✓ | |phpcs| ✓| ✓ | |phpda| ✓| ✓ | |phpdd| ✓| ✓ | |phpdoc-to-typehint| ✓| ✓ | |phpDocumentor| ✓| | |phpinsights| ✓| | |phplint| ✓| ✓ | |phploc| ✓| ✓ | |phpmd| ✓| ✓ | |phpmetrics| ✓| ✓ | |phpmnd| ✓| | |phpspec| ✓| ✓ | |phpstan| ✓| ✓ | |phpstan-beberlei-assert| ✓| ✓ | |phpstan-deprecation-rules| ✓| ✓ | |phpstan-doctrine| ✓| ✓ | |phpstan-ergebnis-rules| ✓| ✓ | |phpstan-exception-rules| ✓| ✓ | |phpstan-phpunit| ✓| ✓ | |phpstan-strict-rules| ✓| ✓ | |phpstan-symfony| ✓| ✓ | |phpstan-webmozart-assert| ✓| ✓ | |phpunit| ✓| ✓ | |phpunit-5| ✓| | |phpunit-7| ✓| | |phpunit-8| ✓| ✓ | |psalm| ✓| ✓ | |psecio-parse| ✓| ✓ | |rector| ✓| | |roave-backward-compatibility-check| ✓| | |simple-phpunit| ✓| ✓ | |twig-lint| ✓| ✓ | |twigcs| ✓| ✓ | |yaml-lint| ✓| ✓ |

    opened by Pen-y-Fan 8
  • 1.30 failing as a Github action (1.29 works)

    1.30 failing as a Github action (1.29 works)

    I have this issue in my build after bumping to 1.30:

    Generating code coverage report in PHPUnit XML format ... done
    sh -c "  phpdbg -qrr /tools/infection run --verbose --show-mutations --no-interaction --only-covered --coverage var/ --min-msi=100 --min-covered-msi=100 --threads 4"
    zend_mm_heap corrupted
    

    Check the build output here (open it manually, Github's UI seems to not properly expand the output fully currently), the only thing that changed is the image version. It works locally (as did the previous version).

    opened by dkarlovi 8
  • Add model generator from json schema

    Add model generator from json schema

    Generating schemas often is part of the CI / QA pipelines, as integration with a frontend.

    Would it be possible to add https://github.com/api-platform/schema-generator to the phpqa image?

    opened by rvanlaak 4
  • Issue with PHPStan configuration and 1.67

    Issue with PHPStan configuration and 1.67

    Hello,

    thanks for your work by maintaining this utility.

    Since the latest docker image build from yesterday (using jakzal/phpqa:php7.4 tag), PHPStan seems to ignore the level parameter on both command options and in NEON configuration file. By using the previous tag (jakzal/phpqa:1.66-php7.4), I do not encounter the issue.

    Is this related to your image or PHPStan?

    Thanks.

    opened by laryjulien 18
  • Trigger releases weekly

    Trigger releases weekly

    Release process is already automated with:

    make release
    

    The command has been tested over the past months. We can now start triggering it automatically on a regular basis.

    opened by jakzal 1
  • The LDAP PHP extension is not enabled. :-(

    The LDAP PHP extension is not enabled. :-(

    Successfully extracted cache
    Executing "step_script" stage of the job script
    00:06
    Using docker image sha256:803c688afae652c73220eeebef8b635bf730f41947e333d2c95921ac15d12b71 for jakzal/phpqa:php7.4-alpine with digest jakzal/phpqa@sha256:bc295c86dc517fb3cffe8fd1be442d47e8b76402409400dbc80b48b2758d8813 ...
    $ phpstan analyse --ansi src
    Note: Using configuration file /dd/phpstan.neon.
       0/113 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
      60/113 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░]  53%
      80/113 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░]  70%
     113/113 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
     -- --------------------------------------------------------------------------- 
         Error                                                                      
     -- --------------------------------------------------------------------------- 
         Internal error: Internal error: The LDAP PHP extension is not enabled. in  
         file                                                                       
         /dd/src/Command/MercureSseListenerCommand.p  hp                                                                         
         Run PHPStan with --debug option and post the stack trace to:               
         https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md       
         Child process error (exit code 1):                                         
     -- --------------------------------------------------------------------------- 
                                                                                    
     [ERROR] Found 2 errors                                                         
                                                                                    
    ERROR: Job failed: exit code 1
    

    Is it possible to add php ldap extension ? if else how to workaround ?

    cordialy

    opened by filoucrackeur 5
  • Installing the PDO extensions

    Installing the PDO extensions

    Hi,

    While unit tests should run without a database, integration tests will usually touch the database. In order to run those, installing the pdo extensions would make sense.

    Sure, adding every possible extension a project might need will lead to bloat, but pdo_mysql / pdo_pgsql would cover most people's needs.

    WDYT?

    enhancement question 
    opened by mihai-stancu 0
Releases(v1.83.1)
Owner
Jakub Zalas
Agile Software Engineer
Jakub Zalas
A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.

A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.

Felix Becker 1.1k Jan 4, 2023
Docker-magento - Docker image for Magento 1.6 to 1.9

Docker image for Magento 1.x This repo creates a Docker image for Magento 1.x. Please note The primary goal of this repo is to create Docker images fo

Fu Cheng 144 Nov 18, 2022
Beautiful and understandable static analysis tool for PHP

PhpMetrics PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report. Documentation | Twitter | Contributing

PhpMetrics 2.3k Jan 5, 2023
Find undefined and unused variables with the PHP Codesniffer static analysis tool.

PHP_CodeSniffer VariableAnalysis Plugin for PHP_CodeSniffer static analysis tool that adds analysis of problematic variable use. Warns if variables ar

Payton Swick 116 Dec 14, 2022
Attributes to define PHP language extensions (to be enforced by static analysis)

PHP Language Extensions (currently in BETA) This library provides attributes for extending the PHP language (e.g. adding package visibility). The inte

Dave Liddament 70 Dec 19, 2022
Perform static analysis of Drupal PHP code with phpstan-drupal.

Perform static analysis of Drupal PHP code with PHPStan and PHPStan-Drupal on Drupal using PHP 8. For example: docker run --rm \ -v $(pwd)/example01

Dcycle 0 Dec 10, 2021
The SensioLabs DeprecationDetector runs a static code analysis against your project's source code to find usages of deprecated methods, classes and interfaces

SensioLabs DeprecationDetector CAUTION: This package is abandoned and will no longer receive any updates. The SensioLabs DeprecationDetector runs a st

QOSSMIC GmbH 389 Nov 24, 2022
WooCommerce function and class declaration stubs for static analysis.

WooCommerce Stubs This package provides stub declarations for WooCommerce functions, classes and interfaces. These stubs can help plugin and theme dev

PHP Stubs Library 54 Dec 27, 2022
WordPress plugin renames image filenames to be more SEO friendly, based on the post's data and image metadata.

=== Automatic image Rename === Contributors: wpsunshine Tags: image, images, SEO, rename, optimization Requires at least: 5.0 Tested up to: 6.2.2 Stab

null 8 Jun 11, 2023
🐋📦✂️📋📦 Docker image of packagist mirror

Docker for Packagist Mirror This project allows you to easily create and update a mirror of the packagist having as dependency only the docker. It is

Webysther Nunes 28 Jan 20, 2022
A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

?? Docker + PHP 7.4 + MySQL8.0 + Nginx + Certbot(HTTPS) + Symfony 5 Boilerplate ?? Edited from https://github.com/ger86/symfony-docker version -> http

null 6 Nov 9, 2022
Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

Meanbee 454 Dec 27, 2022
🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

?? This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

Anton Kliek 1 Jan 26, 2022
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.

Docker Tutorials and Labs At this time we are not actively adding labs to this repository. Our focus is on training.play-with-docker.com where new lab

Docker 11.1k Jan 2, 2023
Debug - The Debug component provides tools to ease debugging PHP code.

Debug Component CAUTION: this component is deprecated since Symfony 4.4. Instead, use the ErrorHandler component. The Debug component provides tools t

Symfony 7.3k Jan 8, 2023
The ErrorHandler component provides tools to manage errors and ease debugging PHP code

ErrorHandler Component The ErrorHandler component provides tools to manage errors and ease debugging PHP code. Getting Started $ composer require symf

Symfony 2.2k Jan 3, 2023
PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

php-text-analysis PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP l

null 464 Dec 28, 2022
the examples of head first object oriented analysis & design - in PHP

Head First object oriented analysis & design in (PHP) after cloning the repository, you have to install the project's dependancies by running the foll

Muhammed ElFeqy 3 Oct 16, 2021
An extension for PHPStan for adding analysis for PHP Language Extensions.

PHPStan PHP Language Extensions (currently in BETA) This is an extension for PHPStan for adding analysis for PHP Language Extensions. Language feature

Dave Liddament 9 Nov 30, 2022