jolicode / slack-php-api

:hash: PHP Slack Client based on the official OpenAPI specification
https://jolicode.github.io/slack-php-api/
MIT License
221 stars 54 forks source link

Fatal error: Declaration of `ChatPostMessage::transformResponseBody()` must be compatible with `Jane\OpenApiRuntime\Client\EndpointTrait` #158

Open GigiCooper opened 12 months ago

GigiCooper commented 12 months ago

Error:

Fatal error: Declaration of JoliCode\Slack\Api\Endpoint\ChatPostMessage::transformResponseBody(string $body, int $status, Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType) must be compatible with Jane\OpenApiRuntime\Client\EndpointTrait::transformResponseBody(string $body, int $status, Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) in vendor/jolicode/slack-php-api/generated/Endpoint/ChatPostMessage.php on line 119

PHP version: 8.1

composer.json:

{
    "require": {
        "automattic/woocommerce": "^3.0",
        "jolicode/slack-php-api": "^3.0",
        "symfony/http-client": "^5.4",
        "nyholm/psr7": "^1.8",
        "psr/http-client": "^1.0"
    },
    "config": {
        "allow-plugins": {
            "php-http/discovery": true
        }
    }
}
damienalexandre commented 12 months ago

Hello, you are using "jolicode/slack-php-api": "^3.0", which is a very old version.

Can you upgrade?

"jolicode/slack-php-api": "^4.5",

Thanks