codeigniter4 / codeigniter4/shield
Bug: Auth.php Errors
- 主要言語
- PHP
- スター
- 426
- フォーク
- 143
- 平均マージ
- 9時間 19分
- マージ済み PR(30日)
- 6
説明
### 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
```php
// | 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_
コントリビューションガイド
調査の方向性
shield/src/Auth.php から始め、報告されている PHP、CodeIgniter、Shield のバージョンを使った基本的な Shield インストールで、attempt() と check() の @method アノテーションに対する PhpStorm の診断を調査します。報告されているエラーを再現し、アノテーションに期待される動作を特定します。メソッド宣言を削除せずに、文書化されたエラーが解決されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- authentication
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100