Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

AutoRouterImproved extendability

未關閉
#7,364 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
php
領域
backend

研究方向

首先閱讀 AutoRouterImproved,以及它目前用來尋找控制器和方法名稱的父路由器方法。比較兩種提議的方案:重複使用父路由器的行為,或透過應用程式特定的服務讓自動路由器可替換且可擴充。完成的標準是確定一項設計,並實作無需複製路由器即可變更控制器和方法名稱的功能。

由索引模型根據 Issue 內容生成。

描述

enhancement

In the current state, the AutoRouterImproved is not thought to be replaced by an App-Specific service and to be extended on.

kenjis: Because it is better to implement the interface, not extending the class.

In my case, I need to change the controller & method name which is already implemented in the router.
Re-Implementing the AutoRouterImproved to do that seems kinda ridiculous.

Two approaches come to my mind:

  1. The specific solution: Use the "parent" routers methods for finding the method and controller name, this prevents duplicate code and allows for a little app-specific behavior.
  2. The generic solution: Make the auto routers replaceable by app-specific services
    1. Optional: make both extendable, so we don't have to write ridiculous amounts of code for small changes.
主要語言
PHP
星號
6k
分支
2k
平均合併
1 天 22 小時
30 天內合併 PR
59

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codeigniter4/CodeIgniter4 的其他 Issue

查看 codeigniter4/CodeIgniter4 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。