Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
fi

- name: Test with PHPUnit
run: vendor/bin/phpunit --no-coverage --testsuite lang
run: PYRAMETER_DISABLED=1 vendor/bin/phpunit --no-coverage --testsuite lang

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the PYRAMETER_DISABLED as an env below instead?

@samsonasik samsonasik Jul 25, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, there is no lang testsuite in this repo, so no test at all in target testsuite. I add that as maybe the lang test suite will be used in the future.

I will try add to env.

@samsonasik samsonasik Jul 25, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paulbalandan I've put PYRAMETER_DISABLED to env below it 👍 883bb65

env:
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"codeigniter4/settings": "^2.1"
},
"require-dev": {
"boundwize/pyrameter": "^0.5",
"boundwize/structarmed": "0.15.2",
"codeigniter/phpstan-codeigniter": "^2.0",
"codeigniter4/devkit": "^1.3",
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<parameter name="report-count" value="30"/>
<parameter name="format" value="table"/>
</bootstrap>
<bootstrap class="Boundwize\Pyrameter\Extension"/>
</extensions>
<logging>
<testdoxHtml outputFile="build/phpunit/testdox.html"/>
Expand Down
51 changes: 51 additions & 0 deletions pyrameter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter Shield.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* 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\DatabaseTestTrait;
use CodeIgniter\Test\FeatureTestTrait;
use Tests\Authentication\Filters\AbstractFilterTestCase;
use Tests\Support\DatabaseTestCase;

return PyrameterConfig::create()
->usesClass(
DatabaseTestTrait::class,
TestKind::Integration,
unless: [FeatureTestTrait::class, AbstractFilterTestCase::class],
)
->usesClass(
DatabaseTestCase::class,
TestKind::Integration,
unless: [FeatureTestTrait::class, AbstractFilterTestCase::class],
)
->usesClass(
FeatureTestTrait::class,
TestKind::Functional,
)
->usesClass(
AbstractFilterTestCase::class,
TestKind::Functional,
)
->usesFunction('copy', TestKind::Integration)
->usesFunction('file_get_contents', TestKind::Integration)
->usesFunction('getcwd', TestKind::Integration)
->usesFunction('is_file', TestKind::Integration)
->usesFunction('unlink', TestKind::Integration)
->targetShape(
unit: ['min' => 40],
functional: ['max' => 20],
integration: ['max' => 50],
e2e: ['max' => 0],
)
->failOnViolation();
Loading