-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Named Arguments #324
Labels
bug
Something isn't working
Comments
Which PHP version and which safe version are you using? |
Both latest: echo PHP_VERSION_ID, PHP_EOL,
json_decode(file_get_contents(__DIR__. '/composer.lock'))->packages[0]->name, PHP_EOL,
json_decode(file_get_contents(__DIR__. '/composer.lock'))->packages[0]->version, PHP_EOL,
var_export((new \ReflectionFunction('Safe\json_decode'))->getParameters(), true), PHP_EOL,
var_export((new \ReflectionFunction('\json_decode'))->getParameters(), true); 80102
thecodingmachine/safe
v2.1.1
array (
0 =>
ReflectionParameter::__set_state(array(
'name' => 'json',
)),
1 =>
ReflectionParameter::__set_state(array(
'name' => 'assoc',
)),
2 =>
ReflectionParameter::__set_state(array(
'name' => 'depth',
)),
3 =>
ReflectionParameter::__set_state(array(
'name' => 'options',
)),
)
array (
0 =>
ReflectionParameter::__set_state(array(
'name' => 'json',
)),
1 =>
ReflectionParameter::__set_state(array(
'name' => 'associative',
)),
2 =>
ReflectionParameter::__set_state(array(
'name' => 'depth',
)),
3 =>
ReflectionParameter::__set_state(array(
'name' => 'flags',
)),
) |
Ah this is a bug then. Since If you are up for it, you can submit a PR changing the parameter names in https://github.com/thecodingmachine/safe/blob/master/lib/special_cases.php |
@dbrekelmans Hi! Consider my changes, please. #376 |
Fixed in #376 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Is breaking straightforward migration when named arguments are used a bug or feature?
E.g. this code - without Safe - will work fine:
migration to using Safe would require to changing
flags
tooptions
though.The text was updated successfully, but these errors were encountered: