Thank you for these great patches @a.dmitriiev !
I tested both of these patches out with the
config_distro_ignore
functionality. In my testing it appears that the patch in #3144145-6: Consider replacing fnmatch usage β has an issue where any ignore rule will match any config name (e.g.foo
will matchnode.type.my_content_type
). The original patch in #3144145-2: Consider replacing fnmatch usage β seemed to work in almost all cases but has a minor issue where a partial match now matches a complete config name (e.g.content
matchesnode.type.my_content_type
because the generated regex pattern was missing the^$
I have updated the patch in #3144145-2: Consider replacing fnmatch usage β to fix the substring issue, use
preg_quote
, and for coding standards. I have removed the case insensitivity flag becausefnmatch()
wasn't originally being used withFNM_CASEFOLD
. I think in some cases (windows platforms, maybe?) the original implementation usingfnmatch()
might have been case insensitive in some places and not others.Most of the
fnmatch()
replacements in Drupal have not been a complete reimplementation of the shell-style patterns as regex, but this patch retains the wildcard functionality on * and ?, which I think is useful for theconfig_distro_ignore
use case.- πΊπΈUnited States joegraduate Arizona, USA
Patch in #9 looks good to me. Thanks @tadean!
Discussed this offline with @tadean and we are in agreement that it would be good to merge this ahead of an alpha release with D10 compatibility and create a follow-up issue that adds automated test coverage for this functionality before creating a beta release.
- πΊπΈUnited States trackleft2 Tucson, AZ πΊπΈ
Tested with many patterns using the test module after changing config within the
core.entity_form_display.node.sample_content_type.default.yml
file including:core.entity_form_display.node.sample_content_type.* core.entity_form_display.node.sample_content_typ?.???????
- Status changed to RTBC
over 1 year ago 11:51pm 13 June 2023 -
tadean β
authored 2c4e730d on 2.0.x
Issue #3144145 by a.dmitriiev, tadean, nedjo, joegraduate, trackleft2:...
-
tadean β
authored 2c4e730d on 2.0.x
- Status changed to Fixed
over 1 year ago 11:52pm 13 June 2023 - πΊπΈUnited States joegraduate Arizona, USA
Committed to 2.0.x. Thanks all!
Automatically closed - issue fixed for 2 weeks with no activity.