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 Jane\JsonSchemaRuntime\Normalizer\CheckArray #153

Open
bulentevren opened this issue May 5, 2023 · 7 comments
Open

Fatal Error Jane\JsonSchemaRuntime\Normalizer\CheckArray #153

bulentevren opened this issue May 5, 2023 · 7 comments

Comments

@bulentevren
Copy link

Fatal error: Trait "Jane\JsonSchemaRuntime\Normalizer\CheckArray" not found in C:\serve\htdocs\greeter\vendor\jolicode\slack-php-api\generated\Normalizer\JaneObjectNormalizer.php on line 24

php 8.2/ windows

Could not figure out what is the problem here :(

@bulentevren
Copy link
Author

`C:\serve\htdocs\greeter>composer info jolicode/slack-php-api
name : jolicode/slack-php-api
descrip. : An up to date PHP client for Slack's API
keywords : api, client, openapi, sdk, slack, slackapi, swagger
versions : * v3.0.0
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage :
source : [git] https://github.com/jolicode/slack-php-api.git 4f8cd6a
dist : [zip] https://api.github.com/repos/jolicode/slack-php-api/zipball/4f8cd6ada7ef89eebae71250068c84cbe0fb2d71 4f8cd6a
path : C:\serve\htdocs\greeter\vendor\jolicode\slack-php-api
names : jolicode/slack-php-api

support
issues : https://github.com/jolicode/slack-php-api/issues
source : https://github.com/jolicode/slack-php-api/tree/v3.0.0

autoload
psr-4
JoliCode\Slack\ => src/
JoliCode\Slack\Api\ => generated/

requires
jane-php/open-api-runtime ^6.0
php >= 7.2
php-http/client-common ^1.9 || ^2.0
php-http/discovery ^1.7
php-http/multipart-stream-builder ^1.1
psr/http-client-implementation *

requires (dev)
friendsofphp/php-cs-fixer ^2.16
jane-php/open-api-2 ^6.0
nyholm/psr7 ^1.2
opis/json-schema ^1.0
symfony/console ^5.1
symfony/contracts ^2.1
symfony/http-client ^4.3.3 || ^5.1
symfony/phpunit-bridge ^4.3
symfony/process ^5.1
symfony/string ^5.1

conflicts
php-http/httplug < 2.0`

@damienalexandre
Copy link
Member

Hi! Sorry you bump into this issue!

I don't know what the issue is, but do you know why you are using version 3.0? It's quite old, can you try v4.5.0?

@bulentevren
Copy link
Author

Thanks.
I just followed documentiation and use composer to install
composer require jolicode/slack-php-api
how should i update?

@bulentevren
Copy link
Author

ok i have updated it by using composer update but it is 3.0.2 now.
I have different error this time

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 C:\serve\htdocs\greeter\vendor\jolicode\slack-php-api\generated\Endpoint\ChatPostMessage.php on line 119

@damienalexandre
Copy link
Member

Oh dear, I can reproduce the issue you are right. Looks like there is a dependency issue.

You can run this to use the latest version:

composer require jolicode/slack-php-api:v4.5.0 -W

It will downgrade psr/http-message (2.0 => 1.1).

@bulentevren
Copy link
Author

thanks a lot all working :)

@damienalexandre
Copy link
Member

Good to know.

Let's keep this issue open, looks like this upstream change is needed: thephpleague/uri-src#108

/tmp/lol $ composer why psr/http-message
league/uri               6.8.0  requires psr/http-message (^1.0.1)       
nyholm/psr7              1.8.0  requires psr/http-message (^1.1 || ^2.0) 
php-http/client-common   2.6.1  requires psr/http-message (^1.0 || ^2.0) 
php-http/httplug         2.4.0  requires psr/http-message (^1.0 || ^2.0) 
php-http/message         1.14.0 requires psr/http-message (^1.0 || ^2.0) 
php-http/message-factory 1.1.0  requires psr/http-message (^1.0 || ^2.0) 
psr/http-client          1.0.2  requires psr/http-message (^1.0 || ^2.0) 
psr/http-factory         1.0.2  requires psr/http-message (^1.0 || ^2.0) 

/tmp/lol $ composer why league/uri
jane-php/json-schema-runtime v7.5.0 requires league/uri (^6.0) 

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