Repository navigation
refactor: keep roles free of Laravel before they become a package - #489
Merged
Merged
Conversation
The label of a #[Role] without one comes from Naming::headline(), and what needs Laravel (provider, middleware, @ROLE directive, doctor check, commands and stubs) moves to Pollora\Role\Infrastructure\Laravel. Roles, capabilities and command outputs of pollora-test are identical to the references taken before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 1 of the extraction of
pollora/roles(plan:.claude/plans/meta-roles-bindings-packages.mdin pollora-test).RoleDefinitionBuilder: the label of a#[Role]without one comes fromNaming::headline()(pollora/attributes 0.1.1, same words asStr::headline(), checked against it) andNaming::classBasename()instead ofclass_basename().Pollora\Role\Infrastructure\Laravel: provider,EnsureUserHasRole,RoleDirective,RolesCheck, the six commands and their stubs. They stay in the framework when the package is extracted.pollora/attributesis required at^0.1.1 || ^1.0.surface.json: the diff is the moved classes only.Checked: Roles unit and contract tests, PHPStan, Rector, Pint; the 28 captures of pollora-test (roles:list, roles:show ×6, doctor, wp_user_roles, pages, REST, bindings…) are identical to the references taken before the change.