modelcontextprotocol / modelcontextprotocol/php-sdk
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan
オープン
初心者向け
まだ誰も着手していません。
Server
- 主要言語
- PHP
- スター
- 1.6k
- フォーク
- 173
- 平均マージ
- 2日 49分
- マージ済み PR(30日)
- 23
説明
The Handler phpstan-type on ElementReference uses a bare \Closure. Implementing RegistryInterface with checkMissingCallableSignature enabled is then impossible: bare Closure fails the signature rule, and adding one breaks contravariance against the interface. \Closure(mixed...): mixed on the alias fixes both. Happy to send the one-liner.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ElementReference にある phpstan-type エイリアス Handler を見つけ、RegistryInterface でどのように使用されているかを調べます。bare Closure 型を issue に記載された互換性のあるシグネチャに変更し、その後プロジェクトの PHPStan チェックを実行して、checkMissingCallableSignature が反変性エラーなしで通ることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 78/100