SpearDevs Shopware PHP Standards package contains:
- Psalm
- Easy Coding Standards
- PHPUnit
- Shopware testing bootstrap
- GitHub Action workflow
{
"extra": {
"symfony": {
"endpoint": [
"https://api.github.com/repos/speardevs/recipes/contents/index.json",
"flex://defaults"
]
}
},
"repositories": [
{
"type": "vcs",
"url": "[email protected]:SpearDevs/ShopwarePHPStandards.git"
}
]
}
composer require speardevs/shopware-php-standards --dev
Generate token here and
create new GitHub Action's secret key SPEARDEVS_PIPELINES_KEY
with generated token.
Default PHP version in package is defined as 8.2
. If adjustment is needed then update following files:
.github/workflows/speardevs-shopware-coding-standards.yaml
- set correct PHP version forphp-version
keyrector.php
- replaceLevelSetList::UP_TO_PHP_82
set list name with proper version; example:LevelSetList::UP_TO_PHP_74
Remember to change the plugin name in tests/TestBoostrap.php
.
If project has no implemented tests, comment Run PHPUnit tests
step in pipeline defined
in .github/workflows/speardevs-shopware-coding-standards.yaml
to pass correctly job.