-
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
Changes from all commits
1d1436c
ff54b69
1fd09e4
c1bff25
5ffa1d7
c46cf40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
$container->setParameter('graphqlite.security.maximum_query_complexity', $config['security']['maximum_query_complexity'] ?? null); | ||||||
$container->setParameter('graphqlite.security.maximum_query_depth', $config['security']['maximum_query_depth'] ?? null); | ||||||
$container->setParameter('graphqlite.security.firewall_name', $config['security']['firewall_name'] ?? 'main'); | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</service> | ||||||
|
||||||
<service id="GraphQL\Validator\Rules\QueryComplexity" /> | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 |
||
$kernel->boot(); | ||
|
||
$parameters = ['query' => ' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 |
||
"php-coveralls/php-coveralls": "^2.1.0", | ||
"symfony/phpunit-bridge": "^6", | ||
"phpstan/phpstan": "^1.8", | ||
|
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 betrue
for disabling introspection