Skip to content

Update to PHP 8.5#444

Open
samdark wants to merge 1 commit intomasterfrom
php85-update
Open

Update to PHP 8.5#444
samdark wants to merge 1 commit intomasterfrom
php85-update

Conversation

@samdark
Copy link
Member

@samdark samdark commented Feb 21, 2026

Q A
Is bugfix?
New feature?
Breaks BC? ✔️
Fixed issues -

Copilot AI review requested due to automatic review settings February 21, 2026 21:58
@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.96%. Comparing base (0233f44) to head (eb0e4fd).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #444   +/-   ##
=========================================
  Coverage     76.96%   76.96%           
  Complexity       29       29           
=========================================
  Files            11       11           
  Lines           178      178           
=========================================
  Hits            137      137           
  Misses           41       41           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the project from PHP 8.2-8.5 support to PHP 8.5-only support. The change involves updating the minimum PHP version requirement, Docker images, CI/CD workflows, and adopting PHP 8.5 language features including the #[\Override] attribute on properties and typed constants. However, there are several critical issues that need to be addressed before this can be safely merged.

Changes:

  • Restricts PHP version to ^8.5.0, dropping support for PHP 8.2, 8.3, and 8.4
  • Adds #[\Override] attributes to property declarations in AssetBundle
  • Converts class constants to use typed constant syntax (PHP 8.3 feature)
  • Updates Docker base image to PHP 8.5
  • Updates all CI/CD workflows to test only on PHP 8.5
  • Updates Rector configuration to use PHP 8.5 rules
  • Bumps multiple dependency versions

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/Web/Shared/Layout/Main/MainAsset.php Adds #[\Override] attributes to property declarations (critical issue: this syntax may not be supported)
src/Environment.php Converts constants to use typed constant declarations (PHP 8.3 feature)
rector.php Updates Rector configuration from php82 to php85 rules
docker/Dockerfile Changes base image from php8.2 to php8.5 (needs verification that image exists)
composer.json Updates PHP requirement from "8.2 - 8.5" to "^8.5.0" and bumps dependencies
README.md Updates documentation to reflect PHP 8.5 requirement
.github/workflows/static.yml Removes PHP 8.2-8.4 from test matrix, tests only PHP 8.5
.github/workflows/composer-dependency-analyzer.yml Removes PHP 8.2-8.4 from test matrix, tests only PHP 8.5
.github/workflows/build.yml Removes PHP 8.2-8.4 from test matrix, tests only PHP 8.5
Comments suppressed due to low confidence (3)

composer.json:36

  • The PHP version constraint has been changed from supporting a range of PHP versions (8.2 - 8.5) to requiring specifically PHP 8.5.0 or higher (^8.5.0). This is a breaking change as it drops support for PHP 8.2, 8.3, and 8.4, which may impact users who cannot immediately upgrade to PHP 8.5. Consider whether this strict version constraint is necessary, especially if PHP 8.5 is newly released and may not be widely available in production environments yet. The PR description confirms this breaks backward compatibility, so ensure this aligns with the project's versioning and support policy.
        "php": "^8.5.0",

rector.php:15

  • The Rector configuration has been updated to use PHP 8.5 rules (php85: true). Verify that the version of Rector specified in composer.json (^2.3.7) supports PHP 8.5. If PHP 8.5 was released after this version of Rector, the php85 parameter may not exist or may not include all necessary rules, which could cause Rector to fail or produce incorrect transformations.
    ->withPhpSets(php85: true)

docker/Dockerfile:3

  • The FROM dunglas/frankenphp:1-php8.5-bookworm base image is referenced only by a mutable tag, which means any compromise or unexpected change of that tag upstream could silently alter your build environment and execute attacker-controlled code during build or at runtime. An attacker who gains control over the image repository (or a registry in the supply path) could push a malicious image under the same tag, leading to supply chain compromise of this application. To mitigate this, pin the base image to an immutable identifier such as a specific image digest and update it explicitly when needed.
FROM dunglas/frankenphp:1-php8.5-bookworm AS base

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +18
#[\Override]
public ?string $basePath = '@assets/main';
#[\Override]
public ?string $baseUrl = '@assetsUrl/main';
#[\Override]
public ?string $sourcePath = '@assetsSource/main';

#[\Override]
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

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

The #[\Override] attribute is being applied to property declarations, which is not supported in PHP 8.3 (the latest version with definitive documentation at my knowledge cutoff). The Override attribute was introduced in PHP 8.3 specifically for methods to ensure they actually override a parent method. Properties in PHP are simply redeclared in child classes and don't have the same override semantics. If PHP 8.5 does not support the Override attribute on properties, this code will result in fatal errors. Please verify that PHP 8.5 officially supports this syntax, or remove the Override attributes from all property declarations in this file.

Suggested change
#[\Override]
public ?string $basePath = '@assets/main';
#[\Override]
public ?string $baseUrl = '@assetsUrl/main';
#[\Override]
public ?string $sourcePath = '@assetsSource/main';
#[\Override]
public ?string $basePath = '@assets/main';
public ?string $baseUrl = '@assetsUrl/main';
public ?string $sourcePath = '@assetsSource/main';

Copilot uses AI. Check for mistakes.
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