robrichards / xmlseclibs

A PHP library for XML Security
BSD 3-Clause "New" or "Revised" License
387 stars 181 forks source link

PHP Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /app/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php on line 136 #196

Closed seismicmike closed 4 years ago

seismicmike commented 5 years ago

Hi, I recently ran into the issue from https://github.com/robrichards/xmlseclibs/issues/148 while using 2.1.0 of this library on PHP 7.2.

Specifically:

PHP Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /app/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php on line 136 PHP Warning: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' (this will throw an Error in a future version of PHP) in /app/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php on line 137 PHP Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /app/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php on line 136

Is this an issue that can be resolved by removing usage of Mcrypt? php-mcrypt has been removed from PHP 7.2.

tvdijen commented 5 years ago

Upgrade to 3.x and your warnings will magically disappear

tvdijen commented 4 years ago

@robrichards I think it's safe to close this one.. The issue was resolved in v3 of the library. You may want to update the README on master though.. 3.x isn't mentioned there at all

robrichards commented 4 years ago

Thanks