Skip to content

Fix json_decode associative argument consistency with PHP#436

Closed
dpi wants to merge 1 commit intothecodingmachine:masterfrom
dpi:json_decode-named-arg
Closed

Fix json_decode associative argument consistency with PHP#436
dpi wants to merge 1 commit intothecodingmachine:masterfrom
dpi:json_decode-named-arg

Conversation

@dpi
Copy link
Copy Markdown
Contributor

@dpi dpi commented Dec 27, 2023

I like to use named arguments with \json_decode(), particularly with the associative argument.

e.g. \json_decode($json, associative: true);

Switching to use thecodingmachine/safe currently necessitates switching associative to assoc. This slows down migrations and introduces an inconsistency.

We should fix the named argument of \Safe\json_decode so it has the same name as PHP.

@dpi
Copy link
Copy Markdown
Contributor Author

dpi commented Dec 27, 2023

Similar to #376

@dpi dpi changed the title Fix json_decode associative argument consistency with PHP Fix json_decode associative argument consistency with PHP Dec 27, 2023
@staabm
Copy link
Copy Markdown
Collaborator

staabm commented Nov 28, 2024

cherry-picked with #473

thank you

@staabm staabm closed this Nov 28, 2024
@dpi dpi deleted the json_decode-named-arg branch November 28, 2024 12:13
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