Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bug: Auth.php Errors

Aperta
#1,270 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
php

Direzione di ricerca

Inizia da shield/src/Auth.php e ispeziona i diagnostici di PhpStorm sulle annotazioni @method per attempt() e check(), utilizzando un'installazione di base di Shield con le versioni di PHP, CodeIgniter e Shield indicate. Riproduci gli errori segnalati e identifica il comportamento previsto delle annotazioni; il lavoro è completato quando gli errori documentati sono risolti senza rimuovere le dichiarazioni dei metodi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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

Lingua principale
PHP
Stelle
426
Fork
144
Merge medio
3g 14h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeigniter4/shield

Tutte le issue di codeigniter4/shield

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.