magento2: PHP 7.0.4 is not supported by 2.1-RC3
Steps to reproduce
- Try Install Magento from
develop
branch on Ubuntu 16.04 Xenial.
Expected result
- Installation starts
Actual result
- Composer reports about unmet dependency
In 2.1-RC3 Composer and PHP code check both require PHP version 7.0.2 or 7.0.6+, but Ubuntu 16.04 package repository has only PHP 7.0.4 at this moment. Why PHP 7.0.4 is not supported by Magento 2.1 ?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 43 (16 by maintainers)
7.0.4 with Xenial must be in the list of supported PHP versions. Could someone convert this issue from a question to critical bug which need a hotfix ASAP? In case of Composer it’s blocker. And not only for me. IMHO.
Situation is that at this time Magento 2.1 is not compatible with current Ubuntu LTS version until they upgrade their php (or by using an external ppa with all related security and management implications).
I think that for the Magento ecosystem is vital that it works with Ubuntu server. This should be an absolute priority at the cost to write an ugly workaround to the problem.
Magento just can’t afford to drop Ubuntu server compatibility.
Also I just tried the test case provided in https://bugs.php.net/bug.php?id=71914 and it works correctly in php 7.0.4.
Ok, we finished excessive testing and 7.0.4 works fine on 2.1 branch. We are going to update composer with upcoming patch release. Thanks everyone for help.
@orlangur @vkublytskyi It would appear that the version constraints added in the scope of MAGETWO-53293 (commit 01ab812 as example) were incorrect. The PHP version constraint should be
~5.6.0|7.0.2-7.0.4|~7.0.6
vs~5.6.0|7.0.2|~7.0.6
as 7.0.5 is the only incompatible version.Can this be fixed in the next RC?
Changing the app/bootstrap.php works around not being able to run it. After than you can use the magento setup:install to install and it’ll just work. That being said, it really should be update to be 7.0.2-7.0.4,7.0.6. Considering a patched version of 7.0.4 is provided with Xenial, it should not be excluded by magento. Also in terms of long term supportability, requiring a PPA may not be ideal.
@slackerzz So Canonical has been faster to upgrade the Operating System than Magento to change a single file? lol!
Canonical has updated php package in Ubuntu 16.04 to 7.0.8.
M2.2? Not supporting major LTS GNU/Linux PHP distro is a recipe for disaster, with so much basic issues M2 is just not production ready.
I see the fix has been done 9 days ago MAGETWO-54737: PHP 7.0.4 Support and merged yesterday Merge pull request #144 from magento-tango/MAGETWO-55147 But only in develop branch. (M2.2)
Looks like we’ll never see it in 2.1. Strange understanding the meaning of the words “blocker”, “hotfix”, “critical”, and “ASAP” by M-Team.
Any idea by when the fix for the composer installation (for php 7.0.4) will be published? Thanks in advance.
Can somebody please confirm what exact PHP 7 versions are actually supported, because it’s really confusing. In the System requirements, it says PHP 7.0.4 is actually supported:
While over here it says:
Somebody really has to clean up the docs because it’s really really confusing.
@Web-Wave Why would you upgrade your entire application environment, only because someone in the core of the project was lazy to change a few lines? We don’t ask for a miracle but just two lines. What I did - changed bootstrap and composer checks for PHP7 on my own and M2.1 working fine (apart from other unrelated issues xD).
And Magento does not follow SemVer specification anymore, why v. 2.2 when we are on 2.1 stack? Release 2.1.1 etc.
Test works as expected.
@maksek any news regarding tests against 7.0.4?
@ignaciomella This won’t help with Composer dependencies.
My workaround:
Edit app/bootstrap.php
for those running php v7.0.4, change
|| PHP_VERSION_ID === 70002
to
|| PHP_VERSION_ID === 70004
and run this:
find . -type f -print0 | xargs -0 -n 1 sed -i -e 's/7\.0\.2\|\~7\.0\.6/7.0.4|~7.0.6/g'
i expected to see a 2.1.1 hotfix release, maybe i was too optimistic 😞
@stamster I only upgraded to 7.0.8 for development and stability testing. I have been pushing through to see what are the do’s & don’ts before sending my e-commerce to a production server. My most recent dev server is Ubuntu 16.04 with php7.0.4 zero issues.
I have changed on my own both bootstrap and composer.json in order to run on Ubuntu Xenial with PHP 7.0.4. Magento 2.1.0 works w/o issues then.
@ignaciomella worked like a charm, thx for sharing and much appreciated sir
Top class individuals here
Sorry about the confusion, it’s fixed now. Be sure to refer to the 2.1 system requirements.
@giacmir, we are going to revalidate our test scenarios against 7.0.4, if not issues, we may include it back.