fix: Add explicit Request properties and AllowDynamicProperties attribute to eliminate PHP 8.2 deprecation output
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Core;
|
||||
/**
|
||||
* Handles HTTP requests, extracting query params, body data, and headers.
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Request
|
||||
{
|
||||
private string $method;
|
||||
@@ -15,9 +16,13 @@ class Request
|
||||
|
||||
// Explicit properties to store authentication details to avoid deprecation warnings in PHP 8.2+
|
||||
public ?int $user_id = null;
|
||||
public ?string $uuid = null;
|
||||
public ?int $company_id = null;
|
||||
public ?string $role = null;
|
||||
public bool $is_super_admin = false;
|
||||
public ?string $phone_number = null;
|
||||
public ?string $full_name = null;
|
||||
public ?string $grade_level = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user