laravel 12 support - #1051
Conversation
|
Can someone please check this? |
|
please...someone... |
|
@fabmade could you kindly make the change @junamai2000 requested, please? |
|
Thank you @fabmade. Can this be merged now @junamai2000? |
|
Hi @ArlonAntonius, I think this can be merged. Would you be able to take a look? Big thanks in advance! |
|
Hi! Any update on this merge? Thank you all. |
|
? |
|
Please, someone...Can this, please, be merged? Thanks in advance... |
|
Can we get this merged please? |
|
Please merge this PR @ArlonAntonius @luceos |
|
Please...anyone... |
|
Please merge this PR @ArlonAntonius @luceos |
|
Another long shot to see if this message alert reaches anyone who can merge this... |
luceos
left a comment
There was a problem hiding this comment.
Sorry about this. I looked at this before and noticed some things that need a change. The Dockerfile contains German doc, which should be English. And the resolving issue with CurrentHostname on Laravel 12 must be explained, simply resolving without reason doesn't really help with the reliability of the package.
Having said this, compatibility up to the latest Laravel should be seen as a highest priority, I'm trying to take care of this but the current maintainers have not been able to provide the permissions to take maintenance responsibilities onto myself.
|
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. |
|
I ran the suite against Laravel 12, since that is the thing this PR needs and nobody seems to have measured. Results, in case they are useful here.
The generated configuration is byte for byte identical. I dumped what the package produces — all four division modes, the derived password and the connection names — on 11.56.1 and on 12.68.0, with the same - "framework": "11.56.1",
+ "framework": "12.68.0",That is the only difference in the whole snapshot. The isolation suite passes on 12. Whether one tenant can reach another's data through a connection, a queued job or an HTTP request, on MySQL 8, MariaDB 11 and PostgreSQL 14 and 16, across the Two things worth knowing:
On the constraint. For context: I maintain a fork at dazza-dev/hyn-multi-tenant, where this is released as v2.0.0 for Laravel 12 and v1.0.0 for Laravel 11, and I have been sending back what applies to 5.9 — #1054 for isolation and provisioning, #1055 for the test harness, #1056 for the per-request identification that #1015 asks about. The measurements above are from that work; the useful part for this PR is that the framework jump itself costs nothing. |
support for laravel 12