Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
ExtensionDiscovery
matches each line in an *.info.yml
file against the following regular expression pattern (line 349):
'@^type:\s*(\w+)\s*$@'
This matches lines of the form:
type: module
but not lines of the form:
type: 'module'
or lines of the form:
type: "module"
All three are valid YAML, however, so it seems awkward not to support the latter cases.
Proposed resolution
Fix the regular expression to account for quotes.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#1 | 2318847-1-extension-discovery-quotes-yaml.patch | 757 bytes | tstoeckler |
Comments
Comment #1
tstoecklerHere we go. I tested that this works with all three options mentioned above.
Comment #2
sunThanks.
Comment #3
alexpottExtensionDiscovery is conspicuous in its lack of a unit test. Now we have vfsStream in core we should create a follow up to add unit testing.
Committed 05638cd and pushed to 8.0.x. Thanks!