Merge branch '4.x' into 5.x

This commit is contained in:
nuno maduro
2026-07-06 18:47:25 +01:00
10 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies - name: Cache Composer dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
key: static-php-8.4-${{ matrix.dependency-version }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }} key: static-php-8.4-${{ matrix.dependency-version }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }}
+1 -1
View File
@@ -48,7 +48,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies - name: Cache Composer dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }} key: ${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }}
+2 -2
View File
@@ -58,12 +58,12 @@
] ]
}, },
"require-dev": { "require-dev": {
"mrpunyapal/peststan": "^0.2.10", "mrpunyapal/peststan": "^0.2.11",
"laravel/pao": "^1.1.1", "laravel/pao": "^1.1.1",
"pestphp/pest-dev-tools": "^5.0.0", "pestphp/pest-dev-tools": "^5.0.0",
"pestphp/pest-plugin-browser": "^5.0.0", "pestphp/pest-plugin-browser": "^5.0.0",
"pestphp/pest-plugin-type-coverage": "^5.0.0", "pestphp/pest-plugin-type-coverage": "^5.0.0",
"psy/psysh": "^0.12.23" "psy/psysh": "^0.12.24"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
"prefer-stable": true, "prefer-stable": true,
+4
View File
@@ -4,7 +4,9 @@ declare(strict_types=1);
use Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector; use Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector;
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveDuplicatedReturnSelfDocblockRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector; use Rector\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessUnionReturnDocblockRector;
use Rector\TypeDeclaration\Rector\ClassMethod\NarrowObjectReturnTypeRector; use Rector\TypeDeclaration\Rector\ClassMethod\NarrowObjectReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
@@ -18,6 +20,8 @@ return RectorConfig::configure()
ArrowFunctionDelegatingCallToFirstClassCallableRector::class, ArrowFunctionDelegatingCallToFirstClassCallableRector::class,
NarrowObjectReturnTypeRector::class, NarrowObjectReturnTypeRector::class,
RemoveParentDelegatingConstructorRector::class, RemoveParentDelegatingConstructorRector::class,
RemoveDuplicatedReturnSelfDocblockRector::class,
RemoveUselessUnionReturnDocblockRector::class,
]) ])
->withPreparedSets( ->withPreparedSets(
deadCode: true, deadCode: true,
+1 -1
View File
@@ -130,7 +130,7 @@ final class Expectation
if (getenv('PARATEST') !== false || isset($_SERVER['COLLISION_PRINTER'])) { if (getenv('PARATEST') !== false || isset($_SERVER['COLLISION_PRINTER'])) {
ob_start(); ob_start();
var_dump($this->value, ...$arguments); var_dump($this->value, ...$arguments);
$output = (string) ob_get_clean(); $output = ob_get_clean();
throw new ExpectationFailedException($output); throw new ExpectationFailedException($output);
} }
+5 -2
View File
@@ -94,7 +94,8 @@ final class TestCaseFactory
$filename = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', static fn (array $match): string => strtolower($match['drive']), $filename); $filename = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', static fn (array $match): string => strtolower($match['drive']), $filename);
} }
$filename = str_replace('\\\\', '\\', addslashes((string) realpath($filename))); $realpath = (string) realpath($filename);
$filename = str_replace('\\\\', '\\', addslashes($realpath));
$rootPath = TestSuite::getInstance()->rootPath; $rootPath = TestSuite::getInstance()->rootPath;
$relativePath = str_replace($rootPath.DIRECTORY_SEPARATOR, '', $filename); $relativePath = str_replace($rootPath.DIRECTORY_SEPARATOR, '', $filename);
@@ -149,6 +150,8 @@ final class TestCaseFactory
$attributesCode = Attributes::code($this->attributes); $attributesCode = Attributes::code($this->attributes);
$filenameLiteral = var_export($realpath, true);
$methodsCode = implode('', array_map( $methodsCode = implode('', array_map(
fn (TestCaseMethodFactory $methodFactory): string => $methodFactory->buildForEvaluation(), fn (TestCaseMethodFactory $methodFactory): string => $methodFactory->buildForEvaluation(),
$methods $methods
@@ -166,7 +169,7 @@ final class TestCaseFactory
final class $className extends $baseClass implements $hasPrintableTestCaseClassFQN { final class $className extends $baseClass implements $hasPrintableTestCaseClassFQN {
$traitsCode $traitsCode
public static \$__filename = '$filename'; public static \$__filename = $filenameLiteral;
$methodsCode $methodsCode
} }
+1 -1
View File
@@ -6,7 +6,7 @@ namespace Pest;
function version(): string function version(): string
{ {
return '5.0.0-rc.11'; return '5.0.0-rc.12';
} }
function testDirectory(string $file = ''): string function testDirectory(string $file = ''): string
+4 -1
View File
@@ -219,8 +219,11 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
if (! $watchPatterns->isEnabled()) { if (! $watchPatterns->isEnabled()) {
return false; return false;
} }
if (! $watchPatterns->isLocally()) {
return true;
}
return ! ($watchPatterns->isLocally() && self::argumentPresent('--ci', $arguments)); return ! self::argumentPresent('--ci', $arguments);
} }
/** /**
@@ -1,5 +1,5 @@
Pest Testing Framework 5.0.0-rc.11. Pest Testing Framework 5.0.0-rc.12.
USAGE: pest <file> [options] USAGE: pest <file> [options]
@@ -1,3 +1,3 @@
Pest Testing Framework 5.0.0-rc.11. Pest Testing Framework 5.0.0-rc.12.