Skip to content
Merged
Changes from all 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
10 changes: 8 additions & 2 deletions tests/system/AutoReview/FrameworkCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testDeprecationsAreProperlyVersioned(): void
$deprecationsWithoutVersion = [];

foreach ($this->getSourceFiles() as $file) {
$lines = file($file, FILE_IGNORE_NEW_LINES);
$lines = @file($file, FILE_IGNORE_NEW_LINES);

if ($lines === false) {
continue;
Expand Down Expand Up @@ -156,6 +156,7 @@ private static function getTestClasses(): array
FilesystemIterator::SKIP_DOTS,
),
RecursiveIteratorIterator::CHILD_FIRST,
RecursiveIteratorIterator::CATCH_GET_CHILD,
);

$testClasses = array_map(
Expand Down Expand Up @@ -211,12 +212,17 @@ private function getSourceFiles(): array
FilesystemIterator::SKIP_DOTS,
),
RecursiveIteratorIterator::CHILD_FIRST,
RecursiveIteratorIterator::CATCH_GET_CHILD,
);

/** @var SplFileInfo $file */
foreach ($iterator as $file) {
if ($file->isFile() && str_ends_with($file->getPathname(), '.php')) {
$phpFiles[] = $file->getRealPath();
$realPath = $file->getRealPath();

if ($realPath !== false) {
$phpFiles[] = $realPath;
}
}
}
}
Expand Down
Loading