Run the evaluator tool

Edit on GitHub

This document describes how to check if code is compliant with Spryker’s standards using the evaluator tool.


Running the evaluator without installing Spryker SDK

Alternatively, you can use the spryker-sdk image from the project directory without installing it. To do that, run all the commands in this doc as follows: `docker run -ti -v $PWD:/data/project –entrypoint bash spryker/php-sdk:latest -c ‘cd /data/project && ../bin/console {COMMAND}’.

  • Get general information about the tool and see all the commands related to evaluation in the analyze section:
spryker-sdk list

Run an evaluation

To evaluate your code, run the evaluator in one of the following ways:

  • Evaluate the code of all the modules:
spryker-sdk analyze:php:code-compliance
  • Evaluate the code of needed modules:
spryker-sdk analyze:php:code-compliance -m '{NAMESPACE}.{MODULE_NAME} {NAMESPACE}.{MODULE_NAME} ...'


spryker-sdk analyze:php:code-compliance -m 'Pyz.ProductStorage'
The command creates `analyze:php:code-compliance.violations.yaml` in the `reports` folder.

To view the report, run the following command:

spryker-sdk analyze:php:code-compliance-report

Resolve upgradability issues

If the report contains upgradability issues, to resolve them, see Upgradability guidelines.