Skip to content

PHP 7.4.0-7.4.11 fatal due to covariant return type bug in php-ai-client DTOs #240

@sensahin

Description

@sensahin

The plugin declare PHP 7.4+ support, but on PHP 7.4.0 the AI Client DTO inheritance pattern can fatal with:

Declaration of GenerativeAiResult::fromArray(array $array): GenerativeAiResult must be compatible with WithArrayTransformationInterface::fromArray(array $array): WithArrayTransformationInterface

This appears to be PHP bug (80126), fixed in PHP 7.4.12:

https://bugs.php.net/bug.php?id=80126
https://www.php.net/ChangeLog-7

So the practical minimum for the PHP SDK path may be PHP 7.4.12+, not PHP 7.4.0+.

Could the compatibility docs/plugin headers/runtime checks clarify that PHP 7.4.12+ is required for the PHP AI Client SDK path, or add a guard/admin notice for PHP 7.4.0-7.4.11?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions