-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix some deprecation warnings #64
Fix some deprecation warnings #64
Conversation
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
I suggest adjust PHP Coding Standard to ignore silencing errors (
|
@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. |
Thanks for adjusting the code. Merging. |