Skip to content

Revert "Use value() helper in 'when' method to simplify code" #55465 #55514

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

Conversation

mohammadrasoulasghari
Copy link
Contributor

In a previous PR, I replaced the logic inside the when method with a call to the value() helper for better readability and to avoid duplicating logic.
However, since Conditionable is intended to be used as a standalone package, relying on the value() helper — which comes from illuminate/collections — is incorrect.
This PR reverts that change to ensure Conditionable remains fully self-contained.

@shaedrich
Copy link
Contributor

shaedrich commented Apr 23, 2025

Would it make sense to title the PR "Revert #55465"?

@mohammadrasoulasghari mohammadrasoulasghari changed the title Fix when method in Conditionable and remove use of value() helper Revert "Use value() helper in 'when' method to simplify code https://github.com/laravel/framework/pull/55465" Apr 23, 2025
@mohammadrasoulasghari mohammadrasoulasghari changed the title Revert "Use value() helper in 'when' method to simplify code https://github.com/laravel/framework/pull/55465" Revert "Use value() helper in 'when' method to simplify code #55465" Apr 23, 2025
@mohammadrasoulasghari mohammadrasoulasghari changed the title Revert "Use value() helper in 'when' method to simplify code #55465" Revert "Use value() helper in 'when' method to simplify code" #55465 Apr 23, 2025
@taylorotwell taylorotwell merged commit 9ee0795 into laravel:12.x Apr 23, 2025
60 checks passed
@mohammadrasoulasghari mohammadrasoulasghari deleted the revert-55465-when-method-using-value branch May 23, 2025 13:02
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.

3 participants