Skip to content
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

PHP 7.0.4 is not supported by 2.1-RC3 #5131

Closed
boldhedgehog opened this issue Jun 21, 2016 · 43 comments
Closed

PHP 7.0.4 is not supported by 2.1-RC3 #5131

boldhedgehog opened this issue Jun 21, 2016 · 43 comments
Assignees

Comments

@boldhedgehog
Copy link

Steps to reproduce

  1. Try Install Magento from develop branch on Ubuntu 16.04 Xenial.

Expected result

  1. Installation starts

Actual result

  1. 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 ?

@boldhedgehog boldhedgehog changed the title PHP 7.0.4 PHP 7.0.4 is not supported by 2.1-RC3 Jun 21, 2016
@commcad
Copy link

commcad commented Jun 21, 2016

Was just about to report this. Having the same issue here also on Xenial 16.04 PHP 7.0.4

Workaround is of course to install some third party repo and force the latest/untested zend php pckg. Unfortunately that just won't work for us here :/

Hoping for 2.1 to support the official Ubuntu bundle

@davidalger
Copy link
Member

@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?

@dooblem
Copy link

dooblem commented Jun 23, 2016

@oserediuk We are also experiencing this issue. The 2.1-RC3 is not working under Xenial with php 7.0.4. This is definitely a bug for us.

Error message:
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read Magento System Requirements.

@oserediuk
Copy link
Contributor

Hello! Please, read this release note for 2.1-RC3 http://devdocs.magento.com/guides/v2.0/release-notes/ReleaseNotes2.1_RC3CE.html.You can use just 7.0.2, and 7.0.6

@boldhedgehog
Copy link
Author

@oserediuk yes, it also says

We do not support PHP 5.5.x or 7.0.5.

So this still does not answer my question: Why PHP 7.0.4 is not supported by Magento 2.1? Is there a technical reason for this?

@piotrekkaminski
Copy link
Contributor

@boldhedgehog yes - there were some issues specific to this version of PHP 7 that were later corrected.

@piotrekkaminski
Copy link
Contributor

Might be related to https://bugs.php.net/bug.php?id=71914. We were getting this/similar errors on 7.0.4 and 7.0.5. I will update this ticket if i get more information.

@maksek
Copy link
Contributor

maksek commented Jun 24, 2016

@boldhedgehog, you may install latest PHP 7.0.x from 3rd party library.
PHP 7.0.4 has bug which were fixed in later version.

@boldhedgehog
Copy link
Author

@maksek Thanks for the update, closing issue.

@giacmir
Copy link
Member

giacmir commented Jun 24, 2016

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.

@maksek
Copy link
Contributor

maksek commented Jun 24, 2016

@giacmir, we are going to revalidate our test scenarios against 7.0.4, if not issues, we may include it back.

@hostep
Copy link
Contributor

hostep commented Jun 24, 2016

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:

7.0.2–7.0.6 except for 7.0.5

There is a known PHP issue that affects our code compiler when using PHP 7.0.5. We recommend you not use PHP 7.0.5; instead, use PHP 7.0.2–7.0.4 or 7.0.6.

While over here it says:

System requirements

Our technology stack is built on PHP and MySQL. Magento 2.1.0 supports:

PHP 5.6
PHP 7.0.2
PHP 7.0.6 + up until 7.1

Somebody really has to clean up the docs because it's really really confusing.

@maksek maksek reopened this Jun 24, 2016
@tanberry
Copy link

@hostep , we will get the docs cleared up ASAP, apologies for the confusion, and thanks for pointing it out!

@ghost
Copy link

ghost commented Jun 24, 2016

Sorry about the confusion, it's fixed now. Be sure to refer to the 2.1 system requirements.

@ignaciomella
Copy link

ignaciomella commented Jun 25, 2016

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'

@commcad
Copy link

commcad commented Jun 26, 2016

@ignaciomella worked like a charm, thx for sharing and much appreciated sir

Top class individuals here

@boldhedgehog
Copy link
Author

@ignaciomella This won't help with Composer dependencies.

@mwhahaha
Copy link

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
Copy link
Member

@maksek any news regarding tests against 7.0.4?

@forgeonline
Copy link

forgeonline commented Jun 30, 2016

Although Tech requirement is

PHP

5.6.x
7.0.6 up to 7.1

Our servers are cloud containers with PHP 7.0

PHP 7.0.0 (cli) (built: May 31 2016 05:50:35) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

We still have to Error in both Archive and Composer download

 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.1.0 magento2
Problem 1
    - Installation request for magento/product-community-edition 2.1.0 -> satisfiable by magento/product-community-edition[2.1.0].
    - magento/product-community-edition 2.1.0 requires php ~5.6.0|7.0.2|~7.0.6 -> your PHP version (7.0.0) does not satisfy that requirement.

@kitsor
Copy link

kitsor commented Jul 1, 2016

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.

@maksek
Copy link
Contributor

maksek commented Jul 1, 2016

Testing in progress...

@kitsor
Copy link

kitsor commented Jul 5, 2016

Test works as expected.

image

@maksek
Copy link
Contributor

maksek commented Jul 6, 2016

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.

@stamster
Copy link

stamster commented Jul 7, 2016

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.

@acidreian666
Copy link

I used @ignaciomella method to modify the Bootstrap to get it to magento2.1 to install on php7.0.4 on ubuntu 16.04LTS and then updated using 3d party PPA to 7.0.8. But i started having random issues so I decided to start over and I was hoping by now there would be a patch. Can anyone comfirm use on php7.1?

@stamster
Copy link

stamster commented Jul 7, 2016

Why did you upgrade from 7.0.4 which is well maintained LTS release? It seems that latest PHP 7.0.8 is a code breaker for Magento.
There are many complaints on PHP group breaking API and not following SemVer between those 7.0.x releases.

@acidreian666
Copy link

@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.

@aelmizeb
Copy link

Any idea by when the fix for the composer installation (for php 7.0.4) will be published?
Thanks in advance.

@Web-Wave
Copy link

Hello @maksek,
When did you upload the new composer file ? I mean, I have just tried now and compose say php 7.0.4 is not supported. When do you think you can apply the new composer file ?
Thank you ;)

@kitsor
Copy link

kitsor commented Jul 14, 2016

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.

@stamster
Copy link

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.

@Web-Wave
Copy link

Hello,

So what do you think is the best, upgrade php 7.0.4 to php 7.0.6 ?
Or should I use git (not composer) to get the develop version who is compatible with php 7.0.4 ?

@slackerzz
Copy link
Member

i expected to see a 2.1.1 hotfix release, maybe i was too optimistic 😞

@stamster
Copy link

@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.

@vzaporozhets
Copy link

@stamster, @slackerzz, @Web-Wave, @kitsor and others. This is not only one problem what we want to fix in 2.1.1 And it takes time to define such scope, fix/change implementation, validate that changes actually fixed the problem, no new regressions found and finally roll-out everything to all of you. We are not lazy, really ))) So, 2.1.1 is coming soon and this problem will be a part of this release for sure.

@stamster
Copy link

@vzaporozhets Well, that's good, thanks for clarification that there will be actually 2.1.1 release! That's more logical, then to wait for 2.2.

@commcad
Copy link

commcad commented Jul 16, 2016

deleted - unnecessary comments

@zengoma
Copy link

zengoma commented Jul 18, 2016

I know it's not ideal, but I am simply using:

--repository-url=https://repo.magento.com/ magento/project-community-edition=2.0.7 for now, it's not the end of the world.
Magento core team has promised to fix the issue and I have full faith in them, they know what they are doing, thanks for all the hard work!

@slackerzz
Copy link
Member

Canonical has updated php package in Ubuntu 16.04 to 7.0.8.

@giacmir
Copy link
Member

giacmir commented Jul 20, 2016

@slackerzz So Canonical has been faster to upgrade the Operating System than Magento to change a single file? lol!

@adragus-inviqa
Copy link
Contributor

@giacmir - yeah, hah, lol, but...

a) ubuntu's not made in PHP
b) regression testing takes a while
c) they didn't update the Operating System

I swear, every time I see a "lol"...

@vkorotun vkorotun removed the PS label Aug 4, 2016
@veloraven
Copy link
Contributor

Closed as the issue was already fixed for 2.1.
Please create new GitHub issue if you can still reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests