mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:34:03 +00:00
Filesystem logic refactor, improved defaults for cache tenancy (#42)
* refactor FilesystemTenancyBootstrapper * clean up tests and improve coverage * minor maintenance mode changes * Improve tenants:migrate --skip-failing logic * make tenants:migrate output consistently formatted * minor RootUrlBootstrapper + misc changes * cache bootstrapper-related improvements * Fix code style (php-cs-fixer) * misc refactor * Fix code style (php-cs-fixer) * add %original_storage_path% to fs bootstrapper, improve default config for cache * rename method * inject concrete implementations where needed instead of abstracts * Fix code style (php-cs-fixer) * refactor DealsWithTenantSymlinks * remove obsolete phpstan ignore --------- Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
This commit is contained in:
parent
4b6fa22aa7
commit
a41ad69023
23 changed files with 234 additions and 160 deletions
|
|
@ -50,11 +50,15 @@ use Stancl\Tenancy\Bootstrappers\CacheTenancyBootstrapper;
|
|||
use Stancl\Tenancy\Bootstrappers\BroadcastChannelPrefixBootstrapper;
|
||||
use Stancl\Tenancy\Bootstrappers\Integrations\FortifyRouteBootstrapper;
|
||||
|
||||
// todo refactor this file -- too much stuff happening here
|
||||
|
||||
beforeEach(function () {
|
||||
$this->mockConsoleOutput = false;
|
||||
|
||||
config(['cache.default' => $cacheDriver = 'redis']);
|
||||
CacheTenancyBootstrapper::$tenantCacheStores = [$cacheDriver];
|
||||
config([
|
||||
'cache.default' => 'redis',
|
||||
'tenancy.cache.stores' => ['redis'],
|
||||
]);
|
||||
// Reset static properties of classes used in this test file to their default values
|
||||
BroadcastingConfigBootstrapper::$credentialsMap = [];
|
||||
TenancyBroadcastManager::$tenantBroadcasters = ['pusher', 'ably'];
|
||||
|
|
@ -74,7 +78,6 @@ beforeEach(function () {
|
|||
afterEach(function () {
|
||||
// Reset static properties of classes used in this test file to their default values
|
||||
RootUrlBootstrapper::$rootUrlOverride = null;
|
||||
CacheTenancyBootstrapper::$tenantCacheStores = [];
|
||||
TenancyBroadcastManager::$tenantBroadcasters = ['pusher', 'ably'];
|
||||
BroadcastingConfigBootstrapper::$credentialsMap = [];
|
||||
TenancyUrlGenerator::$prefixRouteNames = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue