silverstripe / silverstripe-graphql

Serves Silverstripe data as GraphQL representations
BSD 3-Clause "New" or "Revised" License
52 stars 61 forks source link

CMS 5 - Upgrade to webonyx/graphql-php v15 #511

Closed emteknetnz closed 1 year ago

emteknetnz commented 1 year ago

We currently use v14 on webonyx/graphql-php - but it is not PHP 8.2 compatible. This was uncovered as part of the PHP 8.2 support card

v14 will emit multiple deprecation warnings when you dev/build flush=1 using PHP 8.2

vendor/webonyx/graphql-php/src/Type/Definition/FieldDefinition.php:263
vendor/webonyx/graphql-php/src/Type/Definition/InputObjectField.php:106
vendor/webonyx/graphql-php/src/Utils/BreakChangesFinder.php:106 (and many others in this file)
vendor/webonyx/graphql-php/src/Utils/BuildClientSchema.php:190
vendor/webonyx/graphql-php/src/Validators/Rules/ValuesOfCorrectType.php:182

I submitted a PR add PHP 8.2 support for v14 but it was rejected due to v14 now being an unsupported versioned

We're forced to upgrade to v15 for PHP 8.2 support

I tried upgrading to v15 - "webonyx/graphql-php": "dev-master as 14.99.99" but it immediately failed unit tests on my local

v15 (dev-master) is currently in beta. On the linked PR above I asked for a timeline for when v15 goes to stable. Ideally we should be using a stable version, though we may be forced to use a beta.

If v15 is not PHP 8.2 compatible, then submit a PR to add PHP 8.2 support

Acceptance Criteria

PRs

maxime-rainville commented 1 year ago

PR is merged.