codeigniter4 / codeigniter4/shield
Bug: Auth.php Errors
- Lenguaje dominante
- PHP
- Estrellas
- 427
- Forks
- 144
- Merge medio
- 9 h 19 min
- PR fusionados (30 d)
- 6
Descripción
### 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_
Guía de contribución
Línea de trabajo
Comienza con shield/src/Auth.php e inspecciona los diagnósticos de PhpStorm sobre las anotaciones @method de attempt() y check(), usando una instalación básica de Shield con las versiones de PHP, CodeIgniter y Shield indicadas. Reproduce los errores indicados e identifica el comportamiento esperado de las anotaciones; se considera terminado cuando los errores documentados se hayan resuelto sin eliminar las declaraciones de los métodos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- php
- Área
- authentication
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100