1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 21:14:03 +00:00

Reverse bootstrappers when reverting to central

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:09:51 +03:00 committed by GitHub
parent 3542b3f028
commit 44af6fdf22
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();
}