Skip to content

chore: require PHP 8.5 and apply Rector PHP 8.5 rules - #71

Merged
turegjorup merged 2 commits into
developfrom
feature/rector-php85
Nov 8, 2026
Merged

turegjorup merged 2 commits into
developfrom
feature/rector-php85

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Require PHP 8.5 and apply the Rector PHP 8.5 rules.

This PR depends on #70 (PHP 8.5 image). The base branch is feature/docker-compose-template-update. After #70 is merged, change the base to develop.

Changes

  • Require PHP >=8.5 in composer.json, the same as event-database-imports. Run composer update --lock.
  • Apply the Rector PHP 8.5 rules (withPhpSets() reads the PHP version from composer.json):
    • NewMethodCallWithoutParenthesesRector: (new Foo())->bar() becomes new Foo()->bar() (PHP 8.4 syntax).
    • AddOverrideAttributeToOverriddenPropertiesRector: #[\Override] on properties that override a parent property (PHP 8.5). These are mostly the static props in the tests that override AbstractApiTestCase.
  • Change the PHP version in CLAUDE.md and in the comment in rector.php.

Why

The application runs on PHP 8.5 after #70. The requirement in composer.json must agree with the runtime.

The #[\Override] attribute is not required by PHP 8.5. It makes PHP stop with an error when a parent property is renamed or removed. Without the attribute, the child property silently becomes a new property.

The changes are in a separate PR, because #[\Override] on a property causes an error on PHP 8.4.

Checks

  • PHPUnit on PHP 8.5.12: 265 tests, 718 assertions, all pass.
  • PHPStan: no errors. Rector dry-run: no changes.

Rector changes are syntax only: new without parentheses and #[\Override] on overridden properties.
Base automatically changed from feature/docker-compose-template-update to develop November 8, 2026 20:18
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.39%. Comparing base (fd777d7) to head (4f624ef).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #71   +/-   ##
==========================================
  Coverage      74.39%   74.39%           
  Complexity       264      264           
==========================================
  Files             30       30           
  Lines            738      738           
==========================================
  Hits             549      549           
  Misses           189      189           
Flag Coverage Δ
unittests 74.39% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@turegjorup
turegjorup merged commit be3455e into develop Nov 8, 2026
12 of 13 checks passed
@turegjorup
turegjorup deleted the feature/rector-php85 branch November 8, 2026 20:19
@turegjorup turegjorup mentioned this pull request Nov 8, 2026
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