1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-09-20 11:14:03 +00:00

Correct FSBootstrapper and DeleteTenantStorage docblocks

getBoundTenantStoragePath() and DeleteTenantStorage both claimed the tenant storage directory is where disks, cache and sessions are scoped to. That's only true when root_override points there and scope_cache/scope_sessions are enabled -- a root_override using %original_storage_path% puts the disk root outside it entirely.
This commit is contained in:
lukinovec 2026-08-19 15:22:33 +02:00 committed by Samuel Stancl
parent ae77c49985
commit 223b49a395
2 changed files with 9 additions and 6 deletions

View file

@ -331,8 +331,8 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
/**
* Get the storage path of the passed tenant (independent of the current context).
*
* This is the directory the bootstrapper scopes disks, cache and sessions to,
* regardless of suffix_storage_path (that config option only affects the storage_path() helper).
* The returned path doesn't depend on suffix_storage_path -- that config option
* only controls whether storage_path() uses it.
*/
public static function getBoundTenantStoragePath(Tenant $tenant): string
{

View file

@ -16,13 +16,16 @@ use Stancl\Tenancy\Contracts\Tenant;
/**
* Delete the tenant's storage directory.
*
* Requires FilesystemTenancyBootstrapper to be enabled, since the deleted directory
* is the one the bootstrapper scopes disks, cache and sessions to.
* Requires FilesystemTenancyBootstrapper to be enabled, since the tenant storage path
* is resolved from it.
*
* The job does not depend on the tenancy.filesystem.suffix_storage_path config,
* Files outside that directory (e.g. disks with an %original_storage_path%-based
* root_override) are not deleted.
*
* Note that this job is not affected by the tenancy.filesystem.suffix_storage_path config
* since it doesn't use the storage_path() helper.
*
* @see Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper
* @see FilesystemTenancyBootstrapper
*/
class DeleteTenantStorage implements ShouldQueue
{