[
https://issues.apache.org/jira/browse/THRIFT-5956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Volodymyr Panivko closed THRIFT-5956.
-------------------------------------
Resolution: Fixed
> Bump minimum PHP version to 8.1
> -------------------------------
>
> Key: THRIFT-5956
> URL: https://issues.apache.org/jira/browse/THRIFT-5956
> Project: Thrift
> Issue Type: New Feature
> Components: PHP - Compiler, PHP - Library
> Affects Versions: 0.24.0
> Reporter: Volodymyr Panivko
> Assignee: Volodymyr Panivko
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> The PHP library currently declares `"php": "^7.1 || ^8.0"` in composer.json,
> keeping us on the floor of PHP 7.1 — a release that has been EOL since 2019.
> The CI matrix accordingly tests 10 PHP versions (7.1 → 8.5), and dev
> dependencies span PHPUnit 7/8/9 to bridge that range.
> PHP 7.x branches are all unsupported upstream:
> - 7.0 EOL 2019-01-10
> - 7.1 EOL 2019-12-01
> - 7.2 EOL 2020-11-30
> - 7.3 EOL 2021-12-06
> - 7.4 EOL 2022-11-28
> - 8.0 EOL 2023-11-26
> The PHP runtime library has solid test coverage now, so we can simplify
> maintenance by raising the minimum to PHP 8.1. Rationale for 8.1
> specifically (not 8.0):
> * Ubuntu LTS Docker images already used by Thrift CI map naturally
> to 8.1+ (jammy=8.1, noble=8.3); only focal still defaults to 7.4
> and will be moved to ppa:ondrej/php for 8.1.
> * 8.1 unlocks native enums, readonly properties, and `never` return
> type — useful for follow-up modernization of the C++ → PHP
> generator output.
> * 8.1 is the lowest version supported by PHPUnit 10/11, leaving a
> clear migration path.
> Scope of this ticket:
> * composer.json: require PHP ^8.1; collapse PHPUnit constraint to
> ^9.5; bump phpcs to ^3.10.
> * .github/workflows/build.yml: drop the 7.1/7.2/7.3/7.4/8.0 rows of
> the lib-php matrix.
> * build/docker/ubuntu-focal/Dockerfile: install PHP 8.1 from
> ppa:ondrej/php (focal default is 7.4).
> * build/docker/README.md: refresh the version table.
> * lib/php/phpunit.xml: bump schema URL to 9.5.
> * CHANGES.md: announce the breaking change.
> Out of scope (separate follow-up tickets):
> * Migrating to PHPUnit 10/11.
> * Modernizing the C++ → PHP generator output (typed properties,
> constructor promotion, native enums, declare(strict_types=1)).
> Users still on PHP 7.x or 8.0 will need to stay on the 0.23.x release
> series.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)