Cannot use yii\base\Object as Object because 'Object' is a special class name

Hello, i dont know what happen here, please help me to figure this out thank you…

did you update your php version, in php >7.1 object keyword is reserved yii2 had a class object defined in older version which has been updated, please update your yii

i check my php version and it is 7.2,

my yii version is “2.0.15.1” what should i do?

update your yii

use yii\base\BaseObject;
class MysqlBackup extends BaseObject

im sorry ,im looking for answer online to find how to update yii but i cant find it, can you help me? big thanks

run composer update and make sure to update the references to your Object class to BaseObject just like @oim pointed out

It’s working. Thank you so much for your help @alirz23 @oim

2 Likes