-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed
Description
Preconditions
- Magento 2.2.1
Steps to reproduce
- Create an integration test with the following fixture:
protected function setUp() { $this->objectManager = Bootstrap::getObjectManager(); $this->commandList = $this->objectManager->create(CommandListInterface::class); }
Expected result
- I can use the command list to test registered commands
Actual result
- The test fails with an error like this:
Cannot instantiate interface Magento\Framework\Interception\ObjectManager\ConfigInterface PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 PATH/vendor/magento/framework/ObjectManager/ObjectManager.php:70 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:144 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:230 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59 PATH/vendor/magento/framework/ObjectManager/ObjectManager.php:70 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:144 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:230 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59 PATH/vendor/magento/framework/ObjectManager/ObjectManager.php:70 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:144 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:230 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59 PATH/vendor/magento/framework/ObjectManager/ObjectManager.php:70 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:180 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:156 PATH/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:230 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34 PATH/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59 PATH/vendor/magento/framework/ObjectManager/ObjectManager.php:56 PATH/vendor/example/example/tests/ExampleTest.php:53
I logged which classes were instantiated befor the error and it seems like XmlCatalogGenerateCommand
has the object manager config in its dependency graph, but in the integration test environment there is no preference for it.
Magento\Developer\Console\Command\XmlCatalogGenerateCommand
=> Magento\Framework\App\Utility\Files
=> Magento\Framework\Component\DirSearch
=> Magento\Framework\App\Utility\RegexIteratorFactory
=> Magento\Developer\Model\XmlCatalog\Format\PhpStorm
=> Magento\Framework\Filesystem\File\WriteFactory
=> Magento\Developer\Console\Command\DiInfoCommand
=> Magento\Developer\Model\Di\Information
=> Magento\Developer\Model\Di\PluginList
=> Magento\Framework\Interception\ObjectManager\ConfigInterface
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed