Description
On PHP 8.4, the library triggers the following deprecation:
ErrorException: Deprecated: RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema::__construct():
Implicitly marking parameter $data as nullable is deprecated,
the explicit nullable type must be used instead
Cause
All Model classes use array $data = null in their constructors. In PHP 8.4, this implicit nullable pattern is deprecated; the parameter must be explicitly nullable.
Suggested fix
Change the constructor signature from:
public function __construct(array $data = null)
to:
public function __construct(?array $data = null)
Scope
This pattern appears in all Model classes under src/Model/ (e.g. LaunchLinkSchema, CourseSchema, RegistrationSchema, and many others).
Environment
- PHP 8.4.x
- rustici-software/scormcloud-api-v2-client-php 4.0.0