-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove date.default_latitude and .default_longitude inis #4423
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
The only purpose of these ini settings is to serve as defaults for `date_sunrise()` and `date_sunset()`, which is is obviously of limited usefulness.
case 3: | ||
longitude = INI_FLT("date.default_longitude"); | ||
longitude = DATE_DEFAULT_LONGITUDE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having these as ini's still made some small sense in that you could configure your server for your location (if such a thing exists) -- but a hardcoded default is completely useless. If we drop the ini settings, these parameters should be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that these parameters should not have a default, but they come after the optional $format parameter. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would have to become required as well ... people would have had to specify it for any realistic use of the function anyway, to get at the lat/long parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, but in this case we should have deprecated relying on the defaults in PHP 7.4. Guess it's too late now. Postpone? @derickr ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit unfortunate that this didn't make it into the 7.4 deprecations. I guess this isn't particularly critical though and we can deprecate for 8.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this topic has been brought up 12 years ago, I don't think it's critical, so deprecating for 8.0 would be fine for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. tbh, if I really got my way, I'd deprecate the two functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure we don't forget about it, I've created https://wiki.php.net/rfc/deprecations_php_8_0 and added a stub for this. If anyone wants to fill out the argument, feel free :)
As it looks like we'll go with a different approach, can this be closed? |
Closing this is fine for me. |
The only purpose of these ini settings is to serve as defaults for
date_sunrise()
anddate_sunset()
, which is is obviously of limitedusefulness.
This topic came up in PR #4412, and this PR is meant as a base for discussing and evaluating what to do with these INI settings. See also https://externals.io/message/26033 for a former discussion about changing the default values of the settings.
cc @derickr