Closed FalkoHilbert closed 3 years ago
Hi!
Do you happen to have a longer stacktrace? Because I don't find an isfile
method neither in the client nor in JanePHP.
Thanks!
Hi,
I didn't have a stacktrace yet, but i think the following line is the reason: https://github.com/janephp/open-api-runtime/blob/1c5248ed5e453b32e8afb325b180d010768a472e/Client/Client.php#L61
Hey @FalkoHilbert, thanks for your report, it seems this bug is more related with https://github.com/janephp/janephp, that's why I'm taking back here :)
Could you provide us what is your OS, PHP version (php --version
), slack-php-api (composer info
) version and a code example (with the path your are using) to help us reproduce your issue ?
Thanks !
Hi, i'm using php 7.2.34 on debian 9 jolicode/slack-php-api v2.5.0 -> but it looks like it would also be present in higher versions jane-php/open-api-runtime v5.3.3 jane-php/json-schema-runtime v5.3.3
<?php
declare(strict_types=1);
require_once( 'vendor/autoload.php' );
use Faker\Factory;
use JoliCode\Slack\ClientFactory;
$client = ClientFactory::create(SLACK_TOKEN);
$faker = Factory::create();
$veryLongBody = $faker->text(4096);
$client->chatPostMessage(
[
'text' => 'Test message',
'blocks' => json_encode([
[
'type' => 'section',
'text' => [
'type' => 'plain_text',
'text' => $veryLongBody
]
]
]),
'channel' => 'YOUR USER ID HERE',
'as_user' => true
]
);
I Hope it will help
We were not able to reproduce the error, but it should be fixed by #108.
Could you please try it? By setting this in your composer.json:
"jolicode/slack-php-api": "dev-upgradeJane"
And then composer update jolicode/slack-php-api
.
Thanks a lot!
it looks like it is working now
Awesome, just released the patch: https://packagist.org/packages/jolicode/slack-php-api#v4.1.1
Hi, we have been using this really super working library for some time. However, today we noticed that for very long messages sent with the
chatPostMessage
function, an error is thrown with the contentisfile(): File name is longer than the maximum allowed path length on this platform (4096):
. Do you guys have any idea how I can solve this problem? File:/vendor/jane-php/open-api-runtime/Client/Psr18Client.php
Function:executePsr7Endpoint