From 487ac82360f2faae12280d5dc74c1355f8fd6acd Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 15 Jul 2026 20:46:52 +0700 Subject: [PATCH 1/4] chore(test): add Pyrameter test-shape enforcement --- .gitattributes | 1 + composer.json | 1 + phpunit.xml.dist | 1 + pyrameter.php | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 pyrameter.php diff --git a/.gitattributes b/.gitattributes index 4e9eca84d..fb192d9bc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,6 +13,7 @@ /phpstan-baseline.php export-ignore /phpstan.neon.dist export-ignore /phpunit.xml.dist export-ignore +/pyrameter.php export-ignore /psalm_autoload.php export-ignore /psalm-baseline.xml export-ignore /psalm.xml export-ignore diff --git a/composer.json b/composer.json index d621181c3..e74e73409 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "codeigniter4/settings": "^2.1" }, "require-dev": { + "boundwize/pyrameter": "^0.4.4", "boundwize/structarmed": "0.14.16", "codeigniter/phpstan-codeigniter": "^2.0", "codeigniter4/devkit": "^1.3", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4d82a9068..e406d54f0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -34,6 +34,7 @@ + diff --git a/pyrameter.php b/pyrameter.php new file mode 100644 index 000000000..4c04af314 --- /dev/null +++ b/pyrameter.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +use Boundwize\Pyrameter\Config\PyrameterConfig; +use Boundwize\Pyrameter\TestKind; +use CodeIgniter\Test\FeatureTestTrait; +use Tests\Support\DatabaseTestCase; + +return PyrameterConfig::defaults() + ->usesClass( + DatabaseTestCase::class, + TestKind::Integration, + unless: [FeatureTestTrait::class], + ) + ->usesClass( + FeatureTestTrait::class, + TestKind::Functional, + ) + ->targetShape( + unit: ['min' => 40], + functional: ['max' => 10], + integration: ['max' => 50], + e2e: ['max' => 0], + ) + ->failOnViolation(); From 57bd13f323ec09b6e4c73c9a503b1a7625494929 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 15 Jul 2026 20:53:51 +0700 Subject: [PATCH 2/4] chore: make use of --no-extensions on lang --- .github/workflows/phpunit-lang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-lang.yml b/.github/workflows/phpunit-lang.yml index 877f5f81a..13eb9d660 100644 --- a/.github/workflows/phpunit-lang.yml +++ b/.github/workflows/phpunit-lang.yml @@ -59,7 +59,7 @@ jobs: fi - name: Test with PHPUnit - run: vendor/bin/phpunit --no-coverage --testsuite lang + run: vendor/bin/phpunit --no-coverage --testsuite --no-extensions lang env: TERM: xterm-256color TACHYCARDIA_MONITOR_GA: enabled From e147b738c8d4e1b01b3581710a6348ce56eaebfa Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 15 Jul 2026 20:55:07 +0700 Subject: [PATCH 3/4] chore: make use of --no-extensions on lang --- .github/workflows/phpunit-lang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-lang.yml b/.github/workflows/phpunit-lang.yml index 13eb9d660..1bcf59263 100644 --- a/.github/workflows/phpunit-lang.yml +++ b/.github/workflows/phpunit-lang.yml @@ -59,7 +59,7 @@ jobs: fi - name: Test with PHPUnit - run: vendor/bin/phpunit --no-coverage --testsuite --no-extensions lang + run: vendor/bin/phpunit --no-coverage --no-extensions --testsuite lang env: TERM: xterm-256color TACHYCARDIA_MONITOR_GA: enabled From 2bf508dc8f1f7d2ceb8bf917250fed396ef462de Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 15 Jul 2026 21:06:59 +0700 Subject: [PATCH 4/4] chore: bump to pyrameter 0.5 and make use of PYRAMETER_DISABLED=1 on specific lang test suite --- .github/workflows/phpunit-lang.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit-lang.yml b/.github/workflows/phpunit-lang.yml index 1bcf59263..04c8b00e1 100644 --- a/.github/workflows/phpunit-lang.yml +++ b/.github/workflows/phpunit-lang.yml @@ -59,7 +59,7 @@ jobs: fi - name: Test with PHPUnit - run: vendor/bin/phpunit --no-coverage --no-extensions --testsuite lang + run: PYRAMETER_DISABLED=1 vendor/bin/phpunit --no-coverage --testsuite lang env: TERM: xterm-256color TACHYCARDIA_MONITOR_GA: enabled diff --git a/composer.json b/composer.json index e74e73409..37a028450 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "codeigniter4/settings": "^2.1" }, "require-dev": { - "boundwize/pyrameter": "^0.4.4", + "boundwize/pyrameter": "^0.5", "boundwize/structarmed": "0.14.16", "codeigniter/phpstan-codeigniter": "^2.0", "codeigniter4/devkit": "^1.3",