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

[BUGFIX] Safety check for foreach #22

Closed
wants to merge 1 commit into from

Conversation

sabbelasichon
Copy link

Resolves: #21

foreach ($this->aliasMap['classNameToAliasMapping'][$originalClassName] as $aliasClassName) {
if (!$this->classOrInterfaceExists($aliasClassName)) {
class_alias($originalClassName, $aliasClassName);
if(is_array($this->aliasMap['classNameToAliasMapping'][$originalClassName])) {
Copy link
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
Author

Choose a reason for hiding this comment

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

Done.

@helhum
Copy link
Contributor

helhum commented Oct 20, 2021

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

@sbuerk
Copy link

sbuerk commented Jul 27, 2022

@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
Copy link
Contributor

helhum commented Aug 7, 2022

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

Fixed with #20

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

hdietrich-timespin commented Nov 9, 2022

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