urlManager with locale on URL placing the locale random

I’m having a problem when I generate a URL using

Yii::$app->urlManagerAbsolute->createAbsoluteUrl([‘site/blog’, ‘id’ => 1, ‘order’ => “asc”])
Its generating something like this ‘http://localhost/site/blog?id=1&/enorder=asc’

it’s placing the EN in the middle of the URL
Can anyone help me out?

I only added Google Api to composer and installed it and it updated my yiisoft/yii2-swiftmailer and kmergen/yii2-language-switcher

Also i have this one my configs

‘urlManager’ => [‘baseUrl’ => ‘/’],
‘urlManagerAbsolute’ => [‘baseUrl’ => ‘http : // localhost/’],
‘urlManagerAbsoluteBackend’ => [‘baseUrl’ => ‘http : // localhost/admin/’],
(The urls have spaces cause im new user cant put more than 2 urls but they are together in the code)

I tried to go back to the previous commit before the composer was updated but it’s still causing this even after removing vendor and doing composer install

Try https://github.com/codemix/yii2-localeurls. It proved to do things right.