filsh/yii2-oauth2-server

Declaration of m140501_075311_add_oauth2_server::primaryKey($columns) should be compatible with yii\db\Migration::primaryKey($length = NULL)

RichWeber opened this issue · 2 comments

  • OS : Ubuntu 18.04
  • DB : Postgres 11
  • Yii2 : 2.0.29
Yii Migration Tool (based on Yii v2.0.29)

Total 1 new migration to be applied:
	m140501_075311_add_oauth2_server

Apply the above migration? (yes|no) [no]:y
*** applying m140501_075311_add_oauth2_server
PHP Warning 'yii\base\ErrorException' with message 'Declaration of m140501_075311_add_oauth2_server::primaryKey($columns) should be compatible with yii\db\Migration::primaryKey($length = NULL)'

in /opt/vendor/filsh/yii2-oauth2-server/migrations/m140501_075311_add_oauth2_server.php:5

set the default primaryKey like the following:
public function primaryKey($columns=null) {
return 'PRIMARY KEY (' . $this->db->getQueryBuilder()->buildColumns($columns) . ')';
}

varp commented

@RichWeber @xuezhileikaku Thanks! Already fixed in the master branch!