Skip to content

eloquent controllers: use [static::class, ] as controller method refe…#1011

Open
afk11 wants to merge 1 commit into
release-v7from
7.0-static-use
Open

eloquent controllers: use [static::class, ] as controller method refe…#1011
afk11 wants to merge 1 commit into
release-v7from
7.0-static-use

Conversation

@afk11

@afk11 afk11 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

a typo in the string format isn't detected until much later, whereas static::class is always correct, and can't be typod without producing compile errors (detected early)

it's also invisible to 'Find Usages' in PhpStorm in the string format, so this helps navigating the project

…rence for routes. More robust against typos (execution fails with a syntax error) and helps IDE determine what code is being run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant