diff --git a/composer.json b/composer.json index c22f0044..c0e9dcaf 100644 --- a/composer.json +++ b/composer.json @@ -25,13 +25,13 @@ "pestphp/pest-plugin-arch": "^5.0.0", "pestphp/pest-plugin-mutate": "^5.0.2", "pestphp/pest-plugin-profanity": "^5.0.0", - "phpunit/phpunit": "^13.3.3", - "symfony/process": "^8.1.6" + "phpunit/phpunit": "^13.3.4", + "symfony/process": "^8.1.7" }, "conflict": { "filp/whoops": "<2.18.3", "laravel/boost": "<2.6.0", - "phpunit/phpunit": ">13.3.3", + "phpunit/phpunit": ">13.3.4", "sebastian/exporter": "<7.0.0", "webmozart/assert": "<1.11.0" }, diff --git a/tests/Fixtures/Tia/Project.php b/tests/Fixtures/Tia/Project.php index 04d9f463..fe0e5941 100644 --- a/tests/Fixtures/Tia/Project.php +++ b/tests/Fixtures/Tia/Project.php @@ -519,13 +519,21 @@ final class Project throw new RuntimeException(sprintf('Unable to create [%s].', $directory)); } - if (@link($from, $to) || @copy($from, $to)) { + if ((self::shareDevice($from, $directory) && @link($from, $to)) || @copy($from, $to)) { return; } throw new RuntimeException(sprintf('Unable to mirror [%s] into [%s].', $from, $to)); } + private static function shareDevice(string $from, string $directory): bool + { + $source = @stat($from); + $target = @stat($directory); + + return $source !== false && $target !== false && $source['dev'] === $target['dev']; + } + /** * @return iterable<\SplFileInfo> */