-
Notifications
You must be signed in to change notification settings - Fork 42
chore: Fix deprecations and tests for symfony 6, graphqlite 6 and php8.1 #174
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
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
@@ -72,7 +72,7 @@ function($namespace): string { | |||
$container->setParameter('graphqlite.namespace.types', $namespaceType); | |||
$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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -457,7 +457,7 @@ public function testWithIntrospection(): void | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the webonyx pkg changed how they calculate complexity, it was now failing on 2 raised it to 3
@@ -34,7 +34,7 @@ | |||
"require-dev": { | |||
"symfony/security-bundle": "^6", | |||
"symfony/yaml": "^6", | |||
"beberlei/porpaginas": "^1.2", | |||
"beberlei/porpaginas": "^1.2 || ^2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
@@ -72,7 +72,7 @@ function($namespace): string { | |||
$container->setParameter('graphqlite.namespace.types', $namespaceType); | |||
$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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$container->setParameter('graphqlite.security.disableIntrospection', !($config['security']['introspection'] ?? true)); | |
$container->setParameter('graphqlite.security.disable_introspection', !($config['security']['introspection'] ?? true)); |
@@ -74,7 +74,9 @@ | |||
</call> | |||
</service> | |||
|
|||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<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