Answer the question
In order to leave comments, you need to log in
Laravel variable $namespace RouteServiceProvider is overwritten by another provider, how to fix?
Good afternoon to everyone who came.
Medium difficulty question. The situation is this. There is a package. This package has a service provider (logically). In the boot method of a service provider, there is a registration of the package's internal service providers. Moreover, one of the connected providers has its own $namespace variable.
Main problem. Since the provider is registered in the boot method of another provider, then, accordingly, all registration takes place after the registration of the application service provider. The variable is overwritten (however, what the hell is this happening - it's not clear. Apparently, for the application, this variable is a singleton).
Question: how to fix this thing, and, moreover, it is desirable not to break the backward compatibility of the package?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question