There is an issue in namespace generation when the project name contains one of the psr4 namespace.
"psr-4": {
"App\\": "app/",
"BackOffice\\": "Modules/BackOffice/"
}

Even though the correct namespace is App\Http\Middleware the extension generate it as App