Consent Manager ext integration#197
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #197 +/- ##
============================================
+ Coverage 98.67% 98.83% +0.16%
- Complexity 285 342 +57
============================================
Files 38 40 +2
Lines 907 1032 +125
============================================
+ Hits 895 1020 +125
Misses 12 12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Integrates phpBB Consent Manager with the Ads extension by adding a per-ad “Require marketing consent” option, deferring executable ad scripts until marketing consent is granted, and extending the ad code analyser to surface consent-related guidance.
Changes:
- Add
ad_consentto ads data model + migration, surface it in ACP UI, and wire it into ad rendering (script deferral viatype="text/plain"+data-consent-category="marketing"). - Register the extension with Consent Manager and add analyser tests for marketing-consent recommendations and iframe usage.
- Expand/adjust unit + functional tests to cover new consent behavior and analyser context passing.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/functional/functional_base.php | Allow passing custom ad code into functional helper. |
| tests/event/setup_ads_consentmanager_test.php | New tests asserting script deferral behavior under Consent Manager. |
| tests/event/main_listener_test.php | Assert Consent Manager registration event + behavior. |
| tests/controller/helper_test.php | Update helper expectations to include ad_consent. |
| tests/controller/admin_input_test.php | Update form parsing tests to include ad_consent. |
| tests/controller/admin_controller_test.php | Update analyser invocation expectations to include form context. |
| tests/analyser/run_test.php | Extend analyser integration tests for marketing consent + iframe notices. |
| tests/analyser/analyser_base.php | Wire config into analyser test instantiation for marketing consent. |
| tests/ad/prepare_ad_code_test.php | New tests for consent-aware script deferral and Google Consent Mode allowlist. |
| tests/ad/get_ads_test.php | Ensure get_ads() includes ad_consent in returned rows. |
| tests/ad/get_ad_test.php | Ensure get_ad() includes ad_consent. |
| migrations/v20x/m6_ad_consent_option.php | Add ad_consent BOOL column (default on). |
| language/en/common.php | Add Consent Manager registration label/description strings. |
| language/en/acp.php | Add ACP strings for consent toggle + new analyser messages. |
| event/main_listener.php | Defer ad code via prepare_ad_code() when marketing consent is enabled; register with Consent Manager. |
| controller/helper.php | Assign AD_CONSENT into ACP template vars (default on). |
| controller/admin_input.php | Read ad_consent from request into form data. |
| controller/admin_controller.php | Pass full form context to analyser; expose Consent Manager availability to template. |
| config/analyser.yml | Register new analyser tests (marketing_consent, iframe). |
| analyser/test/untrusted_connection.php | Update analyser test interface signature to accept context. |
| analyser/test/test_interface.php | Extend analyser test interface to accept optional context array. |
| analyser/test/script_without_async.php | Update analyser test interface signature to accept context. |
| analyser/test/marketing_consent.php | New analyser test recommending marketing-consent setting based on ad code + context. |
| analyser/test/location_href.php | Update analyser test interface signature to accept context. |
| analyser/test/iframe.php | New analyser test warning on iframe usage. |
| analyser/test/alert.php | Update analyser test interface signature to accept context. |
| analyser/manager.php | Pass context into analyser tests. |
| adm/style/manage_ads.html | Add ACP radio toggle for per-ad consent when Consent Manager is available. |
| ad/manager.php | Add consent/category constants, Google Consent Mode allowlist, and prepare_ad_code() deferral logic; include ad_consent in get_ads() results. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
iMattPro
force-pushed
the
consent-manager
branch
from
June 19, 2026 05:10
f86f190 to
54b3b63
Compare
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.
No description provided.