Skip to content

Update PHP requirements and improve code annotations #3

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

dmolineus
Copy link
Contributor

This pull request includes the following changes:

  • Set PHP 7.4 as the minimum requirement and utilize native property types.
  • Fixed issues reported by Psalm to improve static analysis.
  • Adjusted handling of PHP version detection to avoid assumptions about PHP 8.x features while maintaining support for PHP 7.4.
  • Enhanced code by adding annotations for method overrides.
  • Used explicit nullables for silencing PHP 8.4 deprecations.

@dmolineus dmolineus requested a review from discordier June 18, 2025 14:41
Copy link
Member

@discordier discordier left a comment

Choose a reason for hiding this comment

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

As usual, nit-picks.

On the pipeline errors:

  • While psalm failure is expected in php 8.0 and 8.1, it should run in 7.4.
  • The require-checker is failing in lower versions too.

@discordier
Copy link
Member

Triggering the pipeline again pulled the correct psalm versions but now the psalm.xml is incompatible. Psalm 5.x does not know the ClassMustBeFinal element apparently.

Sidenote: PHP7.4 does phpcq install instead of update and therefore pulls the tools for current master - this seems to be wrong

@dmolineus
Copy link
Contributor Author

Triggering the pipeline again pulled the correct psalm versions but now the psalm.xml is incompatible. Psalm 5.x does not know the ClassMustBeFinal element apparently.

I have no idea how to fix it properly.

@discordier
Copy link
Member

Triggering the pipeline again pulled the correct psalm versions but now the psalm.xml is incompatible. Psalm 5.x does not know the ClassMustBeFinal element apparently.

I have no idea how to fix it properly.

The only idea I have is providing separate config files for different conflicting php versions.

Copy link
Member

@discordier discordier left a comment

Choose a reason for hiding this comment

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

Good to go - however the pipeline failures should get adressed by either:

  • fixing them (what ever the way to go might be then)
  • dropping support for end of life versions (which will break these then).

@dmolineus
Copy link
Contributor Author

I vote for dropping support for end of life PHP versions. We would still have to support PHP 8.1. There is a broken psalm version used build against PHP 8.2. Haven't you release the version override for psalm already?

@discordier
Copy link
Member

I vote for dropping support for end of life PHP versions. We would still have to support PHP 8.1. There is a broken psalm version used build against PHP 8.2. Haven't you release the version override for psalm already?

Yes, the overrides are in place and working.
They get correctly pulled when doing phpcq update - we do not validate the constraints on phpcq install though.

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