diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e57bdd8..f25fea17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The asset classes that left for the package no longer reach for Laravel: `AssetEnqueuer` receives the hook services, the Vite factory, the runtime and a PSR-3 logger instead of resolving them from the container, `AssetFile` is resolved through a resolver the provider sets (`AssetFile::resolveUsing()`), and `AssetManager`, `MissingBuilds` and `MissingBuildNotice` take their public directory, logger and project root as arguments. The rendered HTML of a Pollora site is unchanged, in build and while Vite runs hot - An `AssetEnqueuer` destroyed after its application, as in a test, no longer throws while it reports a failure of its deferred enqueue - The typed meta classes that will leave for `pollora/meta` no longer reach for Laravel: `MetaUiDrivers` and `MetaAccessor::extend()` take a PSR-11 `ContainerInterface` (the Laravel container is one, a driver closure receives the same object), and the key of a data object's property is derived by `Pollora\Attributes\Support\Naming` instead of `Str::snake()`. What needs Laravel moved to `Pollora\Meta\Infrastructure\Laravel`: `MetaServiceProvider`, `LaravelMetaValidator`, `TypedMetaCheck`, `MetaListCommand` and `MetaAuditCommand`. The rendered pages, the REST responses and the output of the `pollora:meta:*`, `pollora:binding:list`, `pollora:roles:*` and `pollora:doctor` commands of a Pollora site are unchanged +- The roles classes that will leave for `pollora/roles` no longer reach for Laravel: the label of a `#[Role]` without one comes from `Naming::headline()` (the same words as `Str::headline()`) and `Naming::classBasename()`. What needs Laravel moved to `Pollora\Role\Infrastructure\Laravel`: `RoleServiceProvider`, the `role` middleware `EnsureUserHasRole`, the `@role` directive `RoleDirective`, the `RolesCheck` of `pollora:doctor` and the `pollora:roles:*` and `pollora:make:role` commands with their stubs. Roles, capabilities and command outputs of a Pollora site are unchanged ## [v13.36.0](https://github.com/Pollora/framework/compare/v13.35.6...v13.36.0) - 2026-10-14 diff --git a/composer.json b/composer.json index b80baa1f..e11ba04b 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "pollora/abilities": "^1.0", "pollora/ajax": "^1.1", "pollora/assets": "^0.1", - "pollora/attributes": "^0.1 || ^1.0", + "pollora/attributes": "^0.1.1 || ^1.0", "pollora/discovery": "^0.1 || ^1.0", "pollora/entity": "^1.2", "pollora/hook": "^2.0.1", diff --git a/src/Providers/PolloraServiceProvider.php b/src/Providers/PolloraServiceProvider.php index 2b23a8a4..70120f93 100755 --- a/src/Providers/PolloraServiceProvider.php +++ b/src/Providers/PolloraServiceProvider.php @@ -33,7 +33,7 @@ use Pollora\Permalink\Infrastructure\Providers\PermalinkServiceProvider; use Pollora\Plugin\Infrastructure\Providers\PluginServiceProvider; use Pollora\PostType\Infrastructure\Providers\PostTypeServiceProvider; -use Pollora\Role\Infrastructure\Providers\RoleServiceProvider; +use Pollora\Role\Infrastructure\Laravel\RoleServiceProvider; use Pollora\Route\Infrastructure\Providers\RouteServiceProvider; use Pollora\Schedule\SchedulerServiceProvider; use Pollora\Taxonomy\Infrastructure\Providers\TaxonomyServiceProvider; diff --git a/src/Role/Application/Services/RoleDefinitionBuilder.php b/src/Role/Application/Services/RoleDefinitionBuilder.php index d2cf93a1..f70df2df 100644 --- a/src/Role/Application/Services/RoleDefinitionBuilder.php +++ b/src/Role/Application/Services/RoleDefinitionBuilder.php @@ -5,13 +5,13 @@ namespace Pollora\Role\Application\Services; use BackedEnum; -use Illuminate\Support\Str; use Pollora\Attributes\ModifyRole; use Pollora\Attributes\Role; use Pollora\Attributes\Role\Grants; use Pollora\Attributes\Role\GrantsPostType; use Pollora\Attributes\Role\GrantsTaxonomy; use Pollora\Attributes\Role\Without; +use Pollora\Attributes\Support\Naming; use Pollora\Role\Domain\Exceptions\InvalidRoleDefinitionException; use Pollora\Role\Domain\Models\RoleChanges; use Pollora\Role\Domain\Models\RoleDefinition; @@ -83,7 +83,7 @@ public function build(string $class): RoleDefinition|RoleModification return new RoleDefinition( slug: $role->slug, - label: $role->label ?? Str::headline(class_basename($class)), + label: $role->label ?? Naming::headline(Naming::classBasename($class)), inherits: $inherits, changes: $changes, declaringClass: $class, diff --git a/src/Role/UI/Console/RoleDumpCommand.php b/src/Role/Infrastructure/Laravel/Console/RoleDumpCommand.php similarity index 98% rename from src/Role/UI/Console/RoleDumpCommand.php rename to src/Role/Infrastructure/Laravel/Console/RoleDumpCommand.php index 90549987..4be02fe7 100644 --- a/src/Role/UI/Console/RoleDumpCommand.php +++ b/src/Role/Infrastructure/Laravel/Console/RoleDumpCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\UI\Console; +namespace Pollora\Role\Infrastructure\Laravel\Console; use Illuminate\Console\Attributes\Description; use Illuminate\Console\Attributes\Signature; diff --git a/src/Role/UI/Console/RoleImportCommand.php b/src/Role/Infrastructure/Laravel/Console/RoleImportCommand.php similarity index 99% rename from src/Role/UI/Console/RoleImportCommand.php rename to src/Role/Infrastructure/Laravel/Console/RoleImportCommand.php index 54cd67b0..205dc1a8 100644 --- a/src/Role/UI/Console/RoleImportCommand.php +++ b/src/Role/Infrastructure/Laravel/Console/RoleImportCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\UI\Console; +namespace Pollora\Role\Infrastructure\Laravel\Console; use Illuminate\Console\Attributes\Description; use Illuminate\Support\Str; diff --git a/src/Role/UI/Console/RoleListCommand.php b/src/Role/Infrastructure/Laravel/Console/RoleListCommand.php similarity index 97% rename from src/Role/UI/Console/RoleListCommand.php rename to src/Role/Infrastructure/Laravel/Console/RoleListCommand.php index 8321a526..8eef1be6 100644 --- a/src/Role/UI/Console/RoleListCommand.php +++ b/src/Role/Infrastructure/Laravel/Console/RoleListCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\UI\Console; +namespace Pollora\Role\Infrastructure\Laravel\Console; use Illuminate\Console\Attributes\Description; use Illuminate\Console\Attributes\Signature; diff --git a/src/Role/UI/Console/RoleMakeCommand.php b/src/Role/Infrastructure/Laravel/Console/RoleMakeCommand.php similarity index 94% rename from src/Role/UI/Console/RoleMakeCommand.php rename to src/Role/Infrastructure/Laravel/Console/RoleMakeCommand.php index de6f1a2e..1bc4d802 100644 --- a/src/Role/UI/Console/RoleMakeCommand.php +++ b/src/Role/Infrastructure/Laravel/Console/RoleMakeCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\UI\Console; +namespace Pollora\Role\Infrastructure\Laravel\Console; use Illuminate\Console\Attributes\Description; use Illuminate\Support\Str; diff --git a/src/Role/UI/Console/RolePruneCommand.php b/src/Role/Infrastructure/Laravel/Console/RolePruneCommand.php similarity index 98% rename from src/Role/UI/Console/RolePruneCommand.php rename to src/Role/Infrastructure/Laravel/Console/RolePruneCommand.php index 4035772a..a383dd06 100644 --- a/src/Role/UI/Console/RolePruneCommand.php +++ b/src/Role/Infrastructure/Laravel/Console/RolePruneCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\UI\Console; +namespace Pollora\Role\Infrastructure\Laravel\Console; use Illuminate\Console\Attributes\Description; use Illuminate\Console\Attributes\Signature; diff --git a/src/Role/UI/Console/RoleShowCommand.php b/src/Role/Infrastructure/Laravel/Console/RoleShowCommand.php similarity index 98% rename from src/Role/UI/Console/RoleShowCommand.php rename to src/Role/Infrastructure/Laravel/Console/RoleShowCommand.php index b73a6ebb..e4757f54 100644 --- a/src/Role/UI/Console/RoleShowCommand.php +++ b/src/Role/Infrastructure/Laravel/Console/RoleShowCommand.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\UI\Console; +namespace Pollora\Role\Infrastructure\Laravel\Console; use Illuminate\Console\Attributes\Description; use Illuminate\Console\Attributes\Signature; diff --git a/src/Role/UI/Console/stubs/role-import.stub b/src/Role/Infrastructure/Laravel/Console/stubs/role-import.stub similarity index 100% rename from src/Role/UI/Console/stubs/role-import.stub rename to src/Role/Infrastructure/Laravel/Console/stubs/role-import.stub diff --git a/src/Role/UI/Console/stubs/role.stub b/src/Role/Infrastructure/Laravel/Console/stubs/role.stub similarity index 100% rename from src/Role/UI/Console/stubs/role.stub rename to src/Role/Infrastructure/Laravel/Console/stubs/role.stub diff --git a/src/Role/Infrastructure/Middleware/EnsureUserHasRole.php b/src/Role/Infrastructure/Laravel/EnsureUserHasRole.php similarity index 96% rename from src/Role/Infrastructure/Middleware/EnsureUserHasRole.php rename to src/Role/Infrastructure/Laravel/EnsureUserHasRole.php index 9a512e8d..3c1da4fc 100644 --- a/src/Role/Infrastructure/Middleware/EnsureUserHasRole.php +++ b/src/Role/Infrastructure/Laravel/EnsureUserHasRole.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\Infrastructure\Middleware; +namespace Pollora\Role\Infrastructure\Laravel; use Closure; use Illuminate\Auth\Access\AuthorizationException; diff --git a/src/Role/UI/View/RoleDirective.php b/src/Role/Infrastructure/Laravel/RoleDirective.php similarity index 93% rename from src/Role/UI/View/RoleDirective.php rename to src/Role/Infrastructure/Laravel/RoleDirective.php index 381044ff..0f975f22 100644 --- a/src/Role/UI/View/RoleDirective.php +++ b/src/Role/Infrastructure/Laravel/RoleDirective.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\UI\View; +namespace Pollora\Role\Infrastructure\Laravel; use Pollora\Role\Application\Services\RoleReference; diff --git a/src/Role/Infrastructure/Providers/RoleServiceProvider.php b/src/Role/Infrastructure/Laravel/RoleServiceProvider.php similarity index 91% rename from src/Role/Infrastructure/Providers/RoleServiceProvider.php rename to src/Role/Infrastructure/Laravel/RoleServiceProvider.php index 1e568772..bdfd20b5 100644 --- a/src/Role/Infrastructure/Providers/RoleServiceProvider.php +++ b/src/Role/Infrastructure/Laravel/RoleServiceProvider.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\Infrastructure\Providers; +namespace Pollora\Role\Infrastructure\Laravel; use Illuminate\Contracts\Foundation\Application; use Illuminate\Routing\Router; @@ -22,16 +22,13 @@ use Pollora\Role\Infrastructure\Adapters\WordPressRoleLabelTranslator; use Pollora\Role\Infrastructure\Adapters\WordPressRoleStore; use Pollora\Role\Infrastructure\Adapters\WordPressRoleUsage; -use Pollora\Role\Infrastructure\Checks\RolesCheck; -use Pollora\Role\Infrastructure\Middleware\EnsureUserHasRole; +use Pollora\Role\Infrastructure\Laravel\Console\RoleDumpCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleImportCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleListCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleMakeCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RolePruneCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleShowCommand; use Pollora\Role\Infrastructure\Services\RoleDiscovery; -use Pollora\Role\UI\Console\RoleDumpCommand; -use Pollora\Role\UI\Console\RoleImportCommand; -use Pollora\Role\UI\Console\RoleListCommand; -use Pollora\Role\UI\Console\RoleMakeCommand; -use Pollora\Role\UI\Console\RolePruneCommand; -use Pollora\Role\UI\Console\RoleShowCommand; -use Pollora\Role\UI\View\RoleDirective; use Psr\Log\LoggerInterface; /** diff --git a/src/Role/Infrastructure/Checks/RolesCheck.php b/src/Role/Infrastructure/Laravel/RolesCheck.php similarity index 98% rename from src/Role/Infrastructure/Checks/RolesCheck.php rename to src/Role/Infrastructure/Laravel/RolesCheck.php index 0990f469..bb7c47f3 100644 --- a/src/Role/Infrastructure/Checks/RolesCheck.php +++ b/src/Role/Infrastructure/Laravel/RolesCheck.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Pollora\Role\Infrastructure\Checks; +namespace Pollora\Role\Infrastructure\Laravel; use Pollora\Doctor\Domain\Contracts\CheckInterface; use Pollora\Doctor\Domain\Enums\RunContext; diff --git a/tests/Feature/Extraction/RolesContractTest.php b/tests/Feature/Extraction/RolesContractTest.php index 8104afb9..8575f5bd 100644 --- a/tests/Feature/Extraction/RolesContractTest.php +++ b/tests/Feature/Extraction/RolesContractTest.php @@ -13,8 +13,8 @@ use Pollora\Role\Application\Services\RoleDefinitionBuilder; use Pollora\Role\Application\Services\RoleRegistry; use Pollora\Role\Domain\Services\RoleCompiler; -use Pollora\Role\Infrastructure\Middleware\EnsureUserHasRole; -use Pollora\Role\Infrastructure\Providers\RoleServiceProvider; +use Pollora\Role\Infrastructure\Laravel\EnsureUserHasRole; +use Pollora\Role\Infrastructure\Laravel\RoleServiceProvider; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use Tests\Unit\Role\Fixtures\EditorAdjustments; diff --git a/tests/Feature/Extraction/surface.json b/tests/Feature/Extraction/surface.json index 89e16a03..f009580b 100644 --- a/tests/Feature/Extraction/surface.json +++ b/tests/Feature/Extraction/surface.json @@ -921,58 +921,7 @@ "usersWith": "public (string $entry): array" } }, - "Pollora\\Role\\Infrastructure\\Checks\\RolesCheck": { - "kind": "final readonly class", - "extends": null, - "implements": [ - "Pollora\\Doctor\\Domain\\Contracts\\CheckInterface" - ], - "constants": [], - "methods": { - "__construct": "public (Pollora\\Role\\Domain\\Contracts\\RoleUsageInterface $usage, Pollora\\Role\\Infrastructure\\Adapters\\WordPressRoleInjector $injector, Pollora\\Role\\Domain\\Services\\StoredEntryClassifier $classifier = ?): mixed", - "id": "public (): string", - "label": "public (): string", - "run": "public (Pollora\\Doctor\\Domain\\Enums\\RunContext $context): Pollora\\Doctor\\Domain\\Models\\CheckResult", - "runsIn": "public (): array" - } - }, - "Pollora\\Role\\Infrastructure\\Middleware\\EnsureUserHasRole": { - "kind": "class", - "extends": null, - "implements": [], - "constants": [], - "methods": { - "handle": "public (Illuminate\\Http\\Request $request, Closure $next, ...string $roles): Symfony\\Component\\HttpFoundation\\Response", - "using": "public static (...string $roles): string" - } - }, - "Pollora\\Role\\Infrastructure\\Providers\\RoleServiceProvider": { - "kind": "class", - "extends": "Illuminate\\Support\\ServiceProvider", - "implements": [], - "constants": [], - "methods": { - "boot": "public (): void", - "register": "public (): void" - } - }, - "Pollora\\Role\\Infrastructure\\Services\\RoleDiscovery": { - "kind": "final class", - "extends": null, - "implements": [ - "Pollora\\Discovery\\Domain\\Contracts\\DiscoveryInterface" - ], - "constants": [], - "methods": { - "__construct": "public (Pollora\\Role\\Application\\Services\\RoleDefinitionBuilder $builder, Pollora\\Role\\Application\\Services\\RoleRegistry $registry, Pollora\\Role\\Infrastructure\\Adapters\\WordPressRoleInjector $injector, ?Psr\\Log\\LoggerInterface $logger = ?): mixed", - "apply": "public (): void", - "discover": "public (Pollora\\Discovery\\Domain\\Contracts\\DiscoveryLocationInterface $location, Spatie\\StructureDiscoverer\\Data\\DiscoveredStructure $structure, ?Pollora\\Discovery\\Domain\\Contracts\\ReflectionCacheInterface $reflectionCache = ?): void", - "getIdentifier": "public (): string", - "getItems": "public (): Pollora\\Discovery\\Domain\\Contracts\\DiscoveryItemsInterface", - "setItems": "public (Pollora\\Discovery\\Domain\\Contracts\\DiscoveryItemsInterface $items): void" - } - }, - "Pollora\\Role\\UI\\Console\\RoleDumpCommand": { + "Pollora\\Role\\Infrastructure\\Laravel\\Console\\RoleDumpCommand": { "kind": "class", "extends": "Illuminate\\Console\\Command", "implements": [], @@ -981,7 +930,7 @@ "handle": "public (Pollora\\Role\\Domain\\Contracts\\RoleStoreInterface $store): int" } }, - "Pollora\\Role\\UI\\Console\\RoleImportCommand": { + "Pollora\\Role\\Infrastructure\\Laravel\\Console\\RoleImportCommand": { "kind": "class", "extends": "Pollora\\Console\\AbstractGeneratorCommand", "implements": [], @@ -996,7 +945,7 @@ "replaceClass": "protected (mixed $stub, mixed $name): string" } }, - "Pollora\\Role\\UI\\Console\\RoleListCommand": { + "Pollora\\Role\\Infrastructure\\Laravel\\Console\\RoleListCommand": { "kind": "class", "extends": "Illuminate\\Console\\Command", "implements": [], @@ -1005,7 +954,7 @@ "handle": "public (Pollora\\Role\\Application\\Services\\RoleRegistry $registry, Pollora\\Role\\Domain\\Contracts\\RoleUsageInterface $usage): int" } }, - "Pollora\\Role\\UI\\Console\\RoleMakeCommand": { + "Pollora\\Role\\Infrastructure\\Laravel\\Console\\RoleMakeCommand": { "kind": "class", "extends": "Pollora\\Console\\AbstractGeneratorCommand", "implements": [], @@ -1016,7 +965,7 @@ "replaceClass": "protected (mixed $stub, mixed $name): string" } }, - "Pollora\\Role\\UI\\Console\\RolePruneCommand": { + "Pollora\\Role\\Infrastructure\\Laravel\\Console\\RolePruneCommand": { "kind": "class", "extends": "Illuminate\\Console\\Command", "implements": [], @@ -1025,7 +974,7 @@ "handle": "public (Pollora\\Role\\Domain\\Contracts\\RoleUsageInterface $usage, Pollora\\Role\\Domain\\Contracts\\RoleStoreInterface $store, Pollora\\Role\\Application\\Services\\RoleRegistry $registry, Pollora\\Role\\Domain\\Services\\StoredEntryClassifier $classifier): int" } }, - "Pollora\\Role\\UI\\Console\\RoleShowCommand": { + "Pollora\\Role\\Infrastructure\\Laravel\\Console\\RoleShowCommand": { "kind": "class", "extends": "Illuminate\\Console\\Command", "implements": [], @@ -1034,7 +983,17 @@ "handle": "public (Pollora\\Role\\Application\\Services\\RoleRegistry $registry): int" } }, - "Pollora\\Role\\UI\\View\\RoleDirective": { + "Pollora\\Role\\Infrastructure\\Laravel\\EnsureUserHasRole": { + "kind": "class", + "extends": null, + "implements": [], + "constants": [], + "methods": { + "handle": "public (Illuminate\\Http\\Request $request, Closure $next, ...string $roles): Symfony\\Component\\HttpFoundation\\Response", + "using": "public static (...string $roles): string" + } + }, + "Pollora\\Role\\Infrastructure\\Laravel\\RoleDirective": { "kind": "final class", "extends": null, "implements": [], @@ -1042,5 +1001,46 @@ "methods": { "__invoke": "public (string $expression): string" } + }, + "Pollora\\Role\\Infrastructure\\Laravel\\RoleServiceProvider": { + "kind": "class", + "extends": "Illuminate\\Support\\ServiceProvider", + "implements": [], + "constants": [], + "methods": { + "boot": "public (): void", + "register": "public (): void" + } + }, + "Pollora\\Role\\Infrastructure\\Laravel\\RolesCheck": { + "kind": "final readonly class", + "extends": null, + "implements": [ + "Pollora\\Doctor\\Domain\\Contracts\\CheckInterface" + ], + "constants": [], + "methods": { + "__construct": "public (Pollora\\Role\\Domain\\Contracts\\RoleUsageInterface $usage, Pollora\\Role\\Infrastructure\\Adapters\\WordPressRoleInjector $injector, Pollora\\Role\\Domain\\Services\\StoredEntryClassifier $classifier = ?): mixed", + "id": "public (): string", + "label": "public (): string", + "run": "public (Pollora\\Doctor\\Domain\\Enums\\RunContext $context): Pollora\\Doctor\\Domain\\Models\\CheckResult", + "runsIn": "public (): array" + } + }, + "Pollora\\Role\\Infrastructure\\Services\\RoleDiscovery": { + "kind": "final class", + "extends": null, + "implements": [ + "Pollora\\Discovery\\Domain\\Contracts\\DiscoveryInterface" + ], + "constants": [], + "methods": { + "__construct": "public (Pollora\\Role\\Application\\Services\\RoleDefinitionBuilder $builder, Pollora\\Role\\Application\\Services\\RoleRegistry $registry, Pollora\\Role\\Infrastructure\\Adapters\\WordPressRoleInjector $injector, ?Psr\\Log\\LoggerInterface $logger = ?): mixed", + "apply": "public (): void", + "discover": "public (Pollora\\Discovery\\Domain\\Contracts\\DiscoveryLocationInterface $location, Spatie\\StructureDiscoverer\\Data\\DiscoveredStructure $structure, ?Pollora\\Discovery\\Domain\\Contracts\\ReflectionCacheInterface $reflectionCache = ?): void", + "getIdentifier": "public (): string", + "getItems": "public (): Pollora\\Discovery\\Domain\\Contracts\\DiscoveryItemsInterface", + "setItems": "public (Pollora\\Discovery\\Domain\\Contracts\\DiscoveryItemsInterface $items): void" + } } } diff --git a/tests/Unit/Role/EnsureUserHasRoleTest.php b/tests/Unit/Role/EnsureUserHasRoleTest.php index 382d68c7..9445de74 100644 --- a/tests/Unit/Role/EnsureUserHasRoleTest.php +++ b/tests/Unit/Role/EnsureUserHasRoleTest.php @@ -5,7 +5,7 @@ use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Http\Request; -use Pollora\Role\Infrastructure\Middleware\EnsureUserHasRole; +use Pollora\Role\Infrastructure\Laravel\EnsureUserHasRole; use Symfony\Component\HttpFoundation\Response; use Tests\Unit\Role\Fixtures\EventManager; diff --git a/tests/Unit/Role/RoleCommandsTest.php b/tests/Unit/Role/RoleCommandsTest.php index 3ccbef14..7b08379d 100644 --- a/tests/Unit/Role/RoleCommandsTest.php +++ b/tests/Unit/Role/RoleCommandsTest.php @@ -14,8 +14,8 @@ use Pollora\Role\Domain\Services\PostTypeCapabilityMap; use Pollora\Role\Domain\Services\RoleCompiler; use Pollora\Role\Infrastructure\Adapters\WordPressRoleInjector; -use Pollora\Role\UI\Console\RoleListCommand; -use Pollora\Role\UI\Console\RoleShowCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleListCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleShowCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; use Tests\Unit\Role\Fixtures\EditorAdjustments; diff --git a/tests/Unit/Role/RoleDirectiveTest.php b/tests/Unit/Role/RoleDirectiveTest.php index 191956dc..18609d7a 100644 --- a/tests/Unit/Role/RoleDirectiveTest.php +++ b/tests/Unit/Role/RoleDirectiveTest.php @@ -3,7 +3,7 @@ declare(strict_types=1); use Brain\Monkey\Functions; -use Pollora\Role\UI\View\RoleDirective; +use Pollora\Role\Infrastructure\Laravel\RoleDirective; use Tests\Unit\Role\Fixtures\EventManager; /** diff --git a/tests/Unit/Role/RoleServiceProviderTest.php b/tests/Unit/Role/RoleServiceProviderTest.php index 90be8ccb..6b853a0e 100644 --- a/tests/Unit/Role/RoleServiceProviderTest.php +++ b/tests/Unit/Role/RoleServiceProviderTest.php @@ -12,11 +12,11 @@ use Pollora\Hook\Domain\Contract\Filter; use Pollora\Role\Application\Services\RoleDefinitionBuilder; use Pollora\Role\Infrastructure\Adapters\WordPressRoleInjector; -use Pollora\Role\Infrastructure\Middleware\EnsureUserHasRole; -use Pollora\Role\Infrastructure\Providers\RoleServiceProvider; +use Pollora\Role\Infrastructure\Laravel\Console\RoleMakeCommand; +use Pollora\Role\Infrastructure\Laravel\EnsureUserHasRole; +use Pollora\Role\Infrastructure\Laravel\RoleDirective; +use Pollora\Role\Infrastructure\Laravel\RoleServiceProvider; use Pollora\Role\Infrastructure\Services\RoleDiscovery; -use Pollora\Role\UI\Console\RoleMakeCommand; -use Pollora\Role\UI\View\RoleDirective; use Psr\Log\LoggerInterface; beforeEach(function (): void { diff --git a/tests/Unit/Role/RoleWritingCommandsTest.php b/tests/Unit/Role/RoleWritingCommandsTest.php index c8e601be..73784cb4 100644 --- a/tests/Unit/Role/RoleWritingCommandsTest.php +++ b/tests/Unit/Role/RoleWritingCommandsTest.php @@ -15,9 +15,9 @@ use Pollora\Role\Domain\Contracts\RoleUsageInterface; use Pollora\Role\Domain\Services\PostTypeCapabilityMap; use Pollora\Role\Domain\Services\StoredEntryClassifier; -use Pollora\Role\UI\Console\RoleDumpCommand; -use Pollora\Role\UI\Console\RoleImportCommand; -use Pollora\Role\UI\Console\RolePruneCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleDumpCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RoleImportCommand; +use Pollora\Role\Infrastructure\Laravel\Console\RolePruneCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; use Tests\Unit\Role\Fixtures\EventManager; diff --git a/tests/Unit/Role/RolesCheckTest.php b/tests/Unit/Role/RolesCheckTest.php index c4333593..a86ea3c0 100644 --- a/tests/Unit/Role/RolesCheckTest.php +++ b/tests/Unit/Role/RolesCheckTest.php @@ -11,7 +11,7 @@ use Pollora\Role\Domain\Services\PostTypeCapabilityMap; use Pollora\Role\Domain\Services\RoleCompiler; use Pollora\Role\Infrastructure\Adapters\WordPressRoleInjector; -use Pollora\Role\Infrastructure\Checks\RolesCheck; +use Pollora\Role\Infrastructure\Laravel\RolesCheck; use Tests\Unit\Role\Fixtures\EventManager; use Tests\Unit\Role\Fixtures\FakeRoleUsage;