Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Modifying BLT Configuration definition is not accurate #2046

Closed
uenrico opened this issue Sep 28, 2017 · 4 comments
Closed

Modifying BLT Configuration definition is not accurate #2046

uenrico opened this issue Sep 28, 2017 · 4 comments
Assignees

Comments

@uenrico
Copy link

uenrico commented Sep 28, 2017

My system information:

  • Operating system type: Windows10 (host), DrupalVM (guest)
  • Operating system version: Ubuntu 16.04.3 LTS
  • BLT version: 8.9.2

BLT Configuration definition said "BLT configuration can be customized by overriding the value of default variable values... Values loaded from the later files will overwrite values in earlier files."

That definition is not accurate because when project.yml and project.local.yml are loaded an array_merge is executed (arrayMergeRecursiveDistinct) instead of a real array override.

project.yml (partial)

modules:
    local:
        enable: [dblog, devel, seckit, views_ui]
        uninstall: [acsf, acquia_connector, shield]

project.local.yml (partial)

modules:
    local:
        enable: [dblog, devel, seckit, views_ui]
        uninstall: {  }

I get the following output:

modules:
    local:
        enable: [dblog, devel, seckit, views_ui]
        uninstall: [acsf, acquia_connector, shield]

And I expected this to happen:
modules.local.uninstall should be empty if we are expecting an override,

@grasmash
Copy link
Contributor

grasmash commented Sep 28, 2017

You're right, the array value must return true for isset() in order for the override to take effect. Have you tried setting the value to null ?

https://github.com/acquia/blt/blob/8.x/src/Robo/Common/ArrayManipulator.php#L31

@uenrico
Copy link
Author

uenrico commented Sep 28, 2017

uninstall: null works for me

@grasmash
Copy link
Contributor

Documentation has been updated.

@uenrico
Copy link
Author

uenrico commented Sep 28, 2017

Checking logs I got a php warning msg using uninstall: null when executing blt setup

PHP Warning: implode(): Invalid arguments passed in /vendor/acquia/blt/src/Robo/Commands/Setup/ToggleModulesCommand.php on line 70

Warning: implode(): Invalid arguments passed in /vendor/acquia/blt/src/Robo/Commands/Setup/ToggleModulesCommand.php on line 70

briantully added a commit to briantully/blt that referenced this issue Feb 8, 2018
* acquia/8.x: (1264 commits)
  Update composer.json
  Use the correct command for setup.strategy = sync (acquia#2097)
  Provide better Memcached boilerplate config. (acquia#2063)
  Note about docker and headless chrome (acquia#2091)
  Fixes acquia#2072: temporarily disabling checking of features overrides. (acquia#2082)
  Drupal 8.4 compatibility improvements. (acquia#2080)
  Update .travis.yml
  Removing sudo from Travis. (acquia#2066)
  Fixes acquia#2059: override site uri during deploy:update. (acquia#2060)
  Remove any NULL arguments from original command being passed into VM, so that missing arguments detected faster. (acquia#2058)
  Add additional settings file include options acquia#2054 (acquia#2055)
  Add support for Apache Solr search (Acquia Search) acquia#412. (acquia#2053)
  Fixes acquia#1872: Command arguments lost when invokeCommand is called with @executeInDrupalVm within a Robo watch task. (acquia#2052)
  Cleaning up composer requirements. (acquia#2050)
  Update configuration-management.md (acquia#2051)
  Fixes acquia#2048: PHP Warning when using modules.local.uninstall: null. (acquia#2049)
  Fixes acquia#2046: Modifying BLT Configuration definition is not accurate. (acquia#2047)
  Fixes acquia#2040: Assert existence of .nvmrc or .node-version. (acquia#2042)
  Add back line removed in acquia#2039 (acquia#2043)
  Fix spacing in simplesamlphp setup readme. (acquia#2044)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants