一旦在路由中使用 绑定到命名空间namespace(),多级控制器提示类找不到
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in think\route\Rule.php around parseRule() at line 699, then reproduce the reported Route group with namespace('app\index\controller') and the nested user.Blog/index controller route. Check how the route is converted into a controller class name. Done means the route resolves the intended namespaced controller without ClassNotFoundException.
Written by the indexing model from the issue text.
Description
所属功能组件
路由(Route)
ThinkPHP 版本
8.1.4
操作系统
Linux
错误信息
“#0 [0]ClassNotFoundException in Callback.php line 108
类不存在:app\index\controller\user.blog
其它说明
Route::group('',function(){ Route::get('user/blog','user.Blog/index'); }) ->namespace('app\index\controller');
大概,think\route\Rule.php 699行 parseRule().字符没有转换
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from top-think/framework
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 62/100
All issues in top-think/framework
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·