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

Fix the legacy registered hooks being overwritten by the annotation ones #2418

Merged
merged 2 commits into from Feb 24, 2023

Conversation

qzminski
Copy link
Member

If you have any hooks that are registered in the legacy way:

// config/config.php
$GLOBALS['ISO_HOOKS']['generateProduct'][] = […];

They will get overwritten if there is at least one hook registered with annotations:

use Isotope\ServiceAnnotation\IsotopeHook;

/**
 * @IsotopeHook("generateProduct")
 */
class MyListener {
    // …
}

This pull request aims to fix that.

@qzminski qzminski added the bug label Feb 13, 2023
@qzminski qzminski self-assigned this Feb 13, 2023
@aschempp
Copy link
Member

@qzminski can you please check if everything still works as expected with my changes?

@qzminski
Copy link
Member Author

I can confirm it works as expected.

@aschempp aschempp merged commit 88595f5 into 2.8 Feb 24, 2023
@aschempp aschempp deleted the bugfix/hooks-overwrite branch February 24, 2023 20:53
@aschempp aschempp added this to the 2.8.10 milestone Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants