Skip to content

Internal error in BitBucket pipelines #9974

@erikvanderschaaf

Description

@erikvanderschaaf

Bug report

I've got an error in BitBucket pipelines that says to post the following stack trace, so here it is ;-)

The error says Internal error: Internal error: Internal error. in file /opt/atlassian/pipelines/agent/build/src/Presentation/Image/Product.php

There is also another error that says Child process error (exit code 1):

#1 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Type/ObjectType.php(1234): PHPStan\Type\ObjectType->getEnumCases() 
#2 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Type/UnionType.php(966): PHPStan\Type\ObjectType->getFiniteTypes() 
#3 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Type/UnionType.php(1050): PHPStan\Type\UnionType::PHPStan\Type\{closure}(Object(PHPStan\Type\ObjectType)) 
#4 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Type/UnionType.php(967): PHPStan\Type\UnionType->notBenevolentPickFromTypes(Object(Closure)) 
#5 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/InitializerExprTypeResolver.php(1107): PHPStan\Type\UnionType->getFiniteTypes() 
#6 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(706): PHPStan\Reflection\InitializerExprTypeResolver->resolveIdenticalType(Object(PHPStan\Type\Constant\ConstantIntegerType), Object(PHPStan\Type\UnionType)) 
#7 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(566): PHPStan\Analyser\MutatingScope->resolveType('\\DaisyconIO\\Inf...', Object(PhpParser\Node\Expr\BinaryOp\Identical)) 
#8 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php(197): PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\BinaryOp\Identical)) 
#9 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php(168): PHPStan\Type\Php\ArrayFilterFunctionReturnTypeReturnTypeExtension->processKeyAndItemType(Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Type\IntegerType), Object(PHPStan\Type\UnionType), Object(PhpParser\Node\Expr\Variable), NULL, Object(PhpParser\Node\Expr\BinaryOp\Identical)) 
#10 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php(71): PHPStan\Type\Php\ArrayFilterFunctionReturnTypeReturnTypeExtension->filterByTruthyValue(Object(PHPStan\Analyser\MutatingScope), Object(PhpParser\Node\Expr\Variable), Object(PHPStan\Type\ArrayType), NULL, Object(PhpParser\Node\Expr\BinaryOp\Identical)) 
#11 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(1527): PHPStan\Type\Php\ArrayFilterFunctionReturnTypeReturnTypeExtension->getTypeFromFunctionCall(Object(PHPStan\Reflection\Native\NativeFunctionReflection), Object(PhpParser\Node\Expr\FuncCall), Object(PHPStan\Analyser\MutatingScope)) 
#12 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(566): PHPStan\Analyser\MutatingScope->resolveType('\\array_filter($...', Object(PhpParser\Node\Expr\FuncCall)) 
#13 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(763): PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\FuncCall)) 
#14 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(566): PHPStan\Analyser\MutatingScope->resolveType('$typeFiltered =...', Object(PhpParser\Node\Expr\Assign)) 
#15 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1548): PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\Assign)) 
#16 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(601): PHPStan\Analyser\NodeScopeResolver->findEarlyTerminatingExpr(Object(PhpParser\Node\Expr\Assign), Object(PHPStan\Analyser\MutatingScope)) 
#17 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(387): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Expression), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#18 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(560): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\ClassMethod), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#19 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3602): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\ClassMethod), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#20 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3618): PHPStan\Analyser\NodeScopeResolver->processNodesForCalledMethod(Object(PhpParser\Node\Stmt\Class_), '/opt/atlassian/...', Object(PHPStan\Reflection\ResolvedMethodReflection), Object(Closure)) 
#21 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3614): PHPStan\Analyser\NodeScopeResolver->processNodesForCalledMethod(Array, '/opt/atlassian/...', Object(PHPStan\Reflection\ResolvedMethodReflection), Object(Closure)) 
#22 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3618): PHPStan\Analyser\NodeScopeResolver->processNodesForCalledMethod(Object(PhpParser\Node\Stmt\Namespace_), '/opt/atlassian/...', Object(PHPStan\Reflection\ResolvedMethodReflection), Object(Closure)) 
#23 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3548): PHPStan\Analyser\NodeScopeResolver->processNodesForCalledMethod(Array, '/opt/atlassian/...', Object(PHPStan\Reflection\ResolvedMethodReflection), Object(Closure)) 
#24 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1784): PHPStan\Analyser\NodeScopeResolver->processCalledMethod(Object(PHPStan\Reflection\ResolvedMethodReflection)) 
#25 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1588): PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\MethodCall), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\ExpressionContext)) 
#26 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2938): PHPStan\Analyser\NodeScopeResolver->PHPStan\Analyser\{closure}(Object(PHPStan\Analyser\MutatingScope)) 
#27 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1596): PHPStan\Analyser\NodeScopeResolver->processAssignVar(Object(PHPStan\Analyser\MutatingScope), Object(PhpParser\Node\Expr\Variable), Object(PhpParser\Node\Expr\MethodCall), Object(Closure), Object(PHPStan\Analyser\ExpressionContext), Object(Closure), true) 
#28 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(602): PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\Assign), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\ExpressionContext)) 
#29 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(387): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Expression), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#30 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1098): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\TryCatch), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#31 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(387): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\TryCatch), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#32 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(560): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\ClassMethod), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#33 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(387): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\ClassMethod), Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer), Object(PHPStan\Analyser\StatementContext)) 
#34 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(643): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Class_), Array, Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer), Object(PHPStan\Analyser\StatementContext)) 
#35 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(387): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Class_), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#36 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(615): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Namespace_), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#37 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(356): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Namespace_), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) 
#38 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(166): PHPStan\Analyser\NodeScopeResolver->processNodes(Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure)) 
#39 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(132): PHPStan\Analyser\FileAnalyser->analyseFile('/opt/atlassian/...', Array, Object(PHPStan\Rules\LazyRegistry), Object(PHPStan\Collectors\Registry), NULL) 
#40 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): PHPStan\Command\WorkerCommand->PHPStan\Command\{closure}(Array) 
#41 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/clue/ndjson-react/src/Decoder.php(117): _PHPStan_1623582d5\Evenement\EventEmitter->emit('data', Array) 
#42 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): _PHPStan_1623582d5\Clue\React\NDJson\Decoder->handleData(Array) 
#43 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/Util.php(62): _PHPStan_1623582d5\Evenement\EventEmitter->emit('data', Array) 
#44 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): _PHPStan_1623582d5\React\Stream\Util::_PHPStan_1623582d5\React\Stream\{closure}('{"action":"anal...') 
#45 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/DuplexResourceStream.php(154): _PHPStan_1623582d5\Evenement\EventEmitter->emit('data', Array) 
#46 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(201): _PHPStan_1623582d5\React\Stream\DuplexResourceStream->handleData(Resource id #3725) 
#47 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(173): _PHPStan_1623582d5\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL) 
#48 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(98): _PHPStan_1623582d5\React\EventLoop\StreamSelectLoop->run() 
#49 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Command/Command.php(259): PHPStan\Command\WorkerCommand->execute(Object(_PHPStan_1623582d5\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_1623582d5\Symfony\Component\Console\Output\ConsoleOutput)) 
#50 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(870): _PHPStan_1623582d5\Symfony\Component\Console\Command\Command->run(Object(_PHPStan_1623582d5\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_1623582d5\Symfony\Component\Console\Output\ConsoleOutput)) 
#51 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(261): _PHPStan_1623582d5\Symfony\Component\Console\Application->doRunCommand(Object(PHPStan\Command\WorkerCommand), Object(_PHPStan_1623582d5\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_1623582d5\Symfony\Component\Console\Output\ConsoleOutput)) 
#52 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(157): _PHPStan_1623582d5\Symfony\Component\Console\Application->doRun(Object(_PHPStan_1623582d5\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_1623582d5\Symfony\Component\Console\Output\ConsoleOutput)) 
#53 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(124): _PHPStan_1623582d5\Symfony\Component\Console\Application->run() 
#54 phar:///opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(125): _PHPStan_1623582d5\{closure}() 
#55 /opt/atlassian/pipelines/agent/build/vendor/phpstan/phpstan/phpstan(7): require('phar:///opt/atl...') 
#56 /opt/atlassian/pipelines/agent/build/vendor/bin/phpstan(115): include('/opt/atlassian/...') 
#57 {main}

Code snippet that reproduces the problem

No response

Expected output

I expected phpstan to analyse the code in the file

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions