-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Closed
Copy link
Labels
Description
Is your feature request related to a problem? Please describe.
Implicitly nullable parameter declarations has been deprecated in PHP8.4.
You'll run into "deprecated" errors if you execute a php code using API client generated by this generator on PHP8.4.
PHP functions/methods now should declare nullable parameter explicitly:
class Foo implements ModelInterface
{
// ...
- public function __construct(array $data = null)
+ public function __construct(?array $data = null)
{
$this->setIfExists('some_field', $data ?? [], null);
}
}
## Describe the solution you'd like
Update templates for php to declare nullable explicitly.
## Describe alternatives you've considered
Do not allow nullable parameters by deleting `= null`.
## Additional context
https://www.php.net/releases/8.4/en.php
https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecatediamyukihiro