Compare commits

...

4 Commits

Author SHA1 Message Date
e54e4a0178 release: 4.0.3 2025-08-24 15:17:23 +01:00
7749775f50 chore: uses phpunit 12.3.6 2025-08-24 15:17:19 +01:00
f11f3aa0a4 Merge pull request #1464 from gehrisandro/sandro/prevent-duplicate-attributes
Prevent duplicate attributes
2025-08-23 22:43:15 +01:00
33817013fe Prevent duplicate attributes 2025-08-23 12:35:32 +02:00
5 changed files with 11 additions and 6 deletions

View File

@ -25,12 +25,12 @@
"pestphp/pest-plugin-arch": "^4.0.0",
"pestphp/pest-plugin-mutate": "^4.0.1",
"pestphp/pest-plugin-profanity": "^4.0.1",
"phpunit/phpunit": "^12.3.5",
"phpunit/phpunit": "^12.3.6",
"symfony/process": "^7.3.0"
},
"conflict": {
"filp/whoops": "<2.18.3",
"phpunit/phpunit": ">12.3.5",
"phpunit/phpunit": ">12.3.6",
"sebastian/exporter": "<7.0.0",
"webmozart/assert": "<1.11.0"
},

View File

@ -759,7 +759,12 @@ final class TestCall // @phpstan-ignore-line
$this->testSuite->tests->set($this->testCaseMethod);
if (! is_null($testCase = $this->testSuite->tests->get($this->filename))) {
$testCase->attributes = array_merge($testCase->attributes, $this->testCaseFactoryAttributes);
$attributesToMerge = array_filter(
$this->testCaseFactoryAttributes,
fn (Attribute $attributeToMerge): bool => array_filter($testCase->attributes, fn (Attribute $attribute): bool => serialize($attributeToMerge) === serialize($attribute)) === []
);
$testCase->attributes = array_merge($testCase->attributes, $attributesToMerge);
}
}
}

View File

@ -6,7 +6,7 @@ namespace Pest;
function version(): string
{
return '4.0.2';
return '4.0.3';
}
function testDirectory(string $file = ''): string

View File

@ -1,5 +1,5 @@
Pest Testing Framework 4.0.2.
Pest Testing Framework 4.0.3.
USAGE: pest <file> [options]

View File

@ -1,3 +1,3 @@
Pest Testing Framework 4.0.2.
Pest Testing Framework 4.0.3.