fix: clear generated code after composer require#81
Merged
dgjlindsay merged 3 commits intomainfrom Apr 14, 2026
Merged
Conversation
Clear stale generated code after composer require during install. Fix proxy base_link_url not being set in "apply immediately" section, causing navigation links to redirect back to localhost. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Port from magento-abn-plugin PR #10. Adds getBrand() and getBrandVersion() to Repository, appends brand query params to payment URL, terms link, and sole trader iframe. Defaults empty (no brand override for Two). Forks override via TWO_BRAND / TWO_BRAND_VERSION env vars in .env.local. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment on lines
+626
to
+630
| var brandParams = config.brand ? `&brand=${config.brand}` : ''; | ||
| if (config.brandVersion) { | ||
| brandParams += `&brandVersion=${config.brandVersion}`; | ||
| } | ||
| const URL = `${config.checkoutPageUrl}/soletrader/signup?businessToken=${this.delegationToken}&autofillToken=${this.autofillToken}&autofillData=${data}${brandParams}`; |
There was a problem hiding this comment.
Brand values are interpolated directly into the URL without encoding. The PHP side correctly uses http_build_query(), but if these env vars ever contain spaces or special chars the URL here will be malformed. Use encodeURIComponent for consistency.
Suggested change
| var brandParams = config.brand ? `&brand=${config.brand}` : ''; | |
| if (config.brandVersion) { | |
| brandParams += `&brandVersion=${config.brandVersion}`; | |
| } | |
| const URL = `${config.checkoutPageUrl}/soletrader/signup?businessToken=${this.delegationToken}&autofillToken=${this.autofillToken}&autofillData=${data}${brandParams}`; | |
| var brandParams = config.brand ? '&brand=' + encodeURIComponent(config.brand) : ''; | |
| if (config.brandVersion) { | |
| brandParams += '&brandVersion=' + encodeURIComponent(config.brandVersion); | |
| } | |
| const URL = `${config.checkoutPageUrl}/soletrader/signup?businessToken=${this.delegationToken}&autofillToken=${this.autofillToken}&autofillData=${data}${brandParams}`; |
There was a problem hiding this comment.
Re-reviewing after new commits. One minor correctness issue flagged inline (missing encodeURIComponent in JS brand params). The core fix (rm -rf /data/generated/code) and the PHP brand param logic are correct. Ready for human approval once the encoding is addressed.
Puvendhan
approved these changes
Apr 14, 2026
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
composer requireduringmake installTest plan
make installcompletes without DI compilation errorsmake testpasses🤖 Generated with Claude Code