chore: Fix deprecations and tests for symfony 6, graphqlite 6 and php8.1#174
chore: Fix deprecations and tests for symfony 6, graphqlite 6 and php8.1#174nguyenk merged 6 commits intothecodingmachine:6.0from
Conversation
|
Hello @aszenz thank you alot. PHPUnit tests are failing : https://github.com/thecodingmachine/graphqlite-bundle/actions/runs/5342663710/jobs/9686120137?pr=174 I'd be more then glad to merge once this passes. would ou find the time and strength to fix it ? |
|
Fixing tests for validator pkg first in thecodingmachine/graphqlite-symfony-validator-bridge#67 |
|
@aszenz just merged it ! |
+ Fix MyException to use GraphQLInterface
Pass enabled argument to service
extensions automatically now
for latest webonyx graphql pkg + Use built in sort types option + Fix for subscription error
deprecations for php 8.2
| $container->setParameter('graphqlite.security.enable_login', $enableLogin); | ||
| $container->setParameter('graphqlite.security.enable_me', $enableMe); | ||
| $container->setParameter('graphqlite.security.introspection', $config['security']['introspection'] ?? true); | ||
| $container->setParameter('graphqlite.security.disableIntrospection', !($config['security']['introspection'] ?? true)); |
There was a problem hiding this comment.
Reason for inverting the logic here is because i had to pass this argument to the service DisableIntrospection which now takes $enabled as argument which needs to be true for disabling introspection
| public function testDisableIntrospection(): void | ||
| { | ||
| $kernel = new GraphQLiteTestingKernel(true, null, true, null, false, 2, 2); | ||
| $kernel = new GraphQLiteTestingKernel(true, null, true, null, false, 3, 2); |
There was a problem hiding this comment.
I guess the webonyx pkg changed how they calculate complexity, it was now failing on 2 raised it to 3
| "symfony/security-bundle": "^6", | ||
| "symfony/yaml": "^6", | ||
| "beberlei/porpaginas": "^1.2", | ||
| "beberlei/porpaginas": "^1.2 || ^2.0", |
There was a problem hiding this comment.
Allowed v2, v2 fixed some deprecation's on php 8.1, I couldn't find any breaking change that could affect this pkg.
We could remove support for v1 also
|
@nguyenk Fixed all the tests |
| $container->setParameter('graphqlite.security.enable_login', $enableLogin); | ||
| $container->setParameter('graphqlite.security.enable_me', $enableMe); | ||
| $container->setParameter('graphqlite.security.introspection', $config['security']['introspection'] ?? true); | ||
| $container->setParameter('graphqlite.security.disableIntrospection', !($config['security']['introspection'] ?? true)); |
There was a problem hiding this comment.
| $container->setParameter('graphqlite.security.disableIntrospection', !($config['security']['introspection'] ?? true)); | |
| $container->setParameter('graphqlite.security.disable_introspection', !($config['security']['introspection'] ?? true)); |
|
|
||
| <service id="GraphQL\Validator\Rules\DisableIntrospection" /> | ||
| <service id="GraphQL\Validator\Rules\DisableIntrospection"> | ||
| <argument key="$enabled">%graphqlite.security.disableIntrospection%</argument> |
There was a problem hiding this comment.
| <argument key="$enabled">%graphqlite.security.disableIntrospection%</argument> | |
| <argument key="$enabled">%graphqlite.security.disable_introspection%</argument> |
|
Awsome job @aszenz thank you |
Can be merged in #166