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

Update Application to support PHP 8.4 #218

Merged
merged 8 commits into from
Jan 23, 2025

Conversation

alexander-schranz
Copy link
Contributor

Q A
Is bugfix? ✔️
New feature?
Breaks BC? ❌ (not with current min PHP version)
Fixed issues comma-separated list of tickets # fixed by the PR, if any

Update Application to support PHP 8.4. Better would be catch this via PHP CS Fixer, PHPStan or Rector rule.

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.40%. Comparing base (fbd079e) to head (ba0faee).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #218   +/-   ##
=========================================
  Coverage     95.40%   95.40%           
  Complexity       80       80           
=========================================
  Files             9        9           
  Lines           261      261           
=========================================
  Hits            249      249           
  Misses           12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

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

Add line to changelog.

Better would be catch this via PHP CS Fixer, PHPStan or Rector rule.

Agree. If exist such rule for Rector, you can add it.

rector.php Outdated
Comment on lines 20 to 21
->withPhpSets(php80: true)
->withPhpVersion(PhpVersion::PHP_84);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Little bit strange and unexpected configuration but this is suggested by @samsonasik in:

rectorphp/rector#8823 (reply in thread)

Choose a reason for hiding this comment

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

if you have files applied, better run once, and rollback the config with php version 8.0, so that will be safer, ensuring in case of some rule have multiple php version check.

I think php-cs-fixer or phpcs have this already so you don't need to use it if php version is not in 8.4 yet, see https://cs.symfony.com/doc/rules/function_notation/nullable_type_declaration_for_default_null_value.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@samsonasik thx for the feedback and support. Did rollback the config. If the yii core team want to add another tool I let them decide currently there is no php cs tool in place or I'm not aware of it.

@samdark
Copy link
Member

samdark commented Jan 21, 2025

@samdark
Copy link
Member

samdark commented Jan 21, 2025

Ah, roave plugin :( @vjik do we have solution for it?

@alexander-schranz
Copy link
Contributor Author

@samdark sadly no solution as it is blocked by PHP 8.4 support of Psalm it uses classes from there.

@samsonasik
Copy link

samsonasik commented Jan 21, 2025

@alexander-schranz --ignore-platform-reqs on php 8.4 can help?

@samdark samdark requested a review from vjik January 21, 2025 17:52
@alexander-schranz
Copy link
Contributor Author

I'm not aware how to add such flags via the shared CI actions, without effecting the other PHP versions. So think its better one of the yii core devs take this PR over.

@samdark samdark merged commit d1f22d9 into yiisoft:master Jan 23, 2025
20 checks passed
@samdark
Copy link
Member

samdark commented Jan 23, 2025

Let's remove 8.4 from CI for now. Thanks for the pull request. Merged.

@alexander-schranz alexander-schranz deleted the patch-1 branch January 23, 2025 09:14
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.

4 participants