Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Sep 4, 2024
1 parent f6fc2b7 commit 38a613c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
use Roave\BetterReflection\SourceLocator\SourceStubber\Exception\CouldNotFindPhpStormStubs;
use Roave\BetterReflection\SourceLocator\SourceStubber\PhpStormStubs\CachingVisitor;
use Roave\BetterReflection\Util\ConstantNodeChecker;
use SeekableIterator;
use SimpleXMLElement;
use SplFixedArray;
use SplObjectStorage;
use Traversable;

use function array_change_key_case;
Expand Down Expand Up @@ -492,6 +494,11 @@ private function replaceExtendsOrImplementsByPhpVersion(string $className, array
$modifiedNames[] = new Node\Name\FullyQualified(Traversable::class);
continue;
}
} elseif ($className === SplObjectStorage::class) {
if ($name === SeekableIterator::class && $this->phpVersion < 80400) {
$modifiedNames[] = new Node\Name\FullyQualified(Iterator::class);
continue;
}
}

if ($this->getClassNodeData($name) === null) {
Expand Down

0 comments on commit 38a613c

Please sign in to comment.