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

Internal error: OxidEsales\EshopCommunity\Core\Autoload\BackwardsCompatibilityClassMapProvider::getMap() #8747

Closed
Akadi-79 opened this issue Jan 20, 2023 · 2 comments

Comments

@Akadi-79
Copy link

Hallo , By running PHPStan in my module i am getting the following error:

Internal error: Internal error: OxidEsales\EshopCommunity\Core\Autoload\BackwardsCompatibilityClassMapProvider::getMap(): Return value must be of type array, int returned in file
/Users/Shared/development/projects_git/oxid6-modules/patch/source/modules/laudert/patch/Core/Events.php
Run PHPStan with -v option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md
Child process error (exit code 1):

By running PHPStan with -v option as mentioned , i am getting the following stack trace:

#0 /Users/Shared/development/projects_git/oxid6-modules/patch/vendor/oxid-esales/oxideshop-ce/source/Core/Autoload/BackwardsCompatibilityAutoload.php(75): OxidEsales\EshopCommunity\Core\Autoload\BackwardsCompatibilityClassMapProvider->getMap()
#1 /Users/Shared/development/projects_git/oxid6-modules/patch/vendor/oxid-esales/oxideshop-ce/source/Core/Autoload/BackwardsCompatibilityAutoload.php(50):
OxidEsales\EshopCommunity\Core\Autoload\BackwardsCompatibilityAutoload::getBackwardsCompatibilityClassMap()
#2 /Users/Shared/development/projects_git/oxid6-modules/patch/vendor/oxid-esales/oxideshop-ce/source/Core/Autoload/BackwardsCompatibilityAutoload.php(35):
OxidEsales\EshopCommunity\Core\Autoload\BackwardsCompatibilityAutoload::getUnifiedNamespaceClassForBcAlias('laudert_patch')
#3 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(278):
OxidEsales\EshopCommunity\Core\Autoload\BackwardsCompatibilityAutoload::autoload('laudert_patch')
#4 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php(62):
PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator::PHPStan\Reflection\BetterReflection\SourceLocator{closure}()
#5 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(290):
PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::withStreamWrapperOverride(Object(Closure))
#6 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(119):
PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateClassByName('laudert_patch')
#7 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php(26):
PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector), Object(PHPStan\BetterReflection\Identifier\Identifier))
#8 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/MemoizingSourceLocator.php(33):
PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector), Object(PHPStan\BetterReflection\Identifier\Identifier))
#9 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflector/DefaultReflector.php(32):
PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector), Object(PHPStan\BetterReflection\Identifier\Identifier))
#10 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php(45):
PHPStan\BetterReflection\Reflector\DefaultReflector->reflectClass('laudert_patch')
#11 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/BetterReflectionProvider.php(149):
PHPStan\Reflection\BetterReflection\Reflector\MemoizingReflector->reflectClass('laudert_patch')
#12 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php(35):
PHPStan\Reflection\BetterReflection\BetterReflectionProvider->hasClass('laudert_patch')
#13 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Type/Constant/ConstantStringType.php(88): PHPStan\Reflection\ReflectionProvider\MemoizingReflectionProvider->hasClass('laudert_patch')
#14 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(435): PHPStan\Type\Constant\ConstantStringType->isClassStringType()
#15 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(412):
PHPStan\Dependency\DependencyResolver->considerArrayForCallableTest(Object(PHPStan\Analyser\MutatingScope), Object(PhpParser\Node\Expr\Array_))
#16 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(158): PHPStan\Dependency\DependencyResolver->resolveDependencies(Object(PhpParser\Node\Expr\Array_),
Object(PHPStan\Analyser\MutatingScope))
#17 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Node/ClassStatementsGatherer.php(98): PHPStan\Analyser\FileAnalyser->PHPStan\Analyser{closure}(Object(PhpParser\Node\Expr\Array_),
Object(PHPStan\Analyser\MutatingScope))
#18 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(506): PHPStan\Node\ClassStatementsGatherer->invoke(Object(PhpParser\Node\Expr\Array),
Object(PHPStan\Analyser\MutatingScope))
#19 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2478): PHPStan\Analyser\NodeScopeResolver::PHPStan\Analyser{closure}(Object(PhpParser\Node\Expr\Array),
Object(PHPStan\Analyser\MutatingScope))
#20 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1471): PHPStan\Analyser\NodeScopeResolver->callNodeCallbackWithExpression(Object(Closure),
Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Analyser\ExpressionContext))
#21 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1486): PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\Array_),
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\ExpressionContext))
#22 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2838):
PHPStan\Analyser\NodeScopeResolver->PHPStan\Analyser{closure}(Object(PHPStan\Analyser\MutatingScope))
#23 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1494): PHPStan\Analyser\NodeScopeResolver->processAssignVar(Object(PHPStan\Analyser\MutatingScope),
Object(PhpParser\Node\Expr\StaticPropertyFetch), Object(PhpParser\Node\Expr\Array_), Object(Closure), Object(PHPStan\Analyser\ExpressionContext), Object(Closure), true)
#24 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(558): PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\Assign),
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\ExpressionContext))
#25 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(360): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Expression),
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#26 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(521): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\ClassMethod), Array,
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#27 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(360): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\ClassMethod),
Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer), Object(PHPStan\Analyser\StatementContext))
#28 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3279): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Trait_), Array,
Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer), Object(PHPStan\Analyser\StatementContext))
#29 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3294): PHPStan\Analyser\NodeScopeResolver->processNodesForTraitUse(Object(PhpParser\Node\Stmt\Trait_),
Object(PHPStan\Reflection\ClassReflection), Object(PHPStan\Analyser\MutatingScope), Array, Object(PHPStan\Node\ClassStatementsGatherer))
#30 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3290): PHPStan\Analyser\NodeScopeResolver->processNodesForTraitUse(Array,
Object(PHPStan\Reflection\ClassReflection), Object(PHPStan\Analyser\MutatingScope), Array, Object(PHPStan\Node\ClassStatementsGatherer))
#31 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3294): PHPStan\Analyser\NodeScopeResolver->processNodesForTraitUse(Object(PhpParser\Node\Stmt\Namespace_),
Object(PHPStan\Reflection\ClassReflection), Object(PHPStan\Analyser\MutatingScope), Array, Object(PHPStan\Node\ClassStatementsGatherer))
#32 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3244): PHPStan\Analyser\NodeScopeResolver->processNodesForTraitUse(Array,
Object(PHPStan\Reflection\ClassReflection), Object(PHPStan\Analyser\MutatingScope), Array, Object(PHPStan\Node\ClassStatementsGatherer))
#33 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(703): PHPStan\Analyser\NodeScopeResolver->processTraitUse(Object(PhpParser\Node\Stmt\TraitUse),
Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer))
#34 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(360): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\TraitUse),
Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer), Object(PHPStan\Analyser\StatementContext))
#35 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(599): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Class_), Array,
Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer), Object(PHPStan\Analyser\StatementContext))
#36 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(360): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Class_),
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#37 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(571): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Namespace_), Array,
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#38 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(327): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Namespace_),
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#39 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(175): PHPStan\Analyser\NodeScopeResolver->processNodes(Array, Object(PHPStan\Analyser\MutatingScope),
Object(Closure))
#40 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(148): PHPStan\Analyser\FileAnalyser->analyseFile('/Users/Shared/d...', Array,
Object(PHPStan\Rules\LazyRegistry), Object(PHPStan\Collectors\Registry), NULL)
#41 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): PHPStan\Command\WorkerCommand->PHPStan\Command{closure}(Array)
#42 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/clue/ndjson-react/src/Decoder.php(110): _PHPStan_4dd92cd93\Evenement\EventEmitter->emit('data', Array)
#43 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): _PHPStan_4dd92cd93\Clue\React\NDJson\Decoder->handleData(Array)
#44 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/Util.php(62): _PHPStan_4dd92cd93\Evenement\EventEmitter->emit('data', Array)
#45 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/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...')
#46 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/DuplexResourceStream.php(154): _PHPStan_4dd92cd93\Evenement\EventEmitter->emit('data', Array)
#47 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(201): _PHPStan_4dd92cd93\React\Stream\DuplexResourceStream->handleData(Resource id #3490)
#48 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(173): _PHPStan_4dd92cd93\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL)
#49 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(108): _PHPStan_4dd92cd93\React\EventLoop\StreamSelectLoop->run()
#50 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/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))
#51 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/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))
#52 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/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))
#53 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/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))
#54 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(124): _PHPStan_4dd92cd93\Symfony\Component\Console\Application->run()
#55 phar:///Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(125): _PHPStan_4dd92cd93{closure}()
#56 /Users/Shared/development/projects_git/oxid6-modules/patch/vendor/phpstan/phpstan/phpstan(8): require('phar:///Users/S...')
#57 /Users/Shared/development/projects_git/oxid6-modules/patch/vendor/bin/phpstan(97): include('/Users/Shared/d...')
#58 {main}
Child process error (exit code 1):

I need your help to get ride of this error.

@mergeable mergeable bot closed this as completed Jan 20, 2023
@ondrejmirtes
Copy link
Member

Hi, it'd be nice if you'd create a small reproducing repository that shows the same problem. Thank you.

@ondrejmirtes ondrejmirtes reopened this Jan 20, 2023
@phpstan phpstan deleted a comment from mergeable bot Jan 20, 2023
@github-actions
Copy link

github-actions bot commented Mar 4, 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 4, 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

2 participants