richdynamix / magestead

The Vagrant Solution for Magento Developers
81 stars 29 forks source link

Magento2 installation fails. Cannot use object of type stdClass as array #75

Closed zdraganov closed 7 years ago

zdraganov commented 7 years ago

Magestead CLI version 2.2.0 PHP 5.6.7

When running magestead new <project_name> and starting setup of Magento 2 project, after I login and password for my account I receive the following exception:

PHP Fatal error:  Cannot use object of type stdClass as array in /Users/zhivko/.composer/vendor/richdynamix/magestead/src/Magestead/Helper/Options.php on line 196

I changed the verifyAuth function and 187 line with doing $authObj = (array)json_decode($authJson, true); to result as associative array rather than object and this seems to do the work for me.

If you want PR please ask :)

richdynamix commented 7 years ago

:( Ah I think I have seen something similar in another issue. I was planning on replacing that method with composer's composer config command to set the values as they are merged if they exist so its non destructive. I haven't had time lately but feel free to submit a PR ;)

zdraganov commented 7 years ago

https://github.com/richdynamix/magestead/pull/76