Problem/Motivation

Currently the exclude package assignment plugin unsets configuration of excluded types:

        if (in_array($item->getType(), $exclude_types)) {
          unset($config_collection[$item_name]);
        }

This results in a fatal error when #2621750: New 'devel' assignment plugin to package bundle is applied:

Fatal error: Call to a member function getType() on a non-object in /path/to/site/modules/features/modules/features_ui/src/Form/FeaturesExportForm.php on line 329

The error results because a given piece of configuration is added to a package but subsequently unset, so that when the package is packaged, the item is missing.

Proposed resolution

Rather than unsetting the configuration items, flag them such that, if they are not already added, they'll be excluded unless explicitly later added.

We already have a ConfigurationItem property, extensionProvided, that we use to flag items that should be excluded from everything except the install profile (if one is generated). We can't reuse this property, because in this case we want to exclude from all packages including the install profile.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 2664784-2.patch4.58 KBnedjo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nedjo created an issue. See original summary.

nedjo’s picture

Status: Active » Needs review
FileSize
4.58 KB

Patch attached.

  • nedjo committed 48a46c4 on
    Issue #2664784 by nedjo: Exclude assignment plugin should flag config...
nedjo’s picture

Status: Needs review » Fixed
Related issues: -#2621750: New 'devel' assignment plugin to package bundle

Committed this because it's a blocker for #2621750: New 'devel' assignment plugin to package bundle.

Status: Fixed » Closed (fixed)

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