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

オープン
#799 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

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.

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

説明

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.

主要言語
PHP
スター
1.7k
フォーク
166
平均マージ
1日 1時間
マージ済み PR(30日)
42

環境構築

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

はじめの一歩

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

goaop/framework のほかの issue

goaop/framework の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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