1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:44:04 +00:00

Reverse bootstrappers when reverting to central (#932)

Some of my bootstrappers are depending on previous bootstrappers but when reverting it needs to run in reverse order.
Submitting to v4 since this might be a breaking change (currently I am overriding this file).
This commit is contained in:
emargareten 2022-08-30 17:24:50 +03:00 committed by GitHub
parent 2b02198dda
commit 62d19c5f5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ class RevertToCentralContext
{
event(new RevertingToCentralContext($event->tenancy));
foreach ($event->tenancy->getBootstrappers() as $bootstrapper) {
foreach (array_reverse($event->tenancy->getBootstrappers()) as $bootstrapper) {
$bootstrapper->revert();
}