TYPO3 / class-alias-loader

Composer Plugin to provide aliases to PHP classes that have been renamed
MIT License
43 stars 12 forks source link

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

Open sabbelasichon opened 3 years ago

sabbelasichon commented 3 years ago

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.

helhum commented 2 years ago

Fixed with #20

hdietrich-timespin commented 1 year ago

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!