Fix service id for EncryptionHelper broken by Mautic 7.2.0 - #12
Closed
back-2-95 wants to merge 1 commit into
Closed
Conversation
Mautic 7.2.0 refactored CoreBundle service registration and dropped the legacy "mautic.helper.encryption" alias for EncryptionHelper, so the container fails to compile with: The service "mautic.integration.hcaptcha" has a dependency on a non-existent service "mautic.helper.encryption". Reference the class directly instead of the removed string id. The class-based service id has been valid since at least Mautic 5.x, so this keeps compatibility with 5.x/6.x/7.x, not just 7.2+. Fixes FireMultimedia#11
|
I tested commit
|
Author
|
Closed in favor of #14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #11.
Mautic 7.2.0 refactored
CoreBundle's service registration (see mautic/mautic#16841) and dropped the legacymautic.helper.encryptionalias forEncryptionHelper. Sibling helpers (CookieHelper,FileUploader, etc.) kept their aliases in that refactor, so this looks like an oversight on Mautic's side rather than an intentional break — but regardless, this plugin'sConfig/config.phphardcodes the now-missing string id, which breaks container compilation on 7.2.0:Fix
Reference
\Mautic\CoreBundle\Helper\EncryptionHelper::classdirectly instead of the string service id. Autodiscovery has always registered classes under their FQCN in addition to any legacy alias, so this class-based id has been valid since at least Mautic 5.x — meaning this change fixes 7.2+ without affecting compatibility with 5.x/6.x/7.1.Test plan
php -l Config/config.phppasses