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

Crash on PHP8 #104

Closed ramonacat closed 3 years ago

ramonacat commented 3 years ago

I'm seeing this error on PHP8:

PHP 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 /opt/prs-pinger/vendor/jolicode/slack-php-api/generated/Endpoint/ChatPostMessage.php on line 119

I'm running jane-php/open-api-runtime version 6.3.3 and jolicode/slack-php-api version 4.0.0

damienalexandre commented 3 years ago

Hi,

thanks for reporting this. As I look at this test job: https://travis-ci.org/github/jolicode/slack-php-api/jobs/751797285 PHP 8 should be supported.

Can you share your exact PHP 8 version, and maybe the code you use to see this error?

pyrech commented 3 years ago

Closing as no activity since 2 months and PHP 8 seems to run fine now.

Feel free to reopen if you still get some issues with PHP 8 :wink:

ramonacat commented 3 years ago

Hey, sorry for the lack of response. I'm still not sure what exactly the issue was, but in case anyone finds this, what helped me was to remove the vendor directory and do composer install again.