如何从yii2中的脚本标记中删除0 =“3”属性?

In Yii2 I add my scripts in the main.php file at the end of file before ending body tag like this

$this->registerJsFile($this->theme->baseUrl . '/js/scripts.min.js', [
            'depends' => [
                'yii\web\YiiAsset',
                'yii\bootstrap\BootstrapPluginAsset'
            ], $this::POS_END
        ]);

but when i see the check my site on code optimizer website like https://validator.w3.org it give this error on script tag

Is there any idea how to remove 0="3" attribute. Thanks in advance.

Incorrect syntax of registerJsFile() options. Try this:

$this->registerJsFile($this->theme->baseUrl . '/js/scripts.min.js', [
    'depends'  => [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapPluginAsset',
    ],
    'position' => $this::POS_END,
]);