Ne-Lexa / php-zip

PhpZip is a php-library for extended work with ZIP-archives.
MIT License
493 stars 60 forks source link

PHP 8 support #72

Closed SteveDesmond-ca closed 3 years ago

SteveDesmond-ca commented 3 years ago

Description
As a developer using this library, I want to upgrade my app to PHP 8, so I can keep up with the latest patches.

Example
Currently, composer fails with

  Problem 1
    - nelexa/zip is locked to version 3.3.3 and an update of this package was not requested.
    - nelexa/zip 3.3.3 requires php ^5.5.9 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.

Not sure if any code needs to be changed beyond the composer config

odan commented 3 years ago

I think more changes are needed:

PHP 8 compatibility check result:

FILE: php-zip/src/Util/CryptoUtil.php
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 48 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and
    |       | removed since PHP 7.2; Use openssl (preferred) or
    |       | pecl/mcrypt once available instead
 48 | ERROR | Function mcrypt_decrypt() is deprecated since PHP 7.1
    |       | and removed since PHP 7.2; Use OpenSSL instead
 48 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since
    |       | PHP 7.1 and removed since PHP 7.2
 72 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and
    |       | removed since PHP 7.2; Use openssl (preferred) or
    |       | pecl/mcrypt once available instead
 72 | ERROR | Function mcrypt_encrypt() is deprecated since PHP 7.1
    |       | and removed since PHP 7.2; Use OpenSSL instead
 72 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since
    |       | PHP 7.1 and removed since PHP 7.2
----------------------------------------------------------------------
Ne-Lexa commented 3 years ago

Version 4.0 has been released with PHP 8 support. Thank you for your contribution.