i used sqlsrv connection in yii2 and gii is worked correct!
this is my connection :
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'sqlsrv:Server=DESKTOP-UCQ1M4B;Database=shopping;ConnectionPooling=0',
    'username' => '',
    'password' => '',
    'charset' => 'utf8'
];
but when i want install extension in my Yii2 project extention has not error but database not update for example: i added this extention in project with this line:
composer require "dektrium/yii2-user:0.9.*@dev"
and this is return of composer :
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing yiisoft/yii2-httpclient (2.0.2)
    Loading from cache
  - Installing yiisoft/yii2-authclient (2.1.1)
    Loading from cache
  - Installing dektrium/yii2-user (dev-master a908ab3)
    Cloning a908ab3652668c6f2755052098dac09a8c6de6f4 from cache
Writing lock file
Generating autoload files
but database not updated!!!
in mysql connection after install this extention database has update with create 3 table of users profile Structure!