We have made configuration exports and imports part or our dev/deploy workflow. In the past couple versions of Drupal (at least 8.6.11, perhaps earlier), I've been getting the following errors when running config imports and exports via drush in the shell
$ drush @integration cim
Invalid argument supplied for foreach() ModuleHandler.php:538 [warning]
Collection Config Operation
core.extension update$ drush @local cex
count(): Parameter must be an array or an object that implements Countable Table.php:789 This is with drush 8.1.15. It happens both on my local dev environment, which is php 7.1 on git-bash, and on my remote dev/host environment, which is php 7.2 on Ubuntu, developing against a Pantheon hosted site.
I've also been dealing with an error where the config exports don't seem to exactly align with the current state of the site exported from. I can't say that it's related to this issue, but it would be my first guess. I haven't had an opportunity yet to look deeply into the issue.
Comments
Comment #2
slefevre@ccad.edu commentedComment #3
slefevre@ccad.edu commentedComment #4
cilefen commentedThere are three Table.php files in the core codebase, none of them have a line 789 (they are too short).
However there is one in that version of Drush:
It is in the function _updateRowsCols.
Sure enough, I found it here: https://github.com/drush-ops/drush/issues/3226. You may need to upgrade Drush.
Comment #5
slefevre@ccad.edu commented@cilegen this was indeed the issue. Thanks so much!