Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4 | Fix passing E_USER_ERROR to trigger_error() #149

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Aug 29, 2024

PHP 8.4 deprecates passing E_USER_ERROR to trigger_error(), with the recommendation being to replace these type of calls with either an Exception or an exit statement.

This commit fixes the one instance found in this codebase by introducing a new MissingFunctionExpectations exception.

Includes updating the related tests (and test names) to match.

Ref: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error

Related to #146

PHP 8.4 deprecates passing `E_USER_ERROR` to `trigger_error()`, with the recommendation being to replace these type of calls with either an Exception or an `exit` statement.

This commit fixes the one instance found in this codebase by introducing a new `MissingFunctionExpectations` exception.

Includes updating the related tests (and test names) to match.

Ref: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error

Related to #146
@jrfnl jrfnl added this to the 2.x Next milestone Aug 29, 2024
@jrfnl jrfnl requested a review from gmazzap August 29, 2024 10:00
@jrfnl jrfnl mentioned this pull request Aug 29, 2024
@gmazzap
Copy link
Collaborator

gmazzap commented Aug 29, 2024

Thank you very much @jrfnl

Awesome work as usual :)

@gmazzap gmazzap merged commit d95a9d8 into master Aug 29, 2024
20 of 21 checks passed
@gmazzap gmazzap deleted the feature/php-8.4-fix-for-trigger-error branch August 29, 2024 20:15
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