Skip to content

PHP 8.0: RemovedFunctions: handle 21 removed/deprecated functions #1202

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

Merged
merged 5 commits into from
Aug 16, 2020

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 10, 2020

The commits in this PR line up with the commits in PHP Core to remove the functions.

Related to #809


PHP 8.0: RemovedFunctions - account for deprecated Enchant functions

Deprecate enchant_broker_set_dict_path, enchant_broker_get_dict_path
enchant_dict_add_to_personal and enchant_dict_is_in_session

Ref: https://github.com/php/php-src/blob/c0172aa2bdb9ea223c8491bdb300995b93a857a0/NEWS#L71

  • enchant_broker_set_dict_path and enchant_broker_get_dict_path
    not available in libenchant < 1.5 nor in libenchant-2
  • enchant_dict_add_to_personal, use enchant_dict_add instead
  • enchant_dict_is_in_session, use enchant_dict_is_added instead
  • enchant_broker_free and enchant_broker_free_dict, unset the object instead

Refs:

Includes unit tests.

PHP 8.0: RemovedFunctions - handle removed support for oci_internal_debug()

oci_internal_debug() and its alias ociinternaldebug() have been removed.

Refs:

Includes adjusted unit tests.

PHP 8.0: RemovedFunctions - account for deprecated Zip functions

The procedural API of Zip is deprecated. Use ZipArchive instead

Refs:

Includes unit tests.

PHP 8.0: RemovedFunctions - account for deprecated OpenSSL functions

  • The openssl_x509_free() function is deprecated and no longer has an effect,
    instead the OpenSSLCertificate instance is automatically destroyed if it is no
    longer referenced.
  • The openssl_pkey_free() function is deprecated and no longer has an effect,
    instead the OpenSSLAsymmetricKey instance is automatically destroyed if it is no
    longer referenced.

Refs:

Includes unit tests.

PHP 8.0: RemovedFunctions - account for deprecated libXML function

LibXML:

  • libxml_disable_entity_loader() has been deprecated. As libxml 2.9.0 is now
    required, external entity loading is guaranteed to be disabled by default,
    and this function is no longer needed to protect against XXE attacks.

Refs:

Includes unit tests.

jrfnl added 5 commits August 10, 2020 22:42
> Deprecate enchant_broker_set_dict_path, enchant_broker_get_dict_path
> enchant_dict_add_to_personal and enchant_dict_is_in_session

Ref: https://github.com/php/php-src/blob/c0172aa2bdb9ea223c8491bdb300995b93a857a0/NEWS#L71

> - enchant_broker_set_dict_path and enchant_broker_get_dict_path
>    not available in libenchant < 1.5 nor in libenchant-2
> - enchant_dict_add_to_personal, use enchant_dict_add instead
> - enchant_dict_is_in_session, use enchant_dict_is_added instead
> - enchant_broker_free and enchant_broker_free_dict, unset the object instead

Refs:
* https://github.com/php/php-src/blob/c0172aa2bdb9ea223c8491bdb300995b93a857a0/UPGRADING#L662-L666
* php/php-src#5492
* php/php-src@66d42e9
* php/php-src#5577
* php/php-src@cd3e04d

Includes unit tests.
> - The openssl_x509_free() function is deprecated and no longer has an effect,
>     instead the OpenSSLCertificate instance is automatically destroyed if it is no
>     longer referenced.
> - The openssl_pkey_free() function is deprecated and no longer has an effect,
>    instead the OpenSSLAsymmetricKey instance is automatically destroyed if it is no
>    longer referenced.

Refs:
* https://github.com/php/php-src/blob/71bfa5344ab207072f4cd25745d7023096338385/UPGRADING#L384-L399
* php/php-src#5860
* php/php-src@9f44eca#diff-7748eb3bfdd3bf962553f6f9f2723c45

Includes unit tests.
> LibXML:
> - libxml_disable_entity_loader() has been deprecated. As libxml 2.9.0 is now
>   required, external entity loading is guaranteed to be disabled by default,
>   and this function is no longer needed to protect against XXE attacks.

Refs:
* https://github.com/php/php-src/blob/71bfa5344ab207072f4cd25745d7023096338385/UPGRADING#L808-L811
* php/php-src#5867
* php/php-src@e0fa48f

Includes unit tests.
@jrfnl jrfnl added enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Aug 10, 2020
@jrfnl jrfnl added this to the 10.0.0 milestone Aug 10, 2020
@jrfnl jrfnl requested a review from wimg August 10, 2020 21:54
@wimg wimg merged commit 14a38f1 into develop Aug 16, 2020
@wimg wimg deleted the php-8.0/removedfunctions-x21 branch August 16, 2020 22:29
@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Aug 16, 2020
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