Skip to content

Conversation

@webard
Copy link
Contributor

@webard webard commented Jan 4, 2026

Description

According to #18847, this PR allows UnitEnum as an $action parameter in HasAuthorization trait.

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

Copilot AI review requested due to automatic review settings January 4, 2026 20:30
@github-project-automation github-project-automation bot moved this to Todo in Roadmap Jan 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for UnitEnum as the $action parameter in the HasAuthorization trait methods, allowing developers to use enum values instead of just strings when checking authorization. This is part of a broader effort to support enums throughout Filament, as referenced in issue #18847.

Key changes:

  • Updated three method signatures (getAuthorizationResponse, can, authorize) to accept UnitEnum | string instead of just string
  • Added use UnitEnum; import statement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@danharrin danharrin added the enhancement New feature or request label Jan 4, 2026
@danharrin danharrin modified the milestones: v4, v3, v5.0.0 Jan 4, 2026
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Jan 9, 2026
@danharrin danharrin merged commit 3953cdc into filamentphp:5.x Jan 9, 2026
23 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants