1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 15:54:03 +00:00

[1.7.0] Fix Events system (#94)

* Add TenantManagerEvents

* Apply fixes from StyleCI

* Fix typos, add tests

* end() events

* Travis should be failing

* Uncomment ending
This commit is contained in:
Samuel Štancl 2019-08-14 17:32:33 +02:00 committed by GitHub
parent c1df467601
commit 1a88cad4d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -41,6 +41,10 @@ trait BootstrapsTenancy
public function end()
{
array_map(function ($listener) {
$listener($this);
}, $this->listeners['ending']);
$this->initialized = false;
$this->disconnectDatabase();
@ -49,6 +53,10 @@ trait BootstrapsTenancy
}
$this->untagCache();
$this->resetFileSystemRootPaths();
array_map(function ($listener) {
$listener($this);
}, $this->listeners['ended']);
}
public function switchDatabaseConnection()

1
test
View file

@ -1,4 +1,5 @@
#!/bin/bash
set -e
# for development
docker-compose up -d