Skip to content

[BUGFIX] Safety check for foreach#22

Closed
sabbelasichon wants to merge 1 commit into
TYPO3:mainfrom
sabbelasichon:issue-21
Closed

[BUGFIX] Safety check for foreach#22
sabbelasichon wants to merge 1 commit into
TYPO3:mainfrom
sabbelasichon:issue-21

Conversation

@sabbelasichon

Copy link
Copy Markdown

Resolves: #21

Comment thread src/ClassAliasLoader.php Outdated
foreach ($this->aliasMap['classNameToAliasMapping'][$originalClassName] as $aliasClassName) {
if (!$this->classOrInterfaceExists($aliasClassName)) {
class_alias($originalClassName, $aliasClassName);
if(is_array($this->aliasMap['classNameToAliasMapping'][$originalClassName])) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor remark: Can you add a space between the "if" and the "(" so it is consistent? We badly need some CI checks in this package ;)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@helhum

helhum commented Oct 20, 2021

Copy link
Copy Markdown
Contributor

Could it be that this would be fixed with #20 as well?

@sbuerk

sbuerk commented Jul 27, 2022

Copy link
Copy Markdown

@bmack @helhum This PR would also help to fix a functional test failure in core v11 with PHP 8.2. From myside, the change seems to be ok.

Any change to get this "merged" and a "release" so we can raise this package in TYPO3 core ? (If nothing speaks against it)

@helhum

helhum commented Aug 7, 2022

Copy link
Copy Markdown
Contributor

Could it be that this would be fixed with #20 as well?

Fixed with #20

@helhum helhum closed this Aug 7, 2022
@hdietrich-timespin

hdietrich-timespin commented Nov 9, 2022

Copy link
Copy Markdown

Could it be that this would be fixed with #20 as well?

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 #22 and #21 is not solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

7 participants