Download the PHP package smile/magento2-smilelab-quality-suite without Composer
On this page you can find all versions of the php package smile/magento2-smilelab-quality-suite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smile/magento2-smilelab-quality-suite
More information about smile/magento2-smilelab-quality-suite
Files in smile/magento2-smilelab-quality-suite
Package magento2-smilelab-quality-suite
Short Description Complete suite of quality tools for Magento projects.
License OSL-3.0
Informations about the package magento2-smilelab-quality-suite
Smile Lab Quality Suite (Magento)
This library provides coding standards / rulesets that can be used on Magento projects.
It includes the following packages:
Table of content
- Installation
- Configuration
- Usage
- Fix your code
- Ci
- Baseline
Installation
Configuration
Create three files at the root of your project directory:
Usage
Fix your code
A lot of style errors can be fixed automatically by running this command:
CI
GitHub Workflow
Example of .github/workflows/static-analysis.yaml
file:
GitLab Runner
Example of .gitlab-ci.yml
file:
Baseline
If you want to add this coding standard on an existing project, it might be complicated to fix all issues. The baseline is a mechanism that allows you to keep your legacy code as it is and enforces the quality analysis for the code you will add in the future.
:heavy_exclamation_mark: It is always better to fix all issues. Baseline are a tweak to help you have a fresh start. But keep in mind that all errors (in the baseline or not) must be corrected eventually.
To generate the baselines, run these commands:
For phpstan, you'll need to add the file phpstan-baseline.neon
to the include
part of the phpstan.neon.dist
file and config reportUnmatchedIgnoredErrors: false
to the parameters
part of the same file.
The baseline files must be added to git.
All versions of magento2-smilelab-quality-suite with dependencies
smile/magento2-smilelab-phpcs Version ^3.0
smile/magento2-smilelab-phpmd Version ^2.0
smile/magento2-smilelab-phpstan Version ^1.0