Upgrade to laravel 11 - #1050
Conversation
|
I went looking for why the extra
public function identifyHostname()
{
$this->app->singleton(CurrentHostname::class, function () {
$hostname = $this->dispatch(new HostnameIdentification());
$this->tenant(optional($hostname)->website);
return $hostname;
});
}Until something resolves that binding, no identification is dispatched and no tenant is set. So on its own, calling it is a no-op. The reason it appears to work today is an accident of provider ordering:
I put a backtrace in the constructor to check: two constructions per application. Registering the singleton in That second construction is what makes a later Worth knowing either way, since it is not free: per request it means I have not sent a fix for this, because changing it moves identification to boot time, and whether the request's For context: I maintain a fork of 5.9 at dazza-dev/hyn-multi-tenant and have been sending back what applies here — #1054 for the isolation and provisioning fixes, #1055 for moving the test harness to Orchestra Testbench. |
No description provided.