From 0531264072b93a5139fecd762472a87cbec9244c Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Tue, 6 Aug 2024 21:30:53 +0200 Subject: [PATCH 1/9] #112 add Attribut OpenApi --- composer.json | 3 +- composer.lock | 199 +++++++++++++++++- .../Commands/CreateApiCommand.php | 40 +++- 3 files changed, 232 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index e05d5e0..2ac85e3 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "ext-pdo": "*", "symfony/yaml": "6.3.*", "symfony/console": "6.3.*", - "nette/php-generator": "^4.1@dev" + "nette/php-generator": "^4.1@dev", + "zircote/swagger-php": "^4.0@dev" } , "require-dev": { diff --git a/composer.lock b/composer.lock index de1095d..bc6b7bc 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": "1096fdd109424883860924610fef80fb", + "content-hash": "ec3f7bc17ec722b03a3bb4263c2ec7d2", "packages": [ { "name": "graham-campbell/result-type", @@ -406,6 +406,57 @@ }, "time": "2023-09-22T11:11:30+00:00" }, + { + "name": "psr/log", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, { "name": "symfony/console", "version": "6.3.x-dev", @@ -564,6 +615,70 @@ ], "time": "2024-04-18T09:32:20+00:00" }, + { + "name": "symfony/finder", + "version": "7.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "0f7f413c4b46ff3312500439fb250cb63e89cf78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/0f7f413c4b46ff3312500439fb250cb63e89cf78", + "reference": "0f7f413c4b46ff3312500439fb250cb63e89cf78", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/7.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-25T06:25:26+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "1.x-dev", @@ -1373,6 +1488,88 @@ } ], "time": "2023-11-12T22:52:03+00:00" + }, + { + "name": "zircote/swagger-php", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/zircote/swagger-php.git", + "reference": "e462ff5269ea0ec91070edd5d51dc7215bdea3b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/e462ff5269ea0ec91070edd5d51dc7215bdea3b6", + "reference": "e462ff5269ea0ec91070edd5d51dc7215bdea3b6", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.2", + "psr/log": "^1.1 || ^2.0 || ^3.0", + "symfony/deprecation-contracts": "^2 || ^3", + "symfony/finder": ">=2.2", + "symfony/yaml": ">=3.3" + }, + "require-dev": { + "composer/package-versions-deprecated": "^1.11", + "doctrine/annotations": "^1.7 || ^2.0", + "friendsofphp/php-cs-fixer": "^2.17 || ^3.47.1", + "phpstan/phpstan": "^1.6", + "phpunit/phpunit": ">=8", + "vimeo/psalm": "^4.23" + }, + "suggest": { + "doctrine/annotations": "^1.7 || ^2.0" + }, + "default-branch": true, + "bin": [ + "bin/openapi" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "OpenApi\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Robert Allen", + "email": "zircote@gmail.com" + }, + { + "name": "Bob Fanger", + "email": "bfanger@gmail.com", + "homepage": "https://bfanger.nl" + }, + { + "name": "Martin Rademacher", + "email": "mano@radebatz.net", + "homepage": "https://radebatz.net" + } + ], + "description": "swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations", + "homepage": "https://github.com/zircote/swagger-php/", + "keywords": [ + "api", + "json", + "rest", + "service discovery" + ], + "support": { + "issues": "https://github.com/zircote/swagger-php/issues", + "source": "https://github.com/zircote/swagger-php/tree/4.10.6" + }, + "time": "2024-07-26T03:04:43+00:00" } ], "packages-dev": [ diff --git a/src/EduFramework/Commands/CreateApiCommand.php b/src/EduFramework/Commands/CreateApiCommand.php index a26f27d..08f2b08 100644 --- a/src/EduFramework/Commands/CreateApiCommand.php +++ b/src/EduFramework/Commands/CreateApiCommand.php @@ -11,6 +11,7 @@ namespace Studoo\EduFramework\Commands; use Nette\PhpGenerator\PhpFile; +use PhpParser\Node\Expr\Array_; use Studoo\EduFramework\Commands\Exception\ControllerAlreadyExistsException; use Studoo\EduFramework\Commands\Exception\RouteAlreadyExistsException; use Studoo\EduFramework\Core\Controller\ControllerInterface; @@ -69,9 +70,11 @@ public function execute(InputInterface $input, OutputInterface $output): int //Format controller-name arg $namesCollection = $this->getNamesCollection($input->getArgument('controller-name')); //Generate route params in app/Config/routes.yaml - $this->generateRoute($namesCollection["uri"], $namesCollection["uri"], $namesCollection["className"]); + $router = $this->generateRoute($namesCollection["uri"], $namesCollection["uri"], $namesCollection["className"]); + // Generate openapi.php + $this->generateOpenApi(); //Generate Controller Class - $this->generateController($namesCollection["className"]); + $this->generateController($namesCollection["className"], $router); //Close command message $io->success("Controller successfully generated"); return Command::SUCCESS; @@ -106,10 +109,11 @@ private function getNamesCollection(string $arg): array /** * Fonction permettant de générer la classe PHP * @param string $className Nom de la classe + * @param array $router Route générée * @return void * @throws ControllerAlreadyExistsException */ - private function generateController(string $className): void + private function generateController(string $className, array $router): void { $filename = self::CONTROLLER_DIR . self::API_DIR . "$className.php"; @@ -127,12 +131,15 @@ private function generateController(string $className): void $namespace->addUse('Twig\Error\LoaderError'); $namespace->addUse('Twig\Error\RuntimeError'); $namespace->addUse('Twig\Error\SyntaxError'); + $namespace->addUse('OpenApi\Attributes'); //Generate ClassName $class = $namespace->addClass($className); //Add interface implementation $class->addImplement(ControllerInterface::class); //Create and design execute method $method = $class->addMethod('execute'); + $method->addAttribute('OpenApi\\Attributes\\Get', ['path' => $router['uri']]); + $method->addAttribute('OpenApi\\Attributes\\Response', ['response' => '200', 'description' => 'Mettre une description']); $method->setReturnType('string|null'); $method->addParameter('request')->setType('Studoo\EduFramework\Core\Controller\Request'); $method->setBody(<<<'CODE' @@ -153,13 +160,13 @@ private function generateController(string $className): void /** * Fonction permettant d'ajouter la route au fichier de configuration * Par défaut la méthode lors de la génération est GET - * @param string $name - * @param string $uri - * @param string $className - * @return void + * @param string $name Nom de la route + * @param string $uri URI de la route + * @param string $className Nom de la classe + * @return array $router Route générée * @throws RouteAlreadyExistsException */ - private function generateRoute(string $name, string $uri, string $className): void + private function generateRoute(string $name, string $uri, string $className): array { if (is_file(self::ROUTES_FILE_PATH) === false) { file_put_contents(self::ROUTES_FILE_PATH, ''); @@ -183,5 +190,22 @@ private function generateRoute(string $name, string $uri, string $className): vo ]; file_put_contents(self::ROUTES_FILE_PATH, Yaml::dump($router)); + + return $router[$indexName . $name]; + } + + private function generateOpenApi(): void + { + $filename = self::CONTROLLER_DIR . self::API_DIR . 'openapi.php'; + if (file_exists($filename) === true) { + return; + } + + $file = new PhpFile(); + $namespace = $file->addNamespace("Controller\api"); + $namespace->addUse('OpenApi\Attributes'); + $class = $namespace->addClass('openapi'); + $class->addAttribute('OpenApi\\Attributes\\Info', ['title' => 'My First API', 'version' => '0.1']); + file_put_contents($filename, $file); } } From 9dbcdc03fe96d448aa812004872037776365d2a4 Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Wed, 7 Aug 2024 13:34:47 +0200 Subject: [PATCH 2/9] #112 fix error update PHP 8.2 --- TaskFile.yaml | 2 +- composer.json | 2 +- composer.lock | 376 +++++++++++++++++++++++++++++++------------------- 3 files changed, 236 insertions(+), 144 deletions(-) diff --git a/TaskFile.yaml b/TaskFile.yaml index 0b26b8e..b645b71 100644 --- a/TaskFile.yaml +++ b/TaskFile.yaml @@ -38,7 +38,7 @@ vars: PHPUNIT: "php vendor/bin/phpunit" # # PHP QA TOOLS - PHPQA: jakzal/phpqa:php8.1-alpine + PHPQA: jakzal/phpqa:php8.2-alpine PHPQA_RUN: "{{.DOCKER_RUN}} --init -it --rm -v {{.PWD}}:/project -w /project {{.PHPQA}}" MYSQL_TESTING_RUN: "{{.DOCKER_RUN}} --init -it --rm -e MYSQL_ROOT_PASSWORD=studoo -e MYSQL_DATABASE=app_db -p 3309:3306 -d mysql:8.0 --name mysql-testing" diff --git a/composer.json b/composer.json index 2ac85e3..2d7e433 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.2", "vlucas/phpdotenv": "^v5.5", "twig/twig": "^3.7", "nikic/fast-route": "^1.3", diff --git a/composer.lock b/composer.lock index bc6b7bc..4a66c0c 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": "ec3f7bc17ec722b03a3bb4263c2ec7d2", + "content-hash": "37290ef989d18fa8d5ea092831fba702", "packages": [ { "name": "graham-campbell/result-type", @@ -12,20 +12,20 @@ "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "default-branch": true, "type": "library", @@ -55,7 +55,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -67,7 +67,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:16:48+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "nette/php-generator", @@ -75,17 +75,17 @@ "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "7a71f2f4e4d51e7b6d36232fb8f92b185cba152b" + "reference": "076795a95cfe05ccae798caedc9d5278f66ca709" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/7a71f2f4e4d51e7b6d36232fb8f92b185cba152b", - "reference": "7a71f2f4e4d51e7b6d36232fb8f92b185cba152b", + "url": "https://api.github.com/repos/nette/php-generator/zipball/076795a95cfe05ccae798caedc9d5278f66ca709", + "reference": "076795a95cfe05ccae798caedc9d5278f66ca709", "shasum": "" }, "require": { "nette/utils": "^3.2.9 || ^4.0", - "php": "8.0 - 8.3" + "php": "8.0 - 8.4" }, "require-dev": { "jetbrains/phpstorm-attributes": "dev-master", @@ -137,7 +137,7 @@ "issues": "https://github.com/nette/php-generator/issues", "source": "https://github.com/nette/php-generator/tree/master" }, - "time": "2024-05-16T21:20:27+00:00" + "time": "2024-06-18T20:57:59+00:00" }, { "name": "nette/utils", @@ -145,16 +145,16 @@ "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "d6a99617b62820837a1535c5508ac17ed7866640" + "reference": "c7c06ccd35a03d4590f1f3add554398a241b228f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/d6a99617b62820837a1535c5508ac17ed7866640", - "reference": "d6a99617b62820837a1535c5508ac17ed7866640", + "url": "https://api.github.com/repos/nette/utils/zipball/c7c06ccd35a03d4590f1f3add554398a241b228f", + "reference": "c7c06ccd35a03d4590f1f3add554398a241b228f", "shasum": "" }, "require": { - "php": ">=8.0 <8.4" + "php": "8.0 - 8.4" }, "conflict": { "nette/finder": "<3", @@ -224,7 +224,7 @@ "issues": "https://github.com/nette/utils/issues", "source": "https://github.com/nette/utils/tree/master" }, - "time": "2024-05-16T20:06:41+00:00" + "time": "2024-08-07T11:01:10+00:00" }, { "name": "nikic/fast-route", @@ -282,12 +282,12 @@ "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "416ca2ac2a84555b785a98002d613fe13d1d1c2f" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/416ca2ac2a84555b785a98002d613fe13d1d1c2f", - "reference": "416ca2ac2a84555b785a98002d613fe13d1d1c2f", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "default-branch": true, "type": "library", @@ -338,7 +338,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/master" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:52:20+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "psr/container", @@ -621,12 +621,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "0f7f413c4b46ff3312500439fb250cb63e89cf78" + "reference": "9a54be47a3813ace04e40e0903b651f3a52d952d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/0f7f413c4b46ff3312500439fb250cb63e89cf78", - "reference": "0f7f413c4b46ff3312500439fb250cb63e89cf78", + "url": "https://api.github.com/repos/symfony/finder/zipball/9a54be47a3813ace04e40e0903b651f3a52d952d", + "reference": "9a54be47a3813ace04e40e0903b651f3a52d952d", "shasum": "" }, "require": { @@ -677,7 +677,7 @@ "type": "tidelift" } ], - "time": "2024-07-25T06:25:26+00:00" + "time": "2024-08-06T10:13:52+00:00" }, { "name": "symfony/polyfill-ctype", @@ -741,7 +741,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/1.x" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -765,12 +765,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "0a1df740cbb01859ce1bac85b0ad58ffe02f69b6" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/0a1df740cbb01859ce1bac85b0ad58ffe02f69b6", - "reference": "0a1df740cbb01859ce1bac85b0ad58ffe02f69b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -820,7 +820,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/1.x" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -836,7 +836,7 @@ "type": "tidelift" } ], - "time": "2024-04-19T06:31:17+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -902,7 +902,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/1.x" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -926,12 +926,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "098e36a5b73de12beeb5ac17e80abf3696f7ad5f" + "reference": "8740a072b86292957feb42703edde77fcfca84fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/098e36a5b73de12beeb5ac17e80abf3696f7ad5f", - "reference": "098e36a5b73de12beeb5ac17e80abf3696f7ad5f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8740a072b86292957feb42703edde77fcfca84fb", + "reference": "8740a072b86292957feb42703edde77fcfca84fb", "shasum": "" }, "require": { @@ -999,7 +999,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-06-20T08:18:00+00:00" }, { "name": "symfony/polyfill-php80", @@ -1064,7 +1064,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/1.x" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { @@ -1082,6 +1082,83 @@ ], "time": "2024-05-31T15:07:36+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-19T12:30:46+00:00" + }, { "name": "symfony/service-contracts", "version": "dev-main", @@ -1172,12 +1249,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "04753031ec588aff2d77d5851192d0c4a9686e95" + "reference": "37188300067dda3c2711b870e03a523d1b3e7db1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/04753031ec588aff2d77d5851192d0c4a9686e95", - "reference": "04753031ec588aff2d77d5851192d0c4a9686e95", + "url": "https://api.github.com/repos/symfony/string/zipball/37188300067dda3c2711b870e03a523d1b3e7db1", + "reference": "37188300067dda3c2711b870e03a523d1b3e7db1", "shasum": "" }, "require": { @@ -1250,7 +1327,7 @@ "type": "tidelift" } ], - "time": "2024-06-04T06:37:32+00:00" + "time": "2024-08-04T09:26:10+00:00" }, { "name": "symfony/yaml", @@ -1330,12 +1407,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "ab071efe3b2d5caf2c662c9d018d9eacc76058d9" + "reference": "6566066fabbde78e101d3b363009e602f467616b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ab071efe3b2d5caf2c662c9d018d9eacc76058d9", - "reference": "ab071efe3b2d5caf2c662c9d018d9eacc76058d9", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6566066fabbde78e101d3b363009e602f467616b", + "reference": "6566066fabbde78e101d3b363009e602f467616b", "shasum": "" }, "require": { @@ -1343,7 +1420,8 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php80": "^1.22" + "symfony/polyfill-php80": "^1.22", + "symfony/polyfill-php81": "^1.29" }, "require-dev": { "psr/container": "^1.0|^2.0", @@ -1402,7 +1480,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:05:59+00:00" + "time": "2024-08-07T09:26:22+00:00" }, { "name": "vlucas/phpdotenv", @@ -1410,19 +1488,19 @@ "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "334f4952967f3ee6cdb2004e05e0bd01b525d56b" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/334f4952967f3ee6cdb2004e05e0bd01b525d56b", - "reference": "334f4952967f3ee6cdb2004e05e0bd01b525d56b", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.2", + "graham-campbell/result-type": "^1.1.3", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2", + "phpoption/phpoption": "^1.9.3", "symfony/polyfill-ctype": "^1.24", "symfony/polyfill-mbstring": "^1.24", "symfony/polyfill-php80": "^1.24" @@ -1475,7 +1553,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/master" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -1487,7 +1565,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:52:03+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "zircote/swagger-php", @@ -1579,12 +1657,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "9955122a490d18ce723cf9014b196c126222c180" + "reference": "0dfb69d79d0964b8a80bfa92c07f50e3e8d73542" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/9955122a490d18ce723cf9014b196c126222c180", - "reference": "9955122a490d18ce723cf9014b196c126222c180", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0dfb69d79d0964b8a80bfa92c07f50e3e8d73542", + "reference": "0dfb69d79d0964b8a80bfa92c07f50e3e8d73542", "shasum": "" }, "require": { @@ -1642,7 +1720,7 @@ "type": "tidelift" } ], - "time": "2024-05-05T15:09:38+00:00" + "time": "2024-06-20T19:34:15+00:00" }, { "name": "myclabs/deep-copy", @@ -1650,12 +1728,12 @@ "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "2f5294676c802a62b0549f6bc8983f14294ce369" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/2f5294676c802a62b0549f6bc8983f14294ce369", - "reference": "2f5294676c802a62b0549f6bc8983f14294ce369", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1695,7 +1773,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -1703,20 +1781,20 @@ "type": "tidelift" } ], - "time": "2024-02-10T11:10:03+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nikic/php-parser", - "version": "dev-master", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "daaadc3bae458908aa477b90a8932e7da9253f22" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/daaadc3bae458908aa477b90a8932e7da9253f22", - "reference": "daaadc3bae458908aa477b90a8932e7da9253f22", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -1729,7 +1807,6 @@ "ircmaxell/php-yacc": "^0.0.7", "phpunit/phpunit": "^9.0" }, - "default-branch": true, "bin": [ "bin/php-parse" ], @@ -1760,9 +1837,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/master" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-06-03T06:24:19+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "phar-io/manifest", @@ -1889,12 +1966,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "3352293d9e91513d5508c415835014881b420218" + "reference": "328a747f499cca790acff5634a4e55b957f40634" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/3352293d9e91513d5508c415835014881b420218", - "reference": "3352293d9e91513d5508c415835014881b420218", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/328a747f499cca790acff5634a4e55b957f40634", + "reference": "328a747f499cca790acff5634a4e55b957f40634", "shasum": "" }, "require": { @@ -1913,7 +1990,7 @@ "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1922,7 +1999,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -1959,7 +2036,7 @@ "type": "github" } ], - "time": "2024-03-22T05:16:32+00:00" + "time": "2024-07-17T05:19:21+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2208,41 +2285,41 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bfe55ab9f51514c30870772e70d825eb160508bf" + "reference": "d83130070127e5bc064b96b815ba03bb7e0200e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bfe55ab9f51514c30870772e70d825eb160508bf", - "reference": "bfe55ab9f51514c30870772e70d825eb160508bf", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d83130070127e5bc064b96b815ba03bb7e0200e1", + "reference": "d83130070127e5bc064b96b815ba03bb7e0200e1", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.31", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -2303,7 +2380,7 @@ "type": "tidelift" } ], - "time": "2024-06-03T05:41:34+00:00" + "time": "2024-08-02T05:57:17+00:00" }, { "name": "roave/security-advisories", @@ -2311,20 +2388,23 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "01c19f1a89daf51e8355cc0b7e3113d5274929b5" + "reference": "176422aa2c339a0f4e56b92862c67a94e2b584fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/01c19f1a89daf51e8355cc0b7e3113d5274929b5", - "reference": "01c19f1a89daf51e8355cc0b7e3113d5274929b5", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/176422aa2c339a0f4e56b92862c67a94e2b584fb", + "reference": "176422aa2c339a0f4e56b92862c67a94e2b584fb", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", - "admidio/admidio": "<4.2.13", + "admidio/admidio": "<4.3.10", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "aheinze/cockpit": "<2.2", - "aimeos/ai-client-html": ">=2020.04.1,<2020.10.27|>=2021.04.1,<2021.10.21|>=2022.04.1,<2022.10.12|>=2023.04.1,<2023.10.14|>=2024.04.1,<2024.04.4", + "aimeos/ai-admin-graphql": ">=2022.04.1,<2022.10.10|>=2023.04.1,<2023.10.6|>=2024.04.1,<2024.04.6", + "aimeos/ai-admin-jsonadm": "<2020.10.13|>=2021.04.1,<2021.10.6|>=2022.04.1,<2022.10.3|>=2023.04.1,<2023.10.4|==2024.04.1", + "aimeos/ai-client-html": ">=2020.04.1,<2020.10.27|>=2021.04.1,<2021.10.22|>=2022.04.1,<2022.10.13|>=2023.04.1,<2023.10.15|>=2024.04.1,<2024.04.7", + "aimeos/ai-controller-frontend": "<2020.10.15|>=2021.04.1,<2021.10.8|>=2022.04.1,<2022.10.8|>=2023.04.1,<2023.10.9", "aimeos/aimeos-core": ">=2022.04.1,<2022.10.17|>=2023.04.1,<2023.10.17|>=2024.04.1,<2024.04.7", "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5", "airesvsg/acf-to-rest-api": "<=3.1", @@ -2350,12 +2430,13 @@ "athlon1600/php-proxy": "<=5.1", "athlon1600/php-proxy-app": "<=3", "austintoddj/canvas": "<=3.4.2", - "automad/automad": "<=1.10.9", + "auth0/wordpress": "<=4.6", + "automad/automad": "<=2.0.0.0-alpha5", "automattic/jetpack": "<9.8", "awesome-support/awesome-support": "<=6.0.7", "aws/aws-sdk-php": "<3.288.1", "azuracast/azuracast": "<0.18.3", - "backdrop/backdrop": "<1.24.2", + "backdrop/backdrop": "<1.27.3|>=1.28,<1.28.2", "backpack/crud": "<3.4.9", "bacula-web/bacula-web": "<8.0.0.0-RC2-dev", "badaso/core": "<2.7", @@ -2370,12 +2451,13 @@ "bcosca/fatfree": "<3.7.2", "bedita/bedita": "<4", "bigfork/silverstripe-form-capture": ">=3,<3.1.1", - "billz/raspap-webgui": "<2.9.5", + "billz/raspap-webgui": "<=3.1.4", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "blueimp/jquery-file-upload": "==6.4.4", "bmarshall511/wordpress_zero_spam": "<5.2.13", "bolt/bolt": "<3.7.2", "bolt/core": "<=4.2", + "born05/craft-twofactorauthentication": "<3.3.4", "bottelet/flarepoint": "<2.2.1", "bref/bref": "<2.1.17", "brightlocal/phpwhois": "<=4.2.5", @@ -2407,8 +2489,8 @@ "codeigniter4/framework": "<4.4.7", "codeigniter4/shield": "<1.0.0.0-beta8", "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.27|>=2,<2.2.23|>=2.3,<2.7", - "concrete5/concrete5": "<9.2.8", + "composer/composer": "<1.10.27|>=2,<2.2.24|>=2.3,<2.7.7", + "concrete5/concrete5": "<=9.3.2", "concrete5/core": "<8.5.8|>=9,<9.1", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/comments-bundle": ">=2,<4.13.40|>=5.0.0.0-RC1-dev,<5.3.4", @@ -2419,7 +2501,7 @@ "contao/managed-edition": "<=1.5", "corveda/phpsandbox": "<1.3.5", "cosenary/instagram": "<=2.3", - "craftcms/cms": "<4.6.2", + "craftcms/cms": "<4.6.2|>=5.0.0.0-beta1,<=5.2.2", "croogo/croogo": "<4", "cuyz/valinor": "<0.12", "czproject/git-php": "<4.0.3", @@ -2429,7 +2511,7 @@ "datatables/datatables": "<1.10.10", "david-garcia/phpwhois": "<=4.3.1", "dbrisinajumi/d2files": "<1", - "dcat/laravel-admin": "<=2.1.3.0-beta", + "dcat/laravel-admin": "<=2.1.3", "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3", "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1|>=7,<7.4", "desperado/xml-bundle": "<=0.1.7", @@ -2454,7 +2536,7 @@ "ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2", "ecodev/newsletter": "<=4", "ectouch/ectouch": "<=2.7.2", - "egroupware/egroupware": "<16.1.20170922", + "egroupware/egroupware": "<23.1.20240624", "elefant/cms": "<2.0.7", "elgg/elgg": "<3.3.24|>=4,<4.0.5", "elijaa/phpmemcacheadmin": "<=1.3", @@ -2472,7 +2554,7 @@ "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1-dev", "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1-dev|>=5.4,<5.4.11.1-dev|>=2017.12,<2017.12.0.1-dev", "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26|>=3.3,<3.3.39", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", "ezsystems/ezplatform-graphql": ">=1.0.0.0-RC1-dev,<1.0.13|>=2.0.0.0-beta1,<2.3.12", "ezsystems/ezplatform-kernel": "<1.2.5.1-dev|>=1.3,<1.3.35", @@ -2495,6 +2577,7 @@ "filp/whoops": "<2.1.13", "fineuploader/php-traditional-server": "<=1.2.2", "firebase/php-jwt": "<6", + "fisharebest/webtrees": "<=2.1.18", "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2", "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6", "flarum/core": "<1.8.5", @@ -2517,7 +2600,7 @@ "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1,<1.3.5", "friendsofsymfony1/swiftmailer": ">=4,<5.4.13|>=6,<6.2.5", - "friendsofsymfony1/symfony1": ">=1.1,<1.15.19", + "friendsofsymfony1/symfony1": ">=1.1,<1.5.19", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6", "froala/wysiwyg-editor": "<3.2.7|>=4.0.1,<=4.1.3", @@ -2527,7 +2610,7 @@ "funadmin/funadmin": "<=3.2|>=3.3.2,<=3.3.3", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", - "getformwork/formwork": "<1.13", + "getformwork/formwork": "<1.13.1|==2.0.0.0-beta1", "getgrav/grav": "<1.7.46", "getkirby/cms": "<4.1.1", "getkirby/kirby": "<=2.5.12", @@ -2541,7 +2624,7 @@ "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<2.2.1", "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<6.1.7", + "grumpydictator/firefly-iii": "<6.1.17", "gugoan/economizzer": "<=0.9.0.0-beta1", "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", "guzzlehttp/psr7": "<1.9.1|>=2,<2.4.5", @@ -2555,7 +2638,7 @@ "hov/jobfair": "<1.0.13|>=2,<2.0.2", "httpsoft/http-message": "<1.0.12", "hyn/multi-tenant": ">=5.6,<5.7.2", - "ibexa/admin-ui": ">=4.2,<4.2.3", + "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6.0.0-beta1,<4.6.9", "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3|>=4.5,<4.5.6|>=4.6,<4.6.2", "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3", "ibexa/post-install": "<=1.0.4", @@ -2578,6 +2661,7 @@ "innologi/typo3-appointments": "<2.0.6", "intelliants/subrion": "<4.2.2", "inter-mediator/inter-mediator": "==5.5", + "ipl/web": "<0.10.1", "islandora/islandora": ">=2,<2.4.1", "ivankristianto/phpwhois": "<=4.3", "jackalope/jackalope-doctrine-dbal": "<1.7.4", @@ -2598,6 +2682,7 @@ "jsdecena/laracom": "<2.0.9", "jsmitty12/phpwhois": "<5.1", "juzaweb/cms": "<=3.4", + "jweiland/events2": "<8.3.8|>=9,<9.0.6", "kazist/phpwhois": "<=4.2.6", "kelvinmo/simplexrd": "<3.1.1", "kevinpapst/kimai2": "<1.16.7", @@ -2635,11 +2720,11 @@ "lms/routes": "<2.1.1", "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", "luyadev/yii-helpers": "<1.2.1", - "magento/community-edition": "<2.4.3.0-patch3|>=2.4.4,<2.4.5", + "magento/community-edition": "<2.4.5|==2.4.5|>=2.4.5.0-patch1,<2.4.5.0-patch8|==2.4.6|>=2.4.6.0-patch1,<2.4.6.0-patch6|==2.4.7", "magento/core": "<=1.9.4.5", "magento/magento1ce": "<1.9.4.3-dev", "magento/magento1ee": ">=1,<1.14.4.3-dev", - "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2.0-patch2", + "magento/product-community-edition": "<2.4.4.0-patch9|>=2.4.5,<2.4.5.0-patch8|>=2.4.6,<2.4.6.0-patch6|>=2.4.7,<2.4.7.0-patch1", "magneto/core": "<1.9.4.4-dev", "maikuolan/phpmussel": ">=1,<1.6", "mainwp/mainwp": "<=4.4.3.3", @@ -2659,7 +2744,7 @@ "microsoft/microsoft-graph": ">=1.16,<1.109.1|>=2,<2.0.1", "microsoft/microsoft-graph-beta": "<2.0.1", "microsoft/microsoft-graph-core": "<2.0.2", - "microweber/microweber": "<=2.0.4", + "microweber/microweber": "<=2.0.16", "mikehaertl/php-shellcommand": "<1.6.1", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", @@ -2668,7 +2753,7 @@ "mojo42/jirafeau": "<4.4", "mongodb/mongodb": ">=1,<1.9.2", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<4.3.4", + "moodle/moodle": "<4.3.5|>=4.4.0.0-beta,<4.4.1", "mos/cimage": "<0.7.19", "movim/moxl": ">=0.8,<=0.10", "movingbytes/social-network": "<=1.2.1", @@ -2705,14 +2790,14 @@ "october/cms": "<1.0.469|==1.0.469|==1.0.471|==1.1.1", "october/october": "<=3.4.4", "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.5.2", + "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.5.15", "omeka/omeka-s": "<4.0.3", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": ">=1,<1.9.3|>=2,<2.1.5", "open-web-analytics/open-web-analytics": "<1.7.4", - "opencart/opencart": "<=3.0.3.7|>=4,<4.0.2.3-dev", + "opencart/opencart": ">=0", "openid/php-openid": "<2.3", - "openmage/magento-lts": "<20.5", + "openmage/magento-lts": "<20.10.1", "opensolutions/vimbadmin": "<=3.0.15", "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2", "orchid/platform": ">=9,<9.4.4|>=14.0.0.0-alpha4,<14.5", @@ -2722,6 +2807,7 @@ "oro/crm-call-bundle": ">=4.2,<=4.2.5|>=5,<5.0.4|>=5.1,<5.1.1", "oro/customer-portal": ">=4.1,<=4.1.13|>=4.2,<=4.2.10|>=5,<=5.0.11|>=5.1,<=5.1.3", "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<=4.2.10|>=5,<=5.0.12|>=5.1,<=5.1.3", + "oveleon/contao-cookiebar": "<1.16.3|>=2,<2.1.3", "oxid-esales/oxideshop-ce": "<4.5", "oxid-esales/paymorrow-module": ">=1,<1.0.2|>=2,<2.0.1", "packbackbooks/lti-1-3-php-library": "<5", @@ -2763,7 +2849,7 @@ "phpxmlrpc/extras": "<0.6.1", "phpxmlrpc/phpxmlrpc": "<4.9.2", "pi/pi": "<=2.5", - "pimcore/admin-ui-classic-bundle": "<=1.4.2", + "pimcore/admin-ui-classic-bundle": "<=1.5.1", "pimcore/customer-management-framework-bundle": "<4.0.6", "pimcore/data-hub": "<1.2.4", "pimcore/demo": "<10.3", @@ -2786,8 +2872,8 @@ "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", "prestashop/ps_linklist": "<3.1", - "privatebin/privatebin": "<1.4", - "processwire/processwire": "<=3.0.210", + "privatebin/privatebin": "<1.4|>=1.5,<1.7.4", + "processwire/processwire": "<=3.0.229", "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7", "propel/propel1": ">=1,<=1.7.1", "pterodactyl/panel": "<1.11.6", @@ -2826,9 +2912,9 @@ "shopware/core": "<6.5.8.8-dev|>=6.6.0.0-RC1-dev,<6.6.1", "shopware/platform": "<6.5.8.8-dev|>=6.6.0.0-RC1-dev,<6.6.1", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<6.2.3", + "shopware/shopware": "<=5.7.17", "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", - "shopxo/shopxo": "<2.2.6", + "shopxo/shopxo": "<=6.1", "showdoc/showdoc": "<2.10.4", "silverstripe-australia/advancedreports": ">=1,<=2", "silverstripe/admin": "<1.13.19|>=2,<2.1.8", @@ -2836,11 +2922,12 @@ "silverstripe/cms": "<4.11.3", "silverstripe/comments": ">=1.3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.13.39|>=5,<5.1.11", + "silverstripe/framework": "<5.2.16", "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.8.2|>=4,<4.3.7|>=5,<5.1.3", "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", "silverstripe/recipe-cms": ">=4.5,<4.5.3", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", + "silverstripe/reports": "<5.2.3", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4|>=2.1,<2.1.2", "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", "silverstripe/subsites": ">=2,<2.6.1", @@ -2861,7 +2948,7 @@ "slim/slim": "<2.6", "slub/slub-events": "<3.0.3", "smarty/smarty": "<4.5.3|>=5,<5.1.1", - "snipe/snipe-it": "<=6.2.2", + "snipe/snipe-it": "<6.4.2", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spatie/browsershot": "<3.57.4", @@ -2870,12 +2957,14 @@ "spoon/library": "<1.4.1", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<22.02.3", + "ssddanbrown/bookstack": "<24.05.1", "statamic/cms": "<4.46|>=5.3,<5.6.2", "stormpath/sdk": "<9.9.99", - "studio-42/elfinder": "<2.1.62", + "studio-42/elfinder": "<=2.1.64", + "studiomitte/friendlycaptcha": "<0.1.4", "subhh/libconnect": "<7.0.8|>=8,<8.1", "sukohi/surpass": "<1", + "sulu/form-bundle": ">=2,<2.5.3", "sulu/sulu": "<1.6.44|>=2,<2.4.17|>=2.5,<2.5.13", "sumocoders/framework-user-bundle": "<1.4", "superbig/craft-audit": "<3.0.2", @@ -2887,7 +2976,7 @@ "sylius/grid-bundle": "<1.10.1", "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", "sylius/resource-bundle": ">=1,<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2|>=1.12.0.0-alpha1,<1.12.16|>=1.13.0.0-alpha1,<1.13.1", + "sylius/sylius": "<1.12.19|>=1.13.0.0-alpha1,<1.13.4", "symbiote/silverstripe-multivaluefield": ">=3,<3.1", "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", "symbiote/silverstripe-seed": "<6.0.3", @@ -2939,18 +3028,19 @@ "thorsten/phpmyfaq": "<3.2.2", "tikiwiki/tiki-manager": "<=17.1", "timber/timber": ">=0.16.6,<1.23.1|>=1.24,<1.24.1|>=2,<2.1", - "tinymce/tinymce": "<7", + "tinymce/tinymce": "<7.2", "tinymighty/wiki-seo": "<1.2.2", "titon/framework": "<9.9.99", "tobiasbg/tablepress": "<=2.0.0.0-RC1", "topthink/framework": "<6.0.17|>=6.1,<6.1.5|>=8,<8.0.4", "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3", - "torrentpier/torrentpier": "<=2.4.1", + "torrentpier/torrentpier": "<=2.4.3", "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", "tribalsystems/zenario": "<9.5.60602", "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", + "twbs/bootstrap": "<=3.4.1|>=4,<=4.6.2", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", @@ -2988,7 +3078,8 @@ "wallabag/tcpdf": "<6.2.22", "wallabag/wallabag": "<2.6.7", "wanglelecc/laracms": "<=1.0.3", - "web-auth/webauthn-framework": ">=3.3,<3.3.4", + "web-auth/webauthn-framework": ">=3.3,<3.3.4|>=4.5,<4.9", + "web-auth/webauthn-lib": ">=4.5,<4.9", "web-feet/coastercms": "==5.5", "webbuilders-group/silverstripe-kapost-bridge": "<0.4", "webcoast/deferred-image-processing": "<1.0.2", @@ -3002,7 +3093,7 @@ "winter/wn-dusk-plugin": "<2.1", "winter/wn-system-module": "<1.2.4", "wintercms/winter": "<=1.2.3", - "woocommerce/woocommerce": "<6.6", + "woocommerce/woocommerce": "<6.6|>=8.8,<8.8.5|>=8.9,<8.9.3", "wp-cli/wp-cli": ">=0.12,<2.5", "wp-graphql/wp-graphql": "<=1.14.5", "wp-premium/gravityforms": "<2.4.21", @@ -3018,7 +3109,7 @@ "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", "yiisoft/yii": "<1.1.29", - "yiisoft/yii2": "<2.0.50", + "yiisoft/yii2": "<2.0.49.4-dev", "yiisoft/yii2-authclient": "<2.2.15", "yiisoft/yii2-bootstrap": "<2.0.4", "yiisoft/yii2-dev": "<2.0.43", @@ -3045,7 +3136,7 @@ "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", "zendframework/zend-mail": "<2.4.11|>=2.5,<2.7.2", "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4", + "zendframework/zend-session": ">=2,<2.2.9|>=2.3,<2.3.4", "zendframework/zend-validator": ">=2.3,<2.3.6", "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", @@ -3104,7 +3195,7 @@ "type": "tidelift" } ], - "time": "2024-06-05T14:05:01+00:00" + "time": "2024-08-05T22:04:39+00:00" }, { "name": "sebastian/cli-parser", @@ -4125,12 +4216,13 @@ "minimum-stability": "dev", "stability-flags": { "nette/php-generator": 20, + "zircote/swagger-php": 20, "roave/security-advisories": 20 }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.1", + "php": ">=8.2", "ext-pdo": "*" }, "platform-dev": [], From 367349bd3636e83f76a40f9b4ef609c047ab8d28 Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Wed, 7 Aug 2024 13:53:04 +0200 Subject: [PATCH 3/9] #114 fix error update PHP 8.2 --- .github/workflows/testing.yml | 2 +- CHANGELOG.md | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2bfcf52..37c11f9 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: true matrix: - php-versions: [ '8.1' ] + php-versions: [ '8.2' ] steps: # https://github.com/actions/checkout (official) - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 21a22b0..bb07efa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,23 @@ **Présentation des versions du framework Edu Framework** -## v2.1.0 (en cours de dev) +## v2.2.0 - coming soon + +**new features** + +- [#112](https://github.com/studoo-app/edu-framework/issues/112) Implement OpenAPI @bfoujols + +**bug Fixes** + +- [#114](https://github.com/studoo-app/edu-framework/issues/114) Update PHP version 8.1 -> 8.2 @bfoujols + +> Release notes for v2.2.0 +> +> [https://github.com/studoo-app/edu-framework/milestone/v2.2.0](https://github.com/studoo-app/edu-framework/milestone/17) + +
+ +## v2.1.0 - 20/06/2024 **new features** @@ -20,7 +36,7 @@ > > [https://github.com/studoo-app/edu-framework/milestone/v2.1.0](https://github.com/studoo-app/edu-framework/milestone/12) -
+
## v2.0.2 - 24/05/2024 From 38d7a392e6956e4968e7028da49778fc6571cc49 Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Wed, 7 Aug 2024 18:42:13 +0200 Subject: [PATCH 4/9] #112 add block info in command CLI --- app/Config/routes.yaml | 20 ------------------- .../Commands/CreateApiCommand.php | 8 +++++++- 2 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 app/Config/routes.yaml diff --git a/app/Config/routes.yaml b/app/Config/routes.yaml deleted file mode 100644 index a770de6..0000000 --- a/app/Config/routes.yaml +++ /dev/null @@ -1,20 +0,0 @@ -home: - uri: /home - controller: Controller\HomeController - httpMethod: [GET] -link: - uri: /link - controller: Controller\LinkController - httpMethod: [GET] -user: - uri: /user/{id} - controller: Controller\UserController - httpMethod: [GET,POST] -userUpdate: - uri: /user/{id}/update - controller: Controller\UserController - httpMethod: [GET,POST] -userName: - uri: /user/{id:\d+}[/{name}] - controller: Controller\UserController - httpMethod: [GET,POST] \ No newline at end of file diff --git a/src/EduFramework/Commands/CreateApiCommand.php b/src/EduFramework/Commands/CreateApiCommand.php index 08f2b08..3c5f9e0 100644 --- a/src/EduFramework/Commands/CreateApiCommand.php +++ b/src/EduFramework/Commands/CreateApiCommand.php @@ -76,7 +76,13 @@ public function execute(InputInterface $input, OutputInterface $output): int //Generate Controller Class $this->generateController($namesCollection["className"], $router); //Close command message - $io->success("Controller successfully generated"); + $io->block( + [ + "Class : " . self::CONTROLLER_DIR . self::API_DIR . $namesCollection["className"], + "URI : " . $router['uri'] + ] + ); + $io->success("Controller and route successfully generated"); return Command::SUCCESS; } From f2d8b99822a52c7c551af2c72183f1b03f878856 Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Thu, 8 Aug 2024 14:48:30 +0200 Subject: [PATCH 5/9] #112 add test unit api cli --- app/Config/routes.yaml | 24 +++++++ composer.json | 3 +- composer.lock | 68 ++++++++++++++++++- .../Commands/CreateApiCommand.php | 4 ++ tests/Command/CreateApiCommandTest.php | 43 ++++++++++++ 5 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 app/Config/routes.yaml create mode 100644 tests/Command/CreateApiCommandTest.php diff --git a/app/Config/routes.yaml b/app/Config/routes.yaml new file mode 100644 index 0000000..6714cb9 --- /dev/null +++ b/app/Config/routes.yaml @@ -0,0 +1,24 @@ +index: + uri: / + controller: Controller\HomeController + httpMethod: [GET] +home: + uri: /home + controller: Controller\HomeController + httpMethod: [GET] +link: + uri: /link + controller: Controller\LinkController + httpMethod: [GET] +user: + uri: /user/{id} + controller: Controller\UserController + httpMethod: [GET,POST] +userUpdate: + uri: /user/{id}/update + controller: Controller\UserController + httpMethod: [GET,POST] +userName: + uri: /user/{id:\d+}[/{name}] + controller: Controller\UserController + httpMethod: [GET,POST] \ No newline at end of file diff --git a/composer.json b/composer.json index 2d7e433..3d9dd51 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "symfony/yaml": "6.3.*", "symfony/console": "6.3.*", "nette/php-generator": "^4.1@dev", - "zircote/swagger-php": "^4.0@dev" + "zircote/swagger-php": "^4.0@dev", + "symfony/filesystem": "7.2.x-dev" } , "require-dev": { diff --git a/composer.lock b/composer.lock index 4a66c0c..9e78059 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": "37290ef989d18fa8d5ea092831fba702", + "content-hash": "7813f19d8e460380ab13e1b4ac9cccc4", "packages": [ { "name": "graham-campbell/result-type", @@ -615,6 +615,72 @@ ], "time": "2024-04-18T09:32:20+00:00" }, + { + "name": "symfony/filesystem", + "version": "7.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "c46c178f375c2dfddc7b6a32731077c778e14264" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c46c178f375c2dfddc7b6a32731077c778e14264", + "reference": "c46c178f375c2dfddc7b6a32731077c778e14264", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/7.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-23T10:47:31+00:00" + }, { "name": "symfony/finder", "version": "7.2.x-dev", diff --git a/src/EduFramework/Commands/CreateApiCommand.php b/src/EduFramework/Commands/CreateApiCommand.php index 3c5f9e0..0a76213 100644 --- a/src/EduFramework/Commands/CreateApiCommand.php +++ b/src/EduFramework/Commands/CreateApiCommand.php @@ -200,6 +200,10 @@ private function generateRoute(string $name, string $uri, string $className): ar return $router[$indexName . $name]; } + /** + * Génération du fichier de base openapi + * @return void + */ private function generateOpenApi(): void { $filename = self::CONTROLLER_DIR . self::API_DIR . 'openapi.php'; diff --git a/tests/Command/CreateApiCommandTest.php b/tests/Command/CreateApiCommandTest.php new file mode 100644 index 0000000..7cc2917 --- /dev/null +++ b/tests/Command/CreateApiCommandTest.php @@ -0,0 +1,43 @@ +add(new CreateApiCommand()); + $command = $application->find("make:api"); + $this->commandeTester = new CommandTester($command); + } + + protected function tearDown(): void + { + $this->commandeTester = null; + (new Filesystem())->remove("app/Config/routes.yaml"); + (new Filesystem())->copy("tests/Config/routes.yaml", "app/Config/routes.yaml"); + (new Filesystem())->remove("app/Controller/api/InitController.php"); + (new Filesystem())->remove("app/Controller/api/openapi.php"); + } + + public function testCommandUri(): void + { + $this->commandeTester->execute(["controller-name" => "init"]); + $output = $this->commandeTester->getDisplay(); + + $this->assertStringContainsString('URI : /api/init', $output); + } +} From 7a03ee1c04294d5e3f1cda41886c5a7678043d8a Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Thu, 8 Aug 2024 14:48:30 +0200 Subject: [PATCH 6/9] #112 del not use class --- app/Config/routes.yaml | 24 +++++++ composer.json | 3 +- composer.lock | 68 ++++++++++++++++++- .../Commands/CreateApiCommand.php | 4 ++ tests/Command/CreateApiCommandTest.php | 42 ++++++++++++ 5 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 app/Config/routes.yaml create mode 100644 tests/Command/CreateApiCommandTest.php diff --git a/app/Config/routes.yaml b/app/Config/routes.yaml new file mode 100644 index 0000000..6714cb9 --- /dev/null +++ b/app/Config/routes.yaml @@ -0,0 +1,24 @@ +index: + uri: / + controller: Controller\HomeController + httpMethod: [GET] +home: + uri: /home + controller: Controller\HomeController + httpMethod: [GET] +link: + uri: /link + controller: Controller\LinkController + httpMethod: [GET] +user: + uri: /user/{id} + controller: Controller\UserController + httpMethod: [GET,POST] +userUpdate: + uri: /user/{id}/update + controller: Controller\UserController + httpMethod: [GET,POST] +userName: + uri: /user/{id:\d+}[/{name}] + controller: Controller\UserController + httpMethod: [GET,POST] \ No newline at end of file diff --git a/composer.json b/composer.json index 2d7e433..3d9dd51 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "symfony/yaml": "6.3.*", "symfony/console": "6.3.*", "nette/php-generator": "^4.1@dev", - "zircote/swagger-php": "^4.0@dev" + "zircote/swagger-php": "^4.0@dev", + "symfony/filesystem": "7.2.x-dev" } , "require-dev": { diff --git a/composer.lock b/composer.lock index 4a66c0c..9e78059 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": "37290ef989d18fa8d5ea092831fba702", + "content-hash": "7813f19d8e460380ab13e1b4ac9cccc4", "packages": [ { "name": "graham-campbell/result-type", @@ -615,6 +615,72 @@ ], "time": "2024-04-18T09:32:20+00:00" }, + { + "name": "symfony/filesystem", + "version": "7.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "c46c178f375c2dfddc7b6a32731077c778e14264" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c46c178f375c2dfddc7b6a32731077c778e14264", + "reference": "c46c178f375c2dfddc7b6a32731077c778e14264", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/7.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-23T10:47:31+00:00" + }, { "name": "symfony/finder", "version": "7.2.x-dev", diff --git a/src/EduFramework/Commands/CreateApiCommand.php b/src/EduFramework/Commands/CreateApiCommand.php index 3c5f9e0..0a76213 100644 --- a/src/EduFramework/Commands/CreateApiCommand.php +++ b/src/EduFramework/Commands/CreateApiCommand.php @@ -200,6 +200,10 @@ private function generateRoute(string $name, string $uri, string $className): ar return $router[$indexName . $name]; } + /** + * Génération du fichier de base openapi + * @return void + */ private function generateOpenApi(): void { $filename = self::CONTROLLER_DIR . self::API_DIR . 'openapi.php'; diff --git a/tests/Command/CreateApiCommandTest.php b/tests/Command/CreateApiCommandTest.php new file mode 100644 index 0000000..29fb6d4 --- /dev/null +++ b/tests/Command/CreateApiCommandTest.php @@ -0,0 +1,42 @@ +add(new CreateApiCommand()); + $command = $application->find("make:api"); + $this->commandeTester = new CommandTester($command); + } + + protected function tearDown(): void + { + $this->commandeTester = null; + (new Filesystem())->remove("app/Config/routes.yaml"); + (new Filesystem())->copy("tests/Config/routes.yaml", "app/Config/routes.yaml"); + (new Filesystem())->remove("app/Controller/api/InitController.php"); + (new Filesystem())->remove("app/Controller/api/openapi.php"); + } + + public function testCommandUri(): void + { + $this->commandeTester->execute(["controller-name" => "init"]); + $output = $this->commandeTester->getDisplay(); + + $this->assertStringContainsString('URI : /api/init', $output); + } +} From 34a9b503b9e88771c1215a895d4d534ec4cada19 Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Thu, 8 Aug 2024 15:49:02 +0200 Subject: [PATCH 7/9] #112 add tests units create api controller --- tests/Command/CreateApiCommandTest.php | 74 +++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/tests/Command/CreateApiCommandTest.php b/tests/Command/CreateApiCommandTest.php index 29fb6d4..bf32850 100644 --- a/tests/Command/CreateApiCommandTest.php +++ b/tests/Command/CreateApiCommandTest.php @@ -5,6 +5,7 @@ use PHPUnit\Framework\TestCase; use Studoo\EduFramework\Commands\CreateApiCommand; +use Studoo\EduFramework\Commands\Exception\RouteAlreadyExistsException; use Studoo\EduFramework\Core\ConfigCore; use Symfony\Component\Console\Application; use Symfony\Component\Console\Tester\CommandTester; @@ -26,17 +27,88 @@ protected function setUp(): void protected function tearDown(): void { $this->commandeTester = null; + } + public static function tearDownAfterClass(): void + { + // Code de nettoyage à exécuter après tous les tests de la classe (new Filesystem())->remove("app/Config/routes.yaml"); (new Filesystem())->copy("tests/Config/routes.yaml", "app/Config/routes.yaml"); (new Filesystem())->remove("app/Controller/api/InitController.php"); (new Filesystem())->remove("app/Controller/api/openapi.php"); } - public function testCommandUri(): void + public function testCreateNewApi(): void { $this->commandeTester->execute(["controller-name" => "init"]); $output = $this->commandeTester->getDisplay(); $this->assertStringContainsString('URI : /api/init', $output); } + + public function testRouteAlreadyExists(): void + { + $this->expectException(RouteAlreadyExistsException::class); + $this->commandeTester->execute(["controller-name" => "init"]); + $this->assertStringContainsString('Route already exists', $this->commandeTester->getDisplay()); + } + + public function testExistFileOpenApi() + { + $this->assertTrue(file_exists("app/Controller/api/openapi.php")); + } + + public function testExistFileInitController() + { + $this->assertTrue(file_exists("app/Controller/api/InitController.php")); + } + + public function testExistFileRoutes() + { + $this->assertTrue(file_exists("app/Config/routes.yaml")); + } + + public function testContentFileRoutes() + { + $this->assertStringContainsString('uri: /api/init', file_get_contents("app/Config/routes.yaml")); + } + + public function testContentFileNameController() + { + $this->assertStringContainsString('api_init:', file_get_contents("app/Config/routes.yaml")); + } + + public function testContentFileController() + { + $this->assertStringContainsString('controller: Controller\api\InitController', file_get_contents("app/Config/routes.yaml")); + } + + public function testContentFileOpenApi() + { + $this->assertStringContainsString('namespace Controller\api;', file_get_contents("app/Controller/api/openapi.php")); + } + + public function testContentFileInitController() + { + $this->assertStringContainsString('namespace Controller\api;', file_get_contents("app/Controller/api/InitController.php")); + } + + public function testContentFileOpenApiAttribute() + { + $this->assertStringContainsString('use OpenApi\Attributes;', file_get_contents("app/Controller/api/openapi.php")); + } + + public function testContentFileInitControllerAttribute() + { + $this->assertStringContainsString('use OpenApi\Attributes;', file_get_contents("app/Controller/api/InitController.php")); + } + + public function testContentFileOpenApiClass() + { + $this->assertStringContainsString('class openapi', file_get_contents("app/Controller/api/openapi.php")); + } + + public function testContentFileInitControllerClass() + { + $this->assertStringContainsString('class InitController', file_get_contents("app/Controller/api/InitController.php")); + } } From 64c1484a6105b562d1330cdca5294823ad8fb26c Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Thu, 8 Aug 2024 21:28:31 +0200 Subject: [PATCH 8/9] #116 add tests units cli command --- tests/Command/CreateCliCommandTest.php | 71 ++++++++++++++++++++++++++ tests/Config/commands.yaml | 0 2 files changed, 71 insertions(+) create mode 100644 tests/Command/CreateCliCommandTest.php create mode 100644 tests/Config/commands.yaml diff --git a/tests/Command/CreateCliCommandTest.php b/tests/Command/CreateCliCommandTest.php new file mode 100644 index 0000000..9b9420c --- /dev/null +++ b/tests/Command/CreateCliCommandTest.php @@ -0,0 +1,71 @@ +add(new CreateCliCommand()); + $command = $application->find("make:command"); + $this->commandeTester = new CommandTester($command); + } + + protected function tearDown(): void + { + $this->commandeTester = null; + } + public static function tearDownAfterClass(): void + { + // Code de nettoyage à exécuter après tous les tests de la classe + (new Filesystem())->remove("app/Config/commands.yaml"); + (new Filesystem())->copy("tests/Config/commands.yaml", "app/Config/commands.yaml"); + (new Filesystem())->remove("app/Command/InitCommand.php"); + } + + public function testCreateNewApi(): void + { + $this->commandeTester->execute(["command-name" => "init"]); + $output = $this->commandeTester->getDisplay(); + + $this->assertStringContainsString('[OK] Command successfully generated', $output); + } + + public function testRouteAlreadyExists(): void + { + $this->expectException(CommandAlreadyExistsException::class); + $this->commandeTester->execute(["command-name" => "init"]); + $this->assertStringContainsString('Route already exists', $this->commandeTester->getDisplay()); + } + + public function testExistFileInitCommand() + { + $this->assertTrue(file_exists("app/Command/InitCommand.php")); + } + + public function testExistFileCommandsYaml() + { + $this->assertTrue(file_exists("app/Config/commands.yaml")); + } + + public function testExistFileCommandsYamlContent() + { + $this->assertStringContainsString( + "init: Command\InitCommand", + file_get_contents("app/Config/commands.yaml") + ); + } +} diff --git a/tests/Config/commands.yaml b/tests/Config/commands.yaml new file mode 100644 index 0000000..e69de29 From b1b6dc1946cb3158b7596208a77fa9391e05c5d4 Mon Sep 17 00:00:00 2001 From: Benoit Foujols Date: Thu, 8 Aug 2024 21:42:37 +0200 Subject: [PATCH 9/9] #116 add version 2.2 --- CHANGELOG.md | 3 ++- src/EduFramework/Core/ConfigCore.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb07efa..d35b600 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ **Présentation des versions du framework Edu Framework** -## v2.2.0 - coming soon +## v2.2.0 - 08/07/2024 **new features** @@ -11,6 +11,7 @@ **bug Fixes** - [#114](https://github.com/studoo-app/edu-framework/issues/114) Update PHP version 8.1 -> 8.2 @bfoujols +- [#116](https://github.com/studoo-app/edu-framework/pull/116) Add Tests for OpenAPI, Command Cli @bfoujols > Release notes for v2.2.0 > diff --git a/src/EduFramework/Core/ConfigCore.php b/src/EduFramework/Core/ConfigCore.php index 2a3f731..40ddc29 100644 --- a/src/EduFramework/Core/ConfigCore.php +++ b/src/EduFramework/Core/ConfigCore.php @@ -36,9 +36,9 @@ public function __construct(array $config) self::$config = array_merge( [ 'name' => 'EduFramework', - 'version' => 'v2.1.0@stable', - 'date_version' => '2024-06-20', // Date de la livraison de la version - 'php_version' => '8.1', // Warning : bin/edu require PHP 8.1 or higher + 'version' => 'v2.2.0@stable', + 'date_version' => '2024-07-08', // Date de la livraison de la version + 'php_version' => '8.2', // Warning : bin/edu require PHP 8.2 or higher 'base_path' => '/', 'twig_path' => '/app/Template', 'route_config_path' => '/app/Config/',