Skip to content

Block JSON schema & PHP-only blocks: Add autoRegister support - #80173

Merged
priethor merged 1 commit into
trunkfrom
priethor/add-autoregister-block-schema
Jul 30, 2026
Merged

Block JSON schema & PHP-only blocks: Add autoRegister support#80173
priethor merged 1 commit into
trunkfrom
priethor/add-autoregister-block-schema

Conversation

@priethor

Copy link
Copy Markdown
Contributor

What

Part of #79330.

Adds autoRegister to the block.json schema. Block authors will now get autocomplete for the setting, and values such as "yes" will show a schema error instead of being silently accepted.

Why

autoRegister already works for PHP-only blocks, but the schema does not know about it yet.

Testing Instructions

  1. Open test/integration/fixtures/block-schemas/invalid-auto-register.json in an editor with JSON schema validation.
  2. Check that "autoRegister": "yes" is marked as invalid.
  3. Change the value to true, check that the error disappears, then undo the change.

I used Claude to help implement these changes. I guided the work, then tested and reviewed the result.

@priethor priethor self-assigned this Jul 13, 2026
@priethor priethor added the Developer Experience Ideas about improving block and theme developer experience label Jul 13, 2026
@priethor priethor mentioned this pull request Jul 13, 2026
10 tasks
@priethor priethor added [Type] Developer Documentation Documentation for developers No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core labels Jul 13, 2026
@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.71 MB

compressed-size-action

@priethor priethor removed the Developer Experience Ideas about improving block and theme developer experience label Jul 13, 2026
@github-actions

Copy link
Copy Markdown

Flaky tests detected in e088c51.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/29242263162
📝 Reported issues:

@priethor
priethor force-pushed the priethor/add-autoregister-block-schema branch from e088c51 to 39ca6a7 Compare July 13, 2026 10:56
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: priethor <priethor@git.wordpress.org>
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@jorgefilipecosta jorgefilipecosta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@priethor
priethor merged commit fad413f into trunk Jul 30, 2026
44 checks passed
@priethor
priethor deleted the priethor/add-autoregister-block-schema branch July 30, 2026 15:26
@github-actions github-actions Bot added this to the Gutenberg 23.8 milestone Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants