class-alias-loader icon indicating copy to clipboard operation
class-alias-loader copied to clipboard

Getting warnings if $this->aliasMap['classNameToAliasMapping'][$originalClassName] is not iterable

Open sabbelasichon opened this issue 4 years ago • 2 comments

When i am running typo3-rector with highest error level i am getting warnings with message "Warning: Invalid argument supplied for foreach() in ClassAliasLoader.php on line 186".

I cannot tell what´s the root of the problem or why stepping into the foreach anyways. But maybe it is safe to check if $this->aliasMap['classNameToAliasMapping'][$originalClassName] is iterable.

sabbelasichon avatar Apr 21 '21 22:04 sabbelasichon

Fixed with #20

helhum avatar Aug 07 '22 14:08 helhum

Fixed with #20

No is not fixed.

The function TYPO3\ClassAliasLoader::loadOriginalClassAndSetAliases($originalClassName) don't use the fixed function TYPO3\ClassAliasLoader::getOriginalClassName($aliasOrClassName). And so the Issue https://github.com/TYPO3/class-alias-loader/pull/22 and https://github.com/TYPO3/class-alias-loader/issues/21 is not solved!

hdietrich-timespin avatar Nov 09 '22 15:11 hdietrich-timespin