[ON HOLD] Move date
function group from RestrictedPHPFunctions
to TimezoneChange
#1794
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.
Follow up on PR #1714 which fixed #1713.
As per the discussion in #1731 (comment). moving the check for use of the
date()
to theTimezoneChange
sniff.As the
date
function group has not been in a released version (yet), we can still safely make this change without concerns about introducing breaking changes (error code change).As that sniff is not part of the
Core
ruleset, I'm explicitly adding this particular error code to theCore
ruleset.Note: we may want to consider renaming this sniff as the name does not seem to be 100% correct anymore.
Suggestions for a better name welcome. If we go down that road, I'd deprecate the
TimezoneChange
sniff to be removed in the next major release.