Open kenjis opened 12 months ago
Use Services::superglobals() and remove all superglobals ($_SERVER, $_GET) in the code base (except in the Superglobals class).
Services::superglobals()
$_SERVER
$_GET
Superglobals
https://github.com/codeigniter4/CodeIgniter4/blob/60b22bf6022f5979036a2fd309df6e3a00e89c05/system/Config/Services.php#L723
https://github.com/codeigniter4/CodeIgniter4/blob/60b22bf6022f5979036a2fd309df6e3a00e89c05/system/Superglobals.php#L19
This is a good phpstan rule.
Use
Services::superglobals()
and remove all superglobals ($_SERVER
,$_GET
) in the code base (except in theSuperglobals
class).https://github.com/codeigniter4/CodeIgniter4/blob/60b22bf6022f5979036a2fd309df6e3a00e89c05/system/Config/Services.php#L723
https://github.com/codeigniter4/CodeIgniter4/blob/60b22bf6022f5979036a2fd309df6e3a00e89c05/system/Superglobals.php#L19