-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Laravel 6+7 composer create-project fails on PHP 8.1 #40339
Comments
Sorry, forgot to attach the output; it is rather long, so I put them both in a gist: https://gist.github.com/asgrim/221090b8c22129dd2a6d57eb48a0d658 |
Hi @asgrim, Laravel 6 & 7 don't support PHP 8.1, please see https://laravel.com/docs/8.x/releases#support-policy We unfortunately won't be changing anything here. Thank you for your suggestions though 👍 |
Thanks @driesvints that helps 👍 It's a shame your PR #39163 didn't go through as that would've helped things going forward, but I appreciate the feedback. I'll exclude Laravel 6 + 7 from our build matrix on PHP 8.1. Cheers & have a great day! |
Laravel versions discussed on laravel/framework#40339 Support policy should be referred to: - https://laravel.com/docs/8.x/releases#support-policy
8.1.*
series)Description:
Installing Laravel 6 or 7 using PHP 8.1 fails, using either of the two following commands:
The PHP version constraint is set to
^7.2.5|^8.0
for Laravel 6 and 7, which suggests both versions are installable on PHP 8.1. This does not appear to be the case. My suspicion is that Laravel 6 and 7 were never intended to support PHP 8.1 - especially, given that Laravel 7 support ended (security - Mar 3, 2021) before PHP 8.1 was even released (Nov 25, 2021).However, unfortunately, since these releases have already been tagged with a version constraint that is not "true", this cannot easily be undone. The steps (in isolation) that could be taken to resolve this:
^7.2.5|8.0.*
, release a new version for each series, and delete the older tags/releases that are not installable on PHP 8.1. This is also undesirable, since deleting tags is never a good idea. Note: just releasing a new version such aslaravel/laravel:6.20.2
with a constraint ofphp:^7.2.5|8.0.*
is not enough; because Composer will still picklaravel/laravel:6.20.1
since it advertises compatibility with PHP 8.1.Neither are ideal solutions, and I know this discussion has been had multiple times on Twitter (which always ends well 😆).
A general ecosystem idea comes to mind; perhaps a way to mark a version as "unsupported" on Packagist; this would mean the version can be installed with
composer install
, but is excluded from any furthercomposer update
. This IMO is better than deleting tags; it means someone using an older version, they can still install the version they were using, but if they do acomposer update
it will either stay on the existing version, or update to a newer compatible release, if available. I've not done enough thought on that to work out if it is actually viable though.Steps To Reproduce:
composer create-project laravel/laravel:6.* test-app-6 --prefer-dist
orcomposer create-project laravel/laravel:7.* test-app-6 --prefer-dist
The text was updated successfully, but these errors were encountered: