I have installed yii2 php framework, version is v2.0.51. My php version is v7.4.0 and mysql 8. All ActiveRecord query is giving following error even if I am switching php version to v7.1.0 or v7.3.0.
Query not running –
self::findAll([`status` => parent::ACTIVE]);
Query running fine –
Yii::$app->db->createCommand("SELECT * FROM news_categories where status = '1'")->queryAll();
Caused by:
ParseError syntax error, unexpected ” (T_ENCAPSED_AND_WHITESPACE),
expecting ‘-‘ or identifier (T_STRING) or variable (T_VARIABLE) or
number (T_NUM_STRING) in
/var/www/html/roleindia/vendor/yiisoft/yii2/db/mysql/Schema.php at
line 236