markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.59k stars 1.01k forks source link

Deprecated Functionality: Function mcrypt_module_open() is deprecated with php:7.1-fpm-0 #54

Closed iandd0824 closed 7 years ago

iandd0824 commented 7 years ago

Try to install the version 2.1.4 and run into the deprecated exception if I use the php version magento2-php:7.1-fpm-0 in setup container.

There is no deprecated exception with magento2-php:7.0-fpm-0.

docker-compose.yml

setup:
  image: mageinferno/magento2-php:7.1-fpm-0
  command: /usr/local/bin/mage-setup
  links:
    - db
  volumes_from:
    - appdata
  env_file: env/setup.env

Command

$ docker-compose run --rm setup

Deprecated Exception

[Progress: 114 / 425]
Module 'Magento_Customer':
[Progress: 115 / 425]
Module 'Magento_BundleImportExport':
[Progress: 116 / 425]
Module 'Magento_CacheInvalidate':
[Progress: 117 / 425]
Module 'Magento_AdminNotification':
[Progress: 118 / 425]
Module 'Magento_Indexer':
Running schema recurring...

[Exception] Deprecated Functionality: Function mcrypt_module_open() is deprecated in /var/www/html/vendor/magento/framework/Encryption/Crypt.php on line 54
jackbrandworkz commented 7 years ago

+1 Solved issue temporarily by using PHP FPM 7.0 image in the docker-compose.yml file

PLEASE APPLY THE FOLLOWING FIX - https://www.cadence-labs.com/2016/09/magento-2-php-7-1-fix-function-mcyrpt_module_open-deprecated/

SOLUTION (https://www.cadence-labs.com/wp-content/themes/Divi-reddot/gists/Crypt.php.txt)

markshust commented 7 years ago

Not going to monkey-patch Magento 2's shit core code. They can do that.

I merged in a fix that downgrades back to PHP 7.0. Once @magento cares enough to put out a proper fix (and not take months to do it), I'll upgrade the compose back to PHP 7.1.