Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Remove redundant config options from blueprint YAML #9685

Merged
merged 15 commits into from
Mar 18, 2024

Conversation

duncanmcclean
Copy link
Member

This pull request aims to prevent config options from being saved in field configs when the values match the default config values for the fieldtype.

This PR also does a little bit of refactoring, moving all the Arr::get()/unset stuff into the ->reject() method. I've also added some tests to ensure my changes don't break anything. 😄

Closes #9431.

@duncanmcclean duncanmcclean marked this pull request as ready for review March 8, 2024 15:44
@duncanmcclean duncanmcclean requested a review from jasonvarga March 8, 2024 16:51
Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

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

Can you see if you can get icon: null and instructions: null get filtered out of replicator/bard groups/sets? Seems relevant to this PR.

          -
            handle: replicator_field
            field:
              type: replicator
              display: 'Replicator Field'
              sets:
                new_set_group:
                  display: 'New Set Group'
                  instructions: null
                  icon: null
                  sets:
                    new_set:
                      display: 'New Set'
                      instructions: null
                      icon: null
                      fields: {  }

duncanmcclean and others added 4 commits March 18, 2024 14:50
…nfig-options-from-blueprint-yaml

# Conflicts:
#	src/Http/Controllers/CP/Fields/FieldsController.php
… github.com:statamic/cms into remove-redundant-config-options-from-blueprint-yaml
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