Skip to content

[6.x] Allow ensuring fields in fieldsets - #11097

Open
duncanmcclean wants to merge 8 commits into
6.xfrom
ensuring-fields-for-fieldsets
Open

duncanmcclean wants to merge 8 commits into
6.xfrom
ensuring-fields-for-fieldsets

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Nov 8, 2024 •

Copy link
Copy Markdown
Member

This pull request implements the ability to ensure fields in fieldsets, copying most of the logic and tests from the blueprint implementation.

This would help to simplify some of the code in the importer around ensuring & saving fields in fieldsets.

This PR doesn't fix any of the open issues regarding ensuring imported fields in blueprints.

@duncanmcclean duncanmcclean changed the title [5.x] Allow ensuring fields in fieldsets [6.x] Allow ensuring fields in fieldsets Jan 28, 2026
@duncanmcclean
duncanmcclean changed the base branch from 5.x to 6.x January 28, 2026 17:34
duncanmcclean and others added 4 commits January 29, 2026 11:44
…eldsets

# Conflicts:
#	src/Fields/Fieldset.php
…et fields

Stop array_filtering fieldset contents, which dropped the empty fields key on every fieldset, and restore the StoreFieldsetTest expectation. Ensured fields now go into the first section when a fieldset uses sections, keep their position when they already exist in a later section, and no longer discard existing reference or import config overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import overrides are keyed by the unprefixed handle, so ensuring a field inside a prefixed import now writes to the key the import actually reads. ensureFieldHasConfig now matches Blueprint: it merges the requested config over existing inline, reference, and import config, and updates deferred ensured fields, instead of only filling missing keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants