Skip to content
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

Make client compatible with php 7. #18

Closed
AliaksandrVahura-ScienceSoft opened this issue Jan 15, 2016 · 2 comments
Closed

Make client compatible with php 7. #18

AliaksandrVahura-ScienceSoft opened this issue Jan 15, 2016 · 2 comments
Assignees

Comments

@AliaksandrVahura-ScienceSoft
Copy link
Contributor

According to compatibility check we need to remove deprecated php 4 constructors.

@thrijith
Copy link
Contributor

thrijith commented Oct 22, 2018

Result's after running compatibility check on laterpay-client-php

For PHP 7.0

phpcs -p laterpay-client-php --standard=PHPCompatibility --runtime-set testVersion 7.0
........... 11 / 11 (100%)
Time: 283ms; Memory: 8Mb

For PHP 7.1

phpcs -p laterpay-client-php --standard=PHPCompatibility --runtime-set testVersion 7.1
........W.. 11 / 11 (100%)
FILE: /Users/laterpay/laterpay-client-php/LaterPay/Crypt.php
FOUND 0 ERRORS AND 18 WARNINGS AFFECTING 9 LINES
148 | WARNING | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1
171 | WARNING | Function mcrypt_generic() is deprecated since PHP 7.1; Use OpenSSL instead
Time: 508ms; Memory: 8Mb

Gives warning to use OpenSSL instead of mcrypt. We are using OpenSSL but we have kept mcrypt as a fallback
Check 👉 this

For PHP 7.2

phpcs -p laterpay-client-php --standard=PHPCompatibility --runtime-set testVersion 7.2
W.......E.. 11 / 11 (100%)
FILE: /Users/laterpay/laterpay-client-php/autoload.php
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
36 | WARNING | Use of __autoload() function is deprecated since PHP 7.2
and mcrypt depreciation warnings.

__autoload will only be called if php version is less than 5.1.2.

Check 👉 this

@thrijith
Copy link
Contributor

PHP Compatibility check on laterpay-client-php for version 5.6 and above.

phpcs -p laterpay-client-php --standard=PHPCompatibility --runtime-set testVersion 5.6-
W.......E.. 11 / 11 (100%)
FILE: /Users/Documents/laterpay/laterpay-client-php/autoload.php
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
36 | WARNING | Use of __autoload() function is deprecated since PHP 7.2
FILE: /Users/Documents/laterpay/laterpay-client-php/LaterPay/Crypt.php

FOUND 18 ERRORS AFFECTING 9 LINES
148 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
171 | ERROR | Function mcrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
171 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
174 | ERROR | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
174 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
210 | ERROR | Function mdecrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
213 | ERROR | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
213 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
270 | ERROR | Function mcrypt_module_open() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
270 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
270 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
271 | ERROR | Function mcrypt_module_open() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
271 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
271 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
274 | ERROR | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
274 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
275 | ERROR | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
275 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead

__autoload depreciation warning. It is only used when current php version is less than 5.1.2. Please check this.

mcrypt depreciation error. We are using OpenSSL, mycrypt is used when openssl isn't available. Please check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants