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 php 8.4 #441

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

support php 8.4 #441

wants to merge 7 commits into from

Conversation

nikow13
Copy link
Contributor

@nikow13 nikow13 commented Nov 26, 2024

updates the codebase for PHP 8.4 compatibility and upgrades Psalm to version 6.0. Some errors were introduced with the Psalm update, so I’ve added a baseline for now to prevent build issues

@mvhirsch mvhirsch mentioned this pull request Dec 10, 2024
@AlessandroMinoccheri AlessandroMinoccheri self-assigned this Dec 13, 2024
@AlessandroMinoccheri
Copy link
Member

Hello @nikow13!
Thanks for your contribution, we need to wait psalm I think to see if all tests will be green

@damien-louis
Copy link

Related psalm issue and MR about PHP 8.4 support:
vimeo/psalm#11107
vimeo/psalm#10928

@ostrolucky
Copy link

Psalm 6 has been released which supports php 8.4

@akondas
Copy link

akondas commented Jan 31, 2025

ready to go?

@ostrolucky
Copy link

looks like php version used for running scrutinizer needs to be bumped

@nikow13
Copy link
Contributor Author

nikow13 commented Feb 4, 2025

looks like php version used for running scrutinizer needs to be bumped

Yes, it seems that Scrutinizer is managed outside the code, so I can’t update it

@damien-louis
Copy link

Poke @AlessandroMinoccheri

@AlessandroMinoccheri
Copy link
Member

We are verifying it :)

Dockerfile Outdated
@@ -1,8 +1,8 @@
ARG PHP_VERSION=7.1
ARG PHP_VERSION=8.4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the version 8.4 and not the minor that we can support?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for local testing with the last version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be the smaller supported version maybe? Like 8.0 🤔

Copy link
Contributor

@micheleorselli micheleorselli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talking a bit with @AlessandroMinoccheri we agreed php 7 support can be dropped, but we would like to keep support for php 8.0 on

strategy:
fail-fast: false
matrix:
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-versions: [ '8.2', '8.3', '8.4']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'd like to keep compatibility from php 8.0

needs: build
steps:
- uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
tools: composer:v2.2
php-version: 8.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we use the smaller supported version (8.0)?

uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

phar:
runs-on: "ubuntu-20.04"
runs-on: ubuntu-latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would that mean when ubuntu gets upgraded we automatically get the latest version? If that the case an approach where we explicitly set the version is preferred imo

strategy:
matrix:
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
coverage-driver: [ 'pcov' ]
php-versions: [ '8.2', '8.3', '8.4' ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Dockerfile Outdated
@@ -1,8 +1,8 @@
ARG PHP_VERSION=7.1
ARG PHP_VERSION=8.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be the smaller supported version maybe? Like 8.0 🤔

@@ -35,7 +35,7 @@ public function shouldMatchNamespacesProvider(): array
* @param mixed $actualFQCN
* @param mixed $explanation
*/
public function test_it_should_match_namespace_and_descendants($expectedNamespace, $actualFQCN, $explanation): void
public function test_it_should_match_namespace_and_descendants(string $expectedNamespace, string $actualFQCN, string $explanation): void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@param in phpdoc does not match with the method signature, would it be possibile to remove it?

@@ -17,10 +17,10 @@ class TargetPhpVersion
'8.1',
'8.2',
'8.3',
'8.4',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc here we are defining which version arkitect is capable of parsing. Should we keep versions older than 8.0? if yes, should then keep testing them (at least smoke test the phar) to be sure we are actually able to do so?

@@ -15,11 +15,9 @@
*/
class ProgressBarProgress implements Progress
{
/** @var OutputInterface */
private $output;
private \Symfony\Component\Console\Output\NullOutput|OutputInterface $output;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't NullOutput implementing OutputInterface? If yes, that could be just

private OutputInterface $output;

@nikow13
Copy link
Contributor Author

nikow13 commented Feb 7, 2025

Talking a bit with @AlessandroMinoccheri we agreed php 7 support can be dropped, but we would like to keep support for php 8.0 on

Hi,
There are a lot of inconsistencies between different PHP versions. I couldn't get it to work with 8.0 and 8.1, but feel free to give it a try if you have any ideas !

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

Successfully merging this pull request may close these issues.

6 participants