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 question si: is it already compatible or not?
One way to find out if it is compatible¹ could be to fork the repo and edit the .travis.yml file to enable testing on php 7.2 (AFAIK already travis has support for 7.2)
Another way would be testing locally and reporting bugs (if any) to help make it compatible.
¹) 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
@renttek
Thank you for the more helpful response :+1:
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 ?
Maybe someone can port it to Magento 1 :) with a push on https://github.com/Inchoo/Inchoo_PHP7 ...
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?
Your PHP version is 7.2.2-1ubuntu2. The required PHP version is 7.0.2|7.0.4|~7.0.6|~7.1.0
@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
There is a weekly update of the project on Youtube: https://www.youtube.com/channel/UCUsdK3NnJ0LqhNJCrJDdiug/playlists
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:
if (count($parentPathPieces) == 1) {
with:
if ($parentPathPieces && count($parentPathPieces) == 1) {
/vendor/magento/framework/Session/SessionManager.php:129 replace:
ini_set('session.use_only_cookies', '1');
with:
if (session_status() == PHP_SESSION_NONE) {
ini_set('session.use_only_cookies', '1');
}
/vendor/magento/module-backend/Block/Menu.php:390 replace:
if (count($colBrakes) && $colBrakes[$itemPosition]['colbrake'] && $itemPosition != 1) {
with:
if ($colBrakes && count($colBrakes) && $colBrakes[$itemPosition]['colbrake'] && $itemPosition != 1) {
/vendor/magento/module-backend/Block/Menu.php:404 replace:
if (count($colBrakes) && $limit) {
with:
if ($colBrakes && count($colBrakes) && $limit) {
/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.
Other people may be using CentOS (where the default PHP Version is 5.4 if I'm no wrong) or Amazon Linux(, RedHat, Debian, etc.)
Compiling another version of PHP or installing it from a PPA is quite simple.
@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.
@gwharton Install Ubuntu 18.04. Do not install PHP 7.2, install 7.1 on it's own. It works just fine, but it's unnecessary hassle.
@renttek Can we get a refund for our license fees then? ;)
@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....
On a fresh install of Ubuntu 18.04 which only comes with PHP 7.2, it is pointless to even try to install Magento? I should find a different solution? Is that it?
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 php
package is in fact just a meta package pointing to a more specific version depending on which version of Ubuntu you're running.
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 php7.0
and php7.0-fpm
. (If you install php7.0-fpm
this will come with an Apache config you can enable with a2enconf
.)
@winstonojeda
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1
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!!!
While Mangento seemed to happily install and run under 7.1, now the entire 18.04 environment is completely unstable an continuously reminds you that there are updates awaiting for all the old PHP modules. dpkg continuously crashes and I am getting core dumps where I never did before. In other words, my development system is completely ruined and now I have to re-install and, no, I am not installing an end of life version only to please Magento.
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:
composer install --ignore-platform-reqs
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?
That may take some time, but as @plastikschnitzer already said "PHP7.1 reaches its EOL in about 11 months", wich also means, that there are about 11 Months left to maybe upgrade.
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 ;-)
@renttek What is free? I pay > € 100.000 per year to fix bugs and add features to our Magento store. It is a very lucrative business model for a lot of parties.
Magento isn't free, it is just another way of making money.
@mklooss sure, you could fix it yourself.
@GuiltyNL I just stated that Magneto (as in Magento Community Edition) comes free of charge and is open source.
If you are an enterprise/commerce customer, than maybe you got a direct contact at Magento Inc.
Most helpful comment
blah blah blah. It is a technical issue