Enhance offset access by defining various access modes, and restrict which ones are available for DOM classes #19001
Annotations
2 errors and 1 warning
Test
Internal error: Internal error: Too few arguments to function PHPStan\Type\ObjectType::isExtraOffsetAccessibleClass(), 0 passed in /home/runner/work/phpstan-src/phpstan-src/src/Type/ObjectType.php on line 922 and exactly 1 expected while analysing file /home/runner/work/phpstan-src/phpstan-src/stubs/iterable.stub
Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml:
## /home/runner/work/phpstan-src/phpstan-src/src/Type/ObjectType.php(1079)
#0 /home/runner/work/phpstan-src/phpstan-src/src/Type/ObjectType.php(922): PHPStan\Type\ObjectType->isExtraOffsetAccessibleClass()
#1 /home/runner/work/phpstan-src/phpstan-src/src/Rules/MissingTypehintCheck.php(78): PHPStan\Type\ObjectType->getIterableValueType()
#2 /home/runner/work/phpstan-src/phpstan-src/src/Type/TypeTraverser.php(52): PHPStan\Rules\MissingTypehintCheck->PHPStan\Rules\{closure}()
#3 /home/runner/work/phpstan-src/phpstan-src/src/Type/TypeTraverser.php(40): PHPStan\Type\TypeTraverser->mapInternal()
#4 /home/runner/work/phpstan-src/phpstan-src/src/Rules/MissingTypehintCheck.php(91): PHPStan\Type\TypeTraverser::map()
#5 /home/runner/work/phpstan-src/phpstan-src/src/Rules/Methods/MissingMethodReturnTypehintRule.php(53): PHPStan\Rules\MissingTypehintCheck->getIterableTypesWithMissingValueTypehint()
#6 /home/runner/work/phpstan-src/phpstan-src/src/Analyser/FileAnalyser.php(112): PHPStan\Rules\Methods\MissingMethodReturnTypehintRule->processNode()
#7 /home/runner/work/phpstan-src/phpstan-src/src/Node/ClassStatementsGatherer.php(140): PHPStan\Analyser\FileAnalyser->PHPStan\Analyser\{closure}()
#8 /home/runner/work/phpstan-src/phpstan-src/src/Analyser/NodeScopeResolver.php(675): PHPStan\Node\ClassStatementsGatherer->__invoke()
#9 /home/runner/work/phpstan-src/phpstan-src/src/Analyser/NodeScopeResolver.php(349): PHPStan\Analyser\NodeScopeResolver->processStmtNode()
#10 /home/runner/work/phpstan-src/phpstan-src/src/Analyser/NodeScopeResolver.php(875): PHPStan\Analyser\NodeScopeResolver->processStmtNodes()
#11 /home/runner/work/phpstan-src/phpstan-src/src/Analyser/NodeScopeResolver.php(304): PHPStan\Analyser\NodeScopeResolver->processStmtNode()
#12 /home/runner/work/phpstan-src/phpstan-src/src/Analyser/FileAnalyser.php(214): PHPStan\Analyser\NodeScopeResolver->processNodes()
#13 /home/runner/work/phpstan-src/phpstan-src/src/PhpDoc/StubValidator.php(149): PHPStan\Analyser\FileAnalyser->analyseFile()
#14 /home/runner/work/phpstan-src/phpstan-src/src/Command/AnalyseApplication.php(87): PHPStan\PhpDoc\StubValidator->validate()
#15 /home/runner/work/phpstan-src/phpstan-src/src/Command/AnalyseCommand.php(284): PHPStan\Command\AnalyseApplication->analyse()
#16 /home/runner/work/phpstan-src/phpstan-src/vendor/symfony/console/Command/Command.php(298): PHPStan\Command\AnalyseCommand->execute()
#17 /home/runner/work/phpstan-src/phpstan-src/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#18 /home/runner/work/phpstan-src/phpstan-src/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#19 /home/runner/work/phpstan-src/phpstan-src/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#20 /home/runner/work/phpstan-src/phpstan-src/bin/phpstan(156): Symfony\Component\Console\Application->run()
#21 /home/runner/work/phpstan-src/phpstan-src/bin/phpstan(157): {closure}()
#22 {main}
|
Test
Process completed with exit code 1.
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Loading