From 51a11dbff2b4d3bdf458fc2855e3caa8692ab9e5 Mon Sep 17 00:00:00 2001 From: neothone Date: Sun, 19 Oct 2025 22:00:20 +0200 Subject: [PATCH] Add fastfony/quality-pack (#1870) * Add fastfony/quality-pack * Add .PHONY target quality * typo in filename to copy * install elements now in recipe * rename yml to yaml * copy the directory --- .../1.0/.github/workflows/quality.yaml | 48 +++++++++++++++++++ .../quality-pack/1.0/.twig-cs-fixer.dist.php | 12 +++++ fastfony/quality-pack/1.0/Makefile | 7 +++ fastfony/quality-pack/1.0/manifest.json | 6 +++ 4 files changed, 73 insertions(+) create mode 100644 fastfony/quality-pack/1.0/.github/workflows/quality.yaml create mode 100644 fastfony/quality-pack/1.0/.twig-cs-fixer.dist.php create mode 100644 fastfony/quality-pack/1.0/Makefile create mode 100644 fastfony/quality-pack/1.0/manifest.json diff --git a/fastfony/quality-pack/1.0/.github/workflows/quality.yaml b/fastfony/quality-pack/1.0/.github/workflows/quality.yaml new file mode 100644 index 00000000..b9d8c6f3 --- /dev/null +++ b/fastfony/quality-pack/1.0/.github/workflows/quality.yaml @@ -0,0 +1,48 @@ +name: Quality Checks + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + security-check: + name: Security Check + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Run Composer Security Audit + run: composer audit + + phpstan: + name: PHPStan Analysis + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Run PHPStan + run: vendor/bin/phpstan analyse src tests --no-progress --error-format=github diff --git a/fastfony/quality-pack/1.0/.twig-cs-fixer.dist.php b/fastfony/quality-pack/1.0/.twig-cs-fixer.dist.php new file mode 100644 index 00000000..08edec12 --- /dev/null +++ b/fastfony/quality-pack/1.0/.twig-cs-fixer.dist.php @@ -0,0 +1,12 @@ +addStandard(new \TwigCsFixer\Standard\TwigCsFixer()); + +$config = new Config(); +$config->setRuleset($ruleset); + +return $config; diff --git a/fastfony/quality-pack/1.0/Makefile b/fastfony/quality-pack/1.0/Makefile new file mode 100644 index 00000000..7d690ffe --- /dev/null +++ b/fastfony/quality-pack/1.0/Makefile @@ -0,0 +1,7 @@ +.PHONY: quality + +quality: + composer audit + vendor/bin/php-cs-fixer fix + vendor/bin/twig-cs-fixer lint --fix templates/ + vendor/bin/phpstan analyse src tests diff --git a/fastfony/quality-pack/1.0/manifest.json b/fastfony/quality-pack/1.0/manifest.json new file mode 100644 index 00000000..db8a4dca --- /dev/null +++ b/fastfony/quality-pack/1.0/manifest.json @@ -0,0 +1,6 @@ +{ + "copy-from-recipe": { + ".twig-cs-fixer.dist.php": ".twig-cs-fixer.dist.php", + ".github/": ".github/" + } +}