Skip to content

Feat: prepare v4.7.2 - #373

Merged
apinto-uc merged 3 commits into
masterfrom
v4.7.2
Jun 23, 2026
Merged

apinto-uc merged 3 commits into
masterfrom
v4.7.2

Conversation

@apinto-uc

@apinto-uc apinto-uc commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

User description

Improvements

  • Set WordPress tested up to version to 7.0

Bugfixes

  • Fixed Gutenberg block registered with API version 1 instead of version 3, resolving a deprecation warning in the block editor

CodeAnt-AI Description

Prepare Cookiebot 4.7.2 for WordPress 7.0 and remove a block editor warning

What Changed

  • Marked the plugin as tested with WordPress 7.0
  • Updated the Cookie Declaration block so it no longer shows a deprecation warning in the Gutenberg editor
  • Bumped the plugin release version to 4.7.2

Impact

✅ WordPress 7.0 compatibility
✅ Fewer Gutenberg warning messages
✅ Clearer plugin version reporting

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:S This PR changes 10-29 lines, ignoring generated files label Jun 22, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Prepare release v4.7.2 (WP 7.0 tested + Gutenberg API v3 fix)
✨ Enhancement 🐞 Bug fix 📝 Documentation ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

Description

• Bump plugin version to 4.7.2 across PHP header and internal constant.
• Mark plugin as tested with WordPress 7.0 and update stable tag.
• Fix Gutenberg block registration to use API v3 and avoid deprecation warnings.
Diagram

graph TD
  WP{{"WordPress"}} --> PL["cookiebot.php"] --> CORE["Cookiebot_WP.php"]
  WP --> BE["Block editor"] --> BLK["cookie-declaration block JS"]
  WP --> RM["readme.txt"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Migrate block registration to block.json
  • ➕ Aligns with modern Gutenberg best practices and metadata-driven registration
  • ➕ Reduces JS boilerplate and centralizes apiVersion/title/keywords in one file
  • ➖ Larger refactor than needed for a release hotfix
  • ➖ May require build/asset pipeline and registration changes beyond this PR’s scope

Recommendation: The PR’s minimal change (explicit apiVersion: 3 plus an explicit save() returning null) is appropriate for a patch release and directly addresses the deprecation warning with low risk. A block.json migration is a worthwhile follow-up improvement, but it’s too broad for this release-prep PR.

Files changed (4) +21 / -4

Bug fix (1) +4 / -0
cookie-declaration-gutenberg-block.jsRegister Cookie Declaration block with Gutenberg API v3 +4/-0

Register Cookie Declaration block with Gutenberg API v3

• Adds 'apiVersion: 3' to the block registration to match current Gutenberg expectations and prevent deprecation notices. Defines 'save()' returning 'null', indicating a dynamic/server-rendered block and satisfying API requirements.

assets/js/backend/gutenberg/cookie-declaration-gutenberg-block.js

Documentation (1) +15 / -2
readme.txtUpdate WP.org metadata and add 4.7.2 changelog +15/-2

Update WP.org metadata and add 4.7.2 changelog

• Updates "Tested up to" to WordPress 7.0 and bumps the stable tag to 4.7.2. Adds a 4.7.2 changelog section documenting the WP 7.0 testing update and the Gutenberg API version fix.

readme.txt

Other (2) +2 / -2
cookiebot.phpBump plugin header version to 4.7.2 +1/-1

Bump plugin header version to 4.7.2

• Updates the WordPress plugin header 'Version' field from 4.7.1 to 4.7.2 for the release.

cookiebot.php

Cookiebot_WP.phpBump internal plugin version constant to 4.7.2 +1/-1

Bump internal plugin version constant to 4.7.2

• Updates 'COOKIEBOT_PLUGIN_VERSION' from 4.7.1 to 4.7.2 to keep runtime version reporting consistent with the release.

src/lib/Cookiebot_WP.php

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@codeant-ai

codeant-ai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:S This PR changes 10-29 lines, ignoring generated files and removed size:S This PR changes 10-29 lines, ignoring generated files labels Jun 23, 2026
assertStringContainsString and assertIsString don't exist in PHPUnit 6.x,
used by the PHP 7.2/7.3 matrix jobs. Replaced with assertTrue(strpos(...))
and assertTrue(is_string(...)), which work across PHPUnit 5.7 through 9.6.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@apinto-uc
apinto-uc merged commit 1426a74 into master Jun 23, 2026
11 checks passed
@apinto-uc
apinto-uc deleted the v4.7.2 branch June 23, 2026 10:34
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants