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

Support for PHP 8.0 #28897

Closed
rvitaliy opened this issue Jun 26, 2020 · 28 comments
Closed

Support for PHP 8.0 #28897

rvitaliy opened this issue Jun 26, 2020 · 28 comments

Comments

@rvitaliy
Copy link
Member

Hi, PHP 8.0 is planned for release in november 2020. It would be nice to see Magento 2.4 support it on release date.
Today the alpha1 is already available, so we can start to test it in CI tests.

https://wiki.php.net/todo/php80
https://twitter.com/official_php/status/1276198231714783232?s=20

@m2-assistant
Copy link

m2-assistant bot commented Jun 26, 2020

Hi @rvitaliy. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Jun 26, 2020
@ghost ghost added this to Ready for QA in Community Backlog Jun 26, 2020
@swathishs swathishs self-assigned this Jun 26, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 26, 2020

Hi @swathishs. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@swathishs
Copy link

@rvitaliy : Thank you for your report. For GitHub issue tracker is for Magento core technical issues only
Kindly refer to Community Forums or Magento Stack Exchange for technical questions, feature requests, etc.

@ghost ghost moved this from Ready for QA to Done (last 30 days) in Community Backlog Jun 26, 2020
@rvitaliy
Copy link
Member Author

This is a technical problem, in November we could not use the new version of PHP because your platform will be obsolete again.

I see that time passes but your bad habits don't change. see #27227
If this is your approach to troubleshooting, I can't wait to stop using Magento.

Good job, bya!

@sdzhepa
Copy link
Contributor

sdzhepa commented Jun 26, 2020

Hello @rvitaliy

Thank you for your question!

Let me please provide some clarification.

For now, I have not heard during internal meetings and discuss any future plans for PHP 8.0 support.

But I am sure as soon as Magneto will have any roadmap/plans for this track, it will be announced through public media channels.

This public GitHub issue tracker is aimed at issues/bugs/improvements that ready to work - something that can be taken by any community member and fixing(creating PR).

This issue report looks like an open question that should be discussed.
I mean, it does not just task that ready to work but big and complex Story/Epic.

I would recommend to raise this topic/question and discuss in the next channels first:

Also, I do not see any reason to keep this issue report open.
Because it will be not possible to share updates about this track in time as a comment or links here. As I mentioned such news will be announced using other channels.

@bryanveIoso
Copy link

bryanveIoso commented Jul 7, 2020

This is a technical problem, in November we could not use the new version of PHP because your platform will be obsolete again.

I see that time passes but your bad habits don't change. see #27227
If this is your approach to troubleshooting, I can't wait to stop using Magento.

Good job, bya!

I think Magento LTS (OpenMage) will support PHP 8 first as it's more active. Or just use WooCommerce instead. M2 updates are kinda slow and until today PHP 7.4.4 is still not supported. O___O. PHP 7.3 EOL is in 4 months (December 6, 2020).

@maghamed
Copy link
Contributor

Hi there, let me provide additional input here.

We are seriously considering PHP 8.0 support for Magento, and some of the features would be especially handy for Magento.
Now we are trying to fit compatibility with PHP 8.0 to our very tight product backlog :)

Currently, we support PHP 7.4 / 7.3, and taking into account that active support of 7.3 will end soon, we switched our CI/CD infrastructure towards 7.4.*

Usually in Magento when we release a major version of the platform we keep supporting throughout all patch releases (in the scope of that major version) all the PHP versions which were actively supported at the time when Magento major release was out. This is done to prevent possible BiC for patch release upgrades.

Also, we separate "support" and "compatibility" in terms of Magento.
Support - is when you are able to use version-specific features, which did not exist before
Compatibility - is when we make sure that everything works as expected, but we don't use features that appeared only in this version and were previously absent.

So, if we would find a way to introduce "Compatibility" of Magento 2.4 with PHP 8.0 - we would definitely do this. Moreover, we really encourage you to help us finding a way of doing this. Thus, all the PRs which provide this compatibility for Magento 2.4 will have a very high priority for us, and we will consider them thoroughly.

@bryanveIoso I did not hear anything about problems with PHP 7.4.4 - could you provide more background here?

@hostep
Copy link
Contributor

hostep commented Aug 21, 2020

@maghamed: @bryanveIoso commented on 7 July, so before Magento 2.4.0 was released (20 July), at that time no Magento versions were out with support for PHP 7.4 😉

Thanks for the extra information though!

@ihor-sviziev
Copy link
Contributor

I will re-open this issue, as it wasn't resolved yet, there is no php 8 support.

@ihor-sviziev ihor-sviziev reopened this Aug 25, 2020
@ghost ghost unassigned swathishs Aug 25, 2020
@ghost ghost moved this from Done (last 30 days) to Ready for QA in Community Backlog Aug 25, 2020
@ilnytskyi
Copy link
Contributor

Has anyone here already tried to setup a preload feature from 7.4 ?

@ihor-sviziev
Copy link
Contributor

Update: we already have php 8.0 beta3, would be good at least to try run magento on it.

@ilnytskyi no, I don't, but would be good to see some info about it!

@sidolov sidolov added this to Ready for Grooming in Low Priority Backlog Sep 24, 2020
@sidolov sidolov added this to Ready for Confirmation in Issue Confirmation and Triage Board Oct 21, 2020
@ghost ghost removed this from Ready for QA in Community Backlog Oct 21, 2020
@ghost ghost removed this from Ready for Grooming in Low Priority Backlog Oct 21, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 13, 2020
@m2-community-project m2-community-project bot added this to Ready for Grooming in Feature Requests Backlog Nov 13, 2020
@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Nov 13, 2020
@rvitaliy
Copy link
Member Author

FYI: https://www.php.net/ChangeLog-8.php#8.0.0

@Alex88-hub
Copy link

I've tested PHP 8 performance on Magento 2 and compare the results with PHP 7.3. Here it is

https://onilab.com/blog/php-7-vs-php-8/

The bottomline: the PHP 8 JIT is far from being useful in terms of improving the Magento 2 web application performance. However, it is fair to say that the feature perfectly copes with its tasks on simple code.

@rvitaliy
Copy link
Member Author

rvitaliy commented Dec 3, 2020

@Alex88-hub
It's not just about performance!
With PHP 8, several improvements have been introduced in the language syntax that help improve the maintainability of the code.
For more information: https://stitcher.io/blog/new-in-php-8

I think it's a real shame that we can't take advantage of them yet.

@markshust
Copy link
Contributor

FYI I just published a new Docker image for PHP 8.0 at https://github.com/markshust/docker-magento/tree/master/images/php/8.0

You can use the standard docker-compose setup at https://github.com/markshust/docker-magento and install Magento as usual. After it's installed, update the docker-compose.dev.yml file to use the new image/tag:
markoshust/magento-php:8.0-fpm-develop

I hope this helps out those who want to test Magento 2 on PHP 8. It should be very easy & simple to get an instance up & running that is easily replicable to diagnose/test issues.

@sandeep-mukherjee
Copy link

https://www.mconnectmedia.com/blog/using-latest-php-version-benefits-for-magento/

@EmperorKonstantin
Copy link

EmperorKonstantin commented Jan 7, 2021

I still feel like they may wait for Magento 3... Typing everything is a lot of work and the core codebase is sprawling at this point. Plus PWA Studio and Venia is coming... so any PHP they static-type for the frontend will be wasted.

@JosephLeedy
Copy link

@EmperorKonstantin Rector would probably help with that.

@EmperorKonstantin
Copy link

EmperorKonstantin commented Jan 7, 2021

@JosephLeedy I'm not familiar with Rector, but I also hope that they use TypeScript in Magento 3 PWA Studio.

@hostep
Copy link
Contributor

hostep commented Jan 7, 2021

They are working on it on this branch should you be curious: https://github.com/magento/magento2/tree/php8-develop

Tickets around this can be seen over here: https://github.com/magento/magento2/projects/31

@EmperorKonstantin
Copy link

@hostep You're a champ! Yay! I see types!

@stale
Copy link

stale bot commented Mar 25, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label Mar 25, 2021
@ihor-sviziev
Copy link
Contributor

This definitely should be open, as magento already have php 8 project.
/cc @sivaschenko

@stale stale bot removed the stale issue label Mar 25, 2021
@rvitaliy
Copy link
Member Author

don't forget to allow php 8.1 🙏🚀
release date Nov 25 2021
https://wiki.php.net/todo/php81

@m2-community-project m2-community-project bot added this to Ready for Development in Platform Health Backlog Jun 9, 2021
@m2-community-project m2-community-project bot removed this from Ready for Grooming in Feature Requests Backlog Jun 9, 2021
@fascinosum
Copy link
Contributor

hi everyone,
I would recommend to look at 11c679b
We are still working on the leftovers, but most of the scenarios are already green
And this is not the final destination 😉

@andrewbess
Copy link
Contributor

Closed, because Magento2 is compatibility with PHP 8.0 on platform-health branch.

@hostep
Copy link
Contributor

hostep commented Oct 15, 2021

Out of curiosity: Magento 2.4.4 will ship with support for PHP 8.1, but will it also still be compatible with older versions of PHP, like 8.0 and 7.4? Based on the commit mentioned above, I would assume it will?

@fascinosum
Copy link
Contributor

Hi @hostep, you can find information about supported versions on the DevDocs System Requirements page
Magento OS 2.4.4 will not have PHP 8.0 as a supported version. PHP 7.4 will have limited support - mostly provides the ability to upgrade from the previous versions

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

No branches or pull requests