Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG report surgested from the program... #8788

Closed
michaelvvvvv opened this issue Jan 28, 2023 · 5 comments
Closed

BUG report surgested from the program... #8788

michaelvvvvv opened this issue Jan 28, 2023 · 5 comments

Comments

@michaelvvvvv
Copy link

Bug report

#0 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/polyfill-mbstring/Mbstring.php(440): preg_match('//u', Array) #1 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/polyfill-mbstring/Mbstring.php(416): Symfony\Polyfill\Mbstring\Mbstring::mb_detect_encoding(Array, Array) #2 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/polyfill-mbstring/bootstrap80.php(45): Symfony\Polyfill\Mbstring\Mbstring::mb_check_encoding(Array, 'UTF-8') #3 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Type/Php/StrCaseFunctionsReturnTypeExtension.php(66): mb_check_encoding(Array, 'UTF-8') #4 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(1468): PHPStan\Type\Php\StrCaseFunctionsReturnTypeExtension->getTypeFromFunctionCall(Object(PHPStan\Reflection\Native\NativeFunctionReflection), Object(PhpParser\Node\Expr\FuncCall), Object(PHPStan\Analyser\MutatingScope)) #5 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(557): PHPStan\Analyser\MutatingScope->resolveType('\\strtolower($fi...', Object(PhpParser\Node\Expr\FuncCall)) #6 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2343): PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\FuncCall)) #7 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1540): PHPStan\Analyser\NodeScopeResolver->getFunctionThrowPoint(Object(PHPStan\Reflection\Native\NativeFunctionReflection), Object(PHPStan\Reflection\FunctionVariantWithPhpDocs), Object(PhpParser\Node\Expr\FuncCall), Object(PHPStan\Analyser\MutatingScope)) #8 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(989): PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\FuncCall), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\ExpressionContext)) #9 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(360): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Switch_), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) #10 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(722): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Foreach_), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) #11 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(360): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Foreach_), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) #12 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(646): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\If_), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) #13 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(360): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\If_), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) #14 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(646): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\If_), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) #15 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(327): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\If_), Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext)) #16 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(175): PHPStan\Analyser\NodeScopeResolver->processNodes(Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure)) #17 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(148): PHPStan\Analyser\FileAnalyser->analyseFile('/mnt/samba/web/...', Array, Object(PHPStan\Rules\LazyRegistry), Object(PHPStan\Collectors\Registry), NULL) #18 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): PHPStan\Command\WorkerCommand->PHPStan\Command\{closure}(Array) #19 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/clue/ndjson-react/src/Decoder.php(110): _PHPStan_4dd92cd93\Evenement\EventEmitter->emit('data', Array) #20 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): _PHPStan_4dd92cd93\Clue\React\NDJson\Decoder->handleData(Array) #21 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/Util.php(62): _PHPStan_4dd92cd93\Evenement\EventEmitter->emit('data', Array) #22 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): _PHPStan_4dd92cd93\React\Stream\Util::_PHPStan_4dd92cd93\React\Stream\{closure}('{"action":"anal...') #23 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/DuplexResourceStream.php(154): _PHPStan_4dd92cd93\Evenement\EventEmitter->emit('data', Array) #24 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(201): _PHPStan_4dd92cd93\React\Stream\DuplexResourceStream->handleData(Resource id #3495) #25 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(173): _PHPStan_4dd92cd93\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL) #26 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(108): _PHPStan_4dd92cd93\React\EventLoop\StreamSelectLoop->run() #27 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Command/Command.php(259): PHPStan\Command\WorkerCommand->execute(Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Output\ConsoleOutput)) #28 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(870): _PHPStan_4dd92cd93\Symfony\Component\Console\Command\Command->run(Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Output\ConsoleOutput)) #29 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(261): _PHPStan_4dd92cd93\Symfony\Component\Console\Application->doRunCommand(Object(PHPStan\Command\WorkerCommand), Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Output\ConsoleOutput)) #30 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(157): _PHPStan_4dd92cd93\Symfony\Component\Console\Application->doRun(Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_4dd92cd93\Symfony\Component\Console\Output\ConsoleOutput)) #31 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(124): _PHPStan_4dd92cd93\Symfony\Component\Console\Application->run() #32 phar:///backup/PHPStan/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(125): _PHPStan_4dd92cd93\{closure}() #33 /backup/PHPStan/vendor/phpstan/phpstan/phpstan(8): require('phar:///backup/...') #34 /backup/PHPStan/vendor/bin/phpstan(120): include('/backup/PHPStan...') #35 {main} Child process error (exit code 1): Child process error (exit code 1):

@mergeable
Copy link

mergeable bot commented Jan 28, 2023

This bug report is missing a link to reproduction at phpstan.org/try.

It will most likely be closed after manual review.

@canvural
Copy link
Contributor

I think a similar thing was fixed recently. Are you using the latest version? If not, try to update and try again.

@michaelvvvvv
Copy link
Author

I think it's quite new , installed it in this week.

PHPStan - PHP Static Analysis Tool 1.9.14

@ondrejmirtes
Copy link
Member

The PHPStan version is encoded in the stack trace :) The namespace of prefixed dependencies begins with _PHPStan_4dd92cd93 which is the commit :) So phpstan/phpstan-src@4dd92cd93 is 1.9.14 :)

This has already been reported: #8538

The workaround is to install mbstring PHP extension.

@github-actions
Copy link

github-actions bot commented Mar 1, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants