Skip to content

Commit

Permalink
Update all PHP deps #10257
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Jul 10, 2024
1 parent 993d185 commit 6e06fb4
Show file tree
Hide file tree
Showing 28 changed files with 1,309 additions and 606 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"php": "^8.2",
"doctrine/orm": "^3.2",
"psr/container": "^1.1 || ^2.0",
"webonyx/graphql-php": "^15.7"
"webonyx/graphql-php": "^15.12"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "@stable",
Expand Down
1,853 changes: 1,277 additions & 576 deletions composer.lock

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ parameters:
excludePaths:
- tests/Blog/Model/*
- tests/AttributeBlog/Model/*
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
- '~^Parameter #2 \$type of static method GraphQL\\Doctrine\\Utils::getOperatorTypeName~'
- '~^Parameter #1 \$method of method GraphQL\\Doctrine\\Factory\\AbstractFieldsConfigurationFactory\:\:getMethodFullName\(\) expects ReflectionMethod, ReflectionFunctionAbstract given\.$~'
Expand All @@ -17,6 +15,10 @@ parameters:
- '~^Parameter \#1 \$type of static method GraphQL\\Type\\Definition\\Type\:\:nonNull\(\) expects~'
- '~^Parameter \#1 \$config of class GraphQL\\Type\\Definition\\InputObjectType constructor expects~'
- '~^Parameter \#1 \$config of method GraphQL\\Type\\Definition\\InputObjectType\:\:__construct~'
-
identifier: missingType.iterableValue
-
identifier: missingType.generics

includes:
- phpstan-baseline.neon
2 changes: 1 addition & 1 deletion src/TypesInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function createFilteredQueryBuilder(string $className, array $filter, arr
* `loadType` with the `typeLoader`. Because dedicated `get*()` methods are easier to use, and provide
* stronger typing.
*
* @return null|(Type&NamedType)
* @return null|(NamedType&Type)
*/
public function loadType(string $typeName, string $namespace): ?Type;
}
3 changes: 2 additions & 1 deletion tests/Blog/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ public function isAdministrator(): bool
* @param null|string $status the status of posts as defined in \GraphQLTests\Doctrine\Blog\Model\Post
*/
public function getPosts(
#[API\Argument(type: '?GraphQLTests\Doctrine\Blog\Types\PostStatusType')] ?string $status = Post::STATUS_PUBLIC
#[API\Argument(type: '?GraphQLTests\Doctrine\Blog\Types\PostStatusType')]
?string $status = Post::STATUS_PUBLIC
): Collection {
// Return unfiltered collection
if ($status === null) {
Expand Down
5 changes: 2 additions & 3 deletions tests/TypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use GraphQLTests\Doctrine\Blog\Types\CustomType;
use GraphQLTests\Doctrine\Blog\Types\DateTimeType;
use GraphQLTests\Doctrine\Blog\Types\PostStatusType;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;

Expand Down Expand Up @@ -157,9 +158,7 @@ public function testHas(): void
self::assertTrue($this->types->has('customName'), 'should have custom registered type by its name, even if custom key was different, once type is created');
}

/**
* @dataProvider provideLoadType
*/
#[DataProvider('provideLoadType')]
public function testLoadType(string $typeName): void
{
$type = $this->types->loadType($typeName, 'GraphQLTests\Doctrine\Blog\Model');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// posts whose author contains John and Jane, OR posts whose author contains Jake and post title contains foo
return [
'SELECT post1, user1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 INNER JOIN post1.user user1 WHERE (user1.name LIKE :filter1 AND user1.name LIKE :filter2) OR (user1.name LIKE :filter3 AND post1.title LIKE :filter4)',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/custom-filter-empty.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/custom-filter-inherited.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 WHERE MOD(post1.id, :filter1) = 0',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/custom-filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 WHERE ((post1.title LIKE :filter1 OR post1.body LIKE :filter1 OR post1.status LIKE :filter1) AND (post1.title LIKE :filter2 OR post1.body LIKE :filter2 OR post1.status LIKE :filter2))',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/custom-sort-inherited.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// computed sorting inherited from parent class
return [
'SELECT post1, MOD(post1.id, 5) AS HIDDEN score FROM GraphQLTests\Doctrine\Blog\Model\Post post1 ORDER BY score ASC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/custom-sort-via-join.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// custom sorting that adds a JOIN
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 INNER JOIN post1.user sortingUser ORDER BY sortingUser.name DESC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/empty.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[],
];
2 changes: 1 addition & 1 deletion tests/data/query-builder/filter-with-null-value.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/join-deep-with-same-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// this is nonsensical, but shows that we can build a query with the same table appearing more than once
return [
'SELECT user1, posts1, user2 FROM GraphQLTests\Doctrine\Blog\Model\User user1 INNER JOIN user1.posts posts1 INNER JOIN posts1.user user2',
\GraphQLTests\Doctrine\Blog\Model\User::class,
GraphQLTests\Doctrine\Blog\Model\User::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/join-deep.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose author has written at least one post whose title contains "foo"
return [
'SELECT post1, user1, posts1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 INNER JOIN post1.user user1 INNER JOIN user1.posts posts1 WHERE posts1.title LIKE :filter1',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/join-to-fetch.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts, but also fetch their author, if any, in a single SQL query
return [
'SELECT post1, user1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 LEFT JOIN post1.user user1',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/join-to-filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose author is somebody called "john"
return [
'SELECT post1, user1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 INNER JOIN post1.user user1 WHERE user1.name LIKE :filter1',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo" or body contains "bar"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 WHERE post1.title LIKE :filter1 OR post1.body LIKE :filter2',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo" and "bar", or whose title contains "baz"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 WHERE (post1.title LIKE :filter1 AND post1.title LIKE :filter2) OR post1.title LIKE :filter3',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/multiple-filter-on-same-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo" or "bar"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 WHERE post1.title LIKE :filter1 OR post1.title LIKE :filter2',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/multiple-sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts sorted by title then by reverse body then by reverse id
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 ORDER BY post1.title ASC, post1.body DESC, post1.id DESC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/simple-filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts whose title contains "foo"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 WHERE post1.title LIKE :filter1',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/simple-sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts sorted by title
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 ORDER BY post1.title ASC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/sort-with-empty-string-first.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts sorted by reversed title but with null title first
return [
'SELECT post1, CASE WHEN post1.title = \'\' THEN 1 ELSE 0 END AS HIDDEN sorting1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 ORDER BY sorting1 DESC, post1.title DESC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/sort-with-empty-string-last.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts sorted by title but with null title last
return [
'SELECT post1, CASE WHEN post1.title = \'\' THEN 1 ELSE 0 END AS HIDDEN sorting1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 ORDER BY sorting1 ASC, post1.title ASC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/sort-with-null-first.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts sorted by reversed title but with null title first
return [
'SELECT post1, CASE WHEN post1.title IS NULL THEN 1 ELSE 0 END AS HIDDEN sorting1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 ORDER BY sorting1 DESC, post1.title DESC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/query-builder/sort-with-null-last.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// all posts sorted by title but with null title last
return [
'SELECT post1, CASE WHEN post1.title IS NULL THEN 1 ELSE 0 END AS HIDDEN sorting1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 ORDER BY sorting1 ASC, post1.title ASC',
\GraphQLTests\Doctrine\Blog\Model\Post::class,
GraphQLTests\Doctrine\Blog\Model\Post::class,
[],
[
[
Expand Down

0 comments on commit 6e06fb4

Please sign in to comment.