Hi.
I've updated magento from 2.0.4 to 2.0.7 via composer.
And then I tried to remove sample data using CLI and got following error.
php70 bin/magento sampledata:remove
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\InputArrayInput::__construct() must be of the type array, object given, called in /srv/mat24/web/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /srv/mat24/web/vendor/symfony/console/Symfony/Component/Console/Input/ArrayInput.php:37
Stack trace:
Sorry, don't sure whether if it is issue or not. Maybe someone already solved such case.
Sampledata is, at best said lottery. It can break your entire Magento2 instance at any time.
You can first try to:
module:uninstall
module:disable
any sampledata modules.
Then run setup:upgrade
@stamster, uh, thats right) I tried to do so - uninstalling all of those modules and one by one, but everytime after console had wrote "Removing code from Magento codebase:" and nothing happened during a half of hour... Well, I decided to reinslall magento. It's much efficient and much faster as well. :) Maybe the problem is in server configuration.
@antonlazarchenko , try to clean your var/generation directory.
rm -Rf <magento_root>/var/generation/*
@rganin, already tried but nothing. I cleaned /di and /generation, did setup:di:compile, setup:upgrade. Nothing.
@stamster @antonlazarchenko we have created MAGETWO-53496 to investigate and fix module:uninstall, and MAGETWO-53497 to investigate and fix sampledata:remove
@aabumuslimov I have not been able to recreate both issues related to sampledata:remove and module:uninstall Can you please make sure your file permissions are as expected?
@aabumuslimov how did you initially deploy Magento? via composer create project? via git or via zip downloaded from magento.com?
@mazhalai, file permissions is ok. According to deployment: firstly git pull, then composer install, then via browser did setup process.
@antonlazarchenko what about steps for I've updated magento from 2.0.4 to 2.0.7 via composer. How did you do that? was that git based?
@mazhalai, I've updated actually /app/code folder with it's modules by git. So /vendor changed by composer.
@antonlazarchenko so you checked out tag 2.0.7? or latest from develop?
@antonlazarchenko how exactly did you update app/code? physically copy files?
I tried the following steps and cannot reproduce your error:
Yeah, some errors of this kind are hard to reproduce. Often I wonder what in the world could cause so much damage to bring your entire instance down. Trying the same on the exact same vritual server works. But, it's not that simple as while in a development process you configure various things.
Personally, I would (I did) avoid sample data at all costs if you need to develop on Magento2. It can cause you so much pain. Not that Magento2 is any better, but at least we remove overhead as much as we can.
@mazhalai, I did approximately following on remote server:
That was the steps as I remembered them. For now I haven't possibility to check.
@stamster, thanx. Recommendation accepted)
@antonlazarchenko After composer update, you need to run bin/magento setup:upgrade
According to contributor guide, tickets without response for two weeks should be closed.
Please feel free to reopen if it's needed.