codeigniter4 / codeigniter4/shield
Bug: Auth.php Errors
- Lingua principale
- PHP
- Stelle
- 427
- Fork
- 144
- Merge medio
- 9h 19m
- PR unite (30g)
- 6
Descrizione
### 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_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with shield/src/Auth.php and inspect the PhpStorm diagnostics on the @method annotations for attempt() and check(), using a base Shield install with the reported PHP, CodeIgniter, and Shield versions. Reproduce the reported errors and identify the expected annotation behavior; done means the documented errors are resolved without removing the method declarations.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- php
- Ambito
- authentication
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100