Closed (fixed)
Project:
Features
Version:
8.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2015 at 14:25 UTC
Updated:
11 Jul 2015 at 16:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
benjy commentedTry the attached.
Comment #2
Anonymous (not verified) commentedHi
I get similar error
Recoverable fatal error: Argument 1 passed to Drupal\Core\Config\InstallStorage::getComponentNames() must be of the type array, string given, called in /var/www/caruro/htdocs/modules/contrib/features/src/FeaturesManager.php on line 816 and defined in Drupal\Core\Config\InstallStorage->getComponentNames() (line 193 of core/lib/Drupal/Core/Config/InstallStorage.php).Comment #3
spadxiii commentedPatch solves this issue!
Just did a clean install with latest beta and installed latest dev of features. Ran into the same problem, which is gone after the patch was applied.
Comment #4
spadxiii commentedAnd as mokone91 mentioned (at the same minute), there's still a few places with the same/similar problem.
Comment #5
nedjoThanks for the draft patch.
The change that triggers this bug was this commit for #1081266: Avoid re-scanning module directory when a filename or a module is missing. Specifically, the patch changed the arguments to
ExtensionInstallStorage::getComponentNames().We call this method in two places. First, in
FeaturesInstallStorage.php, we override two methods ofExtensionInstallStorage, and in each case we callgetComponentNames(). This is what @benjy has addressed, adapting the relevant sections from the patch that introduced these changes.The second is in
FeaturesManager::listExtensionConfig(), which is what is triggering the remaining bug. It looks straightforward to address; the method already receives an Extension object as an argument.Comment #6
mglamanHere's a patch to update usage of
ExtensionInstallStorage::getComponentNames().Comment #7
leewillis77 commentedI'm still seeing the following error with patch #6 which I think relates to the call in FeaturesManager::listExtensionConfig()?
Recoverable fatal error: Argument 1 passed to Drupal\Core\Config\InstallStorage::getComponentFolder() must be an instance of Drupal\Core\Extension\Extension, string given, called in /core/lib/Drupal/Core/Config/InstallStorage.php on line 202 and defined in Drupal\Core\Config\InstallStorage->getComponentFolder() (line 241 of core/lib/Drupal/Core/Config/InstallStorage.php).Comment #8
marthinal commentedI can confirm that it works. Rerolled.
To reproduce the last change from #6 you can use "drush fd MY_CUSTOM_MODULE" for example, and the method listExtensionConfig() will be executed. Also you can debug with xdebug and drush.
Should we start covering with some tests ?
Added
See #2505787: Bundle settings is null, not array for FeatureBundleInterface::setSettings
thanks guys :)
Comment #10
nedjoThanks! Applied the fix from #6, as the settings array is fixed in #2505787: Bundle settings is null, not array for FeatureBundleInterface::setSettings.
Comment #11
nedjo