overblog / GraphQLBundle

This bundle provides tools to build a complete GraphQL API server in your Symfony App.
MIT License
783 stars 221 forks source link

Unbound Version Constraint webonyx/graphql-php:>=14.5 causes Compile Error #1083

Closed possi closed 1 year ago

possi commented 1 year ago
Q A
Bug report? yes
Feature request? no
BC Break report? somewhat
RFC? no
Version/Branch v0.14.3 && v0.15.1

Error: Compile Error: Declaration of Overblog\DataLoader\Promise\Adapter\Webonyx\GraphQL\SyncPromiseAdapter::beforeWait(GraphQL\Executor\Promise\Promise $promise) must be compatible with GraphQL\Executor\Promise\Adapter\SyncPromiseAdapter::beforeWait(GraphQL\Executor\Promise\Promise $promise): void

Webonyx release v15.0.0 on friday. There it tightens the function declaraion of SyncPromiseAdapter::beforeWait. dataloader-php isn't updated yet, which causes the compile error. But dataloader-php doesn't define the requirement to webonyx. Instead graphql-bundle does. But without the restriction to ^14.5 it allows to update to the new major version, which introducing breaking changes.

Please update dataloader-php and/or correct the dependency requirement.

As a workaround we have to include an additional version constraint to pin the indirect dependency.

mcg-web commented 1 year ago

Fixed in v0.14.4 and v0.15.2.