Optional PHP 8.6 runtime APIs: stream error reasons in CacheFileWriter, Io\Poll for the warmup worker pool

Aperta
#799 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Start with CacheFileWriter::write(), where mkdir, file_put_contents and rename are silenced with @, and with Warmup\WorkerPool, where @stream_select(..., 1) is called. Each change must sit behind a function_exists() or class_exists() guard so PHP 8.4 behaviour stays the same. Done means the 8.6 branch adds the error reason to the exception message, or the Io\Poll path exists. The second item may be closed if profiling shows the select loop doesn't matter, so confirm with a maintainer first.

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

Descrizione

Enhancement PHP-8.6

Low-priority improvements built on new 8.6 runtime APIs. Each needs a function_exists() / class_exists() check while the minimum version is 8.4.

  1. Stream errors in CacheFileWriter (Stream Error Handling Improvements).
    • CacheFileWriter::write() hides the errors of mkdir, file_put_contents and rename with @, so the exception doesn't say why a cache write failed (disk full, permissions, cross-device rename).
    • On 8.6, stream_last_errors() / stream_clear_errors() can add the cause to the existing exception message without changing the @ behaviour.
  2. Io\Poll in Warmup\WorkerPool (Polling API).
    • WorkerPool waits on worker sockets with @stream_select(..., 1), a one-second timeout.
    • The new poll API could replace it on 8.6, with the right backend chosen per OS.
    • This only helps if the select loop shows up in warmup profiles; otherwise close this item.

Part of #789.

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

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.