-
-
Notifications
You must be signed in to change notification settings - Fork 85
adds support for PHP 8.5 and symfony 8.0 #511
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
Conversation
| "symfony/expression-language": "^5.4|^6.4|^7.0", | ||
| "symfony/cache": "^5.4|^6.4", | ||
| "nikic/php-parser": "^4.0", | ||
| "symfony/var-exporter": "^5.4|^6.4|^7.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 removed those dependencies as they are not used (directly)
Perfect, long time ago I dropped psalm and moved most of my projects to be phpstan only 👍 (next migration would be probably towards Mago) |
| .DS_Store | ||
| .idea | ||
| .phpunit.cache/ | ||
| composer.lock |
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 not sure about this one, why does it need to be removed?
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.
Without a composer.lock it is easier to test a widen range dependency like "symfony/expression-language": "^5.4|^6.4|^7.3|^8.0".
With a composer.lock this dependency would be lock to a version that is compatible with the lowest supported PHP version. But since composer.lock is committed, the platform config override needs to be set. This override prevents running test with latest Symfony 8.0 since it is locked on PHP 8.1.
I will overhaul the CI to support runs with all supported Symfony Versions on specific PHP Versions.
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.
Oh I see, now it makes sense. So in general I like this approach, especially that php-matcher doesn't really have other big dependencies.
How would you approach this problem if for example there would be another library that we would like to support multiple versions.
Another lib with just 2 versions to test against, like 2 & 3 would pretty much double the amount of tests we need to run. Wouldn't that make the test matrix insanely big?
b275d3d to
2ba08e9
Compare
| php-version: "${{ matrix.php-version }}" | ||
| ini-values: memory_limit=-1 | ||
| tools: composer:v2 | ||
| tools: flex, composer:v2 |
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 assume we need symfony flex to download specific symfony version?
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.
composer require --dev symfony/expression-language:{{ matrix.symfony-version }} would be an alternative
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's perfectly fine, I was just making sure I understand the intention 👍
|
I'm merging this as is, I'm not 100% sure how much I like testing against all symfony versions (might revert that at some point if becomes problematic) |
| matrix: | ||
| dependencies: | ||
| - "locked" | ||
| - "lowest" | ||
| - "highest" | ||
| php-version: | ||
| - "8.1" | ||
| - "8.2" | ||
| - "8.3" | ||
| - "8.4" | ||
| operating-system: | ||
| - "ubuntu-latest" | ||
| - "8.5" | ||
| symfony-version: | ||
| - "5.4.*" | ||
| - "6.4.*" | ||
| - "7.3.*" | ||
| - "7.4.*" | ||
| - "8.0.*" | ||
| exclude: | ||
| - php-version: 8.3 | ||
| symfony-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.
@norberttech with the following matrix config it can be reduced to only 5 CI jobs
| matrix: | |
| dependencies: | |
| - "locked" | |
| - "lowest" | |
| - "highest" | |
| php-version: | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| operating-system: | |
| - "ubuntu-latest" | |
| - "8.5" | |
| symfony-version: | |
| - "5.4.*" | |
| - "6.4.*" | |
| - "7.3.*" | |
| - "7.4.*" | |
| - "8.0.*" | |
| exclude: | |
| - php-version: 8.3 | |
| symfony-version: "8.0.*" | |
| matrix: | |
| include: | |
| - php-version: 8.3 | |
| symfony-version: "5.4.*" | |
| dependencies: "lowest" | |
| - php-version: 8.3 | |
| symfony-version: "6.4.*" | |
| dependencies: "highest" | |
| - php-version: 8.4 | |
| symfony-version: "7.3.*" | |
| dependencies: "highest" | |
| - php-version: 8.4 | |
| symfony-version: "7.4.*" | |
| dependencies: "highest" | |
| - php-version: 8.5 | |
| symfony-version: "8.0.*" | |
| dependencies: "highest" |
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.
Maybe a run with dependencies: "locked" is missing
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.
lets keep it as is for now, if it become too long/complicated we can reduce it to what you suggested above, thanks for the example!
Change Log
Added
Fixed
Changed
Removed
Deprecated
Security
Description
This primarily add PHP 8.5 and Symfony 8.0 support.
It removes Psalm since it seems stuck in development but upgrades PHPStan to latest Version. In following PRs PHPStan level can be increased.
It removes the main composer.lock as in combination with the platform config before it was not possible test a widen range like for
symfony/expression-language.I left some comments directly on the code to explain those changes: