Skip to content

Fix GH-18223: Meaningful error on wrong trait method exclusion#19404

Open
alexandre-daubois wants to merge 1 commit intophp:PHP-8.4from
alexandre-daubois:traits-precedence
Open

Fix GH-18223: Meaningful error on wrong trait method exclusion#19404
alexandre-daubois wants to merge 1 commit intophp:PHP-8.4from
alexandre-daubois:traits-precedence

Conversation

@alexandre-daubois
Copy link
Member

Fix #18223

This adds a compile-time validation to detect invalid trait insteadof rules that would exclude all method implementations. This replaces the confusing runtime "undefined method" errors with a meaningful message.

@alexandre-daubois
Copy link
Member Author

Friendly ping @iluuu1994 as you wrote the issue 🙂

@alexandre-daubois alexandre-daubois changed the base branch from PHP-8.3 to PHP-8.4 March 2, 2026 14:28
@iluuu1994
Copy link
Member

@alexandre-daubois I'll try to have a look tomorrow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid trait insteadof list

2 participants