Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GigiCooper opened this issue Jul 11, 2023 · 1 comment

Comments

@GigiCooper
Copy link

GigiCooper commented Jul 11, 2023

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
Copy link
Member

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

@lyrixx lyrixx changed the title 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 Fatal error: Declaration of ChatPostMessage::transformResponseBody() must be compatible with Jane\OpenApiRuntime\Client\EndpointTrait::transformResponseBody() Jul 12, 2023
@lyrixx lyrixx changed the title Fatal error: Declaration of ChatPostMessage::transformResponseBody() must be compatible with Jane\OpenApiRuntime\Client\EndpointTrait::transformResponseBody() Fatal error: Declaration of ChatPostMessage::transformResponseBody() must be compatible with Jane\OpenApiRuntime\Client\EndpointTrait Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants