mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 13:54:03 +00:00
categorize todos
This commit is contained in:
parent
a85708429e
commit
a0da54cfdc
14 changed files with 18 additions and 19 deletions
|
|
@ -200,7 +200,7 @@ return [
|
|||
// 'pgsql' => Stancl\Tenancy\Database\TenantDatabaseManagers\PostgreSQLSchemaManager::class, // Separate by schema instead of database
|
||||
],
|
||||
|
||||
// todo docblock
|
||||
// todo@docblock
|
||||
'drop_tenant_databases_on_migrate_fresh' => false,
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use Stancl\Tenancy\Contracts\TenancyBootstrapper;
|
|||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
|
||||
/**
|
||||
* todo name.
|
||||
* todo@name rename?
|
||||
*
|
||||
* Separate tenant cache using tagging.
|
||||
* This is the legacy approach. Some things, like dependency injection, won't work properly with this bootstrapper.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use Stancl\Tenancy\Database\Exceptions\NoConnectionSetException;
|
|||
interface StatefulTenantDatabaseManager extends TenantDatabaseManager
|
||||
{
|
||||
/** Get the DB connection used by the tenant database manager. */
|
||||
public function database(): Connection; // todo rename to connection()
|
||||
public function database(): Connection; // todo@name rename to connection()
|
||||
|
||||
/**
|
||||
* Set the DB connection that should be used by the tenant database manager.
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class DatabaseConfig
|
|||
}
|
||||
|
||||
/**
|
||||
* todo come up with a better name
|
||||
* todo@name come up with a better name
|
||||
* Get database manager class from the given connection config's driver.
|
||||
*
|
||||
* @throws DatabaseManagerNotRegisteredException
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class UserImpersonation implements Feature
|
|||
/**
|
||||
* Logout from the current domain and forget impersonation session.
|
||||
*/
|
||||
public static function leave(): void // todo possibly rename
|
||||
public static function leave(): void // todo@name possibly rename
|
||||
{
|
||||
auth()->logout();
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,10 @@ use Closure;
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Route;
|
||||
use Stancl\Tenancy\Concerns\UsableWithEarlyIdentification;
|
||||
use Stancl\Tenancy\Enums\Context;
|
||||
use Stancl\Tenancy\Enums\RouteMode;
|
||||
|
||||
/**
|
||||
* todo come up with a better name.
|
||||
* todo@name come up with a better name.
|
||||
*
|
||||
* Prevents accessing central domains in the tenant context/tenant domains in the central context.
|
||||
* The access isn't prevented if the request is trying to access a route flagged as 'universal',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Stancl\Tenancy\Overrides;
|
|||
|
||||
use Illuminate\Cache\CacheManager as BaseCacheManager;
|
||||
|
||||
// todo move to Cache namespace?
|
||||
// todo@move move to Cache namespace?
|
||||
|
||||
class CacheManager extends BaseCacheManager
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class PathTenantResolver extends Contracts\CachedTenantResolver
|
|||
|
||||
public function getCacheKey(mixed ...$args): string
|
||||
{
|
||||
// todo@samuel: fix the coupling here. when this is called from the cachedresolver, $args are the tenant key. when it's called from within this class, $args are a Route instance
|
||||
// todo@samuel fix the coupling here. when this is called from the cachedresolver, $args are the tenant key. when it's called from within this class, $args are a Route instance
|
||||
// the logic shouldn't have to be coupled to where it's being called from
|
||||
|
||||
// todo@samuel also make the tenant column configurable
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
|
||||
// todo move all resource syncing-related things to a separate namespace?
|
||||
// todo@move move all resource syncing-related things to a separate namespace?
|
||||
|
||||
/**
|
||||
* @property-read Tenant[]|Collection $tenants
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ class Tenancy
|
|||
*/
|
||||
public Tenant|null $tenant = null;
|
||||
|
||||
// todo docblock
|
||||
// todo@docblock
|
||||
public ?Closure $getBootstrappersUsing = null;
|
||||
|
||||
/** Is tenancy fully initialized? */
|
||||
public bool $initialized = false; // todo document the difference between $tenant being set and $initialized being true (e.g. end of initialize() method)
|
||||
public bool $initialized = false; // todo@docs document the difference between $tenant being set and $initialized being true (e.g. end of initialize() method)
|
||||
|
||||
/** Initialize tenancy for the passed tenant. */
|
||||
public function initialize(Tenant|int|string $tenant): void
|
||||
|
|
@ -92,7 +92,7 @@ class Tenancy
|
|||
|
||||
event(new Events\EndingTenancy($this));
|
||||
|
||||
// todo find a way to refactor these two methods
|
||||
// todo@samuel find a way to refactor these two methods
|
||||
|
||||
event(new Events\TenancyEnded($this));
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
use Ramsey\Uuid\Uuid;
|
||||
use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
|
||||
|
||||
// todo move to separate namespace
|
||||
// todo@move move to separate namespace
|
||||
|
||||
class UUIDGenerator implements UniqueIdentifierGenerator
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ if (! function_exists('tenant')) {
|
|||
}
|
||||
|
||||
if (! function_exists('tenant_asset')) {
|
||||
// todo docblock
|
||||
// todo@docblock
|
||||
function tenant_asset(string|null $asset): string
|
||||
{
|
||||
if ($assetUrl = config('app.asset_url')) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ beforeEach(function () {
|
|||
Event::listen(TenancyEnded::class, RevertToCentralContext::class);
|
||||
});
|
||||
|
||||
// todo move these to be in the same file as the other tests from this PR (#909) rather than generic "action tests"
|
||||
// todo@move move these to be in the same file as the other tests from this PR (#909) rather than generic "action tests"
|
||||
|
||||
test('create storage symlinks action works', function() {
|
||||
config([
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
|||
'--realpath' => true,
|
||||
]);
|
||||
|
||||
// Laravel 6.x support todo clean up
|
||||
// Laravel 6.x support todo@refactor clean up
|
||||
$testResponse = class_exists('Illuminate\Testing\TestResponse') ? 'Illuminate\Testing\TestResponse' : 'Illuminate\Foundation\Testing\TestResponse';
|
||||
$testResponse::macro('assertContent', function ($content) {
|
||||
$assertClass = class_exists('Illuminate\Testing\Assert') ? 'Illuminate\Testing\Assert' : 'Illuminate\Foundation\Testing\Assert';
|
||||
|
|
@ -129,8 +129,8 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
|||
'tenancy.models.tenant' => Tenant::class, // Use test tenant w/ DBs & domains
|
||||
]);
|
||||
|
||||
$app->singleton(RedisTenancyBootstrapper::class); // todo (Samuel) use proper approach eg config for singleton registration
|
||||
$app->singleton(PrefixCacheTenancyBootstrapper::class); // todo (Samuel) use proper approach eg config for singleton registration
|
||||
$app->singleton(RedisTenancyBootstrapper::class); // todo@samuel use proper approach eg config for singleton registration
|
||||
$app->singleton(PrefixCacheTenancyBootstrapper::class); // todo@samuel use proper approach eg config for singleton registration
|
||||
$app->singleton(BroadcastingConfigBootstrapper::class);
|
||||
$app->singleton(BroadcastChannelPrefixBootstrapper::class);
|
||||
$app->singleton(MailTenancyBootstrapper::class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue