From 1c187e61faf2f73ca727f2f92d1f26ca6066e122 Mon Sep 17 00:00:00 2001 From: "d3fk::Angatar" Date: Mon, 4 Dec 2023 15:37:15 +0000 Subject: [PATCH] Allow schema generator to use labels for naming API resources and PHP classes --- CHANGELOG.md | 4 + composer.json | 20 +- composer.lock | 1704 ++++++++--------- src/CardinalitiesExtractor.php | 6 +- src/ClassMutator/AnnotationsAppender.php | 2 +- src/ClassMutator/ClassPropertiesAppender.php | 4 +- src/Command/ExtractCardinalitiesCommand.php | 2 +- src/Schema/ClassMutator/EnumClassMutator.php | 2 +- src/Schema/Generator.php | 2 +- src/Schema/Model/Class_.php | 2 +- src/Schema/Model/Constant.php | 2 +- src/Schema/Model/Property.php | 2 +- .../PropertyGenerator/IdPropertyGenerator.php | 2 +- .../PropertyGenerator/PropertyGenerator.php | 2 +- src/Schema/Rdf/RdfGraph.php | 190 ++ src/Schema/Rdf/RdfResource.php | 432 +++++ src/Schema/TypeConverter.php | 2 +- src/SchemaGeneratorConfiguration.php | 9 + src/SchemaGeneratorConfigurationHolder.php | 60 + src/TypesGenerator.php | 19 +- .../PhpDocAnnotationGeneratorTest.php | 4 +- .../ApiPlatformCoreAttributeGeneratorTest.php | 4 +- .../ConfigurationAttributeGeneratorTest.php | 4 +- .../ConstraintAttributeGeneratorTest.php | 4 +- .../DoctrineMongoDBAttributeGeneratorTest.php | 4 +- ...ociationOverrideAttributeGeneratorTest.php | 4 +- .../DoctrineOrmAttributeGeneratorTest.php | 4 +- tests/ClassMutator/ClassParentMutatorTest.php | 4 +- .../ClassPropertiesAppenderTest.php | 4 +- tests/Command/DumpConfigurationTest.php | 27 + tests/Schema/Model/ClassTest.php | 4 +- tests/Schema/Rdf/RdfGraphTest.php | 197 ++ tests/Schema/Rdf/RdfResourceTest.php | 466 +++++ tests/TypesGeneratorTest.php | 2 +- 34 files changed, 2255 insertions(+), 945 deletions(-) create mode 100644 src/Schema/Rdf/RdfGraph.php create mode 100644 src/Schema/Rdf/RdfResource.php create mode 100644 src/SchemaGeneratorConfigurationHolder.php create mode 100644 tests/Schema/Rdf/RdfGraphTest.php create mode 100644 tests/Schema/Rdf/RdfResourceTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 78e73396..37d66951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 5.2.3 + +* feat: Allow schema generator to use labels for naming API resources and PHP classes + ## 5.2.2 * fix: detect enum detection when an ancestor is an enum diff --git a/composer.json b/composer.json index 390e8357..51f3a002 100644 --- a/composer.json +++ b/composer.json @@ -39,27 +39,27 @@ "friendsofphp/php-cs-fixer": "^2.15 || ^3.0", "league/html-to-markdown": "^5.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "symfony/config": "^5.2 || ^6.0" , - "symfony/console": "^5.2 || ^6.0", - "symfony/yaml": "^5.2 || ^6.0", - "symfony/filesystem": "^5.2 || ^6.0", + "symfony/config": "^5.2 || ^6.0 || ^7.0" , + "symfony/console": "^5.2 || ^6.0 || ^7.0", + "symfony/yaml": "^5.2 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.2 || ^6.0 || ^7.0", "twig/twig": "^3.0", "nette/php-generator": "^3.6 || ^4.0", "nikic/php-parser": "^4.13", "cebe/php-openapi": "^1.6", - "symfony/string": "^5.2 || ^6.0" + "symfony/string": "^5.2 || ^6.0 || ^7.0" }, "require-dev": { "api-platform/core": "^2.7 || ^3.0", "doctrine/orm": "^2.7", "myclabs/php-enum": "^1.7", - "symfony/doctrine-bridge": "^5.2 || ^6.0", - "symfony/phpunit-bridge": "^5.2 || ^6.0", - "symfony/serializer": "^5.2 || ^6.0", - "symfony/validator": "^5.2 || ^6.0", + "symfony/doctrine-bridge": "^5.2 || ^6.0 || ^7.0", + "symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0", + "symfony/serializer": "^5.2 || ^6.0 || ^7.0", + "symfony/validator": "^5.2 || ^6.0 || ^7.0", "phpspec/prophecy-phpunit": "^2.0", "phpstan/phpstan": "^1.2.0", - "symfony/finder": "^5.2 || ^6.0" + "symfony/finder": "^5.2 || ^6.0 || ^7.0" }, "bin": [ "bin/schema" diff --git a/composer.lock b/composer.lock index f2be83b3..28aec93e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8d7ec2ad8dc62f26690b53d1dbf22ae8", + "content-hash": "1d40f845abecee348779195d39a04ea8", "packages": [ { "name": "cebe/php-openapi", @@ -77,16 +77,16 @@ }, { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { @@ -128,7 +128,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/3.1.1" }, "funding": [ { @@ -144,20 +144,20 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -207,9 +207,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -225,7 +225,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -293,129 +293,6 @@ ], "time": "2022-02-25T21:32:43+00:00" }, - { - "name": "doctrine/annotations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "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": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "time": "2023-02-02T22:02:53+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" - }, - "time": "2023-06-03T09:27:29+00:00" - }, { "name": "doctrine/inflector", "version": "2.0.8", @@ -507,134 +384,52 @@ ], "time": "2023-06-16T13:40:37+00:00" }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "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": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.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%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-14T08:49:07+00:00" - }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.22.0", + "version": "v3.40.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3" + "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4344562a516b76afe8f2d64b2e52214c30d64ed8", + "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8", "shasum": "" }, "require": { - "composer/semver": "^3.3", + "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^2", - "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", "sebastian/diff": "^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.27", - "symfony/polyfill-php80": "^1.27", - "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", + "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.11", - "php-coveralls/php-coveralls": "^2.5.3", + "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.16", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpspec/prophecy": "^1.17", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.6", - "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" + "phpunit/phpunit": "^9.6", + "symfony/phpunit-bridge": "^6.3.8 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -672,7 +467,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.40.2" }, "funding": [ { @@ -680,20 +475,20 @@ "type": "github" } ], - "time": "2023-07-16T23:08:06+00:00" + "time": "2023-12-03T09:21:33+00:00" }, { "name": "justinrainbow/json-schema", - "version": "5.2.12", + "version": "v5.2.13", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", - "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", "shasum": "" }, "require": { @@ -748,9 +543,9 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" }, - "time": "2022-04-13T08:02:27+00:00" + "time": "2023-09-26T02:20:38+00:00" }, { "name": "league/html-to-markdown", @@ -843,21 +638,21 @@ }, { "name": "nette/php-generator", - "version": "v4.0.7", + "version": "v4.1.2", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "de1843fbb692125e307937c85d43937d0dc0c1d4" + "reference": "abc0e79b2d02d4b8aba5933765b90df3f610c143" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/de1843fbb692125e307937c85d43937d0dc0c1d4", - "reference": "de1843fbb692125e307937c85d43937d0dc0c1d4", + "url": "https://api.github.com/repos/nette/php-generator/zipball/abc0e79b2d02d4b8aba5933765b90df3f610c143", + "reference": "abc0e79b2d02d4b8aba5933765b90df3f610c143", "shasum": "" }, "require": { "nette/utils": "^3.2.9 || ^4.0", - "php": ">=8.0 <8.3" + "php": "8.0 - 8.3" }, "require-dev": { "jetbrains/phpstorm-attributes": "dev-master", @@ -872,7 +667,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -896,7 +691,7 @@ "homepage": "https://nette.org/contributors" } ], - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.2 features.", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.3 features.", "homepage": "https://nette.org", "keywords": [ "code", @@ -906,26 +701,26 @@ ], "support": { "issues": "https://github.com/nette/php-generator/issues", - "source": "https://github.com/nette/php-generator/tree/v4.0.7" + "source": "https://github.com/nette/php-generator/tree/v4.1.2" }, - "time": "2023-04-26T15:09:53+00:00" + "time": "2023-10-29T22:57:32+00:00" }, { "name": "nette/utils", - "version": "v4.0.0", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e" + "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e", + "url": "https://api.github.com/repos/nette/utils/zipball/a9d127dd6a203ce6d255b2e2db49759f7506e015", + "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015", "shasum": "" }, "require": { - "php": ">=8.0 <8.3" + "php": ">=8.0 <8.4" }, "conflict": { "nette/finder": "<3", @@ -933,7 +728,7 @@ }, "require-dev": { "jetbrains/phpstorm-attributes": "dev-master", - "nette/tester": "^2.4", + "nette/tester": "^2.5", "phpstan/phpstan": "^1.0", "tracy/tracy": "^2.9" }, @@ -943,8 +738,7 @@ "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", "ext-json": "to use Nette\\Utils\\Json", "ext-mbstring": "to use Strings::lower() etc...", - "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", - "ext-xml": "to use Strings::length() etc. when mbstring is not available" + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" }, "type": "library", "extra": { @@ -993,22 +787,22 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.0" + "source": "https://github.com/nette/utils/tree/v4.0.3" }, - "time": "2023-02-02T10:41:53+00:00" + "time": "2023-10-29T21:02:13+00:00" }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1049,58 +843,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "psr/container", @@ -1207,16 +952,16 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -1225,7 +970,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1240,7 +985,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -1254,9 +999,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", @@ -1376,16 +1121,16 @@ }, { "name": "sweetrdf/easyrdf", - "version": "1.9.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/sweetrdf/easyrdf.git", - "reference": "feaeb6f602d989c6bc6e482d27426a212e76289a" + "reference": "92554d04aaec5635cbd82caf428434f824298a1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sweetrdf/easyrdf/zipball/feaeb6f602d989c6bc6e482d27426a212e76289a", - "reference": "feaeb6f602d989c6bc6e482d27426a212e76289a", + "url": "https://api.github.com/repos/sweetrdf/easyrdf/zipball/92554d04aaec5635cbd82caf428434f824298a1b", + "reference": "92554d04aaec5635cbd82caf428434f824298a1b", "shasum": "" }, "require": { @@ -1407,7 +1152,7 @@ "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5.0|^10.0.0", - "semsol/arc2": "^2.4", + "semsol/arc2": "^3", "zendframework/zend-http": "^2" }, "type": "library", @@ -1451,27 +1196,27 @@ ], "support": { "issues": "https://github.com/sweetrdf/easyrdf/issues", - "source": "https://github.com/sweetrdf/easyrdf/tree/1.9.0" + "source": "https://github.com/sweetrdf/easyrdf/tree/1.11.0" }, - "time": "2023-06-20T15:05:17+00:00" + "time": "2023-09-14T07:31:36+00:00" }, { "name": "sweetrdf/rdf-helpers", - "version": "1.0.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/sweetrdf/rdfHelpers.git", - "reference": "e0ae1d528766aae4c3bfa9e4312f02efbb6830b5" + "reference": "29db501d91ffe0056b8c3db1fe42d7cd13f9193f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sweetrdf/rdfHelpers/zipball/e0ae1d528766aae4c3bfa9e4312f02efbb6830b5", - "reference": "e0ae1d528766aae4c3bfa9e4312f02efbb6830b5", + "url": "https://api.github.com/repos/sweetrdf/rdfHelpers/zipball/29db501d91ffe0056b8c3db1fe42d7cd13f9193f", + "reference": "29db501d91ffe0056b8c3db1fe42d7cd13f9193f", "shasum": "" }, "require": { "php": ">=8.0", - "sweetrdf/rdf-interface": "^1.0.0", + "sweetrdf/rdf-interface": "^1 | ^2.0.0-RC3", "zozlak/rdf-constants": "^1.1" }, "require-dev": { @@ -1501,27 +1246,27 @@ "homepage": "https://github.com/sweetrdf/rdfHelpers", "support": { "issues": "https://github.com/sweetrdf/rdfHelpers/issues", - "source": "https://github.com/sweetrdf/rdfHelpers/tree/1.0.1" + "source": "https://github.com/sweetrdf/rdfHelpers/tree/1.2.0" }, - "time": "2023-04-02T08:59:30+00:00" + "time": "2023-08-31T12:13:56+00:00" }, { "name": "sweetrdf/rdf-interface", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sweetrdf/rdfInterface.git", - "reference": "1d7645cc2f138017fe7d1421e3b0b479d6bee4a5" + "reference": "b0c930b7bd7a80e63f77510d0dcb261aead4f0a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sweetrdf/rdfInterface/zipball/1d7645cc2f138017fe7d1421e3b0b479d6bee4a5", - "reference": "1d7645cc2f138017fe7d1421e3b0b479d6bee4a5", + "url": "https://api.github.com/repos/sweetrdf/rdfInterface/zipball/b0c930b7bd7a80e63f77510d0dcb261aead4f0a3", + "reference": "b0c930b7bd7a80e63f77510d0dcb261aead4f0a3", "shasum": "" }, "require": { "php": ">=8.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "zozlak/rdf-constants": "*" }, "require-dev": { @@ -1549,40 +1294,40 @@ "homepage": "https://github.com/sweetrdf/rdfInterface", "support": { "issues": "https://github.com/sweetrdf/rdfInterface/issues", - "source": "https://github.com/sweetrdf/rdfInterface/tree/1.0.0" + "source": "https://github.com/sweetrdf/rdfInterface/tree/1.0.1" }, - "time": "2022-11-01T09:27:45+00:00" + "time": "2023-07-21T08:26:06+00:00" }, { "name": "symfony/config", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "a5e00dec161b08c946a2c16eed02adbeedf827ae" + "reference": "8789646600f4e7e451dde9e1dc81cfa429f3857a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/a5e00dec161b08c946a2c16eed02adbeedf827ae", - "reference": "a5e00dec161b08c946a2c16eed02adbeedf827ae", + "url": "https://api.github.com/repos/symfony/config/zipball/8789646600f4e7e451dde9e1dc81cfa429f3857a", + "reference": "8789646600f4e7e451dde9e1dc81cfa429f3857a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^5.4|^6.0", + "symfony/filesystem": "^6.4|^7.0", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<5.4", + "symfony/finder": "<6.4", "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/messenger": "^5.4|^6.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0" + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1610,7 +1355,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.3.0" + "source": "https://github.com/symfony/config/tree/v7.0.0" }, "funding": [ { @@ -1626,47 +1371,50 @@ "type": "tidelift" } ], - "time": "2023-04-25T10:46:17+00:00" + "time": "2023-11-09T08:30:23+00:00" }, { "name": "symfony/console", - "version": "v6.3.0", + "version": "v7.0.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" + "reference": "cdce5c684b2f920bb1343deecdfba356ffad83d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "url": "https://api.github.com/repos/symfony/console/zipball/cdce5c684b2f920bb1343deecdfba356ffad83d5", + "reference": "cdce5c684b2f920bb1343deecdfba356ffad83d5", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1700,7 +1448,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.0" + "source": "https://github.com/symfony/console/tree/v7.0.1" }, "funding": [ { @@ -1716,11 +1464,11 @@ "type": "tidelift" } ], - "time": "2023-05-29T12:49:39+00:00" + "time": "2023-12-01T15:10:06+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -1767,7 +1515,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -1787,24 +1535,24 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c459b40ffe67c49af6fd392aac374c9edf8a027e", + "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", + "symfony/dependency-injection": "<6.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -1813,13 +1561,13 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0" + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1847,7 +1595,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.0" }, "funding": [ { @@ -1863,11 +1611,11 @@ "type": "tidelift" } ], - "time": "2023-04-21T14:41:17+00:00" + "time": "2023-07-27T16:29:09+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -1923,7 +1671,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" }, "funding": [ { @@ -1943,20 +1691,20 @@ }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "7da8ea2362a283771478c5f7729cfcb43a76b8b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7da8ea2362a283771478c5f7729cfcb43a76b8b7", + "reference": "7da8ea2362a283771478c5f7729cfcb43a76b8b7", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -1986,7 +1734,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "source": "https://github.com/symfony/filesystem/tree/v7.0.0" }, "funding": [ { @@ -2002,27 +1750,27 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2023-07-27T06:33:22+00:00" }, { "name": "symfony/finder", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2050,7 +1798,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.0" + "source": "https://github.com/symfony/finder/tree/v7.0.0" }, "funding": [ { @@ -2066,24 +1814,24 @@ "type": "tidelift" } ], - "time": "2023-04-02T01:25:41+00:00" + "time": "2023-10-31T17:59:56+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + "reference": "700ff4096e346f54cb628ea650767c8130f1001f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/700ff4096e346f54cb628ea650767c8130f1001f", + "reference": "700ff4096e346f54cb628ea650767c8130f1001f", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -2117,7 +1865,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.0.0" }, "funding": [ { @@ -2133,20 +1881,20 @@ "type": "tidelift" } ], - "time": "2023-05-12T14:21:09+00:00" + "time": "2023-08-08T10:20:21+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -2161,7 +1909,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2199,7 +1947,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -2215,20 +1963,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -2240,7 +1988,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2280,7 +2028,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -2296,20 +2044,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -2321,7 +2069,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2364,7 +2112,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -2380,20 +2128,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -2408,7 +2156,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2447,7 +2195,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -2463,20 +2211,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -2485,7 +2233,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2530,7 +2278,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -2546,20 +2294,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -2568,7 +2316,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2609,7 +2357,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -2625,24 +2373,24 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + "reference": "13bdb1670c7f510494e04fcb2bfa29af63db9c0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "url": "https://api.github.com/repos/symfony/process/zipball/13bdb1670c7f510494e04fcb2bfa29af63db9c0d", + "reference": "13bdb1670c7f510494e04fcb2bfa29af63db9c0d", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -2670,7 +2418,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.0" + "source": "https://github.com/symfony/process/tree/v7.0.0" }, "funding": [ { @@ -2686,20 +2434,20 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2023-11-20T16:43:42+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", "shasum": "" }, "require": { @@ -2752,7 +2500,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" }, "funding": [ { @@ -2768,24 +2516,24 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-07-30T20:28:31+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "reference": "7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a", + "reference": "7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -2814,7 +2562,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.0.0" }, "funding": [ { @@ -2830,24 +2578,24 @@ "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2023-07-05T13:06:06+00:00" }, { "name": "symfony/string", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "url": "https://api.github.com/repos/symfony/string/zipball/92bd2bfbba476d4a1838e5e12168bef2fd1e6620", + "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -2857,11 +2605,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2900,7 +2648,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.0" + "source": "https://github.com/symfony/string/tree/v7.0.0" }, "funding": [ { @@ -2916,31 +2664,32 @@ "type": "tidelift" } ], - "time": "2023-03-21T21:06:29+00:00" + "time": "2023-11-29T08:40:23+00:00" }, { "name": "symfony/yaml", - "version": "v6.3.0", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927" + "reference": "4f9237a1bb42455d609e6687d2613dde5b41a587" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/a9a8337aa641ef2aa39c3e028f9107ec391e5927", - "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4f9237a1bb42455d609e6687d2613dde5b41a587", + "reference": "4f9237a1bb42455d609e6687d2613dde5b41a587", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0" + "symfony/console": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -2971,7 +2720,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.0" + "source": "https://github.com/symfony/yaml/tree/v6.4.0" }, "funding": [ { @@ -2987,30 +2736,31 @@ "type": "tidelift" } ], - "time": "2023-04-28T13:28:14+00:00" + "time": "2023-11-06T11:00:25+00:00" }, { "name": "twig/twig", - "version": "v3.6.1", + "version": "v3.8.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd" + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", - "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.22" }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" }, "type": "library", "autoload": { @@ -3046,7 +2796,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.6.1" + "source": "https://github.com/twigphp/Twig/tree/v3.8.0" }, "funding": [ { @@ -3058,7 +2808,7 @@ "type": "tidelift" } ], - "time": "2023-06-08T12:52:13+00:00" + "time": "2023-11-21T18:54:41+00:00" }, { "name": "zozlak/rdf-constants", @@ -3102,16 +2852,16 @@ "packages-dev": [ { "name": "api-platform/core", - "version": "v3.1.12", + "version": "v3.2.7", "source": { "type": "git", "url": "https://github.com/api-platform/core.git", - "reference": "1fe505a9d8fd235a8d7e4aa0f245f382f65578f8" + "reference": "f297d2192652a3acd2a644707740de8cb5069221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/core/zipball/1fe505a9d8fd235a8d7e4aa0f245f382f65578f8", - "reference": "1fe505a9d8fd235a8d7e4aa0f245f382f65578f8", + "url": "https://api.github.com/repos/api-platform/core/zipball/f297d2192652a3acd2a644707740de8cb5069221", + "reference": "f297d2192652a3acd2a644707740de8cb5069221", "shasum": "" }, "require": { @@ -3120,12 +2870,13 @@ "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^3.1", - "symfony/http-foundation": "^6.1", - "symfony/http-kernel": "^6.1", - "symfony/property-access": "^6.1", - "symfony/property-info": "^6.1", - "symfony/serializer": "^6.1", - "symfony/web-link": "^6.1", + "symfony/http-foundation": "^6.1 || ^7.0", + "symfony/http-kernel": "^6.1 || ^7.0", + "symfony/property-access": "^6.1 || ^7.0", + "symfony/property-info": "^6.1 || ^7.0", + "symfony/serializer": "^6.1 || ^7.0", + "symfony/translation-contracts": "^3.3", + "symfony/web-link": "^6.1 || ^7.0", "willdurand/negotiation": "^3.0" }, "conflict": { @@ -3134,24 +2885,21 @@ "doctrine/mongodb-odm": "<2.4", "doctrine/orm": "<2.14.0", "doctrine/persistence": "<1.3", - "elasticsearch/elasticsearch": ">=8.0", + "elasticsearch/elasticsearch": ">=8.0,<8.4", "phpspec/prophecy": "<1.15", "phpunit/phpunit": "<9.5", - "symfony/service-contracts": "<3", "symfony/var-exporter": "<6.1.1" }, "require-dev": { - "behat/behat": "^3.1", - "behat/mink": "^1.9@dev", + "behat/behat": "^3.11", + "behat/mink": "^1.9", "doctrine/cache": "^1.11 || ^2.1", "doctrine/common": "^3.2.2", - "doctrine/data-fixtures": "^1.2.2", "doctrine/dbal": "^3.4.0", "doctrine/doctrine-bundle": "^1.12 || ^2.0", "doctrine/mongodb-odm": "^2.2", - "doctrine/mongodb-odm-bundle": "^4.0", "doctrine/orm": "^2.14", - "elasticsearch/elasticsearch": "^7.11.0", + "elasticsearch/elasticsearch": "^7.11 || ^8.4", "friends-of-behat/mink-browserkit-driver": "^1.3.1", "friends-of-behat/mink-extension": "^2.2", "friends-of-behat/symfony-extension": "^2.1", @@ -3166,39 +2914,40 @@ "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-symfony": "^1.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "ramsey/uuid": "^3.7 || ^4.0", - "ramsey/uuid-doctrine": "^1.4", - "soyuka/contexts": "^3.3.6", + "ramsey/uuid": "^3.9.7 || ^4.0", + "ramsey/uuid-doctrine": "^1.4 || ^2.0", + "soyuka/contexts": "v3.3.9", "soyuka/stubs-mongodb": "^1.0", - "symfony/asset": "^6.1", - "symfony/browser-kit": "^6.1", - "symfony/cache": "^6.1", - "symfony/config": "^6.1", - "symfony/console": "^6.1", - "symfony/css-selector": "^6.1", - "symfony/dependency-injection": "^6.1", - "symfony/doctrine-bridge": "^6.1", - "symfony/dom-crawler": "^6.1", - "symfony/error-handler": "^6.1", - "symfony/event-dispatcher": "^6.1", - "symfony/expression-language": "^6.1", - "symfony/finder": "^6.1", - "symfony/form": "^6.1", - "symfony/framework-bundle": "^6.1", - "symfony/http-client": "^6.1", - "symfony/intl": "^6.1", + "symfony/asset": "^6.1 || ^7.0", + "symfony/browser-kit": "^6.1 || ^7.0", + "symfony/cache": "^6.1 || ^7.0", + "symfony/config": "^6.1 || ^7.0", + "symfony/console": "^6.1 || ^7.0", + "symfony/css-selector": "^6.1 || ^7.0", + "symfony/dependency-injection": "^6.1 || ^7.0.12", + "symfony/doctrine-bridge": "^6.1 || ^7.0", + "symfony/dom-crawler": "^6.1 || ^7.0", + "symfony/error-handler": "^6.1 || ^7.0", + "symfony/event-dispatcher": "^6.1 || ^7.0", + "symfony/expression-language": "^6.1 || ^7.0", + "symfony/finder": "^6.1 || ^7.0", + "symfony/form": "^6.1 || ^7.0", + "symfony/framework-bundle": "^6.1 || ^7.0", + "symfony/http-client": "^6.1 || ^7.0", + "symfony/intl": "^6.1 || ^7.0", "symfony/maker-bundle": "^1.24", "symfony/mercure-bundle": "*", - "symfony/messenger": "^6.1", - "symfony/phpunit-bridge": "^6.1", - "symfony/routing": "^6.1", - "symfony/security-bundle": "^6.1", - "symfony/security-core": "^6.1", - "symfony/twig-bundle": "^6.1", - "symfony/uid": "^6.1", - "symfony/validator": "^6.1", - "symfony/web-profiler-bundle": "^6.1", - "symfony/yaml": "^6.1", + "symfony/messenger": "^6.1 || ^7.0", + "symfony/phpunit-bridge": "^6.1 || ^7.0", + "symfony/routing": "^6.1 || ^7.0", + "symfony/security-bundle": "^6.1 || ^7.0", + "symfony/security-core": "^6.1 || ^7.0", + "symfony/stopwatch": "^6.1 || ^7.0", + "symfony/twig-bundle": "^6.1 || ^7.0", + "symfony/uid": "^6.1 || ^7.0", + "symfony/validator": "^6.1 || ^7.0", + "symfony/web-profiler-bundle": "^6.1 || ^7.0", + "symfony/yaml": "^6.1 || ^7.0", "twig/twig": "^1.42.3 || ^2.12 || ^3.0", "webonyx/graphql-php": "^14.0 || ^15.0" }, @@ -3223,10 +2972,10 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.2.x-dev" + "dev-main": "3.3.x-dev" }, "symfony": { - "require": "^6.1" + "require": "^6.1 || ^7.0" } }, "autoload": { @@ -3260,15 +3009,9 @@ ], "support": { "issues": "https://github.com/api-platform/core/issues", - "source": "https://github.com/api-platform/core/tree/v3.1.12" + "source": "https://github.com/api-platform/core/tree/v3.2.7" }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/api-platform/core", - "type": "tidelift" - } - ], - "time": "2023-05-24T19:23:57+00:00" + "time": "2023-11-30T13:51:25+00:00" }, { "name": "doctrine/cache", @@ -3365,16 +3108,16 @@ }, { "name": "doctrine/collections", - "version": "2.1.2", + "version": "2.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "db8cda536a034337f7dd63febecc713d4957f9ee" + "reference": "72328a11443a0de79967104ad36ba7b30bded134" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/db8cda536a034337f7dd63febecc713d4957f9ee", - "reference": "db8cda536a034337f7dd63febecc713d4957f9ee", + "url": "https://api.github.com/repos/doctrine/collections/zipball/72328a11443a0de79967104ad36ba7b30bded134", + "reference": "72328a11443a0de79967104ad36ba7b30bded134", "shasum": "" }, "require": { @@ -3382,12 +3125,12 @@ "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^10.0", + "doctrine/coding-standard": "^12", "ext-json": "*", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^5.11" }, "type": "library", "autoload": { @@ -3431,7 +3174,7 @@ ], "support": { "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/2.1.2" + "source": "https://github.com/doctrine/collections/tree/2.1.4" }, "funding": [ { @@ -3447,7 +3190,7 @@ "type": "tidelift" } ], - "time": "2022-12-27T23:41:38+00:00" + "time": "2023-10-03T09:22:33+00:00" }, { "name": "doctrine/common", @@ -3542,16 +3285,16 @@ }, { "name": "doctrine/dbal", - "version": "3.6.4", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f" + "reference": "0ac3c270590e54910715e9a1a044cc368df282b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", - "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/0ac3c270590e54910715e9a1a044cc368df282b2", + "reference": "0ac3c270590e54910715e9a1a044cc368df282b2", "shasum": "" }, "require": { @@ -3566,11 +3309,12 @@ "require-dev": { "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.10.14", + "jetbrains/phpstorm-stubs": "2023.1", + "phpstan/phpstan": "1.10.42", "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.7", + "phpunit/phpunit": "9.6.13", "psalm/plugin-phpunit": "0.18.4", + "slevomat/coding-standard": "8.13.1", "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^5.4|^6.0", "symfony/console": "^4.4|^5.4|^6.0", @@ -3634,7 +3378,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.6.4" + "source": "https://github.com/doctrine/dbal/tree/3.7.2" }, "funding": [ { @@ -3650,7 +3394,54 @@ "type": "tidelift" } ], - "time": "2023-06-15T07:40:12+00:00" + "time": "2023-11-19T08:06:58+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + }, + "time": "2023-09-27T20:04:15+00:00" }, { "name": "doctrine/event-manager", @@ -3813,18 +3604,96 @@ ], "time": "2022-12-30T00:23:10+00:00" }, + { + "name": "doctrine/lexer", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "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": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/2.1.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%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-14T08:49:07+00:00" + }, { "name": "doctrine/orm", - "version": "2.15.3", + "version": "2.17.1", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "4c3bd208018c26498e5f682aaad45fa00ea307d5" + "reference": "1a4fe6e0bb67762370937a7e6cee3da40a9122d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/4c3bd208018c26498e5f682aaad45fa00ea307d5", - "reference": "4c3bd208018c26498e5f682aaad45fa00ea307d5", + "url": "https://api.github.com/repos/doctrine/orm/zipball/1a4fe6e0bb67762370937a7e6cee3da40a9122d1", + "reference": "1a4fe6e0bb67762370937a7e6cee3da40a9122d1", "shasum": "" }, "require": { @@ -3842,7 +3711,7 @@ "ext-ctype": "*", "php": "^7.1 || ^8.0", "psr/cache": "^1 || ^2 || ^3", - "symfony/console": "^4.2 || ^5.0 || ^6.0", + "symfony/console": "^4.2 || ^5.0 || ^6.0 || ^7.0", "symfony/polyfill-php72": "^1.23", "symfony/polyfill-php80": "^1.16" }, @@ -3853,14 +3722,14 @@ "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.10.18", + "phpstan/phpstan": "~1.4.10 || 1.10.35", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", "psr/log": "^1 || ^2 || ^3", "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^4.4 || ^5.4 || ^6.0", "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2", "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.12.0" + "vimeo/psalm": "4.30.0 || 5.15.0" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", @@ -3910,9 +3779,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.15.3" + "source": "https://github.com/doctrine/orm/tree/2.17.1" }, - "time": "2023-06-22T12:36:06+00:00" + "time": "2023-11-17T06:25:40+00:00" }, { "name": "doctrine/persistence", @@ -4357,16 +4226,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", "shasum": "" }, "require": { @@ -4409,9 +4278,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" }, - "time": "2023-05-30T18:13:47+00:00" + "time": "2023-08-12T11:01:26+00:00" }, { "name": "phpspec/prophecy", @@ -4535,16 +4404,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.1", + "version": "1.24.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496", "shasum": "" }, "require": { @@ -4576,22 +4445,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4" }, - "time": "2023-06-29T20:46:06+00:00" + "time": "2023-11-26T18:29:22+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.26", + "version": "1.10.47", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "5d660cbb7e1b89253a47147ae44044f49832351f" + "reference": "84dbb33b520ea28b6cf5676a3941f4bae1c1ff39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5d660cbb7e1b89253a47147ae44044f49832351f", - "reference": "5d660cbb7e1b89253a47147ae44044f49832351f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/84dbb33b520ea28b6cf5676a3941f4bae1c1ff39", + "reference": "84dbb33b520ea28b6cf5676a3941f4bae1c1ff39", "shasum": "" }, "require": { @@ -4640,20 +4509,20 @@ "type": "tidelift" } ], - "time": "2023-07-19T12:44:37+00:00" + "time": "2023-12-01T15:19:17+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", "shasum": "" }, "require": { @@ -4709,7 +4578,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" }, "funding": [ { @@ -4717,7 +4587,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-09-19T04:57:46+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4962,16 +4832,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.10", + "version": "9.6.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", "shasum": "" }, "require": { @@ -4986,7 +4856,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -5045,7 +4915,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15" }, "funding": [ { @@ -5061,7 +4931,56 @@ "type": "tidelift" } ], - "time": "2023-07-10T04:04:23+00:00" + "time": "2023-12-01T16:55:19+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" }, { "name": "psr/link", @@ -5559,16 +5478,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -5611,7 +5530,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -5619,7 +5538,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -6019,69 +5938,65 @@ }, { "name": "symfony/doctrine-bridge", - "version": "v6.3.1", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/doctrine-bridge.git", - "reference": "594263c7d2677022a16e4f39d20070463ba03888" + "reference": "5e8e95e8389d03f2f3ae16a6c7c804849ed483b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/594263c7d2677022a16e4f39d20070463ba03888", - "reference": "594263c7d2677022a16e4f39d20070463ba03888", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/5e8e95e8389d03f2f3ae16a6c7c804849ed483b5", + "reference": "5e8e95e8389d03f2f3ae16a6c7c804849ed483b5", "shasum": "" }, "require": { - "doctrine/event-manager": "^1.2|^2", - "doctrine/persistence": "^2|^3", - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "doctrine/event-manager": "^2", + "doctrine/persistence": "^3.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3" }, "conflict": { - "doctrine/annotations": "<1.13.1", - "doctrine/dbal": "<2.13.1", + "doctrine/dbal": "<3.6", "doctrine/lexer": "<1.1", - "doctrine/orm": "<2.12", - "symfony/cache": "<5.4", - "symfony/dependency-injection": "<6.2", - "symfony/form": "<5.4.21|>=6,<6.2.7", - "symfony/http-foundation": "<6.3", - "symfony/http-kernel": "<6.2", - "symfony/lock": "<6.3", - "symfony/messenger": "<5.4", - "symfony/property-info": "<5.4", - "symfony/security-bundle": "<5.4", - "symfony/security-core": "<6.0", - "symfony/validator": "<5.4.25|>=6,<6.2.12|>=6.3,<6.3.1" + "doctrine/orm": "<2.15", + "symfony/cache": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/form": "<6.4", + "symfony/http-foundation": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/lock": "<6.4", + "symfony/messenger": "<6.4", + "symfony/property-info": "<6.4", + "symfony/security-bundle": "<6.4", + "symfony/security-core": "<6.4", + "symfony/validator": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.13.1|^2", "doctrine/collections": "^1.0|^2.0", "doctrine/data-fixtures": "^1.1", - "doctrine/dbal": "^2.13.1|^3.0", - "doctrine/orm": "^2.12", + "doctrine/dbal": "^3.6|^4", + "doctrine/orm": "^2.15|^3", "psr/log": "^1|^2|^3", - "symfony/cache": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^6.2", - "symfony/doctrine-messenger": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/form": "^5.4.21|^6.2.7", - "symfony/http-kernel": "^6.3", - "symfony/lock": "^6.3", - "symfony/messenger": "^5.4|^6.0", - "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.4|^6.0", - "symfony/proxy-manager-bridge": "^5.4|^6.0", - "symfony/security-core": "^6.0", - "symfony/stopwatch": "^5.4|^6.0", - "symfony/translation": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", - "symfony/validator": "^5.4.25|~6.2.12|^6.3.1", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/doctrine-messenger": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/form": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/security-core": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "symfony-bridge", "autoload": { @@ -6109,7 +6024,7 @@ "description": "Provides integration for Doctrine with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/doctrine-bridge/tree/v6.3.1" + "source": "https://github.com/symfony/doctrine-bridge/tree/v7.0.0" }, "funding": [ { @@ -6125,34 +6040,35 @@ "type": "tidelift" } ], - "time": "2023-06-18T20:33:34+00:00" + "time": "2023-11-17T16:04:05+00:00" }, { "name": "symfony/error-handler", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "99d2d814a6351461af350ead4d963bd67451236f" + "reference": "80b1258be1b84c12a345d0ec3881bbf2e5270cc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/99d2d814a6351461af350ead4d963bd67451236f", - "reference": "99d2d814a6351461af350ead4d963bd67451236f", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/80b1258be1b84c12a345d0ec3881bbf2e5270cc2", + "reference": "80b1258be1b84c12a345d0ec3881bbf2e5270cc2", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/var-dumper": "^6.4|^7.0" }, "conflict": { - "symfony/deprecation-contracts": "<2.5" + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" }, "require-dev": { "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/http-kernel": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -6183,7 +6099,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.3.0" + "source": "https://github.com/symfony/error-handler/tree/v7.0.0" }, "funding": [ { @@ -6199,40 +6115,40 @@ "type": "tidelift" } ], - "time": "2023-05-10T12:03:13+00:00" + "time": "2023-10-20T16:35:23+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.3.1", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66" + "reference": "47d72323200934694def5d57083899d774a2b110" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", - "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/47d72323200934694def5d57083899d774a2b110", + "reference": "47d72323200934694def5d57083899d774a2b110", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php83": "^1.27" }, "conflict": { - "symfony/cache": "<6.2" + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4" }, "require-dev": { - "doctrine/dbal": "^2.13.1|^3.0", + "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^5.4|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6260,7 +6176,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.1" + "source": "https://github.com/symfony/http-foundation/tree/v7.0.0" }, "funding": [ { @@ -6276,76 +6192,75 @@ "type": "tidelift" } ], - "time": "2023-06-24T11:51:27+00:00" + "time": "2023-11-07T15:10:37+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.1", + "version": "v7.0.1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374" + "reference": "4787639523dcdda32f69063f7fca2ad709f3c6d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/161e16fd2e35fb4881a43bc8b383dfd5be4ac374", - "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4787639523dcdda32f69063f7fca2ad709f3c6d2", + "reference": "4787639523dcdda32f69063f7fca2ad709f3c6d2", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.3", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-foundation": "^6.2.7", + "symfony/error-handler": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.4", - "symfony/config": "<6.1", - "symfony/console": "<5.4", - "symfony/dependency-injection": "<6.3", - "symfony/doctrine-bridge": "<5.4", - "symfony/form": "<5.4", - "symfony/http-client": "<5.4", + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<5.4", - "symfony/messenger": "<5.4", - "symfony/translation": "<5.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<5.4", - "symfony/validator": "<5.4", - "symfony/var-dumper": "<6.3", - "twig/twig": "<2.13" + "symfony/twig-bridge": "<6.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.0.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/clock": "^6.2", - "symfony/config": "^6.1", - "symfony/console": "^5.4|^6.0", - "symfony/css-selector": "^5.4|^6.0", - "symfony/dependency-injection": "^6.3", - "symfony/dom-crawler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/css-selector": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^5.4|^6.0", - "symfony/property-access": "^5.4.5|^6.0.5", - "symfony/routing": "^5.4|^6.0", - "symfony/serializer": "^6.3", - "symfony/stopwatch": "^5.4|^6.0", - "symfony/translation": "^5.4|^6.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/routing": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^5.4|^6.0", - "symfony/validator": "^6.3", - "symfony/var-exporter": "^6.2", - "twig/twig": "^2.13|^3.0.4" + "symfony/uid": "^6.4|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "type": "library", "autoload": { @@ -6373,7 +6288,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.3.1" + "source": "https://github.com/symfony/http-kernel/tree/v7.0.1" }, "funding": [ { @@ -6389,31 +6304,31 @@ "type": "tidelift" } ], - "time": "2023-06-26T06:07:32+00:00" + "time": "2023-12-01T17:08:48+00:00" }, { "name": "symfony/phpunit-bridge", - "version": "v6.3.1", + "version": "v7.0.1", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "0b0bf59b0d9bd1422145a123a67fb12af546ef0d" + "reference": "c2d059b25e31274157dd7727131cd1cf33650207" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/0b0bf59b0d9bd1422145a123a67fb12af546ef0d", - "reference": "0b0bf59b0d9bd1422145a123a67fb12af546ef0d", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/c2d059b25e31274157dd7727131cd1cf33650207", + "reference": "c2d059b25e31274157dd7727131cd1cf33650207", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": ">=7.2.5" }, "conflict": { "phpunit/phpunit": "<7.5|9.1.2" }, "require-dev": { "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/error-handler": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.4|^7.0", "symfony/polyfill-php81": "^1.27" }, "bin": [ @@ -6454,7 +6369,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v6.3.1" + "source": "https://github.com/symfony/phpunit-bridge/tree/v7.0.1" }, "funding": [ { @@ -6470,20 +6385,20 @@ "type": "tidelift" } ], - "time": "2023-06-23T13:25:16+00:00" + "time": "2023-12-01T09:26:31+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", "shasum": "" }, "require": { @@ -6492,7 +6407,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6530,7 +6445,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, "funding": [ { @@ -6546,20 +6461,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "508c652ba3ccf69f8c97f251534f229791b52a57" + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/508c652ba3ccf69f8c97f251534f229791b52a57", - "reference": "508c652ba3ccf69f8c97f251534f229791b52a57", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", "shasum": "" }, "require": { @@ -6569,7 +6484,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6582,7 +6497,10 @@ ], "psr-4": { "Symfony\\Polyfill\\Php83\\": "" - } + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6607,7 +6525,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.0" }, "funding": [ { @@ -6623,29 +6541,28 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-08-16T06:22:46+00:00" }, { "name": "symfony/property-access", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "db9358571ce63f09c439c2fee6c12e5b090b69ac" + "reference": "740e8cb8c54a4f16c82179e8558c29d9fc49901d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/db9358571ce63f09c439c2fee6c12e5b090b69ac", - "reference": "db9358571ce63f09c439c2fee6c12e5b090b69ac", + "url": "https://api.github.com/repos/symfony/property-access/zipball/740e8cb8c54a4f16c82179e8558c29d9fc49901d", + "reference": "740e8cb8c54a4f16c82179e8558c29d9fc49901d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/property-info": "^5.4|^6.0" + "php": ">=8.2", + "symfony/property-info": "^6.4|^7.0" }, "require-dev": { - "symfony/cache": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6684,7 +6601,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v6.3.0" + "source": "https://github.com/symfony/property-access/tree/v7.0.0" }, "funding": [ { @@ -6700,38 +6617,38 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2023-09-27T14:05:33+00:00" }, { "name": "symfony/property-info", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd" + "reference": "ce627df05f5629ce4feec536ee827ad0a12689b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/7f3a03716112269741fe2a809f8f791a371d1fcd", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd", + "url": "https://api.github.com/repos/symfony/property-info/zipball/ce627df05f5629ce4feec536ee827ad0a12689b6", + "reference": "ce627df05f5629ce4feec536ee827ad0a12689b6", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/string": "^5.4|^6.0" + "php": ">=8.2", + "symfony/string": "^6.4|^7.0" }, "conflict": { "phpdocumentor/reflection-docblock": "<5.2", "phpdocumentor/type-resolver": "<1.5.1", - "symfony/dependency-injection": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/serializer": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.10.4|^2", "phpdocumentor/reflection-docblock": "^5.2", "phpstan/phpdoc-parser": "^1.0", - "symfony/cache": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6767,7 +6684,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v6.3.0" + "source": "https://github.com/symfony/property-info/tree/v7.0.0" }, "funding": [ { @@ -6783,56 +6700,58 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2023-11-25T08:38:27+00:00" }, { "name": "symfony/serializer", - "version": "v6.3.1", + "version": "v7.0.1", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "1d238ee3180bc047f8ab713bfb73848d553f4407" + "reference": "9c8f67c1444adf6dbcf90fb76da5b2f5c43af0ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/1d238ee3180bc047f8ab713bfb73848d553f4407", - "reference": "1d238ee3180bc047f8ab713bfb73848d553f4407", + "url": "https://api.github.com/repos/symfony/serializer/zipball/9c8f67c1444adf6dbcf90fb76da5b2f5c43af0ff", + "reference": "9c8f67c1444adf6dbcf90fb76da5b2f5c43af0ff", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "doctrine/annotations": "<1.12", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/dependency-injection": "<5.4", - "symfony/property-access": "<5.4", - "symfony/property-info": "<5.4", - "symfony/uid": "<5.4", - "symfony/yaml": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/property-access": "<6.4", + "symfony/property-info": "<6.4", + "symfony/uid": "<6.4", + "symfony/validator": "<6.4", + "symfony/yaml": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.12|^2", "phpdocumentor/reflection-docblock": "^3.2|^4.0|^5.0", - "symfony/cache": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/filesystem": "^5.4|^6.0", - "symfony/form": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/mime": "^5.4|^6.0", - "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", - "symfony/validator": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0", - "symfony/var-exporter": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" + "seld/jsonlint": "^1.10", + "symfony/cache": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/filesystem": "^6.4|^7.0", + "symfony/form": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^6.4|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6860,7 +6779,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v6.3.1" + "source": "https://github.com/symfony/serializer/tree/v7.0.1" }, "funding": [ { @@ -6876,20 +6795,20 @@ "type": "tidelift" } ], - "time": "2023-06-21T19:54:33+00:00" + "time": "2023-12-01T15:10:06+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86" + "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/02c24deb352fb0d79db5486c0c79905a85e37e86", - "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dee0c6e5b4c07ce851b462530088e64b255ac9c5", + "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5", "shasum": "" }, "require": { @@ -6938,7 +6857,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.4.0" }, "funding": [ { @@ -6954,59 +6873,57 @@ "type": "tidelift" } ], - "time": "2023-05-30T17:17:10+00:00" + "time": "2023-07-25T15:08:44+00:00" }, { "name": "symfony/validator", - "version": "v6.3.1", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "1b71f43c62ee867ab08195ba6039a1bc3e6654dc" + "reference": "616b39ffb22c1519f7fd2582b8052cde4c2d0b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/1b71f43c62ee867ab08195ba6039a1bc3e6654dc", - "reference": "1b71f43c62ee867ab08195ba6039a1bc3e6654dc", + "url": "https://api.github.com/repos/symfony/validator/zipball/616b39ffb22c1519f7fd2582b8052cde4c2d0b9f", + "reference": "616b39ffb22c1519f7fd2582b8052cde4c2d0b9f", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php83": "^1.27", "symfony/translation-contracts": "^2.5|^3" }, "conflict": { - "doctrine/annotations": "<1.13", "doctrine/lexer": "<1.1", - "symfony/dependency-injection": "<5.4", - "symfony/expression-language": "<5.4", - "symfony/http-kernel": "<5.4", - "symfony/intl": "<5.4", - "symfony/property-info": "<5.4", - "symfony/translation": "<5.4", - "symfony/yaml": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<7.0", + "symfony/expression-language": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/intl": "<6.4", + "symfony/property-info": "<6.4", + "symfony/translation": "<6.4", + "symfony/yaml": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.13|^2", "egulias/email-validator": "^2.1.10|^3|^4", - "symfony/cache": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/intl": "^5.4|^6.0", - "symfony/mime": "^5.4|^6.0", - "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.4|^6.0", - "symfony/translation": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7034,7 +6951,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v6.3.1" + "source": "https://github.com/symfony/validator/tree/v7.0.0" }, "funding": [ { @@ -7050,35 +6967,36 @@ "type": "tidelift" } ], - "time": "2023-06-21T12:08:28+00:00" + "time": "2023-11-29T08:40:23+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.3.1", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c81268d6960ddb47af17391a27d222bd58cf0515" + "reference": "cf0220fc7607476fd0d001ab3ed9e830d1fdda56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c81268d6960ddb47af17391a27d222bd58cf0515", - "reference": "c81268d6960ddb47af17391a27d222bd58cf0515", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cf0220fc7607476fd0d001ab3ed9e830d1fdda56", + "reference": "cf0220fc7607476fd0d001ab3ed9e830d1fdda56", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "bin": [ "Resources/bin/var-dump-server" @@ -7116,7 +7034,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.1" + "source": "https://github.com/symfony/var-dumper/tree/v7.0.0" }, "funding": [ { @@ -7132,34 +7050,34 @@ "type": "tidelift" } ], - "time": "2023-06-21T12:08:28+00:00" + "time": "2023-11-27T12:39:18+00:00" }, { "name": "symfony/web-link", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/web-link.git", - "reference": "0989ca617d0703cdca501a245f10e194ff22315b" + "reference": "378bcc80b48c51e32bf121bee684183ff879a62f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/web-link/zipball/0989ca617d0703cdca501a245f10e194ff22315b", - "reference": "0989ca617d0703cdca501a245f10e194ff22315b", + "url": "https://api.github.com/repos/symfony/web-link/zipball/378bcc80b48c51e32bf121bee684183ff879a62f", + "reference": "378bcc80b48c51e32bf121bee684183ff879a62f", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/link": "^1.1|^2.0" }, "conflict": { - "symfony/http-kernel": "<5.4" + "symfony/http-kernel": "<6.4" }, "provide": { "psr/link-implementation": "1.0|2.0" }, "require-dev": { - "symfony/http-kernel": "^5.4|^6.0" + "symfony/http-kernel": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7199,7 +7117,7 @@ "push" ], "support": { - "source": "https://github.com/symfony/web-link/tree/v6.3.0" + "source": "https://github.com/symfony/web-link/tree/v7.0.0" }, "funding": [ { @@ -7215,20 +7133,20 @@ "type": "tidelift" } ], - "time": "2023-04-21T14:41:17+00:00" + "time": "2023-07-25T09:50:29+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -7257,7 +7175,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -7265,7 +7183,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "webmozart/assert", @@ -7392,5 +7310,5 @@ "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/src/CardinalitiesExtractor.php b/src/CardinalitiesExtractor.php index 343b0ee4..799362f7 100644 --- a/src/CardinalitiesExtractor.php +++ b/src/CardinalitiesExtractor.php @@ -13,8 +13,8 @@ namespace ApiPlatform\SchemaGenerator; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; /** * Extracts cardinalities from the OWL definition, from GoodRelations or from Schema.org's comments. @@ -104,7 +104,7 @@ private function extractForProperty(RdfResource $property): string return self::CARDINALITY_UNKNOWN; } - $fromGoodRelations = $this->goodRelationsBridge->extractCardinality($localName); + $fromGoodRelations = $this->goodRelationsBridge->extractCardinality($property->localId()); if (false !== $fromGoodRelations) { return $fromGoodRelations; } diff --git a/src/ClassMutator/AnnotationsAppender.php b/src/ClassMutator/AnnotationsAppender.php index fc074e65..22753f3e 100644 --- a/src/ClassMutator/AnnotationsAppender.php +++ b/src/ClassMutator/AnnotationsAppender.php @@ -16,7 +16,7 @@ use ApiPlatform\SchemaGenerator\AnnotationGenerator\AnnotationGeneratorInterface; use ApiPlatform\SchemaGenerator\Model\Class_; use ApiPlatform\SchemaGenerator\Model\Use_; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; final class AnnotationsAppender implements ClassMutatorInterface { diff --git a/src/ClassMutator/ClassPropertiesAppender.php b/src/ClassMutator/ClassPropertiesAppender.php index 988d135c..b34fcd76 100644 --- a/src/ClassMutator/ClassPropertiesAppender.php +++ b/src/ClassMutator/ClassPropertiesAppender.php @@ -16,8 +16,8 @@ use ApiPlatform\SchemaGenerator\Model\Class_; use ApiPlatform\SchemaGenerator\PropertyGenerator\PropertyGeneratorInterface; use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use Psr\Log\LoggerAwareTrait; final class ClassPropertiesAppender implements ClassMutatorInterface diff --git a/src/Command/ExtractCardinalitiesCommand.php b/src/Command/ExtractCardinalitiesCommand.php index 7701f729..fbb6c971 100644 --- a/src/Command/ExtractCardinalitiesCommand.php +++ b/src/Command/ExtractCardinalitiesCommand.php @@ -15,8 +15,8 @@ use ApiPlatform\SchemaGenerator\CardinalitiesExtractor; use ApiPlatform\SchemaGenerator\GoodRelationsBridge; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; -use EasyRdf\Graph as RdfGraph; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/src/Schema/ClassMutator/EnumClassMutator.php b/src/Schema/ClassMutator/EnumClassMutator.php index eb0ef2df..a37e447b 100644 --- a/src/Schema/ClassMutator/EnumClassMutator.php +++ b/src/Schema/ClassMutator/EnumClassMutator.php @@ -17,7 +17,7 @@ use ApiPlatform\SchemaGenerator\Model\Class_; use ApiPlatform\SchemaGenerator\PhpTypeConverterInterface; use ApiPlatform\SchemaGenerator\Schema\Model\Constant as SchemaConstant; -use EasyRdf\Graph as RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; final class EnumClassMutator extends BaseEnumClassMutator { diff --git a/src/Schema/Generator.php b/src/Schema/Generator.php index 81b84a0e..93fbbc1d 100644 --- a/src/Schema/Generator.php +++ b/src/Schema/Generator.php @@ -18,9 +18,9 @@ use ApiPlatform\SchemaGenerator\GoodRelationsBridge; use ApiPlatform\SchemaGenerator\PhpTypeConverter; use ApiPlatform\SchemaGenerator\Printer; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; use ApiPlatform\SchemaGenerator\TwigBuilder; use ApiPlatform\SchemaGenerator\TypesGenerator; -use EasyRdf\Graph as RdfGraph; use Symfony\Component\Console\Logger\ConsoleLogger; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; diff --git a/src/Schema/Model/Class_.php b/src/Schema/Model/Class_.php index 6d6a49b7..6921e928 100644 --- a/src/Schema/Model/Class_.php +++ b/src/Schema/Model/Class_.php @@ -14,7 +14,7 @@ namespace ApiPlatform\SchemaGenerator\Schema\Model; use ApiPlatform\SchemaGenerator\Model\Class_ as BaseClass_; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; final class Class_ extends BaseClass_ { diff --git a/src/Schema/Model/Constant.php b/src/Schema/Model/Constant.php index f173157b..584cf870 100644 --- a/src/Schema/Model/Constant.php +++ b/src/Schema/Model/Constant.php @@ -14,7 +14,7 @@ namespace ApiPlatform\SchemaGenerator\Schema\Model; use ApiPlatform\SchemaGenerator\Model\Constant as BaseConstant; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; final class Constant extends BaseConstant { diff --git a/src/Schema/Model/Property.php b/src/Schema/Model/Property.php index 4c9a49f4..dc374f35 100644 --- a/src/Schema/Model/Property.php +++ b/src/Schema/Model/Property.php @@ -14,7 +14,7 @@ namespace ApiPlatform\SchemaGenerator\Schema\Model; use ApiPlatform\SchemaGenerator\Model\Property as BaseProperty; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; final class Property extends BaseProperty { diff --git a/src/Schema/PropertyGenerator/IdPropertyGenerator.php b/src/Schema/PropertyGenerator/IdPropertyGenerator.php index 00413794..aff2de20 100644 --- a/src/Schema/PropertyGenerator/IdPropertyGenerator.php +++ b/src/Schema/PropertyGenerator/IdPropertyGenerator.php @@ -19,7 +19,7 @@ use ApiPlatform\SchemaGenerator\PropertyGenerator\IdPropertyGeneratorInterface; use ApiPlatform\SchemaGenerator\Schema\Model\Property as SchemaProperty; use ApiPlatform\SchemaGenerator\Schema\Model\Type\PrimitiveType as SchemaPrimitiveType; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; final class IdPropertyGenerator implements IdPropertyGeneratorInterface { diff --git a/src/Schema/PropertyGenerator/PropertyGenerator.php b/src/Schema/PropertyGenerator/PropertyGenerator.php index 47e2634b..e22f47db 100644 --- a/src/Schema/PropertyGenerator/PropertyGenerator.php +++ b/src/Schema/PropertyGenerator/PropertyGenerator.php @@ -23,8 +23,8 @@ use ApiPlatform\SchemaGenerator\PropertyGenerator\PropertyGeneratorInterface; use ApiPlatform\SchemaGenerator\Schema\Model\Property as SchemaProperty; use ApiPlatform\SchemaGenerator\Schema\Model\Type\PrimitiveType; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\Schema\TypeConverter; -use EasyRdf\Resource as RdfResource; use Psr\Log\LoggerAwareTrait; final class PropertyGenerator implements PropertyGeneratorInterface diff --git a/src/Schema/Rdf/RdfGraph.php b/src/Schema/Rdf/RdfGraph.php new file mode 100644 index 00000000..5a33daa6 --- /dev/null +++ b/src/Schema/Rdf/RdfGraph.php @@ -0,0 +1,190 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace ApiPlatform\SchemaGenerator\Schema\Rdf; + +use EasyRdf\Graph as EasyRdfGraph; + +/** + * This class is a wrapper around the EasyRdf\Graph class. It allows the Schema + * Generator to get RdfResource objects instead of EasyRdf\Resource ones when required. + * + * @author d3fk::Angatar + */ +class RdfGraph +{ + private EasyRdfGraph $graph; + + /** + * Constructor, creates the RdfGraph decorating a freshly created or given + * EasyRdf\Graph with the capability to return/use RdfResource instead of EasyRdf\Resource. + */ + public function __construct($uri = null, $data = null, $format = null, $graph = null) + { + $this->graph = $graph ?? new EasyRdfGraph($uri, $data, $format); + } + + /** + * Returns the corresponding EasyRdf\Graph. + */ + public function getEasyGraph(): EasyRdfGraph + { + return $this->graph; + } + + /** + * Passes any call for an absent method to the contained EasyRdf\Graph, ensuring + * that it returns a Schema Generator's RdfResource in place of any EasyRdf\Resource. + */ + public function __call($methodName, $arguments) + { + $arguments = RdfResource::fromRdftoEasyRdfResources($arguments); + + return RdfResource::wrapEasyRdfResource(\call_user_func_array([$this->graph, $methodName], $arguments)); + } + + /** + * Gets all the resources for a property of a resource and ensures that each + * EasyRdf\Resource matched is returned as wrapped in an RdfResource. + */ + public function allResources($resource, $property): array + { + $resource = RdfResource::fromRdftoEasyRdfResource($resource); + + return RdfResource::wrapEasyRdfResources($this->graph->allResources($resource, $property)); + } + + /** + * Gets all values for a property path and ensures that each EasyRdf\Resource + * matched is returned as wrapped in an RdfResource. + */ + public function all($resource, $propertyPath, $type = null, $lang = null): array + { + $resource = RdfResource::fromRdftoEasyRdfResource($resource); + + return RdfResource::wrapEasyRdfResources($this->graph->all($resource, $propertyPath, $type, $lang)); + } + + /** + * Gets all the resources in the graph of a certain type and ensures that + * each EasyRdf\Resource matched is returned as wrapped in an RdfResource. + */ + public function allOfType($type): array + { + return RdfResource::wrapEasyRdfResources($this->graph->allOfType($type)); + } + + /** + * Gets all values for a single property of a resource and ensures that each + * EasyRdf\Resource matched is returned as wrapped in an RdfResource. + */ + public function allForSingleProperty($resource, $property, $type = null, $lang = null): array + { + $resource = RdfResource::fromRdftoEasyRdfResource($resource); + + return RdfResource::wrapEasyRdfResources($this->graph->allForSingleProperty($resource, $property, $type, $lang)); + } + + /** + * Gets the resource types of the graph as list of RdfResource. + */ + public function typesAsResources($resource = null): array + { + $resource = RdfResource::fromRdftoEasyRdfResource($resource); + + return RdfResource::wrapEasyRdfResources($this->graph->typesAsResources($resource)); + } + + /** + * Gets an associative array of all the resources stored in the graph as + * RdfResources. The keys of the array is the URI of the related RdfResource. + */ + public function resources(): array + { + return RdfResource::wrapEasyRdfResources($this->graph->resources()); + } + + /** + * Get an array of RdfResources matching a certain property and optional value. + */ + public function resourcesMatching($property, $value = null): array + { + return RdfResource::wrapEasyRdfResources($this->graph->resourcesMatching($property, $value)); + } + + /** + * Turns any provided EasyRdf\Graph into an RdfGraph. + */ + public static function fromEasyRdf(EasyRdfGraph $graph): self + { + $rdfGraph = new static(null, null, null, $graph); + + return $rdfGraph; + } + + /** + * Ensures that any EasyRdf\Graph provided by reference will be wrapped in + * an RdfGraph. + * + * @param EasyRdfGraph|RdfGraph &$graph + */ + public static function ensureGraphClass(&$graph): void + { + $graph = ($graph instanceof EasyRdfGraph) ? self::fromEasyRdf($graph) : $graph; + } + + /** + * Ensures that each EasyRdf\Graph, in an array of Graphs passed by reference, + * is wrapped in an RdfGraph. + */ + public static function ensureGraphsClass(array &$graphs): void + { + array_walk($graphs, self::class.'::ensureGraphClass'); + } + + /** + * Statically creates a new RdfGraph and loads RDF data from the provided URI. + */ + public static function newAndLoad($uri, $format = null): self + { + $graph = new self($uri); + $graph->load($uri, $format); + + return $graph; + } + + public function __toString() + { + return $this->graph->__toString(); + } + + public function __isset($name) + { + return $this->graph->__isset($name); + } + + public function __set($name, $value) + { + return $this->graph->__set($name, $value); + } + + public function __get($name) + { + return $this->graph->__get($name); + } + + public function __unset($name) + { + return $this->graph->__unset($name); + } +} diff --git a/src/Schema/Rdf/RdfResource.php b/src/Schema/Rdf/RdfResource.php new file mode 100644 index 00000000..432515c4 --- /dev/null +++ b/src/Schema/Rdf/RdfResource.php @@ -0,0 +1,432 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace ApiPlatform\SchemaGenerator\Schema\Rdf; + +use ApiPlatform\SchemaGenerator\SchemaGeneratorConfigurationHolder as Config; +use EasyRdf\Graph as EasyRdfGraph; +use EasyRdf\Resource as EasyRdfResource; + +use function Symfony\Component\String\u; + +/** + * This class is a wrapper around the EasyRdf\Resource class. It allows the + * Schema Generator to use the labels for the resources names instead of the + * default "ID/local names"(URI fragment ID), if the option is choosen in config. + * This capability impacts the PHP class names and API resource names accordingly. + * + * @author d3fk::Angatar + */ +class RdfResource implements \ArrayAccess +{ + private EasyRdfResource $resource; + private ?string $resourceName = null; + private ?string $language = null; + private ?string $namingConvention = null; + private bool $useLabel = false; + + /** + * Constructor, creates the RdfResource decorating a freshly created + * or given EasyRdf\Resource with new resource naming capabilities. + * + * @param EasyRdfGraph|RdfGraph|null $graph + */ + public function __construct(?string $uri, $graph = null, EasyRdfResource $resource = null) + { + $graph = ($graph instanceof RdfGraph) ? $graph->getEasyGraph() : $graph; + $this->resource = $resource ?? new EasyRdfResource($uri, $graph); + $this->defineResourceName(); // line only added to fulfill existing test conditions in ClassPropertiesAppenderTest::testInvoke + } + + /** + * Returns the resourceName or trigger to define one according to the config. + */ + public function localName(): ?string + { + if (!isset($this->resourceName)) { + $this->defineResourceName(); + } + + return $this->resourceName; + } + + /** + * Defines the resource name according to the config file (ID/localName or Label). + */ + private function defineResourceName(): void + { + $this->applyNamingConfig(); + $this->updateResourceName(); + } + + /** + * Applies the naming configuration from the config file to the object. + */ + public function applyNamingConfig(): void + { + // Uses label only if asked in config and the resource is part of a graph + if ($this->hasGraph() + && ((Config::$config['nameAllFromLabels'] ?? false) + || (Config::$config['vocabularies'][$this->getGraph()->getUri()]['nameAllFromLabels'] ?? false) + || (Config::$config['types'][$this->localId()]['nameFromLabel'] ?? false) + ) + ) { + $this->useLabel = true; + + $this->language = Config::$config['types'][$this->localId()]['language'] + ?? (Config::$config['vocabularies'][$this->getGraph()->getUri()]['language'] + ?? (Config::$config['language'] ?? $this->language)); + + $this->namingConvention = Config::$config['types'][$this->localId()]['namingConvention'] + ?? (Config::$config['vocabularies'][$this->getGraph()->getUri()]['namingConvention'] + ?? (Config::$config['namingConvention'] ?? $this->namingConvention)); + } else { + $this->useLabel = false; + } + } + + /** + * Updates the resource name according to language and naming convention + * defined in the object. Using URI fragment ID (local ID/Name) by default. + */ + public function updateResourceName(): void + { + if ($this->useLabel) { + $resourceName = $this->labelAsName($this->language, $this->namingConvention) ?? $this->localId(); + // If it's a Class or a Wikidata/Wikibase Item, we need to start with + // a capital letter as the name is used for the PHP Class & API resource + $this->resourceName = (\in_array($this->type(), ['owl:Class', 'rdfs:Class', 'wikibase:Item', 'wd:Item'], true)) ? ucfirst($resourceName) : $resourceName; + } else { + $this->resourceName = $this->localId(); + } + } + + /** + * Sets wether or not this Resource makes use of the label for defining its name. + */ + public function setUseLabel(bool $useLabel): void + { + $this->useLabel = $useLabel; + } + + /** + * Gets wether or not this Resource makes use of the label for defining its name. + */ + public function getUseLabel(): bool + { + return $this->useLabel; + } + + /** + * Sets the resource name. + */ + public function setResourceName(?string $resourceName): void + { + $this->resourceName = $resourceName; + } + + /** + * Gets the resource name defined. + */ + public function getResourceName(): ?string + { + return $this->resourceName; + } + + /** + * Gets the EasyRdf\Resource composing this Schema Generator's RdfResource. + */ + public function getEasyResource(): EasyRdfResource + { + return $this->resource; + } + + /** + * Resets the resource's parameters related to naming behavior. + */ + public function resetResourceNamingBehavior(): void + { + $this->useLabel = false; + $this->language = null; + $this->namingConvention = null; + $this->resourceName = null; + } + + /** + * Gets the Identifier of the resource from the URI fragment identifier. + */ + public function localId(): ?string + { + return $this->resource->localName(); + } + + /** + * Returns the label of the resource in the given language with given style + * or make use of the default label if none exists in the defined language. + */ + private function labelAsName(?string $language, string $namingConvention = null): ?string + { + // English is the default language, forseeing graphs with several ones. + $language = $language ?: 'en'; + + $label = $this->resource->label($language); + $defaultLabel = $this->resource->label(null); + if ('snake case' === $namingConvention) { + return $label ? u($label->getValue())->snake()->__toString() : + ($defaultLabel ? u($defaultLabel->getValue())->snake()->__toString() : null); + } + + // default is camel case style as with schema.org + return $label ? u($label->getValue())->camel()->__toString() : + ($defaultLabel ? u($defaultLabel->getValue())->camel()->__toString() : null); + } + + /** + * Gets the graph related to this resource as a Schema Generator's RdfGraph. + */ + public function getGraph(): ?RdfGraph + { + return ($this->hasGraph()) ? RdfGraph::fromEasyRdf($this->resource->getGraph()) : null; + } + + /** + * Returns true if the current RdfResource belongs to a graph. + */ + protected function hasGraph(): bool + { + return null !== $this->resource->getGraph(); + } + + /** + * Sets the current resource's prefered language (e.g. 'en'). + */ + public function setResourceLanguage(?string $language): void + { + $this->language = $language; + } + + /** + * Gets the prefered language set for the resource. + */ + public function getResourceLanguage(): ?string + { + return $this->language; + } + + /** + * Sets the current resource naming convention to use when naming entities + * from labels (i.e. "snake case" or "camel case"). + */ + public function setNamingConvention(?string $namingConvention): void + { + $this->namingConvention = $namingConvention; + } + + /** + * Gets the naming convention set for the resource. + */ + public function getNamingConvention(): ?string + { + return $this->namingConvention; + } + + /** + * Gets all values for a property and ensures that each EasyRdf\Resource + * matched is returned as wrapped in an RdfResource. + */ + public function all($property, $type = null, $lang = null): array + { + $property = self::fromRdftoEasyRdfResource($property); + + return self::wrapEasyRdfResources($this->resource->all($property, $type, $lang)); + } + + /** + * Gets all the resources for a property of this resource and ensures that + * each EasyRdf\Resource matched is returned as wrapped in an RdfResource. + */ + public function allResources($property): array + { + $property = self::fromRdftoEasyRdfResource($property); + + return self::wrapEasyRdfResources($this->resource->allResources($property)); + } + + /** + * Gets a list of types for a resource, as an array of schema generator's RdfResources. + */ + public function typesAsResources(): array + { + return self::wrapEasyRdfResources($this->resource->typesAsResources()); + } + + /** + * Wrapps a given EasyRdf\Resource in the returned RdfResource. + */ + public static function fromEasyRdf(EasyRdfResource $resource): self + { + $rdfResource = new static(null, null, $resource); + + return $rdfResource; + } + + /** + * Turns any EasyRdf\Resource, provided by reference, into an RdfResource. + * Any form of resource is accepted but only EasyRdf\Resources are impacted. + * + * @param &$resource mixed resource types + */ + public static function ensureResourceClass(&$resource): void + { + $resource = ($resource instanceof EasyRdfResource) ? self::fromEasyRdf($resource) : $resource; + } + + /** + * Ensures each EasyRdf\resource in the array of resources passed by reference + * is turned into an RdfResource wrapping the EasyRdf\Resource. + */ + public static function ensureResourcesClass(array &$resources): void + { + array_walk($resources, self::class.'::ensureResourceClass'); + } + + /** + * Extends the capabilities of any EasyRdf\Resource provided by turning it + * into an RdfResource. + * + * @param $resource mixed resource types + * + * @return $resource mixed but EasyRdf\Resource is wrapped into an RdfResource + */ + public static function wrapEasyRdfResource($resource) + { + $resource = ($resource instanceof EasyRdfResource) ? self::fromEasyRdf($resource) : $resource; + + return $resource; + } + + /** + * Extends the capabilities of each EasyRdf\resource in the array provided + * by wrapping it in an RdfResource. + */ + public static function wrapEasyRdfResources(array $resources): array + { + array_walk($resources, self::class.'::ensureResourceClass'); + + return $resources; + } + + /** + * Returns the corresponding EasyRdf\Resource for any RdfResource provided. + * + * @param $resource mixed resource types + * + * @return $resource mixed but any RdfResource will return its contained EasyRdf\resource + */ + public static function fromRdftoEasyRdfResource($resource) + { + $resource = ($resource instanceof self) ? $resource->getEasyResource() : $resource; + + return $resource; + } + + /** + * Ensures that all RdfResources provided in an array are returned in that + * array as EasyRdf\Resource class Type. + */ + public static function fromRdftoEasyRdfResources(array $resources): array + { + array_walk($resources, self::class.'::ensureEasyResourceClass'); + + return $resources; + } + + /** + * Ensures that any RdfResource provided by reference will be an EasyRdf\Resource. + */ + public static function ensureEasyResourceClass(&$resource): void + { + $resource = ($resource instanceof self) ? $resource->getEasyResource() : $resource; + } + + /** + * Passes any call for an absent method to the contained EasyRdf\Resource, + * ensuring that it returns an RdfResource in place of a simple EasyRdf\Resource. + */ + public function __call($methodName, $arguments) + { + $arguments = self::fromRdftoEasyRdfResources($arguments); + + return self::wrapEasyRdfResource(\call_user_func_array([$this->resource, $methodName], $arguments)); + } + + public function __toString() + { + return $this->resource->__toString(); + } + + public function __isset($name) + { + return $this->resource->__isset($name); + } + + public function __set($name, $value) + { + return $this->resource->__set($name, $value); + } + + public function __get($name) + { + return $this->resource->__get($name); + } + + public function __unset($name) + { + return $this->resource->__unset($name); + } + + /** + * Array Access Interface: Check whether an offset exists. + */ + public function offsetExists($offset): bool + { + return $this->resource->offsetExists($offset); + } + + /** + * Array Access Interface: perform get at using array syntax. + * + * @return mixed can return all value types + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->resource->offsetGet($offset); + } + + /** + * Array Access Interface: perform set at using array syntax. + */ + public function offsetSet($offset, $value): void + { + $this->resource->offsetSet($offset, $value); + } + + /** + * Array Access Interface: perform unset at using array syntax. + */ + public function offsetUnset($offset): void + { + $this->resource->offsetUnset($offset); + } +} diff --git a/src/Schema/TypeConverter.php b/src/Schema/TypeConverter.php index cc8f4382..744f840f 100644 --- a/src/Schema/TypeConverter.php +++ b/src/Schema/TypeConverter.php @@ -13,7 +13,7 @@ namespace ApiPlatform\SchemaGenerator\Schema; -use EasyRdf\Resource as RdfResource; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; final class TypeConverter { diff --git a/src/SchemaGeneratorConfiguration.php b/src/SchemaGeneratorConfiguration.php index 3195e7a1..8acb60c9 100644 --- a/src/SchemaGeneratorConfiguration.php +++ b/src/SchemaGeneratorConfiguration.php @@ -86,6 +86,9 @@ public function getConfigTreeBuilder(): TreeBuilder ->scalarNode('uri')->info('RDF vocabulary to use')->example('https://schema.org/version/latest/schemaorg-current-https.rdf')->end() ->scalarNode('format')->defaultNull()->info('RDF vocabulary format')->example('rdfxml')->end() ->booleanNode('allTypes')->defaultNull()->info('Generate all types for this vocabulary, even if an explicit configuration exists. If allTypes is enabled globally, it can be disabled for this particular vocabulary')->end() + ->booleanNode('nameAllFromLabels')->defaultFalse()->info('Make use of the label information when possible to define all entities names in this vocabulary?')->end() + ->scalarNode('language')->defaultNull()->info('The language to use, with this vocabulary, among the labels when used as entities names, e.g., en')->end() + ->scalarNode('namingConvention')->defaultNull()->info('The naming convention to use, with this vocabulary, when naming entities from their labels; the default value is camel case (possible values are "snake case" or "camel case"), classes have first charater in uppercase')->end() ->append($attributesNode()) ->end() ->end() @@ -173,6 +176,9 @@ public function getConfigTreeBuilder(): TreeBuilder ->scalarPrototype()->end() ->end() ->booleanNode('allTypes')->defaultFalse()->info('Generate all types, even if an explicit configuration exists')->end() + ->booleanNode('nameAllFromLabels')->defaultFalse()->info('Make use of the label information when possible to define all entities names?')->end() + ->scalarNode('language')->defaultNull()->info('The language to use among the labels when used as entities names, e.g., en')->end() + ->scalarNode('namingConvention')->defaultNull()->info('The naming convention to use when naming entities from their labels; the default value is camel case (possible values are "snake case" or "camel case"), classes have first charater in uppercase')->end() ->booleanNode('resolveTypes')->defaultFalse()->info('If a type is present in a vocabulary but not explicitly imported (types) or if the vocabulary is not totally imported (allTypes), it will be generated')->end() ->arrayNode('types') ->beforeNormalization() @@ -193,6 +199,9 @@ public function getConfigTreeBuilder(): TreeBuilder ->scalarNode('vocabularyNamespace')->defaultNull()->info('Namespace of the vocabulary of this type (defaults to the global "vocabularyNamespace" entry)')->example('http://www.w3.org/ns/activitystreams#')->end() ->booleanNode('abstract')->defaultNull()->info('Is the class abstract? (null to guess)')->end() ->booleanNode('embeddable')->defaultFalse()->info('Is the class embeddable?')->end() + ->booleanNode('nameFromLabel')->defaultFalse()->info('Make use of the label if possible to define this type entity name?')->end() + ->scalarNode('language')->defaultNull()->info('The language to use among the labels when used as entity name for the current type, e.g., en')->end() + ->scalarNode('namingConvention')->defaultNull()->info('The naming convention to use when naming entities from the labels related to the current type; the default value is camel case (possible values are "snake case" or "camel case"), classes have first charater in uppercase')->end() ->arrayNode('namespaces') ->addDefaultsIfNotSet() ->info('Type namespaces') diff --git a/src/SchemaGeneratorConfigurationHolder.php b/src/SchemaGeneratorConfigurationHolder.php new file mode 100644 index 00000000..ea7b3f93 --- /dev/null +++ b/src/SchemaGeneratorConfigurationHolder.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace ApiPlatform\SchemaGenerator; + +/** + * Holder of static configuration for the current run of Schema Generator. + * + * @author d3fk::Angatar + */ +class SchemaGeneratorConfigurationHolder +{ + public static array $config = []; + + /** + * Sets the static configuration. + */ + public static function set(array $config): void + { + self::$config = $config; + } + + /** + * Gets the static configuration set. + */ + public static function get(): array + { + return self::$config; + } + + /** + * Returns true if the configuration was set and is ready to be used. + */ + public static function isReady(): bool + { + if (empty(self::$config)) { + return false; + } + + return true; + } + + /** + * Flushes any stored configuration. + */ + public static function reset(): void + { + self::$config = []; + } +} diff --git a/src/TypesGenerator.php b/src/TypesGenerator.php index 7547dc47..96fabf63 100644 --- a/src/TypesGenerator.php +++ b/src/TypesGenerator.php @@ -28,12 +28,13 @@ use ApiPlatform\SchemaGenerator\Schema\Model\Property as SchemaProperty; use ApiPlatform\SchemaGenerator\Schema\PropertyGenerator\IdPropertyGenerator; use ApiPlatform\SchemaGenerator\Schema\PropertyGenerator\PropertyGenerator; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\Schema\TypeConverter; +use ApiPlatform\SchemaGenerator\SchemaGeneratorConfigurationHolder as Config; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use EasyRdf\Graph as RdfGraph; use EasyRdf\RdfNamespace; -use EasyRdf\Resource as RdfResource; use Psr\Log\LoggerAwareTrait; use Psr\Log\LoggerInterface; use Symfony\Component\String\Inflector\InflectorInterface; @@ -108,6 +109,10 @@ public function generate(array $graphs, array $config): array throw new \InvalidArgumentException('At least one graph must be injected.'); } + // From here, we also make the config easily accessible as a static + // information in a dedicated holder class. + Config::set($config); + [$typeNamesToGenerate, $types] = $this->defineTypesToGenerate($graphs, $config); $classes = []; @@ -452,7 +457,8 @@ private function defineTypesToGenerate(array $graphs, array $config): array } $typeName = $this->phpTypeConverter->escapeIdentifier($type->localName()); - if (!($config['types'][$typeName]['exclude'] ?? false)) { + $typeId = $type->localId(); + if (!($config['types'][$typeId]['exclude'] ?? false)) { if ($config['resolveTypes'] || $vocabAllTypes) { $allTypes[$typeName] = $type; } @@ -464,7 +470,7 @@ private function defineTypesToGenerate(array $graphs, array $config): array } } - foreach ($config['types'] as $typeName => $typeConfig) { + foreach ($config['types'] as $typeId => $typeConfig) { if ($typeConfig['exclude']) { continue; } @@ -474,20 +480,21 @@ private function defineTypesToGenerate(array $graphs, array $config): array foreach ($graphs as $graph) { $resources = $graph->resources(); - $typeIri = $vocabularyNamespace.$typeName; + $typeIri = $vocabularyNamespace.$typeId; if (isset($resources[$typeIri])) { $resource = $graph->resource($typeIri); break; } } - $typeName = $this->phpTypeConverter->escapeIdentifier($typeName); if ($resource) { + $typeName = $this->phpTypeConverter->escapeIdentifier($resource->localName()); $allTypes[$typeName] = $resource; if (!\in_array($typeName, $typeNamesToGenerate, true)) { $typeNamesToGenerate[] = $typeName; } } else { + $typeName = $this->phpTypeConverter->escapeIdentifier($typeId); $this->logger ? $this->logger->warning('Type "{typeName}" cannot be found. Using "{guessFrom}" type to generate entity.', ['typeName' => $typeName, 'guessFrom' => $typeConfig['guessFrom']]) : null; if (isset($graph)) { $type = $graph->resource($vocabularyNamespace.$typeConfig['guessFrom']); diff --git a/tests/AnnotationGenerator/PhpDocAnnotationGeneratorTest.php b/tests/AnnotationGenerator/PhpDocAnnotationGeneratorTest.php index 85545a24..10c7b39b 100644 --- a/tests/AnnotationGenerator/PhpDocAnnotationGeneratorTest.php +++ b/tests/AnnotationGenerator/PhpDocAnnotationGeneratorTest.php @@ -22,9 +22,9 @@ use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property as SchemaProperty; use ApiPlatform\SchemaGenerator\Schema\Model\Type\PrimitiveType as SchemaPrimitiveType; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\String\Inflector\EnglishInflector; diff --git a/tests/AttributeGenerator/ApiPlatformCoreAttributeGeneratorTest.php b/tests/AttributeGenerator/ApiPlatformCoreAttributeGeneratorTest.php index c2a4e637..385a0a93 100644 --- a/tests/AttributeGenerator/ApiPlatformCoreAttributeGeneratorTest.php +++ b/tests/AttributeGenerator/ApiPlatformCoreAttributeGeneratorTest.php @@ -29,9 +29,9 @@ use ApiPlatform\SchemaGenerator\PhpTypeConverter; use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\TypesGenerator; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use Nette\PhpGenerator\Literal; use PHPUnit\Framework\TestCase; use Symfony\Component\String\Inflector\EnglishInflector; diff --git a/tests/AttributeGenerator/ConfigurationAttributeGeneratorTest.php b/tests/AttributeGenerator/ConfigurationAttributeGeneratorTest.php index 1eb03797..4c70f6d7 100644 --- a/tests/AttributeGenerator/ConfigurationAttributeGeneratorTest.php +++ b/tests/AttributeGenerator/ConfigurationAttributeGeneratorTest.php @@ -19,9 +19,9 @@ use ApiPlatform\SchemaGenerator\PhpTypeConverter; use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use PHPUnit\Framework\TestCase; use Symfony\Component\String\Inflector\EnglishInflector; diff --git a/tests/AttributeGenerator/ConstraintAttributeGeneratorTest.php b/tests/AttributeGenerator/ConstraintAttributeGeneratorTest.php index 9f4d2e6f..ca1a3c21 100644 --- a/tests/AttributeGenerator/ConstraintAttributeGeneratorTest.php +++ b/tests/AttributeGenerator/ConstraintAttributeGeneratorTest.php @@ -21,9 +21,9 @@ use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property; use ApiPlatform\SchemaGenerator\Schema\Model\Type\PrimitiveType as SchemaPrimitiveType; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\TypesGenerator; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use Nette\PhpGenerator\Literal; use PHPUnit\Framework\TestCase; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; diff --git a/tests/AttributeGenerator/DoctrineMongoDBAttributeGeneratorTest.php b/tests/AttributeGenerator/DoctrineMongoDBAttributeGeneratorTest.php index 42dcc0e9..c5aaa131 100644 --- a/tests/AttributeGenerator/DoctrineMongoDBAttributeGeneratorTest.php +++ b/tests/AttributeGenerator/DoctrineMongoDBAttributeGeneratorTest.php @@ -21,10 +21,10 @@ use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property; use ApiPlatform\SchemaGenerator\Schema\Model\Type\PrimitiveType as SchemaPrimitiveType; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; use ApiPlatform\SchemaGenerator\TypesGenerator; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use Nette\PhpGenerator\Literal; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Processor; diff --git a/tests/AttributeGenerator/DoctrineOrmAssociationOverrideAttributeGeneratorTest.php b/tests/AttributeGenerator/DoctrineOrmAssociationOverrideAttributeGeneratorTest.php index 072cc266..2cb50353 100644 --- a/tests/AttributeGenerator/DoctrineOrmAssociationOverrideAttributeGeneratorTest.php +++ b/tests/AttributeGenerator/DoctrineOrmAssociationOverrideAttributeGeneratorTest.php @@ -18,9 +18,9 @@ use ApiPlatform\SchemaGenerator\PhpTypeConverter; use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use Nette\PhpGenerator\Literal; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Processor; diff --git a/tests/AttributeGenerator/DoctrineOrmAttributeGeneratorTest.php b/tests/AttributeGenerator/DoctrineOrmAttributeGeneratorTest.php index a8a11942..2abdb1fe 100644 --- a/tests/AttributeGenerator/DoctrineOrmAttributeGeneratorTest.php +++ b/tests/AttributeGenerator/DoctrineOrmAttributeGeneratorTest.php @@ -21,10 +21,10 @@ use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property; use ApiPlatform\SchemaGenerator\Schema\Model\Type\PrimitiveType as SchemaPrimitiveType; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; use ApiPlatform\SchemaGenerator\TypesGenerator; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use Nette\PhpGenerator\Literal; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Processor; diff --git a/tests/ClassMutator/ClassParentMutatorTest.php b/tests/ClassMutator/ClassParentMutatorTest.php index 2d12ab7f..8bce0f48 100644 --- a/tests/ClassMutator/ClassParentMutatorTest.php +++ b/tests/ClassMutator/ClassParentMutatorTest.php @@ -17,9 +17,9 @@ use ApiPlatform\SchemaGenerator\Model\Use_; use ApiPlatform\SchemaGenerator\PhpTypeConverter; use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; diff --git a/tests/ClassMutator/ClassPropertiesAppenderTest.php b/tests/ClassMutator/ClassPropertiesAppenderTest.php index 8cbe5003..aa514fe6 100644 --- a/tests/ClassMutator/ClassPropertiesAppenderTest.php +++ b/tests/ClassMutator/ClassPropertiesAppenderTest.php @@ -21,10 +21,10 @@ use ApiPlatform\SchemaGenerator\Schema\Model\Property; use ApiPlatform\SchemaGenerator\Schema\Model\Type\PrimitiveType as SchemaPrimitiveType; use ApiPlatform\SchemaGenerator\Schema\PropertyGenerator\PropertyGenerator as SchemaPropertyGenerator; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\Schema\TypeConverter; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; diff --git a/tests/Command/DumpConfigurationTest.php b/tests/Command/DumpConfigurationTest.php index feec7860..26a0ca2e 100644 --- a/tests/Command/DumpConfigurationTest.php +++ b/tests/Command/DumpConfigurationTest.php @@ -46,6 +46,15 @@ public function testDumpConfiguration(): void # Generate all types for this vocabulary, even if an explicit configuration exists. If allTypes is enabled globally, it can be disabled for this particular vocabulary allTypes: null + # Make use of the label information when possible to define all entities names in this vocabulary? + nameAllFromLabels: false + + # The language to use, with this vocabulary, among the labels when used as entities names, e.g., en + language: null + + # The naming convention to use, with this vocabulary, when naming entities from their labels; the default value is camel case (possible values are "snake case" or "camel case"), classes have first charater in uppercase + namingConvention: null + # Attributes (merged with generated attributes) attributes: [] @@ -164,6 +173,15 @@ interface: App\Model # Example: App\Model # Generate all types, even if an explicit configuration exists allTypes: false + # Make use of the label information when possible to define all entities names? + nameAllFromLabels: false + + # The language to use among the labels when used as entities names, e.g., en + language: null + + # The naming convention to use when naming entities from their labels; the default value is camel case (possible values are "snake case" or "camel case"), classes have first charater in uppercase + namingConvention: null + # If a type is present in a vocabulary but not explicitly imported (types) or if the vocabulary is not totally imported (allTypes), it will be generated resolveTypes: false @@ -185,6 +203,15 @@ interface: App\Model # Example: App\Model # Is the class embeddable? embeddable: false + # Make use of the label if possible to define this type entity name? + nameFromLabel: false + + # The language to use among the labels when used as entity name for the current type, e.g., en + language: null + + # The naming convention to use when naming entities from the labels related to the current type; the default value is camel case (possible values are "snake case" or "camel case"), classes have first charater in uppercase + namingConvention: null + # Type namespaces namespaces: diff --git a/tests/Schema/Model/ClassTest.php b/tests/Schema/Model/ClassTest.php index 1cbcb963..c26b4a03 100644 --- a/tests/Schema/Model/ClassTest.php +++ b/tests/Schema/Model/ClassTest.php @@ -17,9 +17,9 @@ use ApiPlatform\SchemaGenerator\Model\Use_; use ApiPlatform\SchemaGenerator\Schema\Model\Class_ as SchemaClass; use ApiPlatform\SchemaGenerator\Schema\Model\Property as SchemaProperty; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; -use EasyRdf\Graph as RdfGraph; -use EasyRdf\Resource as RdfResource; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\String\Inflector\EnglishInflector; diff --git a/tests/Schema/Rdf/RdfGraphTest.php b/tests/Schema/Rdf/RdfGraphTest.php new file mode 100644 index 00000000..2596425c --- /dev/null +++ b/tests/Schema/Rdf/RdfGraphTest.php @@ -0,0 +1,197 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace ApiPlatform\SchemaGenerator\Tests\Schema\Rdf; + +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; +use EasyRdf\Graph as EasyRdfGraph; +use PHPUnit\Framework\TestCase; + +/** + * @author d3fk::Angatar + */ +class RdfGraphTest extends TestCase +{ + private static array $testvalues; + private RdfGraph $graph; + + public static function setUpBeforeClass(): void + { + self::$testvalues = [ + 'graphUri' => 'https://raw.githubusercontent.com/w3c/dxwg/gh-pages/dcat/rdf/dcat3.rdf', + 'graphFormat' => 'rdfxml', + 'vocabularyNamespace' => 'http://www.w3.org/ns/dcat#', + 'resourceUri' => 'http://www.w3.org/ns/dcat#DataService', + 'resourceType' => 'owl:Class', + 'property' => 'rdfs:range', + 'newBnodeType' => 'foaf:Project', + 'newResourcePropertyName' => 'rdf:test', + ]; + } + + protected function setUp(): void + { + $this->graph = new RdfGraph(self::$testvalues['graphUri']); + } + + public function testResource(): void + { + $resource = $this->graph->resource(self::$testvalues['resourceUri'], [self::$testvalues['resourceType']]); + $this->assertInstanceOf(RdfResource::class, $resource); + } + + public function testNewBnode(): void + { + $bnode = $this->graph->newBnode(self::$testvalues['newBnodeType']); + $this->assertInstanceOf(RdfResource::class, $bnode); + } + + public function testGet(): void + { + $bnode = $this->graph->newBnode(self::$testvalues['newBnodeType']); + $this->graph->addResource(self::$testvalues['resourceUri'], self::$testvalues['newResourcePropertyName'], $bnode); + $resource = $this->graph->get(self::$testvalues['resourceUri'], self::$testvalues['newResourcePropertyName'], 'resource'); + $this->assertInstanceOf(RdfResource::class, $resource); + } + + public function testGetResource(): void + { + $bnode = $this->graph->newBnode(self::$testvalues['newBnodeType']); + $this->graph->addResource(self::$testvalues['resourceUri'], self::$testvalues['newResourcePropertyName'], $bnode); + $resource = $this->graph->getResource(self::$testvalues['resourceUri'], self::$testvalues['newResourcePropertyName']); + $this->assertInstanceOf(RdfResource::class, $resource); + } + + public function testTypeAsResource(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $resource = $this->graph->typeAsResource(self::$testvalues['resourceUri']); + $this->assertInstanceOf(RdfResource::class, $resource); + } + + public function testPrimaryTopic(): void + { + $bnode = $this->graph->newBnode(self::$testvalues['newBnodeType']); + $this->graph->addResource(self::$testvalues['resourceUri'], 'foaf:primaryTopic', $bnode); + $resource = $this->graph->primaryTopic(self::$testvalues['resourceUri']); + $this->assertInstanceOf(RdfResource::class, $resource); + } + + public function testAll(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $resources = $this->graph->all(self::$testvalues['resourceType'], '^rdf:type'); + $this->assertNotEmpty($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function testAllOfType(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $resources = $this->graph->allOfType(self::$testvalues['resourceType']); + $this->assertNotEmpty($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function tetAllForSingleProperty(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $resources = $this->graph->allForSingleProperty(self::$testvalues['resourceType'], '^rdf:type'); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function testTypesAsResources(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $resources = $this->graph->typesAsResources(self::$testvalues['resourceUri']); + $this->assertNotEmpty($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function testResources(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $resources = $this->graph->resources(); + $this->assertNotEmpty($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function testResourcesMatching(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $resources = $this->graph->resourcesMatching(self::$testvalues['property']); + $this->assertNotEmpty($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function testAllResources(): void + { + $this->graph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $this->graph->addResource(self::$testvalues['resourceUri'], self::$testvalues['newResourcePropertyName'], 'http://example.com/thing'); + $this->graph->addResource(self::$testvalues['resourceUri'], self::$testvalues['newResourcePropertyName'], '_:bnode1'); + $resources = $this->graph->allResources(self::$testvalues['resourceUri'], self::$testvalues['newResourcePropertyName']); + $this->assertNotEmpty($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function testFromEasyRdf(): void + { + $easyRdfGraph = new EasyRdfGraph(self::$testvalues['graphUri']); + $easyRdfGraph->load(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $rdfGraph = RdfGraph::fromEasyRdf($easyRdfGraph); + $this->assertInstanceOf(RdfGraph::class, $rdfGraph); + $this->assertEquals($easyRdfGraph->serialise('rdfxml'), $rdfGraph->serialise('rdfxml')); + } + + public function testEnsureGraphClass(): void + { + $rdfGraph = new EasyRdfGraph(self::$testvalues['graphUri']); + RdfGraph::ensureGraphClass($rdfGraph); + $this->assertInstanceOf(RdfGraph::class, $rdfGraph); + } + + public function testEnsureGraphsClass(): void + { + $graphs = []; + $rdfGraph = new EasyRdfGraph(self::$testvalues['graphUri']); + $graphs[] = $rdfGraph; + $graphs[] = $rdfGraph; + $graphs[] = $this->graph; + + RdfGraph::ensureGraphsClass($graphs); + foreach ($graphs as $graph) { + $this->assertInstanceOf(RdfGraph::class, $graph); + } + } + + public function testNewAndLoad(): void + { + $newLoadedGraph = RdfGraph::newAndLoad(self::$testvalues['graphUri'], self::$testvalues['graphFormat']); + $this->assertInstanceOf(RdfGraph::class, $newLoadedGraph); + } +} diff --git a/tests/Schema/Rdf/RdfResourceTest.php b/tests/Schema/Rdf/RdfResourceTest.php new file mode 100644 index 00000000..204efb0d --- /dev/null +++ b/tests/Schema/Rdf/RdfResourceTest.php @@ -0,0 +1,466 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace ApiPlatform\SchemaGenerator\Tests\Schema\Rdf; + +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfResource; +use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; +use ApiPlatform\SchemaGenerator\SchemaGeneratorConfigurationHolder as Config; +use EasyRdf\Graph as EasyRdfGraph; +use EasyRdf\RdfNamespace; +use EasyRdf\Resource as EasyRdfResource; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Processor; + +use function Symfony\Component\String\u; + +/** + * @author d3fk::Angatar + */ +class RdfResourceTest extends TestCase +{ + private static array $testGroups; + private static Processor $processor; + + public static function setUpBeforeClass(): void + { + self::$processor = new Processor(); + $testGroups = [ + [ + 'graphUri' => 'https://ontobee.org/ontology/rdf/NCIT?iri=http://purl.obolibrary.org/obo/NCIT_C94196', + 'graphFormat' => 'rdfxml', + 'resourceUri' => 'http://purl.obolibrary.org/obo/NCIT_C94196', + 'vocabularyNamespace' => 'http://purl.obolibrary.org/obo/', + 'label' => 'Virus-neutralizing Antibody', + 'id' => 'NCIT_C94196', + 'spanishLabel' => 'Virus-neutralizing Antibody', + ], + [ + 'graphUri' => 'https://raw.githubusercontent.com/w3c/dxwg/gh-pages/dcat/rdf/dcat3.rdf', + 'graphFormat' => 'rdfxml', + 'resourceUri' => 'http://www.w3.org/ns/dcat#DataService', + 'vocabularyNamespace' => 'http://www.w3.org/ns/dcat#', + 'label' => 'Data service', + 'id' => 'DataService', + 'spanishLabel' => 'Servicio de datos', + ], + [ + 'graphUri' => 'http://www.wikidata.org/entity/Q115634351.rdf', + 'graphFormat' => 'rdfxml', + 'resourceUri' => 'http://www.wikidata.org/entity/Q115634351', + 'vocabularyNamespace' => 'http://www.wikidata.org/entity/', + 'label' => 'laboratory freezer', + 'id' => 'Q115634351', + 'spanishLabel' => 'congelador de laboratorio', + ], + ]; + + // set namespaces to work with wikidata + RdfNamespace::set('wikibase', 'http://wikiba.se/ontology#'); + RdfNamespace::set('wd', 'http://www.wikidata.org/entity/'); + + foreach ($testGroups as &$testValues) { + $testValues['snakeLabel'] = u($testValues['label'])->snake()->__toString(); + $testValues['camelLabel'] = u($testValues['label'])->camel()->__toString(); + $testValues['snakeClassLabel'] = ucfirst($testValues['snakeLabel']); + $testValues['camelClassLabel'] = ucfirst($testValues['camelLabel']); + $testValues['snakeSpanishLabel'] = u($testValues['spanishLabel'])->snake()->__toString(); + $testValues['camelSpanishLabel'] = u($testValues['spanishLabel'])->camel()->__toString(); + $testValues['snakeSpanishClassLabel'] = ucfirst($testValues['snakeSpanishLabel']); + + $testValues['graph'] = RdfGraph::newAndLoad($testValues['graphUri'], $testValues['graphFormat']); + } + + self::$testGroups = $testGroups; + } + + protected function setUp(): void + { + Config::reset(); + } + + public function testLocalNameWithConfig(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getSingleTypeRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['snakeClassLabel'], $resource->localName()); + + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourceGeneralNamingConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['camelClassLabel'], $resource->localName()); + + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['snakeClassLabel'], $resource->localName()); + + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourcePreferedLanguageConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['snakeSpanishClassLabel'], $resource->localName()); + + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['id'], $resource->localName()); + + // no config reset occured Config::$config is still set + $resource = new RdfResource($testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['id'], $resource->localName()); + + $resource = new RdfResource($testValues['resourceUri']); + $this->assertEquals($testValues['id'], $resource->localName()); + } + } + + public function testLocalNameWithoutConfig(): void + { + foreach (self::$testGroups as $testValues) { + $resource = new RdfResource($testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['id'], $resource->localName()); + + $resource = new RdfResource($testValues['resourceUri']); + $this->assertEquals($testValues['id'], $resource->localName()); + } + } + + public function testLocalNameConfigOvewrittenBySetters() + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['id'], $resource->localName()); + $resource->setResourceName('test'); + $this->assertEquals('test', $resource->localName()); + $resource->setResourceName(null); + $this->assertEquals($testValues['id'], $resource->localName()); + $resource->setResourceName(null); + $resource->setUseLabel(true); + $resource->updateResourceName(); + $this->assertEquals($testValues['camelClassLabel'], $resource->localName()); + $resource->setNamingConvention('snake case'); + $resource->updateResourceName(); + $this->assertEquals($testValues['snakeClassLabel'], $resource->localName()); + $resource->setResourceLanguage('es'); + $resource->updateResourceName(); + $this->assertEquals($testValues['snakeSpanishClassLabel'], $resource->localName()); + $resource->setResourceLanguage('en'); + $resource->updateResourceName(); + $this->assertEquals($testValues['snakeClassLabel'], $resource->localName()); + } + } + + public function testApplyNamingConfig(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resource->setUseLabel(true); + $resource->applyNamingConfig(); + $this->assertFalse($resource->getUseLabel()); + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertTrue($resource->getUseLabel()); + $resource->setUseLabel(false); + $resource->applyNamingConfig(); + $this->assertTrue($resource->getUseLabel()); + } + } + + public function testSetResourceName(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resource->setResourceName('test'); + $this->assertEquals('test', $resource->getResourceName()); + } + } + + public function testUpdateResourceName(): void + { + foreach (self::$testGroups as $testValues) { + $resource = new RdfResource($testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['id'], $resource->localName()); + $resource->setUseLabel(true); + $resource->updateResourceName(); + $this->assertEquals($testValues['camelClassLabel'], $resource->getResourceName()); + } + } + + public function testResetResourceNamingBehavior(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + + $resource->resetResourceNamingBehavior(); + $this->assertNull($resource->getResourceName()); + + $resource->updateResourceName(); + $this->assertEquals($testValues['id'], $resource->localName()); + } + } + + public function testLocalId(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $this->assertEquals($testValues['id'], $resource->localId()); + } + } + + public function testLabelAsName(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resourceMethod = self::getMethod('labelAsName'); + $this->assertEquals($testValues['camelLabel'], $resourceMethod->invokeArgs($resource, ['', ''])); + $this->assertEquals($testValues['snakeLabel'], $resourceMethod->invokeArgs($resource, ['en', 'snake case'])); + $this->assertEquals($testValues['camelSpanishLabel'], $resourceMethod->invokeArgs($resource, ['es', 'camel case'])); + } + } + + public function testGetGraph(): void + { + foreach (self::$testGroups as $testValues) { + $resource = new RdfResource($testValues['resourceUri']); + $this->assertNull($resource->getGraph()); + $resource = new RdfResource($testValues['resourceUri'], $testValues['graph']); + $this->assertInstanceOf(RdfGraph::class, $resource->getGraph()); + $resource = new RdfResource($testValues['resourceUri'], new EasyRdfGraph($testValues['graphUri'])); + $this->assertInstanceOf(RdfGraph::class, $resource->getGraph()); + } + } + + public function testAll(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getAllTypesRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resource->addResource('rdf:test', 'Simple Test1'); + $resource->addResource('rdf:test', 'Simple Test2'); + $prop = $testValues['graph']->resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#test'); + $all = $resource->all($prop); + $this->assertNotEmpty($all); + foreach ($all as $propResource) { + $this->assertInstanceOf(RdfResource::class, $propResource); + } + } + } + + public function testAllResources(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resource->addResource('rdf:test', 'Resource Test'); + $resources = $resource->allResources('rdf:test'); + $this->assertNotEmpty($resources); + foreach ($resources as $relatedResource) { + $this->assertInstanceOf(RdfResource::class, $relatedResource); + } + } + } + + public function testTypesAsResources(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resources = $resource->typesAsResources(); + $this->assertNotEmpty($resources); + foreach ($resources as $typeResource) { + $this->assertInstanceOf(RdfResource::class, $typeResource); + } + } + } + + public function testTypeAsResource(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $typeResource = $resource->typeAsResource(); + $this->assertNotNull($typeResource); + $this->assertInstanceOf(RdfResource::class, $typeResource); + } + } + + public function testGet(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resource->addResource('rdf:test', 'Testing get function'); + $prop = $testValues['graph']->resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#test'); + $getPropertyResource = $resource->get($prop); + $this->assertNotNull($getPropertyResource); + $this->assertInstanceOf(RdfResource::class, $getPropertyResource); + } + } + + public function testGetResource(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resource->addResource('rdf:test', 'Testing getRersource function'); + $prop = $testValues['graph']->resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#test'); + $getPropertyResource = $resource->getResource($prop); + $this->assertNotNull($getPropertyResource); + $this->assertInstanceOf(RdfResource::class, $getPropertyResource); + } + } + + public function testPrimaryTopic(): void + { + foreach (self::$testGroups as $testValues) { + $resource = $this->createConfiguredRdfResource($this->getDefaultRdfResourceConfig($testValues), $testValues['resourceUri'], $testValues['graph']); + $resource->addResource('foaf:primaryTopic', 'Testing Resource primary Topic'); + $primaryTopic = $resource->primaryTopic(); + $this->assertInstanceOf(RdfResource::class, $primaryTopic); + } + } + + public function testFromEasyRdf(): void + { + foreach (self::$testGroups as $testValues) { + $easyRdfResource = new EasyRdfResource($testValues['resourceUri']); + $rdfResource = RdfResource::fromEasyRdf($easyRdfResource); + $this->assertInstanceOf(RdfResource::class, $rdfResource); + } + } + + public function testFromEasyRdfWithGraph(): void + { + foreach (self::$testGroups as $testValues) { + $easyRdfResource = new EasyRdfResource($testValues['resourceUri'], $testValues['graph']->getEasyGraph()); + $rdfResource = RdfResource::fromEasyRdf($easyRdfResource); + $this->assertInstanceOf(RdfResource::class, $rdfResource); + } + } + + public function testEnsureResourceClass(): void + { + foreach (self::$testGroups as $testValues) { + $rdfResourceToCast = new EasyRdfResource($testValues['resourceUri'], $testValues['graph']->getEasyGraph()); + RdfResource::ensureResourceClass($rdfResourceToCast); + $this->assertInstanceOf(RdfResource::class, $rdfResourceToCast); + } + } + + public function testEnsureResourcesClass(): void + { + $resources = []; + $easyRdfResource = new EasyRdfResource(self::$testGroups[0]['resourceUri'], self::$testGroups[0]['graph']->getEasyGraph()); + $resources[] = $easyRdfResource; + $resources[] = $easyRdfResource; + $resources[] = new RdfResource(self::$testGroups[0]['resourceUri'], self::$testGroups[0]['graph']); + + RdfResource::ensureResourcesClass($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + public function testWrapEasyRdfResource(): void + { + $resourceToDecorate = new EasyRdfResource(self::$testGroups[0]['resourceUri'], self::$testGroups[0]['graph']->getEasyGraph()); + $decoratedResource = RdfResource::wrapEasyRdfResource($resourceToDecorate); + $this->assertInstanceOf(RdfResource::class, $decoratedResource); + } + + public function testWrapEasyRdfResources(): void + { + $resources = []; + $easyRdfResource = new EasyRdfResource(self::$testGroups[0]['resourceUri'], self::$testGroups[0]['graph']->getEasyGraph()); + $resources[] = $easyRdfResource; + $resources[] = $easyRdfResource; + $resources[] = new RdfResource(self::$testGroups[0]['resourceUri'], self::$testGroups[0]['graph']); + + $resources = RdfResource::wrapEasyRdfResources($resources); + foreach ($resources as $resource) { + $this->assertInstanceOf(RdfResource::class, $resource); + } + } + + private function processConfiguration(array $config): array + { + return self::$processor->processConfiguration(new SchemaGeneratorConfiguration(), [$config]); + } + + private function setResourceConfiguration(array $processedConfiguration): void + { + Config::set($processedConfiguration); + } + + private function createConfiguredRdfResource(array $config, string $resouceUri, RdfGraph $graph): RdfResource + { + $processedConfiguration = $this->processConfiguration($config); + $this->setResourceConfiguration($processedConfiguration); + + return new RdfResource($resouceUri, $graph); + } + + private function getSingleTypeRdfResourceConfig(array $testValues): array + { + return [ + 'vocabularies' => [ + ['uri' => $testValues['graphUri'], 'allTypes' => false], + ], + 'types' => [ + $testValues['id'] => [ + 'nameFromLabel' => true, + 'namingConvention' => 'snake case', + 'vocabularyNamespace' => $testValues['vocabularyNamespace'], + ], + ], + ]; + } + + private function getAllTypesRdfResourceGeneralNamingConfig(array $testValues): array + { + return [ + 'vocabularies' => [ + ['uri' => $testValues['graphUri'], 'allTypes' => true], + ], + 'nameAllFromLabels' => true, + 'namingConvention' => 'camel case', + ]; + } + + private function getAllTypesRdfResourceConfig(array $testValues): array + { + return [ + 'vocabularies' => [ + ['uri' => $testValues['graphUri'], 'allTypes' => true, 'nameAllFromLabels' => true, 'namingConvention' => 'snake case'], + ], + ]; + } + + private function getAllTypesRdfResourcePreferedLanguageConfig(array $testValues): array + { + return [ + 'vocabularies' => [ + ['uri' => $testValues['graphUri'], 'allTypes' => true, 'nameAllFromLabels' => true, 'namingConvention' => 'snake case', 'language' => 'es'], + ], + ]; + } + + private function getDefaultRdfResourceConfig(array $testValues): array + { + return [ + 'vocabularies' => [ + ['uri' => $testValues['graphUri']], + ], + ]; + } + + /** + * Get private/protected method from a class for testing. + * + * @param string $name method name + */ + protected static function getMethod($name): \ReflectionMethod + { + $class = new \ReflectionClass(RdfResource::class); + $method = $class->getMethod($name); + $method->setAccessible(true); + + return $method; + } +} diff --git a/tests/TypesGeneratorTest.php b/tests/TypesGeneratorTest.php index beb07316..c199bfe5 100644 --- a/tests/TypesGeneratorTest.php +++ b/tests/TypesGeneratorTest.php @@ -18,9 +18,9 @@ use ApiPlatform\SchemaGenerator\GoodRelationsBridge; use ApiPlatform\SchemaGenerator\PhpTypeConverter; use ApiPlatform\SchemaGenerator\Printer; +use ApiPlatform\SchemaGenerator\Schema\Rdf\RdfGraph; use ApiPlatform\SchemaGenerator\SchemaGeneratorConfiguration; use ApiPlatform\SchemaGenerator\TypesGenerator; -use EasyRdf\Graph as RdfGraph; use EasyRdf\RdfNamespace; use PHPUnit\Framework\TestCase; use Prophecy\Argument;