Skip to content

Consent Manager ext integration#197

Merged
iMattPro merged 15 commits into
masterfrom
consent-manager
Jun 20, 2026
Merged

Consent Manager ext integration#197
iMattPro merged 15 commits into
masterfrom
consent-manager

Conversation

@iMattPro

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.83%. Comparing base (096afce) to head (54b3b63).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@iMattPro iMattPro added the WIP label May 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_consent to ads data model + migration, surface it in ACP UI, and wire it into ad rendering (script deferral via type="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.

Comment thread analyser/test/iframe.php
Comment thread tests/analyser/run_test.php
Comment thread tests/functional/functional_base.php Outdated
@iMattPro
iMattPro merged commit 5b9852d into master Jun 20, 2026
38 checks passed
@iMattPro
iMattPro deleted the consent-manager branch June 20, 2026 00:53
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.

3 participants