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

slefevre@ccad.edu created an issue. See original summary.

slefevre@ccad.edu’s picture

Issue summary: View changes
slefevre@ccad.edu’s picture

Issue summary: View changes
cilefen’s picture

Status: Active » Closed (duplicate)

There are three Table.php files in the core codebase, none of them have a line 789 (they are too short).

drupal8x ((8.6.13))$ find . -name Table.php -exec wc -l {} \;
     398 ./core/lib/Drupal/Core/Render/Element/Table.php
     455 ./core/modules/views/src/Plugin/views/style/Table.php
     702 ./vendor/symfony/console/Helper/Table.php

However there is one in that version of Drush:

drush ((8.1.15))$ find ./ -name Table.php -exec wc -l {} \;
     974 .//vendor/pear/console_table/Table.php
     668 .//vendor/symfony/console/Helper/Table.php

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.

slefevre@ccad.edu’s picture

@cilegen this was indeed the issue. Thanks so much!