diff --git a/composer.json b/composer.json index 5bf2dbb..58d7b59 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ }, "require": { "php": "^8.2", - "doctrine/orm": "^2.15", + "doctrine/orm": "^3.2", "psr/container": "^1.1 || ^2.0", "webonyx/graphql-php": "^15.7" }, diff --git a/composer.lock b/composer.lock index 3d196e2..71b93dd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,101 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b7be194f951fde9bee7e9a5246c19694", + "content-hash": "054180c40f3834aea307aeb20768c4b8", "packages": [ - { - "name": "doctrine/cache", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "1ca8f21980e770095a31456042471a57bc4c68fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb", - "reference": "1ca8f21980e770095a31456042471a57bc4c68fb", - "shasum": "" - }, - "require": { - "php": "~7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "symfony/var-exporter": "^4.4 || ^5.4 || ^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "keywords": [ - "abstraction", - "apcu", - "cache", - "caching", - "couchdb", - "memcached", - "php", - "redis", - "xcache" - ], - "support": { - "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/2.2.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", - "type": "tidelift" - } - ], - "time": "2022-05-20T20:07:39+00:00" - }, { "name": "doctrine/collections", "version": "2.2.2", @@ -185,140 +92,44 @@ ], "time": "2024-04-18T06:56:21+00:00" }, - { - "name": "doctrine/common", - "version": "3.4.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a", - "reference": "0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a", - "shasum": "" - }, - "require": { - "doctrine/persistence": "^2.0 || ^3.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0 || ^10.0", - "doctrine/collections": "^1", - "phpstan/phpstan": "^1.4.1", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^6.1", - "vimeo/psalm": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", - "homepage": "https://www.doctrine-project.org/projects/common.html", - "keywords": [ - "common", - "doctrine", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/3.4.4" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", - "type": "tidelift" - } - ], - "time": "2024-04-16T13:35:33+00:00" - }, { "name": "doctrine/dbal", - "version": "3.8.6", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "b7411825cf7efb7e51f9791dea19d86e43b399a1" + "reference": "50fda19f80724b55ff770bb4ff352407008e63c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/b7411825cf7efb7e51f9791dea19d86e43b399a1", - "reference": "b7411825cf7efb7e51f9791dea19d86e43b399a1", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/50fda19f80724b55ff770bb4ff352407008e63c5", + "reference": "50fda19f80724b55ff770bb4ff352407008e63c5", "shasum": "" }, "require": { - "composer-runtime-api": "^2", - "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3|^1", - "doctrine/event-manager": "^1|^2", - "php": "^7.4 || ^8.0", + "php": "^8.1", "psr/cache": "^1|^2|^3", "psr/log": "^1|^2|^3" }, "require-dev": { "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2023.1", + "jetbrains/phpstorm-stubs": "2023.2", "phpstan/phpstan": "1.11.5", + "phpstan/phpstan-phpunit": "1.4.0", "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "9.6.19", - "psalm/plugin-phpunit": "0.18.4", + "phpunit/phpunit": "10.5.22", + "psalm/plugin-phpunit": "0.19.0", "slevomat/coding-standard": "8.13.1", "squizlabs/php_codesniffer": "3.10.1", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/console": "^4.4|^5.4|^6.0|^7.0", - "vimeo/psalm": "4.30.0" + "symfony/cache": "^6.3.8|^7.0", + "symfony/console": "^5.4|^6.3|^7.0", + "vimeo/psalm": "5.24.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." }, - "bin": [ - "bin/doctrine-dbal" - ], "type": "library", "autoload": { "psr-4": { @@ -371,7 +182,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.8.6" + "source": "https://github.com/doctrine/dbal/tree/4.0.4" }, "funding": [ { @@ -387,7 +198,7 @@ "type": "tidelift" } ], - "time": "2024-06-19T10:38:17+00:00" + "time": "2024-06-19T11:57:23+00:00" }, { "name": "doctrine/deprecations", @@ -767,61 +578,48 @@ }, { "name": "doctrine/orm", - "version": "2.19.6", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "c1bb2ccf4b19c845f91ff7c4c01dc7cbba7f4073" + "reference": "722cea6536775206e81744542b36fa7c9a4ea3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/c1bb2ccf4b19c845f91ff7c4c01dc7cbba7f4073", - "reference": "c1bb2ccf4b19c845f91ff7c4c01dc7cbba7f4073", + "url": "https://api.github.com/repos/doctrine/orm/zipball/722cea6536775206e81744542b36fa7c9a4ea3e5", + "reference": "722cea6536775206e81744542b36fa7c9a4ea3e5", "shasum": "" }, "require": { "composer-runtime-api": "^2", - "doctrine/cache": "^1.12.1 || ^2.1.1", - "doctrine/collections": "^1.5 || ^2.1", - "doctrine/common": "^3.0.3", - "doctrine/dbal": "^2.13.1 || ^3.2", + "doctrine/collections": "^2.2", + "doctrine/dbal": "^3.8.2 || ^4", "doctrine/deprecations": "^0.5.3 || ^1", "doctrine/event-manager": "^1.2 || ^2", "doctrine/inflector": "^1.4 || ^2.0", "doctrine/instantiator": "^1.3 || ^2", - "doctrine/lexer": "^2 || ^3", - "doctrine/persistence": "^2.4 || ^3", + "doctrine/lexer": "^3", + "doctrine/persistence": "^3.3.1", "ext-ctype": "*", - "php": "^7.1 || ^8.0", + "php": "^8.1", "psr/cache": "^1 || ^2 || ^3", - "symfony/console": "^4.2 || ^5.0 || ^6.0 || ^7.0", - "symfony/polyfill-php72": "^1.23", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "doctrine/annotations": "<1.13 || >= 3.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/var-exporter": "^6.3.9 || ^7.0" }, "require-dev": { - "doctrine/annotations": "^1.13 || ^2", - "doctrine/coding-standard": "^9.0.2 || ^12.0", - "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/phpstan": "~1.4.10 || 1.11.1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", + "doctrine/coding-standard": "^12.0", + "phpbench/phpbench": "^1.0", + "phpstan/phpstan": "1.11.1", + "phpunit/phpunit": "^10.4.0", "psr/log": "^1 || ^2 || ^3", "squizlabs/php_codesniffer": "3.7.2", - "symfony/cache": "^4.4 || ^5.4 || ^6.4 || ^7.0", - "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2 || ^7.0", - "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0", - "vimeo/psalm": "4.30.0 || 5.24.0" + "symfony/cache": "^5.4 || ^6.2 || ^7.0", + "vimeo/psalm": "5.24.0" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", - "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", - "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0" }, - "bin": [ - "bin/doctrine" - ], "type": "library", "autoload": { "psr-4": { @@ -862,9 +660,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.19.6" + "source": "https://github.com/doctrine/orm/tree/3.2.1" }, - "time": "2024-06-26T17:24:40+00:00" + "time": "2024-06-26T21:48:58+00:00" }, { "name": "doctrine/persistence", @@ -1593,159 +1391,6 @@ ], "time": "2024-06-19T12:30:46+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "10112722600777e02d2745716b70c5db4ca70442" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442", - "reference": "10112722600777e02d2745716b70c5db4ca70442", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-06-19T12:30:46+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, { "name": "symfony/service-contracts", "version": "v3.5.0", @@ -1916,6 +1561,82 @@ ], "time": "2024-06-28T09:27:18+00:00" }, + { + "name": "symfony/var-exporter", + "version": "v7.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "b80a669a2264609f07f1667f891dbfca25eba44c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b80a669a2264609f07f1667f891dbfca25eba44c", + "reference": "b80a669a2264609f07f1667f891dbfca25eba44c", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v7.1.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T08:00:31+00:00" + }, { "name": "webonyx/graphql-php", "version": "v15.12.5", @@ -5427,17 +5148,17 @@ "time": "2024-05-31T14:57:53+00:00" }, { - "name": "symfony/polyfill-php81", + "name": "symfony/polyfill-php80", "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -5455,7 +5176,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "classmap": [ "Resources/stubs" @@ -5466,6 +5187,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -5475,7 +5200,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -5484,7 +5209,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { @@ -5500,32 +5225,41 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { - "name": "symfony/process", - "version": "v7.1.1", + "name": "symfony/polyfill-php81", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=7.1" }, "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -5534,18 +5268,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Executes commands in sub-processes", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { - "source": "https://github.com/symfony/process/tree/v7.1.1" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" }, "funding": [ { @@ -5561,30 +5301,29 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { - "name": "symfony/stopwatch", + "name": "symfony/process", "version": "v7.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" + "url": "https://github.com/symfony/process.git", + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/service-contracts": "^2.5|^3" + "php": ">=8.2" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" + "Symfony\\Component\\Process\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -5604,10 +5343,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a way to profile code", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" + "source": "https://github.com/symfony/process/tree/v7.1.1" }, "funding": [ { @@ -5626,31 +5365,27 @@ "time": "2024-05-31T14:57:53+00:00" }, { - "name": "symfony/var-exporter", - "version": "v7.1.2", + "name": "symfony/stopwatch", + "version": "v7.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "b80a669a2264609f07f1667f891dbfca25eba44c" + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b80a669a2264609f07f1667f891dbfca25eba44c", - "reference": "b80a669a2264609f07f1667f891dbfca25eba44c", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", "shasum": "" }, "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/property-access": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\VarExporter\\": "" + "Symfony\\Component\\Stopwatch\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -5662,28 +5397,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "description": "Provides a way to profile code", "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "lazy-loading", - "proxy", - "serialize" - ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.1.2" + "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" }, "funding": [ { @@ -5699,7 +5424,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T08:00:31+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "theseer/tokenizer", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f4d41ae..51e2ace 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,25 @@ parameters: ignoreErrors: + - + message: "#^Cannot call method getMethods\\(\\) on ReflectionClass\\\\|null\\.$#" + count: 1 + path: src/Factory/AbstractFieldsConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$property of method GraphQL\\\\Doctrine\\\\Factory\\\\AbstractFactory\\:\\:isPropertyExcluded\\(\\) expects ReflectionProperty, ReflectionProperty\\|null given\\.$#" + count: 1 + path: src/Factory/Type/FilterGroupConditionTypeFactory.php + + - + message: "#^Parameter \\#1 \\$property of method GraphQL\\\\Doctrine\\\\Factory\\\\Type\\\\FilterGroupConditionTypeFactory\\:\\:getLeafType\\(\\) expects ReflectionProperty, ReflectionProperty\\|null given\\.$#" + count: 1 + path: src/Factory/Type/FilterGroupConditionTypeFactory.php + + - + message: "#^Parameter \\#1 \\$property of method GraphQL\\\\Doctrine\\\\Factory\\\\AbstractFactory\\:\\:isPropertyExcluded\\(\\) expects ReflectionProperty, ReflectionProperty\\|null given\\.$#" + count: 1 + path: src/Factory/Type/SortingTypeFactory.php + - message: "#^Method GraphQL\\\\Doctrine\\\\Types\\:\\:getOperator\\(\\) should return GraphQL\\\\Doctrine\\\\Definition\\\\Operator\\\\AbstractOperator but returns GraphQL\\\\Type\\\\Definition\\\\NamedType&GraphQL\\\\Type\\\\Definition\\\\Type\\.$#" count: 1 diff --git a/src/Definition/Operator/HaveOperatorType.php b/src/Definition/Operator/HaveOperatorType.php index bda4c9f..67d7927 100644 --- a/src/Definition/Operator/HaveOperatorType.php +++ b/src/Definition/Operator/HaveOperatorType.php @@ -5,7 +5,7 @@ namespace GraphQL\Doctrine\Definition\Operator; use Doctrine\ORM\Mapping\ClassMetadata; -use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Mapping\OneToManyAssociationMapping; use Doctrine\ORM\QueryBuilder; use GraphQL\Doctrine\Factory\UniqueNameFactory; use GraphQL\Type\Definition\LeafType; @@ -48,12 +48,12 @@ protected function getCollectionValuedDqlCondition(UniqueNameFactory $uniqueName // use `=`, and not `IN()`). So we simulate an approximation of MEMBER OF that support multiple values. But it // does **not** support composite identifiers. And that is fine because it is an official limitation of this // library anyway. - if ($association['type'] === ClassMetadataInfo::ONE_TO_MANY) { + if ($association instanceof OneToManyAssociationMapping) { $id = $metadata->identifier[0]; - $otherClassName = $association['targetEntity']; + $otherClassName = $association->targetEntity; $otherAlias = $uniqueNameFactory->createAliasName($otherClassName); - $otherField = $association['mappedBy']; + $otherField = $association->mappedBy; $otherMetadata = $queryBuilder->getEntityManager()->getClassMetadata($otherClassName); $otherId = $otherMetadata->identifier[0]; diff --git a/src/Factory/AbstractFieldsConfigurationFactory.php b/src/Factory/AbstractFieldsConfigurationFactory.php index 7b914bb..92c7ab3 100644 --- a/src/Factory/AbstractFieldsConfigurationFactory.php +++ b/src/Factory/AbstractFieldsConfigurationFactory.php @@ -147,8 +147,8 @@ private function findIdentityField(string $className): void { $this->metadata = $this->entityManager->getClassMetadata($className); foreach ($this->metadata->fieldMappings as $meta) { - if ($meta['id'] ?? false) { - $this->identityField = $meta['fieldName']; + if ($meta->id ?? false) { + $this->identityField = $meta->fieldName; } } } @@ -184,7 +184,7 @@ final protected function isIdentityField(string $fieldName): bool */ private function getTargetEntity(string $fieldName): ?string { - return $this->metadata->associationMappings[$fieldName]['targetEntity'] ?? null; + return $this->metadata->associationMappings[$fieldName]->targetEntity ?? null; } /** diff --git a/src/Factory/FilteredQueryBuilderFactory.php b/src/Factory/FilteredQueryBuilderFactory.php index a673642..39d44a4 100644 --- a/src/Factory/FilteredQueryBuilderFactory.php +++ b/src/Factory/FilteredQueryBuilderFactory.php @@ -127,7 +127,7 @@ private function applyJoins(ClassMetadata $metadata, array $joins, string $alias $joinedAlias = $this->createJoin($alias, $field, $join['type']); if (isset($join['joins']) || isset($join['conditions'])) { - $targetClassName = $metadata->getAssociationMapping($field)['targetEntity']; + $targetClassName = $metadata->getAssociationMapping($field)->targetEntity; $targetMetadata = $this->entityManager->getClassMetadata($targetClassName); $type = $this->types->getFilterGroupCondition($targetClassName); $this->applyJoinsAndFilters($targetMetadata, $joinedAlias, $type, $join['joins'] ?? [], $join['conditions'] ?? []); diff --git a/src/Factory/Type/FilterGroupConditionTypeFactory.php b/src/Factory/Type/FilterGroupConditionTypeFactory.php index 2bf7461..3fde991 100644 --- a/src/Factory/Type/FilterGroupConditionTypeFactory.php +++ b/src/Factory/Type/FilterGroupConditionTypeFactory.php @@ -4,6 +4,7 @@ namespace GraphQL\Doctrine\Factory\Type; +use Doctrine\ORM\Mapping\FieldMapping; use GraphQL\Doctrine\Attribute\Filter; use GraphQL\Doctrine\Attribute\FilterGroupCondition; use GraphQL\Doctrine\Definition\Operator\AbstractOperator; @@ -60,7 +61,7 @@ public function create(string $className, string $typeName): InputObjectType // Get all scalar fields foreach ($metadata->fieldMappings as $mapping) { - $fieldName = $mapping['fieldName']; + $fieldName = $mapping->fieldName; $property = $metadata->getReflectionProperty($fieldName); // Skip exclusion specified by user @@ -76,7 +77,7 @@ public function create(string $className, string $typeName): InputObjectType // Get all collection fields foreach ($metadata->associationMappings as $mapping) { - $fieldName = $mapping['fieldName']; + $fieldName = $mapping->fieldName; $operators = $this->getOperators($fieldName, Type::id(), true, $metadata->isCollectionValuedAssociation($fieldName)); $filters[] = $this->getFieldConfiguration($typeName, $fieldName, $operators); @@ -105,9 +106,9 @@ public function create(string $className, string $typeName): InputObjectType /** * Read the type of the filterGroupCondition, either from Doctrine mapping type, or the override via attribute. */ - private function getLeafType(ReflectionProperty $property, array $mapping): LeafType + private function getLeafType(ReflectionProperty $property, FieldMapping $mapping): LeafType { - if ($mapping['id'] ?? false) { + if ($mapping->id ?? false) { return Type::id(); } @@ -127,7 +128,7 @@ private function getLeafType(ReflectionProperty $property, array $mapping): Leaf } /** @var LeafType $leafType */ - $leafType = $this->types->get($mapping['type']); + $leafType = $this->types->get($mapping->type); return $leafType; } diff --git a/src/Factory/Type/FilterGroupJoinTypeFactory.php b/src/Factory/Type/FilterGroupJoinTypeFactory.php index ddb0a2e..b743a60 100644 --- a/src/Factory/Type/FilterGroupJoinTypeFactory.php +++ b/src/Factory/Type/FilterGroupJoinTypeFactory.php @@ -60,8 +60,8 @@ private function getJoinsFields(string $className): array $associations = $this->entityManager->getClassMetadata($className)->associationMappings; foreach ($associations as $association) { $field = [ - 'name' => $association['fieldName'], - 'type' => $this->types->getJoinOn($association['targetEntity']), + 'name' => $association->fieldName, + 'type' => $this->types->getJoinOn($association->targetEntity), ]; $fields[] = $field; diff --git a/tests/Blog/Filtering/SearchOperatorType.php b/tests/Blog/Filtering/SearchOperatorType.php index f4488a9..8e4ca86 100644 --- a/tests/Blog/Filtering/SearchOperatorType.php +++ b/tests/Blog/Filtering/SearchOperatorType.php @@ -65,8 +65,8 @@ private function getSearchableFields(ClassMetadata $metadata, string $alias): ar $fields = []; $textType = ['string', 'text']; foreach ($metadata->fieldMappings as $g) { - if (in_array($g['type'], $textType, true)) { - $fields[] = $alias . '.' . $g['fieldName']; + if (in_array($g->type, $textType, true)) { + $fields[] = $alias . '.' . $g->fieldName; } } diff --git a/tests/EntityManagerTrait.php b/tests/EntityManagerTrait.php index 6634904..f1d18c7 100644 --- a/tests/EntityManagerTrait.php +++ b/tests/EntityManagerTrait.php @@ -18,7 +18,10 @@ trait EntityManagerTrait private function setUpEntityManager(): void { $config = ORMSetup::createAttributeMetadataConfiguration([__DIR__ . '/Blog/Model'], true); - $connection = DriverManager::getConnection(['url' => 'sqlite:///:memory:']); + $connection = DriverManager::getConnection([ + 'driver' => 'sqlite3', + 'memory' => true, + ]); $this->entityManager = new EntityManager($connection, $config); } diff --git a/tests/data/PostFilter.graphqls b/tests/data/PostFilter.graphqls index a87b322..23ca54c 100644 --- a/tests/data/PostFilter.graphqls +++ b/tests/data/PostFilter.graphqls @@ -34,17 +34,91 @@ enum LogicalOperator { "Type to specify conditions on fields" input PostFilterGroupCondition { + id: PostFilterGroupConditionId creationDate: PostFilterGroupConditionCreationDate title: PostFilterGroupConditionTitle body: PostFilterGroupConditionBody publicationDate: PostFilterGroupConditionPublicationDate status: PostFilterGroupConditionStatus - id: PostFilterGroupConditionId user: PostFilterGroupConditionUser noInversedBy: PostFilterGroupConditionNoInversedBy custom: PostFilterGroupConditionCustom } +"Type to specify a condition on a specific field" +input PostFilterGroupConditionId { + like: LikeOperatorID + between: BetweenOperatorID + equal: EqualOperatorID + greater: GreaterOperatorID + greaterOrEqual: GreaterOrEqualOperatorID + in: InOperatorID + less: LessOperatorID + lessOrEqual: LessOrEqualOperatorID + null: NullOperatorID + group: GroupOperatorID + modulo: ModuloOperatorInt +} + +input LikeOperatorID { + value: ID! + not: Boolean = false +} + +input BetweenOperatorID { + from: ID! + to: ID! + not: Boolean = false +} + +input EqualOperatorID { + value: ID! + not: Boolean = false +} + +input GreaterOperatorID { + value: ID! + not: Boolean = false +} + +input GreaterOrEqualOperatorID { + value: ID! + not: Boolean = false +} + +input InOperatorID { + values: [ID!]! + not: Boolean = false +} + +input LessOperatorID { + value: ID! + not: Boolean = false +} + +input LessOrEqualOperatorID { + value: ID! + not: Boolean = false +} + +input NullOperatorID { + not: Boolean = false +} + +""" +Will apply a `GROUP BY` on the field to select unique values existing in database. + +This is typically useful to present a list of suggestions to the end-user, while still allowing him to enter arbitrary values. +""" +input GroupOperatorID { + "This field is never used and can be ignored" + value: Boolean = null +} + +input ModuloOperatorInt { + value: Int! +} + "Type to specify a condition on a specific field" input PostFilterGroupConditionCreationDate { like: LikeOperatorDateTime @@ -287,80 +361,6 @@ input GroupOperatorPostStatus { value: Boolean = null } -"Type to specify a condition on a specific field" -input PostFilterGroupConditionId { - like: LikeOperatorID - between: BetweenOperatorID - equal: EqualOperatorID - greater: GreaterOperatorID - greaterOrEqual: GreaterOrEqualOperatorID - in: InOperatorID - less: LessOperatorID - lessOrEqual: LessOrEqualOperatorID - null: NullOperatorID - group: GroupOperatorID - modulo: ModuloOperatorInt -} - -input LikeOperatorID { - value: ID! - not: Boolean = false -} - -input BetweenOperatorID { - from: ID! - to: ID! - not: Boolean = false -} - -input EqualOperatorID { - value: ID! - not: Boolean = false -} - -input GreaterOperatorID { - value: ID! - not: Boolean = false -} - -input GreaterOrEqualOperatorID { - value: ID! - not: Boolean = false -} - -input InOperatorID { - values: [ID!]! - not: Boolean = false -} - -input LessOperatorID { - value: ID! - not: Boolean = false -} - -input LessOrEqualOperatorID { - value: ID! - not: Boolean = false -} - -input NullOperatorID { - not: Boolean = false -} - -""" -Will apply a `GROUP BY` on the field to select unique values existing in database. - -This is typically useful to present a list of suggestions to the end-user, while still allowing him to enter arbitrary values. -""" -input GroupOperatorID { - "This field is never used and can be ignored" - value: Boolean = null -} - -input ModuloOperatorInt { - value: Int! -} - "Type to specify a condition on a specific field" input PostFilterGroupConditionUser { have: HaveOperatorID @@ -435,16 +435,31 @@ enum JoinType { "Type to specify conditions on fields" input UserFilterGroupCondition { + id: UserFilterGroupConditionId creationDate: UserFilterGroupConditionCreationDate name: UserFilterGroupConditionName email: UserFilterGroupConditionEmail isAdministrator: UserFilterGroupConditionIsAdministrator - id: UserFilterGroupConditionId posts: UserFilterGroupConditionPosts favoritePosts: UserFilterGroupConditionFavoritePosts manager: UserFilterGroupConditionManager } +"Type to specify a condition on a specific field" +input UserFilterGroupConditionId { + like: LikeOperatorID + between: BetweenOperatorID + equal: EqualOperatorID + greater: GreaterOperatorID + greaterOrEqual: GreaterOrEqualOperatorID + in: InOperatorID + less: LessOperatorID + lessOrEqual: LessOrEqualOperatorID + null: NullOperatorID + group: GroupOperatorID + modulo: ModuloOperatorInt +} + "Type to specify a condition on a specific field" input UserFilterGroupConditionCreationDate { like: LikeOperatorDateTime @@ -556,21 +571,6 @@ input GroupOperatorBoolean { value: Boolean = null } -"Type to specify a condition on a specific field" -input UserFilterGroupConditionId { - like: LikeOperatorID - between: BetweenOperatorID - equal: EqualOperatorID - greater: GreaterOperatorID - greaterOrEqual: GreaterOrEqualOperatorID - in: InOperatorID - less: LessOperatorID - lessOrEqual: LessOrEqualOperatorID - null: NullOperatorID - group: GroupOperatorID - modulo: ModuloOperatorInt -} - "Type to specify a condition on a specific field" input UserFilterGroupConditionPosts { have: HaveOperatorID @@ -624,22 +624,8 @@ input JoinOnNoInversedBy { "Type to specify conditions on fields" input NoInversedByFilterGroupCondition { - creationDate: NoInversedByFilterGroupConditionCreationDate id: NoInversedByFilterGroupConditionId -} - -"Type to specify a condition on a specific field" -input NoInversedByFilterGroupConditionCreationDate { - like: LikeOperatorDateTime - between: BetweenOperatorDateTime - equal: EqualOperatorDateTime - greater: GreaterOperatorDateTime - greaterOrEqual: GreaterOrEqualOperatorDateTime - in: InOperatorDateTime - less: LessOperatorDateTime - lessOrEqual: LessOrEqualOperatorDateTime - null: NullOperatorDateTime - group: GroupOperatorDateTime + creationDate: NoInversedByFilterGroupConditionCreationDate } "Type to specify a condition on a specific field" @@ -656,3 +642,17 @@ input NoInversedByFilterGroupConditionId { group: GroupOperatorID modulo: ModuloOperatorInt } + +"Type to specify a condition on a specific field" +input NoInversedByFilterGroupConditionCreationDate { + like: LikeOperatorDateTime + between: BetweenOperatorDateTime + equal: EqualOperatorDateTime + greater: GreaterOperatorDateTime + greaterOrEqual: GreaterOrEqualOperatorDateTime + in: InOperatorDateTime + less: LessOperatorDateTime + lessOrEqual: LessOrEqualOperatorDateTime + null: NullOperatorDateTime + group: GroupOperatorDateTime +} diff --git a/tests/data/PostSorting.graphqls b/tests/data/PostSorting.graphqls index dda957b..4a5615f 100644 --- a/tests/data/PostSorting.graphqls +++ b/tests/data/PostSorting.graphqls @@ -19,12 +19,12 @@ input PostSorting { "Fields available for `PostSorting`" enum PostSortingField { + id creationDate title body publicationDate status - id userName postType pseudoRandom diff --git a/tests/data/UserSorting.graphqls b/tests/data/UserSorting.graphqls index 969a29f..962ea07 100644 --- a/tests/data/UserSorting.graphqls +++ b/tests/data/UserSorting.graphqls @@ -19,11 +19,11 @@ input UserSorting { "Fields available for `UserSorting`" enum UserSortingField { + id creationDate name email isAdministrator - id pseudoRandom }