Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Raise the minimum PHP version to 8.3

クローズ 初心者向け
#58 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #65 @e0ipso による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php

調査の方向性

composer.json の php 制約と、その require ブロックにある symfony/polyfill-php81 のエントリから始めてください。次に composer update --lock を実行して composer.lock を更新します。パッケージを削除する前に、src/ でポリフィルされている呼び出しが array_is_list() だけであることを確認し、README の PHP の最小バージョンを更新してください。composer.json が >=8.3 を要求し、ポリフィルが削除され、CI が PHP 8.3 と 8.4 で成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

category::task maintenance priority::normal

Description

composer.json requires php >=7.4, but nothing checks that. CI runs PHP 8.3 and 8.4 only, config.platform.php is pinned to 8.3.0, and the dev dependencies (PHPUnit 10, drupal/core-dev ^11) do not install below 8.3. The test suite cannot run on the minimum we advertise.

I ran a smoke test on PHP 7.4.33 with Drupal 9.5.11 and PHPUnit 9.6. The code in src/ still works there: the README example renders as documented and 57 of 63 tests pass. The other 6 fail because tests/src/ArrayToStdClassTest.php already declares mixed parameters, which is PHP 8 syntax. So 7.4 support works by accident and will break without anyone noticing.

The only Drupal that runs on PHP 7.4 is Drupal 9, which is end of life. Composer refuses to install any 9.5 release by default because of open security advisories.

Raise the minimum to PHP 8.3. That is the oldest version CI tests, so the declared minimum and the tested minimum become the same.

Acceptance Criteria

  • composer.json requires "php": ">=8.3" and composer.lock is refreshed with composer update --lock.
  • symfony/polyfill-php81 is removed from require. The only function src/ uses from it is array_is_list(), which is native since PHP 8.1.
  • The README states PHP 8.3 as the minimum.
  • composer test passes in CI on PHP 8.3 and 8.4.
  • The commit is marked as a breaking change (feat!: or a BREAKING CHANGE: footer) so semantic-release publishes 3.0.0 instead of a 2.x release.

Additional Context

Sites on PHP older than 8.3 keep getting 2.x, currently v2.5.3, through their existing Composer constraint.

Related and out of scope: src/RecursiveTypeCaster.php:153 uses a (boolean) cast, which PHP 8.5 deprecates in favour of (bool). CI does not run 8.5 yet.

主要言語
JavaScript
スター
11
フォーク
5
平均マージ
1日 14時間
マージ済み PR(30日)
12

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

e0ipso/schema-forms-php のほかの issue

e0ipso/schema-forms-php の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。