Skip to content

Conversation

@smoench
Copy link
Contributor

@smoench smoench commented Dec 4, 2025

Change Log

Added

  • PHP 8.5 support
  • allows Symfony 8.0 components

Fixed

Changed

  • dropped support for PHP < 8.3

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:

Comment on lines -29 to -32
"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"
Copy link
Contributor Author

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)

@norberttech
Copy link
Member

It removes Psalm since it seems stuck in development but upgrades PHPStan to latest Version.

Perfect, long time ago I dropped psalm and moved most of my projects to be phpstan only 👍 (next migration would be probably towards Mago)

@smoench smoench marked this pull request as ready for review December 4, 2025 14:05
.DS_Store
.idea
.phpunit.cache/
composer.lock
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

@smoench smoench force-pushed the php85 branch 2 times, most recently from b275d3d to 2ba08e9 Compare December 4, 2025 15:39
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2
tools: flex, composer:v2
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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 👍

@norberttech norberttech merged commit ce401b3 into coduo:6.x Dec 8, 2025
32 checks passed
@norberttech
Copy link
Member

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)

Comment on lines 17 to +33
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.*"
Copy link
Contributor Author

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

Suggested change
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"

Copy link
Contributor Author

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

Copy link
Member

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!

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.

2 participants