-
Notifications
You must be signed in to change notification settings - Fork 63
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
Allow Laravel v9 and Symfony v6 #64
Conversation
Not sure if it's possible to have a Test App that is installable on both PHP 7.3 and PHP 8.1 with appropriate dependencies. |
Would it help if we dropped support for Laravel 6? |
I have updated the test app to a version (Laravel 8) that should be installable on everything from PHP 7.3 to PHP 8.1. |
What needs to be done to merge this PR? Would like to have Laravel 9 support 😄 |
The thing that fails now in CI is PHPCS can not run because of this:
I'm not sure if I upgrade some dependencies that do not need an upgrade, or if phpcs needs to be updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I believe the issue is regarding the composer.json since Laravel 9 has dropped support for all PHP versions below PHP 8. So to fix the issue, we must update the PHP version in composer.json. Laravel version 6 also supports PHP 8 so Laravel version 6 can still be supported, I suppose the following changes should do the trick.
@@ -19,16 +19,16 @@ | |||
"php": ">=7.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"php": ">=7.3", | |
"php": "^8.0", |
with: | ||
php-version: 7.3 | ||
php-version: '7.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
php-version: '7.3' | |
php-version: '8.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this can be bumped, then the test for the old versions will fail.
It's this one that fails, chekalsky/phpcs-action@v1
is built on PHP 7.4 I think.
laravel-bridge/.github/workflows/static.yml
Lines 19 to 32 in 36111f7
phpcs: | |
name: PHPCS | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Download dependencies | |
run: composer update --no-interaction --prefer-dist --no-progress --no-suggest --dev | |
- name: PHPCS check | |
uses: chekalsky/phpcs-action@v1 | |
with: | |
phpcs_bin_path: './vendor/bin/phpcs' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, just looked at the GA and it is based on cytopia/phpcs:3 docker image, which only supports PHP version 7.4 and it haven't been upgraded for more than a year now, so to satisfy the test we must replace the GA with another CodeSniffer action which supports PHP 8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 👍 with requiring PHP 8 if it helps here.
Also maybe this approach can be copied to get rid of this custom action: https://github.com/brefphp/bref/blob/master/.github/workflows/ci.yml#L75-L96 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would work, we just need to add the Code_Sniffer package into composer.json and maybe it could be a good idea to just add a matrix to use several PHP versions. I can make a PR with an updated phpcs action later today
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the phpcs workflow according to the link @mnapoli sent
Can we get this merged soon? |
@mnapoli is there something we are waiting for before we can merge? |
@mnapoli It's possible to merge this one soon? |
@omarkdev please calm down, this is becoming rude. |
Thanks @hmazter! |
Update the package to allow it to be included in a Laravel v9 application that uses Symfony component v6.
Also, updated the CI tests to run on PHP 8.1
And bump
shivammathur/setup-php
to 2.16.0, since version 2.1.0 did not want to install PHP 7.3