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

fix: Required parameter $function follows optional parameter $conditions [PHP8] #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mkosiedowski
Copy link

Hi! I've found this issue while testing my project with PHP 8.
Required parameters after optional parameters in function/method signatures are deprecated in PHP 8

This is not a perfect solution, because the code will still throw an exception if the $function is passed as null, but I did not want to break backwards compatibility in the interface

@mahagr
Copy link
Contributor

mahagr commented Dec 2, 2020

Looks like I missed your fix. See #34 which does it by opposite way.

My take on this is that having default value before required parameter has no effect and the default value gets ignored. Interface break can be handled by inceasing version number of the library.

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