cancel
Showing results for 
Search instead for 
Did you mean: 

Bin/magento exception

Bin/magento exception

On a Magento 2.3.0 website (that looks ok in frontend and backend) when I try to call any "bin/magento" command, it returns:
An exception was raised while creating "Request"; no instance returned

 Anyone knows how to solve it?

7 REPLIES 7

Re: Bin/magento exception

I've the same problem. Nobody can help us?

Re: Bin/magento exception

I've solved downgradin to php 7.2 from php 7.3.

Now all work fine

Re: Bin/magento exception

This issue happens due to PHP changes and now need to use "continue 2" withing "switch" case.

You need to changes the vendor\zendframework\zend-stdlib\src\ArrayObject.php at line #426

continue

to

continue 2

NOTE:

We must not changes the core file, but until the next M2 version fix this issue, we can change core file at our own.

 

Ref:

https://magento.stackexchange.com/questions/256953/an-exception-was-raised-while-creating-request-no...

https://wiki.php.net/rfc/continue_on_switch_deprecation

 

Thank you

Re: Bin/magento exception

it is works for me

You need to changes the vendor\zendframework\zend-stdlib\src\ArrayObject.php at line #426

from continue to continue 2

or change php version to 7.2 ( php -v to know it )

wordpress and opencart themes developer
magento theme developer - laravel php developer

Re: Bin/magento exception

I also face same problem with magento 2.2.5 and php 7.0.X, anyone know how can I solve it?

Re: Bin/magento exception

Hello @shmk @zheng yu_gan1 ,

I had the same issue and Most of the time downgrading PHP is not feasible. 
I tried the following solution by @Abdul Pathan 

here is the link for that.

https://magento.stackexchange.com/a/278143/72475

 

That is the most worked and accepted solution to this problem. I hope that will work for you.

Thank You

answer helpful? Click Kudos and You can accept it as a solution.

 

 

Re: Bin/magento exception

It works for me. Thanks