-
Notifications
You must be signed in to change notification settings - Fork 144
chore: add Pyrameter test-shape enforcement #1358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
samsonasik
merged 7 commits into
codeigniter4:develop
from
samsonasik:chore-add-pyrameter
Jul 25, 2026
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
49624d0
chore(test): add Pyrameter test-shape enforcement
samsonasik 2659cf2
chore: make use of --no-extensions on lang
samsonasik da85f08
chore: make use of --no-extensions on lang
samsonasik bb47997
chore: bump to pyrameter 0.5 and make use of PYRAMETER_DISABLED=1 on…
samsonasik bd0bf1c
update pyrameter setup config to mark AbstractFilterTestCase as funct…
samsonasik 4c0977e
set 40/20/50 for target and enable failOnViolation()
samsonasik 883bb65
set PYRAMETER_DISABLED to env on phpunit-lang
samsonasik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, there is no
langtestsuite in this repo, so no test at all in target testsuite. I add that as maybe thelangtest suite will be used in the future.I will try add to env.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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_DISABLEDtoenvbelow it 👍 883bb65