Fix Mautic 7.2 EncryptionHelper injection and cover integration instantiation - #14
Open
AlexanderZlobinM1 wants to merge 1 commit into
Conversation
3 tasks
|
Code looks good and valid |
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.
Mautic 7.2.0 no longer registers
mautic.helper.encryption, so this plugin prevents a fresh container from compiling. This fixes the service reference for hCaptcha, reCAPTCHA and Turnstile by registering a plugin-scoped alias for the existingEncryptionHelperservice inConfig/services.phpand using that alias in the legacy integration argument lists.Fixes #11. Related to #12: I tested its exact commit
39ce1b2ee81141aa800b8876961420b3e96be30aon a Mautic 7.2.0 installation. It fixes container compilation, but creating the integration then fails:Mautic's
ServicePass::processArgument()treats arguments containing a backslash as literal class-name strings, so puttingEncryptionHelper::classdirectly inConfig/config.phpdoes not inject the service. The local alias avoids that legacy-parser behavior without restoring a global core alias or creating a second helper instance.The included regression script compiles a fresh container and actually retrieves all three integration services; compilation alone would miss the failure in #12. Its temporary cache is removed afterward. Both legacy argument lists use the same alias; the CAPTCHA logic and existing settings are unchanged.
Validation on a Mautic 7.2.0 / PHP 8.4.23 server:
a1c1795): reproduced the missingmautic.helper.encryptionerror.39ce1b2): reproduced the constructor TypeError above.cache:clear --env=prod --no-debugsucceeds.git diff --checkpass.Older Mautic versions and live provider challenge verification have not been runtime-tested in this contribution.