fix: Required parameter $function follows optional parameter $conditions [PHP8]#32
Open
mkosiedowski wants to merge 1 commit intoGregwar:masterfrom
Open
fix: Required parameter $function follows optional parameter $conditions [PHP8]#32mkosiedowski wants to merge 1 commit intoGregwar:masterfrom
mkosiedowski wants to merge 1 commit intoGregwar:masterfrom
Conversation
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
$functionis passed asnull, but I did not want to break backwards compatibility in the interface