Skip to content

[13.x] Refactor parameter names that are implemented from the interface#59015

Merged
taylorotwell merged 1 commit intolaravel:13.xfrom
mrvipchien:thows
Feb 26, 2026
Merged

[13.x] Refactor parameter names that are implemented from the interface#59015
taylorotwell merged 1 commit intolaravel:13.xfrom
mrvipchien:thows

Conversation

@mrvipchien
Copy link
Contributor

This PR aligns method parameter names in implementation classes with their respective Interfaces/Parent classes.

Why this is necessary:

  • Named arguments compatibility: In PHP 8+, renaming parameters in a subclass breaks code that calls the method using named arguments from the interface.
  • Static analysis: Fixes "parameter name mismatch" warnings in PHPStan/Psalm.
  • Liskov substitution principle (LSP): Ensures subclasses strictly follow the contract defined by the interface

@taylorotwell taylorotwell merged commit 10af292 into laravel:13.x Feb 26, 2026
54 checks passed
@mrvipchien mrvipchien deleted the thows branch February 26, 2026 15:37
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.

2 participants