Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Should the ServiceContainer allow the app to overload default extension classes?

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
php
領域
backend

調査の方向性

まず、実際の Request インスタンスの選択に関与する ServiceContainer と DefaultServiceLoader のエントリーポイントを読み、再現には EditableRequest の例を使用します。アプリケーションから提供されたクラスがデフォルトのサービスクラスを拡張する場合に意図された優先順位を判断し、選択した動作を示すテストカバレッジを追加して、受信した Request が正しく解決されることを確認します。

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

説明

question

Specific example: My app deals with editing HTTP Requests, so I have a class called EditableRequest that extends Gt\Http\Request. Because of this, the EditableRequest class is instantiated and passed to the DefaultServiceLoader as the actual Request, rather than the actual request that's coming in.

This is obviously a flaw in the system, because it should be fine for the App's service loader to supply classes that extend already-existing classes.

The question is, what should the default behaviour be? If there's already a class defined in the default service loader, should we ignore loading any extras that simply extend the base classes? I think that would be safest.

主要言語
PHP
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

phpgt/ServiceContainer のほかの issue

phpgt/ServiceContainer の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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