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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler’s picture

Status: Active » Needs review
FileSize
757 bytes

Here we go. I tested that this works with all three options mentioned above.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Thanks.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

ExtensionDiscovery 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!

  • alexpott committed 05638cd on 8.0.x
    Issue #2318847 by tstoeckler: Fixed ExtensionDiscovery does not allow...

Status: Fixed » Closed (fixed)

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