Bug: Auth.php Errors
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- php
调研方向
从 shield/src/Auth.php 开始,使用包含所报告 PHP、CodeIgniter 和 Shield 版本的基础 Shield 安装,检查 PhpStorm 针对 attempt() 和 check() 的 @method 注解给出的诊断。复现所报告的错误,并确定注解的预期行为;在不删除方法声明的情况下解决文档中记录的错误,即视为完成。
由索引模型根据 Issue 内容生成。
描述
PHP Version
8.4.9
CodeIgniter4 Version
4.6.1
Shield Version
1.1.0
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
MySQL 8.4.3
Did you customize Shield?
No Customizations base install.
// shield/src/Auth.php
The minute I open Auth.php the errors show up.
The 2 Result lines below are throwing errors in phpStorm newest version.
If I remark them out like this they go away, it seems to be throwing the errors
because of the email?: and all others with the ? mark in them
// | Errors
// * @method //Result attempt(array{email?: string, username?: string, password?: string, token?: string} $credentials)
// * @method //Result check(array{email?: string, username?: string, password?: string, token?: string} $credentials)
/**
* Facade for Authentication
*
* @method Result attempt(array{email?: string, username?: string, password?: string, token?: string} $credentials)
* @method Result check(array{email?: string, username?: string, password?: string, token?: string} $credentials)
* @method bool checkAction(string $token, string $type) [Session]
* @method void forget(?User $user = null) [Session]
* @method User|null getUser()
* @method bool loggedIn()
* @method bool login(User $user)
* @method void loginById($userId)
* @method bool logout()
* @method void recordActiveDate()
* @method $this remember(bool $shouldRemember = true) [Session]
*/
class Auth
{}
What happened?
Errors
Steps to Reproduce
Base install of shield
Expected Output
No Errors
Anything else?
No response
- 主要语言
- PHP
- 星标
- 426
- 派生
- 144
- 平均合并
- 3 天 14 小时
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codeigniter4/shield 的其他 Issue
-
Dev: Add bot detection for magic links可能已有人在做 @datamweb 于 313 天前认领。 未关闭dev
codeigniter4/shield#1293 · 5 条评论 · 已指派 1 人 ·
-
dev enhancement
难度 5/5 一周以上 新手友好度 35/100
codeigniter4/shield#1255 · 1 条评论 · 1 个 reaction ·
-
dev github_actions
难度 3/5 1-2 天 新手友好度 35/100
codeigniter4/shield#792 · 3 条评论 · 1 个 reaction ·
查看 codeigniter4/shield 的全部 Issue
相似的 Issue
-
sync-en
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 4 天内回复
-
Перевод устарел
难度 1/5 1 小时以内 新手友好度 85/100
-
bug
难度 2/5 半天 新手友好度 76/100
m3ue/m3u-editor#1604 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
femiwiki/docker-mediawiki#1497 ·
维护者通常 1 天内回复