Fix some deprecation warnings#64
Merged
kamilwylegala merged 11 commits intokamilwylegala:masterfrom Jan 29, 2024
Merged
Conversation
Contributor
diegosurita
commented
Jan 26, 2024
- Switch deprecated utf8_encode function to mb_convert_encoding function.
- Fix PHP 8.1 deprecation warnings on Helper and FormHelper.
- Hide strftime deprecation warning.
- Fix preg_split deprecated null param limit on CakeResponse::checkNotModified
- fix deprecation warning when Helper::_entityPath is null - fix `strftime` function deprecation warning on FormHelper::_getDateTimeValue method ref: ARCH-11
Since CakePHP 2 doesn't require the installation of `intl` PHP extension in it's documentation, I can't use the alternative `IntlDateFormatter::format` because it relies such extension. ref: ARCH-13
ref: ARCH-11
ARCH-11: Fix PHP 8.1 deprecation warnings on Helper and FormHelper
ARCH-13: hide strftime deprecation warnings and remove deprecated utf8_encode function
- CakeResponse.php strotime() and preg_split() warnings
1009e3b to
d3c0f5c
Compare
Contributor
Author
|
I suggest adjust PHP Coding Standard to ignore silencing errors (
|
Owner
|
@diegosurita Thank you for this contribution. Maybe ignoring CodeSniffer error via: https://stackoverflow.com/a/4306803 could work? Regarding introducing Intl, a I don't think it's a bad idea. Requirements for locale version of time is important, I think we could require this extension. Could you add comment to ignore error first? Then maybe let's investigate Intl extension option. |
Owner
|
Thanks for adjusting the code. Merging. |
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.