Problem/Motivation

Currently, I cannot force inclusion of a wildcarded set of configuration entity names.

Steps to reproduce

Log in and go to: admin/config/development/configuration/config-split/ignore

Enter the following exclusion names:

block.block.*
~block.block.seven_*

Click Save Configuration, and run an export.

All blocks are ignored from export, whereas I want the seven_* blocks to be exported.

Proposed resolution

Check for wildcard-based exclusion names in the same manner that wildcard-based inclusion names are checked.

Comments

ericjenkins created an issue. See original summary.

ericjenkins’s picture

Attaching patch #2 which leverages the fnmatch() php method to match excluded config entity names in the same manner as included config entity names.

ericjenkins’s picture

Status: Active » Needs review
ericjenkins’s picture

ericjenkins’s picture

I discovered and analyzed a similar issue for the Config Ignore project. @pookmish had what I felt was a more refined if() statement, so I'm adapting it for use here. I'm also converting fnmatch() to preg_match() in my function.

ericjenkins’s picture

Turns out #5 wasn't working for me because the preg_match() was not correctly handling the '~' character. I should have tested #5 prior to committing it.

Submitting patch #6 and interdiff.

mohit_aghera’s picture

Thanks for the patch @ericjenkins. I'll review the patch and I'll do quick testing today.

mohit_aghera’s picture

Assigned: ericjenkins » Unassigned
Status: Needs review » Fixed

Thanks, @ericjenkins, I've merged the patch.
I'll create a new release after one pending patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.