Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Raise the minimum PHP version to 8.3

Aperta Adatta ai principianti
#58 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php

Direzione di ricerca

Inizia dal vincolo php in composer.json e dalla voce symfony/polyfill-php81 nel suo blocco require, poi esegui composer update --lock per aggiornare composer.lock. Verifica che array_is_list() sia l'unica chiamata con polyfill in src/ prima di rimuovere il pacchetto, e aggiorna la versione minima di PHP nel README. È completato quando composer.json richiede >=8.3, il polyfill è stato rimosso e la CI passa con PHP 8.3 e 8.4.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
PHP
Stelle
11
Fork
5
Merge medio
12m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di e0ipso/schema-forms-php

Tutte le issue di e0ipso/schema-forms-php

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.