CI and fixtures: make PHP 8.6 a supported target

Aperta
#797 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, php
Ambito
ci-cd, testing

Direzione di ricerca

This is a tracking issue with several separate tasks. Start with the CI matrix in phpunit.yml (the experimental flag on 8.6) and phpstan.yml (add 8.6), then look at the weaving fixtures under tests/Instrument/Transformer/_files/. Done means the matrix changes land and each listed 8.6 syntax case has a skipped-below-8.6 functional test. Dropping experimental must wait for 8.6.0 GA, and the fixture tasks need maintainer guidance.

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

Descrizione

Enhancement PHP-8.6

Current state

  • phpunit.yml runs PHP 8.6 (lowest and highest dependencies) with experimental: true, so a failure doesn't fail the build.
  • phpstan.yml only runs on 8.4 and 8.5. Locally, composer analyze passes on 8.6 for the current code.
  • No fixture or functional test contains 8.6 syntax. The whole suite passes on 8.6.0RC2 and RC3 (3359 tests).

Tasks

  • Drop experimental for 8.6 in phpunit.yml once 8.6.0 GA is released and setup-php provides it.
  • Add 8.6 to the phpstan.yml matrix.
  • Add weaving fixtures (tests/Instrument/Transformer/_files/php86-*) and functional tests for 8.6 syntax in woven code. They should be skipped below 8.6, or loaded through a version-gated fixture project. Cover:
    • PFA in method bodies, including a PFA of an intercepted method ($this->sum(?, 1)), static PFA (self::make(1, ?)), and PFA after |>;
    • PFA in constant expressions: property/parameter defaults (#791) and attribute arguments (these already work);
    • readonly property defaults in readonly and non-readonly classes, and re-initialisation in an intercepted __clone() (#792);
    • #[\Override] on class constants and enum cases (#794);
    • parameter doc comments (#793);
    • __debugInfo() on enums, which is already woven and intercepted correctly.
  • tests/AGENTS.md: describe the 8.6 test setup. Optionally pin goaop/parser-reflection / nikic/php-parser to versions that parse 8.6 (php-parser 5.9 already has ArgPlaceholder).

No action needed for these 8.6 changes, which were checked against the engine:

  • stateless closure caching: no code relies on closure identity;
  • the limit of 16 filters per php://filter URL: the loader uses one filter per URL;
  • the 8.6 deprecations: the suite runs with failOnDeprecation;
  • __construct() return-value deprecation: generated constructors don't return.

Part of #789.

Lingua principale
PHP
Stelle
1.7k
Fork
166
Merge medio
1g 5h
PR unite (30g)
30

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 goaop/framework

Tutte le issue di goaop/framework

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.