-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Magento Compatibility with PHP 7.2 #12273
Comments
The question si: is it already compatible or not? ¹) This would be only an indicator. I'm not saying test pass === fully compatible I'll try the travis-thing later and report back |
It's not likely to be compatible, due to the removal of mcrypt |
Hello @craigcarnell. The GitHub issue tracker is intended for technical issues only. Please refer to the Community Forums (https://community.magento.com) or the Magento Stack Exchange (http://magento.stackexchange.com/) site for technical questions. |
blah blah blah. It is a technical issue |
That's not getting anyone anywhere. I'll try to patch the mcrypt-dependency later this day/the next days to see which other issues are showing with 7.2. These issue can then be fixed. I'll create an issue to refactor mcrypt dependency after lunch |
Thank you for the more helpful response 👍 PHP 7.2 has now been released. |
pecl has mcrypt |
I don‘t think using mcrypt from pecl is a good idea. There are readons why mcrypt was theown put of the php core. I‘d prefer using libsodium + migration script (just like the serialize/json migration on 2.1>2.2) |
What is the status of this ? |
I have successfully adapted Magento 2 to PHP 7.2: https://mage2.pro/t/5215 |
I just commented out the php error thrown for warning for count( ) against nulls to restore php 7.1 functionality whilst not having to rewrite every friggen count($something) to is_countable($something) && count($something) all over the 2.1 codebase and extensions. Took about 7 comments from php 7.2 sourcecode. Since it is just a warning you could hack it to throw e_deprecated as well and disable ^E_deprecated from throwing any warnings! @dmitry-fedyuk thanks for your guide! It helped a bit but there is more for php-7.1 ! Plus other folks extensions! |
Any updates on this?
|
@craigcarnell: supporting PHP 7.2 has been turned into a community project, feel free to participate: https://github.com/magento-engcom/php-7.2-support/issues |
Just struggled with running Magento 2.2.3 on PHP 7.2.5 and it seems to be all right and runs really fast. Fixes i made: /vendor/magento/framework/View/Design/Theme/ThemeList.php:237 replace:
with:
/vendor/magento/framework/Session/SessionManager.php:129 replace:
with:
/vendor/magento/module-backend/Block/Menu.php:390 replace:
with:
/vendor/magento/module-backend/Block/Menu.php:404 replace:
with:
/app/bootstrap.php - comment out lines 10 (error_reporting) and 13-28 (PHP version check) /vendor/magento/magento2-base/app/bootstrap.php - comment out lines 10 (error_reporting) and 13-28 (PHP version check) Also I needed to install mcrypt for PHP 7.2, php7.2-soap, php7.2-intl, php7.2-gd |
Any idea when we are going to get a release of Magento that supports PHP 7.2 Ubuntu 17.10 is now end of life, so no more updates without upgrading to Ubuntu 18.xx which comes with 7.2 so people running Magento on Ubuntu 17.10 are stuck without any security patches until Magento supporting php 7.2 is released. |
We're finding it quite hard to believe that a platform this big is taking such a long time to support PHP 7.2, which has been stable for 9 months now... Given that mcrypt got deprecated for PHP 7.1, which was released as stable Dec 2016, how has an enterprise grade product such as Magento still not caught up in nearly 2 years? |
You're 'right', that a platform this big, should move faster, but please bear in mind, that magento is open source software and is provided for free. If there are any bugs/issues that are not processed "fast enough", you could always help implementing/solving them. There is a seperate community project for supporting PHP 7.2: https://github.com/magento-engcom/php-7.2-support/projects/1 @gwharton: I don't think, that the default version of PHP in Ubuntu is the yardstick for feature support. |
@renttek , Yeah, I understand. I was merely suggesting that for most people the fact that PHP 7.1 is not end of life until the end of the year is mostly irrelevant, and much more important is when their current distro stops supporting PHP 7.1, which for unbuntu 17.10, has already happened. I understand other distro's are worse and some are better. Its just frustrating that I, personally, am stuck with no security updates to my entire shop linux distro until magento 2.3 is released. Regardless of protocol or procedure, I am merely stating the frustrations and experiences of a pretty typical Magento user. I'm afraid upgrading to Ubuntu 18, and then somehow downgrading PHP to 7.1, or running sidebyside 7.1/7.2 is just not an option that I can stomach at the moment. I am beginning to wish I had stayed on 17.04 LTS as they are still pushing security updates to this version. |
@craigcarnell Yes, thats a way out, but experience tells me I will regret that approach as soon as I try to install anything else that has even a sniff of a dependency on php 7.2 through apt/dpkg. |
In November I will be updating this thread title to be 'PHP 7.3 is out...' |
Does anyone know what the state of the PHP 7.2 project is? The project was active with weekly discussions but has fallen silent for some time. |
After reading all this, I just want to make sure I understand.... |
If you want to avoid messing with package dependencies by hacking in alternative versions of php and you want to stick with a stock distro then there is currently no supported version of ubuntu compatible with magento 2.2. Your only option is ubuntu 17.10 which is end of life. |
Thank you for clarifying. I appreciate it. |
You could try installing an older version of PHP on Ubuntu. The https://packages.ubuntu.com/search?keywords=php Therefore if you want an older version of PHP you should be able to install it with more specific package names such as |
When Magento finally get round to support a nearly year old version of php... Just remove php7.1 and install 7.2 |
Yeah, no. I already tried running dual versions of PHP (7.1+7.2) on an Ubuntu 18.04 system and I have to tell this crowd... DON'T DO IT!!! At the end of the day, and being new to Magento, I leave under the impression that since this has been going on for a year and there does not seem to be an intention for the CE to advance to the level of support that is required. It is at this time where my Magento POC ends. I can't keep wasting time like this. I need to find a CMS that works and keeps up with the current OS releases. Wish you all best of lucks. |
I guess Magento 2.1.1 could be compatible with PHP 7.1, if you want to test it, just add this additional parameter to your composer commands to tell Composer to ignore the PHP version check for the time being:
|
This issue has been going on too long. PHP 7.2 support should not be tied to Magento 2.3.0, this work should have been released as part of a Magento 2.2.x release much earlier than this. Ubuntu 18.10 is due out on 18th October, which only has PHP 7.2 in it's repositories. |
As new bugs being raised on 2.3-develop are now being allocated Release Milestone 2.3.1 and not 2.3.0, I can only assume that the team are working hard on the formal release of 2.3.0. Lets hope it is imminent. I've heard nothing from the team or any official notices about release timescales. |
Magento - what is the delay here? |
@craigcarnell 2.3.0 w/ support for PHP 7.2 will be released on 28.11. (https://community.magento.com/t5/Magento-DevBlog/New-Security-Patches-and-Releases-November-28-2018/ba-p/111657) |
Will the 2.2.x branch become compatible to PHP7.2? Yes I know Magento2.3 is available but 90% of the plugins I need are not compatible. So what to do? PHP7.1 reaches its EOL in about 11 months and this is the only way to step on to run a proper (Magento2 without plugins is not what I consider as proper) webshop?! |
I have to say I'm worried about the direction of Magento under the supervision of Adobe. Supporting PHP7.2 should be top priority, but nobody seems to care less. Instead of improving core stability, Magento introduces doubtful features that sometimes seem to be sponsored too. And like @plastikschnitzer says, Magento 2.3 is just a no-go for the coming year. 60% of our plugins does not support 2.3 and I must say that every (major) upgrade of Magento not only cost me a lot of money, but also a lot of headaches. |
@GuiltyNL I don't think, that the changes will or can be backported to 2.2. If some Plugin/Module vendors can't upgrade their modules in time, then maybe you can reimplement them yourself with 2.3 support? Also as it's free & open source, you are free to (help) backport PHP 7.2 support to Magento 2.2. |
could fix the php7.2 issues with:
just for search folks ;-) |
@GuiltyNL I just stated that Magneto (as in Magento Community Edition) comes free of charge and is open source. |
Preconditions
Steps to reproduce
With the expected release of PHP 7.2 at the end of the month, when can we expect a version of M2 that is compatible?
The text was updated successfully, but these errors were encountered: