Skip to content

PHP 8.1 | RemovedFunctions: account for PHP 8.1 changes#1321

Merged
wimg merged 3 commits intodevelopfrom
php-8.1/removedfunctions-account-for-php-8.1-changes
Mar 16, 2022
Merged

PHP 8.1 | RemovedFunctions: account for PHP 8.1 changes#1321
wimg merged 3 commits intodevelopfrom
php-8.1/removedfunctions-account-for-php-8.1-changes

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Mar 9, 2022

PHP 8.1 | RemovedFunctions: handle deprecated DateTime functions

date_sunrise() and date_sunset() have been deprecated in favor of date_sun_info().

strptime() has been deprecated. Use date_parse_from_format() instead (for locale-independent parsing), or IntlDateFormatter::parse() (for locale-dependent parsing).

strftime() and gmstrftime() have been deprecated. Use date() instead (for locale-independent formatting), or IntlDateFormatter::format() (for locale-dependent formatting).

Includes unit tests.

Refs:

PHP 8.1 | RemovedFunctions: handle deprecated mhash_*() functions

The mhash(), mhash_keygen_s2k(), mhash_count(), mhash_get_block_size(), and mhash_get_hash_name() have been deprecated. Use the hash_*() functions instead.

Includes unit tests.

Refs:

PHP 8.1 | RemovedFunctions: handle deprecated odbc_result_all() function

odbc_result_all() has been deprecated.

Includes unit tests.

Refs:

Related to #1299

jrfnl added 3 commits March 9, 2022 01:11
> `date_sunrise()` and `date_sunset()` have been deprecated in favor of `date_sun_info()`.
>
> `strptime()` has been deprecated. Use `date_parse_from_format()` instead (for locale-independent parsing), or `IntlDateFormatter::parse()` (for locale-dependent parsing).
>
> `strftime()` and `gmstrftime()` have been deprecated. Use `date()` instead (for locale-independent formatting), or `IntlDateFormatter::format()` (for locale-dependent formatting).

Includes unit tests.

Refs:
* https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.date
* https://wiki.php.net/rfc/deprecations_php_8_1#date_sunrise_and_date_sunset
* php/php-src@5bb83b3
* https://wiki.php.net/rfc/deprecations_php_8_1#strptime
* php/php-src@bed7139
* https://wiki.php.net/rfc/deprecations_php_8_1#strftime_and_gmstrftime
* php/php-src@4b3615a
> The `mhash()`, `mhash_keygen_s2k()`, `mhash_count()`, `mhash_get_block_size()`, and `mhash_get_hash_name()` have been deprecated. Use the `hash_*()` functions instead.

Includes unit tests.

Refs:
* https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.hash
* https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family
* php/php-src@bf0c1ce
@jrfnl jrfnl added Type: enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Mar 9, 2022
@jrfnl jrfnl added this to the 10.0.0 milestone Mar 9, 2022
@jrfnl jrfnl requested a review from wimg March 9, 2022 00:44
@wimg wimg merged commit 4cce17f into develop Mar 16, 2022
@wimg wimg deleted the php-8.1/removedfunctions-account-for-php-8.1-changes branch March 16, 2022 19:40
@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants