diff --git a/.github/workflows/release-phar.yml b/.github/workflows/release-phar.yml index 4abec83db..dfaa9d2a1 100644 --- a/.github/workflows/release-phar.yml +++ b/.github/workflows/release-phar.yml @@ -8,16 +8,16 @@ name: Append phalcon.phar to release jobs: build: name: Compile and upload Phar - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - - name: Set PHP 7.2 + - name: Set PHP 8.0 uses: shivammathur/setup-php@v2 with: - php-version: '7.2' - extensions: phalcon-4.0.5 + php-version: '8.0' + extensions: phalcon-5.0.1 - name: Compile phalcon.phar run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1cc3cca0..8b7212efe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,11 +4,11 @@ name: "Tests" jobs: run-tests: - name: PHP ${{ matrix.php-versions }} + name: PHP ${{ matrix.php-versions }} with Phalcon ${{ matrix.phalcon-versions }} runs-on: ubuntu-latest env: - extensions: mbstring, intl, json, zip, phalcon-4.0.5, mysql, pgsql, xdebug-2.9.8 + extensions: mbstring, intl, json, zip, phalcon-${{ matrix.phalcon-versions }}, mysql, pgsql, xdebug-2.9.8 key: cache-v2.0~19.03.2020 services: @@ -32,7 +32,8 @@ jobs: strategy: fail-fast: false matrix: - php-versions: [ '7.2', '7.3', '7.4' ] + php-versions: ['8.0', '8.1'] + phalcon-versions: ['5.0.1'] steps: - uses: actions/checkout@v1 diff --git a/.gitignore b/.gitignore index 6d1dfecd8..6efc8b246 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ # https://help.github.com/articles/ignoring-files/#create-a-global-gitignore /vendor +composer.phar \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 837a41c24..f4e469755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# [5.0.1](https://github.com/phalcon/cphalcon/releases/tag/v5.0.1) +## Changed +- Update composer dependencies to require and support with 8.0 +- Updated phalcon v4 classes for v5 replacements +- Removed support for PHP 7.X + +# [4.3.0](https://github.com/phalcon/cphalcon/releases/tag/v4.3.0) +## Changed +- Changed code generation to external implementation [1455](https://github.com/phalcon/phalcon-devtools/issues/1455) +- Updated composer packages [1523](https://github.com/phalcon/phalcon-devtools/pull/1523) + +# [4.2.0](https://github.com/phalcon/cphalcon/releases/tag/v4.2.0) +Supported PHP Versions: 7.3, 7.4, 8.0 + +This release provides initial PHP 8 and Phalcon 5 support. +## Fixed +- Fixed Phalcon\Version class not found error in Phalcon 5 [1515](https://github.com/phalcon/phalcon-devtools/issues/1515) + # [4.1.0](https://github.com/phalcon/cphalcon/releases/tag/v4.1.0) ## Fixed - Fixed column annotation bugs on model creation [1425](https://github.com/phalcon/phalcon-devtools/issues/1425) diff --git a/Makefile b/Makefile deleted file mode 100644 index 4d3146245..000000000 --- a/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -all: build composer-install - -build: - @docker-compose build - @docker-compose up -d -composer-install: - @docker-compose exec -T service_php composer install -clean: - @docker-compose down - @docker system prune -af - @docker volume prune -f - -help: - @docker-compose exec -T service_php phalcon --help -create-dummy: - @docker-compose exec -T service_php phalcon create-project dummy --enable-webtools --force diff --git a/README.md b/README.md index d45cdb85d..18bdc06ed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Phalcon Devtools -[![codecov](https://codecov.io/gh/phalcon/phalcon-devtools/branch/4.0.x/graph/badge.svg)](https://codecov.io/gh/phalcon/phalcon-devtools) +[![codecov](https://codecov.io/gh/phalcon/phalcon-devtools/branch/5.0.x/graph/badge.svg)](https://codecov.io/gh/phalcon/phalcon-devtools) [![Latest Version](https://img.shields.io/packagist/v/phalcon/devtools.svg?style=flat-square)][:devtools:] [![Software License](https://img.shields.io/badge/license-BSD--3-brightgreen.svg?style=flat-square)][:license:] [![Total Downloads](https://img.shields.io/packagist/dt/phalcon/devtools.svg?style=flat-square)][:packagist:] @@ -21,8 +21,8 @@ with Phalcon framework. ## Requirements -* PHP >= 7.2 -* Phalcon >= 4.0.0 +* PHP >= 8.0 +* Phalcon >= 5.0.1 ## Installing via Composer @@ -37,17 +37,7 @@ Create the composer.json file as follows: ```json { "require-dev": { - "phalcon/devtools": "~4.1" - } -} -``` - -If you are still using Phalcon 3.4.x, create a `composer.json` with the following instead: - -```json -{ - "require-dev": { - "phalcon/devtools": "^3.4" + "phalcon/devtools": "~5.0.0" } } ``` @@ -115,7 +105,7 @@ This command should display something similar to: ```sh $ phalcon --help -Phalcon DevTools (4.1.0) +Phalcon DevTools (5.0.0) Help: Lists the commands available in Phalcon DevTools @@ -124,6 +114,7 @@ Available commands: info (alias of: i) commands (alias of: list, enumerate) controller (alias of: create-controller) + task (alias of: create-task) module (alias of: create-module) model (alias of: create-model) all-models (alias of: create-all-models) diff --git a/composer.json b/composer.json index 5a0d01102..b1b437d4b 100644 --- a/composer.json +++ b/composer.json @@ -22,18 +22,21 @@ "forum": "https://forum.phalcon.io" }, "require": { - "php": ">=7.2", + "php": ">=8.0", "ext-pdo": "*", - "ext-phalcon": "^4.0.0", + "ext-json": "*", + "ext-phalcon": ">=5.0.1", "psy/psysh": "~0.9", "nikic/php-parser": "^4.2.4", - "phalcon/migrations": "^2.0", - "vlucas/phpdotenv": "^3.6|^4.0|^5.0" + "phalcon/migrations": "^3.0", + "vlucas/phpdotenv": "^3.6|^4.0|^5.0", + "nette/php-generator": "^3.5", + "roave/better-reflection": "^5.10.0|^6.1.0" }, "require-dev": { - "humbug/box": "^3.8", + "humbug/box": "^3.16|^4.1", "codeception/codeception": "^4.1", - "phpdocumentor/reflection-docblock": "^4.3", + "phpdocumentor/reflection-docblock": "^5.3|^6.2", "phpunit/phpunit": "^8.0", "codeception/specify": "^1.2", "codeception/verify": "^1.2", @@ -62,5 +65,7 @@ "tests/_support/helpers.php" ] }, + "minimum-stability": "dev", + "prefer-stable": true, "bin": ["phalcon"] } diff --git a/composer.lock b/composer.lock index 38b856690..a240824f7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,72 +4,187 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e04fa6d01edb933f490ddb3528b52ec9", + "content-hash": "67135e5a04ec4f3108d7e40b4c1d9e86", "packages": [ { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", "source": { "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", "shasum": "" }, "require": { - "php": ">=5.3.2" + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" }, "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } }, - "type": "library", "autoload": { "psr-4": { - "XdgBaseDir\\": "src/" + "PackageVersions\\": "src/PackageVersions" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "implementation of xdg base directory specification for php", + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" }, - "time": "2019-12-04T15:06:13+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-17T14:14:24+00:00" }, { - "name": "graham-campbell/result-type", - "version": "v1.0.1", + "name": "fidry/console", + "version": "0.5.5", "source": { "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb" + "url": "https://github.com/theofidry/console.git", + "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb", + "url": "https://api.github.com/repos/theofidry/console/zipball/bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", + "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", "shasum": "" }, "require": { - "php": "^7.0|^8.0", - "phpoption/phpoption": "^1.7.3" + "php": "^7.4.0 || ^8.0.0", + "symfony/console": "^4.4 || ^5.4 || ^6.1", + "symfony/event-dispatcher-contracts": "^1.0 || ^2.5 || ^3.0", + "symfony/service-contracts": "^1.0 || ^2.5 || ^3.0", + "thecodingmachine/safe": "^1.3 || ^2.0", + "webmozart/assert": "^1.11" + }, + "conflict": { + "symfony/dependency-injection": "<5.3.0", + "symfony/framework-bundle": "<5.3.0", + "symfony/http-kernel": "<5.3.0" }, "require-dev": { - "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0" + "bamarni/composer-bin-plugin": "^1.4", + "composer/semver": "^3.3", + "ergebnis/composer-normalize": "^2.28", + "infection/infection": "^0.26", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.4.3", + "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.1", + "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.1", + "symfony/http-kernel": "^4.4 || ^5.4 || ^6.1", + "symfony/phpunit-bridge": "^4.4.47 || ^5.4 || ^6.0", + "symfony/yaml": "^4.4 || ^5.4 || ^6.1", + "webmozarts/strict-phpunit": "^7.3" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": false + }, "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Fidry\\Console\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo Fidry", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Library to create CLI applications", + "keywords": [ + "cli", + "console", + "symfony" + ], + "support": { + "issues": "https://github.com/theofidry/console/issues", + "source": "https://github.com/theofidry/console/tree/0.5.5" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" } + ], + "time": "2022-12-18T10:49:34+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^8.5.28 || ^9.5.21" + }, + "type": "library", "autoload": { "psr-4": { "GrahamCampbell\\ResultType\\": "src/" @@ -82,7 +197,8 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "An Implementation Of The Result Type", @@ -95,7 +211,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" }, "funding": [ { @@ -107,190 +223,475 @@ "type": "tidelift" } ], - "time": "2020-04-13T13:17:36+00:00" + "time": "2022-07-30T15:56:11+00:00" }, { - "name": "nikic/php-parser", - "version": "v4.10.4", + "name": "humbug/php-scoper", + "version": "0.17.5", "source": { "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "url": "https://github.com/humbug/php-scoper.git", + "reference": "f67ae1e5360259911d6c4be871e4aeb4e6661541" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/humbug/php-scoper/zipball/f67ae1e5360259911d6c4be871e4aeb4e6661541", + "reference": "f67ae1e5360259911d6c4be871e4aeb4e6661541", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.0" + "composer/package-versions-deprecated": "^1.8", + "fidry/console": "^0.5.0", + "jetbrains/phpstorm-stubs": "^v2022.1", + "nikic/php-parser": "^4.12", + "php": "^7.4 || ^8.0", + "symfony/console": "^5.2 || ^6.0", + "symfony/filesystem": "^5.2 || ^6.0", + "symfony/finder": "^5.2 || ^6.0", + "symfony/polyfill-php80": "^1.23", + "symfony/polyfill-php81": "^1.24", + "thecodingmachine/safe": "^1.3 || ^2.0" + }, + "replace": { + "symfony/polyfill-php73": "*" }, "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "bamarni/composer-bin-plugin": "^1.1", + "humbug/box": "^3.16.0 || ^4.0", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.0" }, "bin": [ - "bin/php-parse" + "bin/php-scoper" ], "type": "library", "extra": { + "bamarni-bin": { + "bin-links": false + }, "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "1.0-dev" } }, "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { - "PhpParser\\": "lib/PhpParser" + "Humbug\\PhpScoper\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Théo Fidry", + "email": "theo.fidry@gmail.com" + }, + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com" } ], - "description": "A PHP parser written in PHP", + "description": "Prefixes all PHP namespaces in a file or directory.", + "support": { + "issues": "https://github.com/humbug/php-scoper/issues", + "source": "https://github.com/humbug/php-scoper/tree/0.17.5" + }, + "time": "2022-06-26T22:25:11+00:00" + }, + { + "name": "jetbrains/phpstorm-stubs", + "version": "v2022.2", + "source": { + "type": "git", + "url": "https://github.com/JetBrains/phpstorm-stubs.git", + "reference": "01006d9854679672fc8b85c6d5063ea6f25226ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/01006d9854679672fc8b85c6d5063ea6f25226ac", + "reference": "01006d9854679672fc8b85c6d5063ea6f25226ac", + "shasum": "" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "@stable", + "nikic/php-parser": "@stable", + "php": "^8.0", + "phpdocumentor/reflection-docblock": "@stable", + "phpunit/phpunit": "@stable" + }, + "type": "library", + "autoload": { + "files": [ + "PhpStormStubsMap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "PHP runtime & extensions header files for PhpStorm", + "homepage": "https://www.jetbrains.com/phpstorm", "keywords": [ - "parser", - "php" + "autocomplete", + "code", + "inference", + "inspection", + "jetbrains", + "phpstorm", + "stubs", + "type" ], "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2022.2" }, - "time": "2020-12-20T10:01:03+00:00" + "time": "2022-07-25T13:18:36+00:00" }, { - "name": "phalcon/cli-options-parser", - "version": "v1.2.1", + "name": "nette/php-generator", + "version": "v3.6.9", "source": { "type": "git", - "url": "https://github.com/phalcon/cli-options-parser.git", - "reference": "9487c84fb320c6b6882c76d4388d039316d234b9" + "url": "https://github.com/nette/php-generator.git", + "reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phalcon/cli-options-parser/zipball/9487c84fb320c6b6882c76d4388d039316d234b9", - "reference": "9487c84fb320c6b6882c76d4388d039316d234b9", + "url": "https://api.github.com/repos/nette/php-generator/zipball/d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6", + "reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6", "shasum": "" }, "require": { - "php": ">=7.0 <8.0" + "nette/utils": "^3.1.2", + "php": ">=7.2 <8.3" }, "require-dev": { - "phpunit/phpunit": ">=5.3 <8.0", - "squizlabs/php_codesniffer": "3.*" + "nette/tester": "^2.4", + "nikic/php-parser": "^4.13", + "phpstan/phpstan": "^0.12", + "tracy/tracy": "^2.8" + }, + "suggest": { + "nikic/php-parser": "to use ClassType::withBodiesFrom() & GlobalFunction::withBodyFrom()" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "3.6-dev" } }, "autoload": { - "psr-4": { - "Phalcon\\Cop\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" ], "authors": [ { - "name": "Phalcon Team", - "email": "team@phalconphp.com", - "homepage": "https://phalconphp.com/en/team" + "name": "David Grudl", + "homepage": "https://davidgrudl.com" }, { - "name": "Contributors", - "homepage": "https://github.com/phalcon/cli-options-parser/graphs/contributors" + "name": "Nette Community", + "homepage": "https://nette.org/contributors" } ], - "description": "Command line arguments/options parser.", - "homepage": "https://phalconphp.com", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.1 features.", + "homepage": "https://nette.org", "keywords": [ - "argparse", - "cli", - "command", - "command-line", - "getopt", - "line", - "option", - "optparse", - "parser", - "terminal" + "code", + "nette", + "php", + "scaffolding" ], "support": { - "forum": "https://forum.phalconphp.com/", - "issues": "https://github.com/phalcon/cli-options-parser/issues", - "source": "https://github.com/phalcon/cli-options-parser" + "issues": "https://github.com/nette/php-generator/issues", + "source": "https://github.com/nette/php-generator/tree/v3.6.9" }, - "funding": [ - { - "url": "https://github.com/phalcon", - "type": "github" - }, - { - "url": "https://opencollective.com/phalcon", - "type": "open_collective" - } - ], - "time": "2020-03-14T18:48:08+00:00" + "time": "2022-10-04T11:49:47+00:00" }, { - "name": "phalcon/migrations", - "version": "v2.1.6", + "name": "nette/utils", + "version": "v3.2.9", "source": { "type": "git", - "url": "https://github.com/phalcon/migrations.git", - "reference": "fec5c239a9abf718778e577cdd9eceb880ea624e" + "url": "https://github.com/nette/utils.git", + "reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phalcon/migrations/zipball/fec5c239a9abf718778e577cdd9eceb880ea624e", - "reference": "fec5c239a9abf718778e577cdd9eceb880ea624e", + "url": "https://api.github.com/repos/nette/utils/zipball/c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c", + "reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c", "shasum": "" }, "require": { - "ext-phalcon": "^4.0.5", - "phalcon/cli-options-parser": "^1.2", - "php": ">=7.2" + "php": ">=7.2 <8.3" + }, + "conflict": { + "nette/di": "<3.0.6" }, "require-dev": { - "codeception/codeception": "^4.1", - "codeception/module-asserts": "^1.0.0", - "codeception/module-cli": "^1.0", - "codeception/module-db": "^1.0", - "codeception/module-phpbrowser": "^1.0.0", - "ext-pdo": "*", - "fzaninotto/faker": "^1.9", - "humbug/box": "^3.8", - "phalcon/ide-stubs": "^4.0.0", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.1", - "vlucas/phpdotenv": "^4.1" + "jetbrains/phpstorm-attributes": "dev-master", + "nette/tester": "~2.0", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.3" }, "suggest": { - "robmorgan/phinx": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app." + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "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" }, - "bin": [ - "phalcon-migrations" - ], "type": "library", - "autoload": { - "psr-4": { - "Phalcon\\Migrations\\": "src/" + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" } }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.9" + }, + "time": "2023-01-18T03:26:20+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.15.3", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + }, + "time": "2023-01-16T22:05:37+00:00" + }, + { + "name": "phalcon/cli-options-parser", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/phalcon/cli-options-parser.git", + "reference": "1c5a7d0db23a88d8ba14646af75464cbbd115251" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phalcon/cli-options-parser/zipball/1c5a7d0db23a88d8ba14646af75464cbbd115251", + "reference": "1c5a7d0db23a88d8ba14646af75464cbbd115251", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.8", + "squizlabs/php_codesniffer": "3.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Phalcon\\Cop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Phalcon Team", + "email": "team@phalconphp.com", + "homepage": "https://phalconphp.com/en/team" + }, + { + "name": "Contributors", + "homepage": "https://github.com/phalcon/cli-options-parser/graphs/contributors" + } + ], + "description": "Command line arguments/options parser.", + "homepage": "https://phalconphp.com", + "keywords": [ + "argparse", + "cli", + "command", + "command-line", + "getopt", + "line", + "option", + "optparse", + "parser", + "terminal" + ], + "support": { + "forum": "https://forum.phalconphp.com/", + "issues": "https://github.com/phalcon/cli-options-parser/issues", + "source": "https://github.com/phalcon/cli-options-parser" + }, + "funding": [ + { + "url": "https://github.com/phalcon", + "type": "github" + }, + { + "url": "https://opencollective.com/phalcon", + "type": "open_collective" + } + ], + "time": "2021-08-03T02:44:01+00:00" + }, + { + "name": "phalcon/migrations", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/phalcon/migrations.git", + "reference": "84f509fcdd62b5d4cb029490120d0a45690a12b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phalcon/migrations/zipball/84f509fcdd62b5d4cb029490120d0a45690a12b0", + "reference": "84f509fcdd62b5d4cb029490120d0a45690a12b0", + "shasum": "" + }, + "require": { + "ext-phalcon": ">=5.0.1", + "nette/php-generator": "^3.5", + "phalcon/cli-options-parser": "^1.2", + "php": ">=7.4" + }, + "require-dev": { + "codeception/codeception": "^4.1", + "codeception/module-asserts": "^1.0.0", + "codeception/module-cli": "^1.0", + "codeception/module-db": "^1.0", + "codeception/module-phpbrowser": "^1.0.0", + "ext-pdo": "*", + "fakerphp/faker": "^1.15", + "humbug/box": "^3.8", + "phalcon/ide-stubs": "^5.0.1", + "phpstan/phpstan": "^1.8", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6", + "vlucas/phpdotenv": "^4.1" + }, + "suggest": { + "robmorgan/phinx": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app." + }, + "bin": [ + "phalcon-migrations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Phalcon\\Migrations\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" ], "authors": [ { @@ -326,33 +727,37 @@ "type": "open_collective" } ], - "time": "2021-03-22T20:21:52+00:00" + "time": "2022-09-26T07:15:01+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.5", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + "bamarni/composer-bin-plugin": "^1.8", + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -367,11 +772,13 @@ "authors": [ { "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" }, { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "Option Type for PHP", @@ -383,7 +790,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.7.5" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" }, "funding": [ { @@ -395,26 +802,31 @@ "type": "tidelift" } ], - "time": "2020-07-20T17:29:33+00:00" + "time": "2022-07-30T15:51:26+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -441,43 +853,93 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { "name": "psy/psysh", - "version": "v0.10.7", + "version": "v0.11.10", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "a395af46999a12006213c0c8346c9445eb31640c" + "reference": "e9eadffbed9c9deb5426fd107faae0452bf20a36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a395af46999a12006213c0c8346c9445eb31640c", - "reference": "a395af46999a12006213c0c8346c9445eb31640c", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e9eadffbed9c9deb5426fd107faae0452bf20a36", + "reference": "e9eadffbed9c9deb5426fd107faae0452bf20a36", "shasum": "" }, "require": { - "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", - "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", - "php": "^8.0 || ^7.0 || ^5.5.9", - "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10", - "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7" + "nikic/php-parser": "^4.0 || ^3.1", + "php": "^8.0 || ^7.0.8", + "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "3.17.*" + "bamarni/composer-bin-plugin": "^1.2" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." }, "bin": [ "bin/psysh" @@ -485,7 +947,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.10.x-dev" + "dev-main": "0.11.x-dev" } }, "autoload": { @@ -517,63 +979,50 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.10.7" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.10" }, - "time": "2021-03-14T02:14:56+00:00" + "time": "2022-12-23T17:47:18+00:00" }, { - "name": "symfony/console", - "version": "v4.4.21", + "name": "roave/better-reflection", + "version": "6.4.1", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "1ba4560dbbb9fcf5ae28b61f71f49c678086cf23" + "url": "https://github.com/Roave/BetterReflection.git", + "reference": "f3f3565be6fea880b57d600d7b213dc09a7c8dde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1ba4560dbbb9fcf5ae28b61f71f49c678086cf23", - "reference": "1ba4560dbbb9fcf5ae28b61f71f49c678086cf23", + "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/f3f3565be6fea880b57d600d7b213dc09a7c8dde", + "reference": "f3f3565be6fea880b57d600d7b213dc09a7c8dde", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1|^2" + "ext-json": "*", + "jetbrains/phpstorm-stubs": "2022.2", + "nikic/php-parser": "^4.15.1", + "php": "~8.0.12 || ~8.1.0 || ~8.2.0", + "roave/signature": "^1.7" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", - "symfony/lock": "<4.4", - "symfony/process": "<3.3" - }, - "provide": { - "psr/log-implementation": "1.0" + "thecodingmachine/safe": "<1.1.3" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "doctrine/coding-standard": "^10.0.0", + "phpstan/phpstan": "^1.8.10", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpunit/phpunit": "^9.5.25", + "roave/infection-static-analysis-plugin": "^1.25.0", + "vimeo/psalm": "^4.29" }, "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "composer/composer": "Required to use the ComposerSourceLocator" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Roave\\BetterReflection\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -581,71 +1030,129 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "James Titcumb", + "email": "james@asgrim.com", + "homepage": "https://github.com/asgrim" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/console/tree/v4.4.21" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" }, { - "url": "https://github.com/fabpot", - "type": "github" + "name": "Gary Hockin", + "email": "gary@roave.com", + "homepage": "https://github.com/geeh" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "name": "Jaroslav Hanslík", + "email": "kukulich@kukulich.cz", + "homepage": "https://github.com/kukulich" } ], - "time": "2021-03-26T09:23:24+00:00" + "description": "Better Reflection - an improved code reflection API", + "support": { + "issues": "https://github.com/Roave/BetterReflection/issues", + "source": "https://github.com/Roave/BetterReflection/tree/6.4.1" + }, + "time": "2022-11-23T12:27:41+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "name": "roave/signature", + "version": "1.7.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "url": "https://github.com/Roave/Signature.git", + "reference": "2ab4eadcb9f9d449f673a97b67797403b35eca94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/Roave/Signature/zipball/2ab4eadcb9f9d449f673a97b67797403b35eca94", + "reference": "2ab4eadcb9f9d449f673a97b67797403b35eca94", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "8.0.*|8.1.*|8.2.*" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "doctrine/coding-standard": "^10.0.0", + "infection/infection": "^0.26.15", + "phpunit/phpunit": "^9.5.25", + "vimeo/psalm": "^4.28.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "autoload": { + "psr-4": { + "Roave\\Signature\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Sign and verify stuff", + "support": { + "issues": "https://github.com/Roave/Signature/issues", + "source": "https://github.com/Roave/Signature/tree/1.7.0" + }, + "time": "2022-10-10T08:44:53+00:00" + }, + { + "name": "symfony/console", + "version": "v5.4.17", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", "autoload": { "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Symfony\\Component\\Console\\": "" }, - "files": [ - "bootstrap.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -654,24 +1161,24 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "cli", + "command line", + "console", + "terminal" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "source": "https://github.com/symfony/console/tree/v5.4.17" }, "funding": [ { @@ -687,44 +1194,38 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2022-12-28T14:15:31+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.22.1", + "name": "symfony/deprecation-contracts", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-mbstring": "For best performance" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "3.0-dev" }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ - "bootstrap.php" + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -741,17 +1242,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -767,42 +1261,43 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.22.1", + "name": "symfony/event-dispatcher-contracts", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "3.0-dev" }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] + "Symfony\\Contracts\\EventDispatcher\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -818,16 +1313,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Generic abstractions related to dispatching event", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -843,44 +1340,35 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.22.1", + "name": "symfony/filesystem", + "version": "v5.4.13", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "url": "https://github.com/symfony/filesystem.git", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Component\\Filesystem\\": "" }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -889,24 +1377,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + "source": "https://github.com/symfony/filesystem/tree/v5.4.13" }, "funding": [ { @@ -922,44 +1404,34 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2022-09-21T19:53:16+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.22.1", + "name": "symfony/finder", + "version": "v5.4.17", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "url": "https://github.com/symfony/finder.git", + "reference": "40c08632019838dfb3350f18cf5563b8080055fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc", + "reference": "40c08632019838dfb3350f18cf5563b8080055fc", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Component\\Finder\\": "" }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -968,28 +1440,18 @@ ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + "source": "https://github.com/symfony/finder/tree/v5.4.17" }, "funding": [ { @@ -1005,42 +1467,47 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2022-12-22T10:31:03+00:00" }, { - "name": "symfony/service-contracts", - "version": "v2.2.0", + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.0" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { - "symfony/service-implementation": "" + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "1.27-dev" }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Contracts\\Service\\": "" + "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1049,26 +1516,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to writing services", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "compatibility", + "ctype", + "polyfill", + "portable" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/master" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -1084,57 +1549,45 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/var-dumper", - "version": "v4.4.21", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806", - "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.43|^2.13|^3.0.4" + "php": ">=7.1" }, "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + "ext-intl": "For best performance" }, - "bin": [ - "Resources/bin/var-dump-server" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { "files": [ - "Resources/functions/dump.php" + "bootstrap.php" ], "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1150,14 +1603,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ - "debug", - "dump" + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.21" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -1173,130 +1630,132 @@ "type": "tidelift" } ], - "time": "2021-03-27T19:49:03+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "vlucas/phpdotenv", - "version": "v5.3.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.1", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.7.4", - "symfony/polyfill-ctype": "^1.17", - "symfony/polyfill-mbstring": "^1.17", - "symfony/polyfill-php80": "^1.17" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1" + "php": ">=7.1" }, "suggest": { - "ext-filter": "Required to use the boolean validator." + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Dotenv\\": "src/" - } + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", "keywords": [ - "dotenv", - "env", - "environment" + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2021-01-20T15:23:13+00:00" - } - ], - "packages-dev": [ + "time": "2022-11-03T14:55:06+00:00" + }, { - "name": "amphp/amp", - "version": "v2.5.2", + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", - "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { - "php": ">=7" + "php": ">=7.1" }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6.0.9 | ^7", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Amp\\": "lib" - }, "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ] + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1304,86 +1763,78 @@ ], "authors": [ { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.5.2" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { - "url": "https://github.com/amphp", + "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": "2021-01-10T17:06:37+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "amphp/byte-stream", - "version": "v1.8.1", + "name": "symfony/polyfill-php80", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { - "amphp/amp": "^2", "php": ">=7.1" }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Amp\\ByteStream\\": "lib" + "Symfony\\Polyfill\\Php80\\": "" }, - "files": [ - "lib/functions.php" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1392,74 +1843,81 @@ ], "authors": [ { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" }, { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { - "url": "https://github.com/amphp", + "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": "2021-03-30T17:13:30+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "amphp/parallel", - "version": "v1.4.0", + "name": "symfony/polyfill-php81", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/amphp/parallel.git", - "reference": "2c1039bf7ca137eae4d954b14c09a7535d7d4e1c" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/2c1039bf7ca137eae4d954b14c09a7535d7d4e1c", - "reference": "2c1039bf7ca137eae4d954b14c09a7535d7d4e1c", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.6.1", - "amphp/parser": "^1", - "amphp/process": "^1", - "amphp/serialization": "^1", - "amphp/sync": "^1.0.1", "php": ">=7.1" }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^8 || ^7" - }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Amp\\Parallel\\": "lib" + "Symfony\\Polyfill\\Php81\\": "" }, - "files": [ - "lib/Context/functions.php", - "lib/Sync/functions.php", - "lib/Worker/functions.php" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1468,62 +1926,79 @@ ], "authors": [ { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Stephen Coakley", - "email": "me@stephencoakley.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Parallel processing component for Amp.", - "homepage": "https://github.com/amphp/parallel", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "async", - "asynchronous", - "concurrent", - "multi-processing", - "multi-threading" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/master" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, - "time": "2020-04-27T15:12:37+00:00" + "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": "2022-11-03T14:55:06+00:00" }, { - "name": "amphp/parallel-functions", - "version": "v0.1.3", + "name": "symfony/service-contracts", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/amphp/parallel-functions.git", - "reference": "12e6c602e067b02f78ddf5b720c17e9aa01ad4b4" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/12e6c602e067b02f78ddf5b720c17e9aa01ad4b4", - "reference": "12e6c602e067b02f78ddf5b720c17e9aa01ad4b4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", "shasum": "" }, "require": { - "amphp/amp": "^2.0.3", - "amphp/parallel": "^0.1.8 || ^0.2 || ^1", - "opis/closure": "^3.0.7", - "php": ">=7" + "php": ">=8.0.2", + "psr/container": "^2.0" }, - "require-dev": { - "amphp/phpunit-util": "^1.0", - "friendsofphp/php-cs-fixer": "^2.9", - "phpunit/phpunit": "^6.5" + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, "autoload": { "psr-4": { - "Amp\\ParallelFunctions\\": "src" - }, - "files": [ - "src/functions.php" - ] + "Symfony\\Contracts\\Service\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1531,43 +2006,84 @@ ], "authors": [ { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Parallel processing made simple.", + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], "support": { - "issues": "https://github.com/amphp/parallel-functions/issues", - "source": "https://github.com/amphp/parallel-functions/tree/master" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" }, - "time": "2018-10-28T15:29:02+00:00" + "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": "2022-05-30T19:17:58+00:00" }, { - "name": "amphp/parser", - "version": "v1.0.0", + "name": "symfony/string", + "version": "v6.0.17", "source": { "type": "git", - "url": "https://github.com/amphp/parser.git", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1" + "url": "https://github.com/symfony/string.git", + "reference": "3f57003dd8a67ed76870cc03092f8501db7788d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parser/zipball/f83e68f03d5b8e8e0365b8792985a7f341c57ae1", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1", + "url": "https://api.github.com/repos/symfony/string/zipball/3f57003dd8a67ed76870cc03092f8501db7788d9", + "reference": "3f57003dd8a67ed76870cc03092f8501db7788d9", "shasum": "" }, "require": { - "php": ">=7" + "php": ">=8.0.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.3", - "phpunit/phpunit": "^6" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { + "files": [ + "Resources/functions.php" + ], "psr-4": { - "Amp\\Parser\\": "lib" - } + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1575,59 +2091,91 @@ ], "authors": [ { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A generator parser to make streaming parsers simple.", - "homepage": "https://github.com/amphp/parser", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", "keywords": [ - "async", - "non-blocking", - "parser", - "stream" + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" ], "support": { - "issues": "https://github.com/amphp/parser/issues", - "source": "https://github.com/amphp/parser/tree/is-valid" + "source": "https://github.com/symfony/string/tree/v6.0.17" }, - "time": "2017-06-06T05:29:10+00:00" + "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": "2022-12-14T15:52:41+00:00" }, { - "name": "amphp/process", - "version": "v1.1.1", + "name": "symfony/var-dumper", + "version": "v5.4.17", "source": { "type": "git", - "url": "https://github.com/amphp/process.git", - "reference": "b88c6aef75c0b22f6f021141dd2d5e7c5db4c124" + "url": "https://github.com/symfony/var-dumper.git", + "reference": "ad74890513d07060255df2575703daf971de92c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/b88c6aef75c0b22f6f021141dd2d5e7c5db4c124", - "reference": "b88c6aef75c0b22f6f021141dd2d5e7c5db4c124", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ad74890513d07060255df2575703daf971de92c7", + "reference": "ad74890513d07060255df2575703daf971de92c7", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.4", - "php": ">=7" + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" + "ext-iconv": "*", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/uid": "^5.1|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, + "bin": [ + "Resources/bin/var-dump-server" + ], "type": "library", "autoload": { + "files": [ + "Resources/functions/dump.php" + ], "psr-4": { - "Amp\\Process\\": "lib" + "Symfony\\Component\\VarDumper\\": "" }, - "files": [ - "lib/functions.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1636,253 +2184,361 @@ ], "authors": [ { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Asynchronous process manager.", - "homepage": "https://github.com/amphp/process", + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], "support": { - "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v1.1.1" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.17" }, "funding": [ { - "url": "https://github.com/amphp", + "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": "2021-03-30T20:04:22+00:00" + "time": "2022-12-22T10:31:03+00:00" }, { - "name": "amphp/serialization", - "version": "v1.0.0", + "name": "thecodingmachine/safe", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/amphp/serialization.git", - "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1" + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "e788f3d09dcd36f806350aedb77eac348fafadd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/serialization/zipball/693e77b2fb0b266c3c7d622317f881de44ae94a1", - "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/e788f3d09dcd36f806350aedb77eac348fafadd3", + "reference": "e788f3d09dcd36f806350aedb77eac348fafadd3", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "^8.0" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^9 || ^8 || ^7" + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, "autoload": { - "psr-4": { - "Amp\\Serialization\\": "src" - }, "files": [ - "src/functions.php" + "deprecated/apc.php", + "deprecated/array.php", + "deprecated/datetime.php", + "deprecated/libevent.php", + "deprecated/misc.php", + "deprecated/password.php", + "deprecated/mssql.php", + "deprecated/stats.php", + "deprecated/strings.php", + "lib/special_cases.php", + "deprecated/mysqli.php", + "generated/apache.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/calendar.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gettext.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/mysql.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rpminfo.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php" + ], + "classmap": [ + "lib/DateTime.php", + "lib/DateTimeImmutable.php", + "lib/Exceptions/", + "deprecated/Exceptions/", + "generated/Exceptions/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Serialization tools for IPC and data storage in PHP.", - "homepage": "https://github.com/amphp/serialization", - "keywords": [ - "async", - "asynchronous", - "serialization", - "serialize" - ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", "support": { - "issues": "https://github.com/amphp/serialization/issues", - "source": "https://github.com/amphp/serialization/tree/master" + "issues": "https://github.com/thecodingmachine/safe/issues", + "source": "https://github.com/thecodingmachine/safe/tree/v2.4.0" }, - "time": "2020-03-25T21:39:07+00:00" + "time": "2022-10-07T14:02:17+00:00" }, { - "name": "amphp/sync", - "version": "v1.4.0", + "name": "vlucas/phpdotenv", + "version": "v5.5.0", "source": { "type": "git", - "url": "https://github.com/amphp/sync.git", - "reference": "613047ac54c025aa800a9cde5b05c3add7327ed4" + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/613047ac54c025aa800a9cde5b05c3add7327ed4", - "reference": "613047ac54c025aa800a9cde5b05c3add7327ed4", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", "shasum": "" }, "require": { - "amphp/amp": "^2.2", - "php": ">=7.1" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^9 || ^8 || ^7" + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-filter": "*", + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "5.5-dev" + } + }, "autoload": { "psr-4": { - "Amp\\Sync\\": "src" - }, - "files": [ - "src/functions.php", - "src/ConcurrentIterator/functions.php" - ] + "Dotenv\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" }, { - "name": "Stephen Coakley", - "email": "me@stephencoakley.com" + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" } ], - "description": "Mutex, Semaphore, and other synchronization tools for Amp.", - "homepage": "https://github.com/amphp/sync", + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", "keywords": [ - "async", - "asynchronous", - "mutex", - "semaphore", - "synchronization" + "dotenv", + "env", + "environment" ], "support": { - "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v1.4.0" + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" }, - "time": "2020-05-07T18:57:50+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2022-10-16T01:01:54+00:00" }, { - "name": "beberlei/assert", - "version": "v3.2.7", + "name": "webmozart/assert", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/beberlei/assert.git", - "reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf" + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/d63a6943fc4fd1a2aedb65994e3548715105abcf", - "reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { "ext-ctype": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "php": "^7" + "php": "^7.2 || ^8.0" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "*", - "phpstan/phpstan-shim": "*", - "phpunit/phpunit": ">=6.0.0 <8" + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, - "suggest": { - "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles" + "require-dev": { + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { - "Assert\\": "lib/Assert" - }, - "files": [ - "lib/Assert/functions.php" - ] + "Webmozart\\Assert\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], "authors": [ { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de", - "role": "Lead Developer" - }, - { - "name": "Richard Quadling", - "email": "rquadling@gmail.com", - "role": "Collaborator" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Thin assertion library for input validation in business models.", + "description": "Assertions to validate method input/output with nice error messages.", "keywords": [ "assert", - "assertion", - "validation" + "check", + "validate" ], "support": { - "issues": "https://github.com/beberlei/assert/issues", - "source": "https://github.com/beberlei/assert/tree/v3" + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2019-12-19T17:51:41+00:00" - }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ { - "name": "behat/gherkin", - "version": "v4.8.0", + "name": "amphp/amp", + "version": "v2.6.2", "source": { "type": "git", - "url": "https://github.com/Behat/Gherkin.git", - "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd" + "url": "https://github.com/amphp/amp.git", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/2391482cd003dfdc36b679b27e9f5326bd656acd", - "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", "shasum": "" }, "require": { - "php": "~7.2|~8.0" + "php": ">=7.1" }, "require-dev": { - "cucumber/cucumber": "dev-gherkin-16.0.0", - "phpunit/phpunit": "~8|~9", - "symfony/phpunit-bridge": "~3|~4|~5", - "symfony/yaml": "~3|~4|~5" - }, - "suggest": { - "symfony/yaml": "If you want to parse features, represented in YAML files" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "2.x-dev" } }, "autoload": { - "psr-0": { - "Behat\\Gherkin": "src/" + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ], + "psr-4": { + "Amp\\": "lib" } }, "notification-url": "https://packagist.org/downloads/", @@ -1891,88 +2547,86 @@ ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Gherkin DSL parser for PHP", - "homepage": "http://behat.org/", + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "https://amphp.org/amp", "keywords": [ - "BDD", - "Behat", - "Cucumber", - "DSL", - "gherkin", - "parser" + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" ], "support": { - "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.8.0" + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.6.2" }, - "time": "2021-02-04T12:44:21+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-02-20T17:52:18+00:00" }, { - "name": "codeception/codeception", - "version": "4.1.20", + "name": "amphp/byte-stream", + "version": "v1.8.1", "source": { "type": "git", - "url": "https://github.com/Codeception/Codeception.git", - "reference": "d8b16e13e1781dbc3a7ae8292117d520c89a9c5a" + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/d8b16e13e1781dbc3a7ae8292117d520c89a9c5a", - "reference": "d8b16e13e1781dbc3a7ae8292117d520c89a9c5a", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", "shasum": "" }, "require": { - "behat/gherkin": "^4.4.0", - "codeception/lib-asserts": "^1.0", - "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.1.1 | ^9.0", - "codeception/stub": "^2.0 | ^3.0", - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "guzzlehttp/psr7": "~1.4", - "php": ">=5.6.0 <9.0", - "symfony/console": ">=2.7 <6.0", - "symfony/css-selector": ">=2.7 <6.0", - "symfony/event-dispatcher": ">=2.7 <6.0", - "symfony/finder": ">=2.7 <6.0", - "symfony/yaml": ">=2.7 <6.0" + "amphp/amp": "^2", + "php": ">=7.1" }, "require-dev": { - "codeception/module-asserts": "*@dev", - "codeception/module-cli": "*@dev", - "codeception/module-db": "*@dev", - "codeception/module-filesystem": "*@dev", - "codeception/module-phpbrowser": "*@dev", - "codeception/specify": "~0.3", - "codeception/util-universalframework": "*@dev", - "monolog/monolog": "~1.8", - "squizlabs/php_codesniffer": "~2.0", - "symfony/process": ">=2.7 <6.0", - "vlucas/phpdotenv": "^2.0 | ^3.0 | ^4.0 | ^5.0" - }, - "suggest": { - "codeception/specify": "BDD-style code blocks", - "codeception/verify": "BDD-style assertions", - "hoa/console": "For interactive console functionality", - "stecman/symfony-console-completion": "For BASH autocompletion", - "symfony/phpunit-bridge": "For phpunit-bridge support" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" }, - "bin": [ - "codecept" - ], "type": "library", "extra": { - "branch-alias": [] + "branch-alias": { + "dev-master": "1.x-dev" + } }, "autoload": { + "files": [ + "lib/functions.php" + ], "psr-4": { - "Codeception\\": "src/Codeception", - "Codeception\\Extension\\": "ext" + "Amp\\ByteStream\\": "lib" } }, "notification-url": "https://packagist.org/downloads/", @@ -1981,56 +2635,75 @@ ], "authors": [ { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "BDD-style testing framework", - "homepage": "http://codeception.com/", + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", "keywords": [ - "BDD", - "TDD", - "acceptance testing", - "functional testing", - "unit testing" + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" ], "support": { - "issues": "https://github.com/Codeception/Codeception/issues", - "source": "https://github.com/Codeception/Codeception/tree/4.1.20" + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" }, "funding": [ { - "url": "https://opencollective.com/codeception", - "type": "open_collective" + "url": "https://github.com/amphp", + "type": "github" } ], - "time": "2021-04-02T16:41:51+00:00" + "time": "2021-03-30T17:13:30+00:00" }, { - "name": "codeception/lib-asserts", - "version": "1.13.2", + "name": "amphp/parallel", + "version": "v1.4.2", "source": { "type": "git", - "url": "https://github.com/Codeception/lib-asserts.git", - "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6" + "url": "https://github.com/amphp/parallel.git", + "reference": "75853e1623efa5aa5e65e986ec9a97db573a5267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/184231d5eab66bc69afd6b9429344d80c67a33b6", - "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6", + "url": "https://api.github.com/repos/amphp/parallel/zipball/75853e1623efa5aa5e65e986ec9a97db573a5267", + "reference": "75853e1623efa5aa5e65e986ec9a97db573a5267", "shasum": "" }, "require": { - "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3 | ^9.0", - "ext-dom": "*", - "php": ">=5.6.0 <9.0" + "amphp/amp": "^2", + "amphp/byte-stream": "^1.6.1", + "amphp/parser": "^1", + "amphp/process": "^1", + "amphp/serialization": "^1", + "amphp/sync": "^1.0.1", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.1", + "phpunit/phpunit": "^8 || ^7" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "lib/Context/functions.php", + "lib/Sync/functions.php", + "lib/Worker/functions.php" + ], + "psr-4": { + "Amp\\Parallel\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2038,63 +2711,69 @@ ], "authors": [ { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - }, - { - "name": "Gintautas Miselis" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" } ], - "description": "Assertion methods used by Codeception core and Asserts module", - "homepage": "https://codeception.com/", + "description": "Parallel processing component for Amp.", + "homepage": "https://github.com/amphp/parallel", "keywords": [ - "codeception" + "async", + "asynchronous", + "concurrent", + "multi-processing", + "multi-threading" ], "support": { - "issues": "https://github.com/Codeception/lib-asserts/issues", - "source": "https://github.com/Codeception/lib-asserts/tree/1.13.2" + "issues": "https://github.com/amphp/parallel/issues", + "source": "https://github.com/amphp/parallel/tree/v1.4.2" }, - "time": "2020-10-21T16:26:20+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-12-30T00:21:42+00:00" }, { - "name": "codeception/lib-innerbrowser", - "version": "1.4.2", + "name": "amphp/parallel-functions", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/Codeception/lib-innerbrowser.git", - "reference": "4ffb91c18e4cacd073ff2914c07e5ccaf5efe449" + "url": "https://github.com/amphp/parallel-functions.git", + "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/4ffb91c18e4cacd073ff2914c07e5ccaf5efe449", - "reference": "4ffb91c18e4cacd073ff2914c07e5ccaf5efe449", + "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/04e92fcacfc921a56dfe12c23b3265e62593a7cb", + "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb", "shasum": "" }, "require": { - "codeception/codeception": "*@dev", - "ext-dom": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=5.6.0 <9.0", - "symfony/browser-kit": ">=2.7 <6.0", - "symfony/dom-crawler": ">=2.7 <6.0" - }, - "conflict": { - "codeception/codeception": "<4.0" + "amphp/amp": "^2.0.3", + "amphp/parallel": "^1.4", + "amphp/serialization": "^1.0", + "laravel/serializable-closure": "^1.0", + "php": ">=7.4" }, "require-dev": { - "codeception/util-universalframework": "dev-master" + "amphp/php-cs-fixer-config": "v2.x-dev", + "amphp/phpunit-util": "^2.0", + "phpunit/phpunit": "^9.5.11" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\ParallelFunctions\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2102,52 +2781,50 @@ ], "authors": [ { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - }, - { - "name": "Gintautas Miselis" + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Parent library for all Codeception framework modules and PhpBrowser", - "homepage": "https://codeception.com/", - "keywords": [ - "codeception" - ], + "description": "Parallel processing made simple.", "support": { - "issues": "https://github.com/Codeception/lib-innerbrowser/issues", - "source": "https://github.com/Codeception/lib-innerbrowser/tree/1.4.2" + "issues": "https://github.com/amphp/parallel-functions/issues", + "source": "https://github.com/amphp/parallel-functions/tree/v1.1.0" }, - "time": "2021-04-06T05:26:49+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-02-03T19:32:41+00:00" }, { - "name": "codeception/module-asserts", - "version": "1.3.1", + "name": "amphp/parser", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/Codeception/module-asserts.git", - "reference": "59374f2fef0cabb9e8ddb53277e85cdca74328de" + "url": "https://github.com/amphp/parser.git", + "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-asserts/zipball/59374f2fef0cabb9e8ddb53277e85cdca74328de", - "reference": "59374f2fef0cabb9e8ddb53277e85cdca74328de", + "url": "https://api.github.com/repos/amphp/parser/zipball/ff1de4144726c5dad5fab97f66692ebe8de3e151", + "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151", "shasum": "" }, "require": { - "codeception/codeception": "*@dev", - "codeception/lib-asserts": "^1.13.1", - "php": ">=5.6.0 <9.0" + "php": ">=7.4" }, - "conflict": { - "codeception/codeception": "<4.0" + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Amp\\Parser\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2155,55 +2832,66 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" - }, - { - "name": "Gintautas Miselis" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Codeception module containing various assertions", - "homepage": "https://codeception.com/", + "description": "A generator parser to make streaming parsers simple.", + "homepage": "https://github.com/amphp/parser", "keywords": [ - "assertions", - "asserts", - "codeception" + "async", + "non-blocking", + "parser", + "stream" ], "support": { - "issues": "https://github.com/Codeception/module-asserts/issues", - "source": "https://github.com/Codeception/module-asserts/tree/1.3.1" + "issues": "https://github.com/amphp/parser/issues", + "source": "https://github.com/amphp/parser/tree/v1.1.0" }, - "time": "2020-10-21T16:48:15+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-12-30T18:08:47+00:00" }, { - "name": "codeception/module-cli", - "version": "1.1.1", + "name": "amphp/process", + "version": "v1.1.4", "source": { "type": "git", - "url": "https://github.com/Codeception/module-cli.git", - "reference": "1f841ad4a1d43e5d9e60a43c4cc9e5af8008024f" + "url": "https://github.com/amphp/process.git", + "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-cli/zipball/1f841ad4a1d43e5d9e60a43c4cc9e5af8008024f", - "reference": "1f841ad4a1d43e5d9e60a43c4cc9e5af8008024f", + "url": "https://api.github.com/repos/amphp/process/zipball/76e9495fd6818b43a20167cb11d8a67f7744ee0f", + "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f", "shasum": "" }, "require": { - "codeception/codeception": "*@dev", - "php": ">=5.6.0 <9.0" + "amphp/amp": "^2", + "amphp/byte-stream": "^1.4", + "php": ">=7" }, - "conflict": { - "codeception/codeception": "<4.0" + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "phpunit/phpunit": "^6" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "lib/functions.php" + ], + "psr-4": { + "Amp\\Process\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2211,47 +2899,61 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Codeception module for testing basic shell commands and shell output", - "homepage": "http://codeception.com/", - "keywords": [ - "codeception" - ], + "description": "Asynchronous process manager.", + "homepage": "https://github.com/amphp/process", "support": { - "issues": "https://github.com/Codeception/module-cli/issues", - "source": "https://github.com/Codeception/module-cli/tree/1.1.1" + "issues": "https://github.com/amphp/process/issues", + "source": "https://github.com/amphp/process/tree/v1.1.4" }, - "time": "2020-12-26T16:56:19+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-07-06T23:50:12+00:00" }, { - "name": "codeception/module-filesystem", - "version": "1.0.3", + "name": "amphp/serialization", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/Codeception/module-filesystem.git", - "reference": "781be167fb1557bfc9b61e0a4eac60a32c534ec1" + "url": "https://github.com/amphp/serialization.git", + "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-filesystem/zipball/781be167fb1557bfc9b61e0a4eac60a32c534ec1", - "reference": "781be167fb1557bfc9b61e0a4eac60a32c534ec1", + "url": "https://api.github.com/repos/amphp/serialization/zipball/693e77b2fb0b266c3c7d622317f881de44ae94a1", + "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1", "shasum": "" }, "require": { - "codeception/codeception": "^4.0", - "php": ">=5.6.0 <9.0", - "symfony/finder": ">=2.7 <6.0" - }, - "conflict": { - "codeception/codeception": "<4.0" + "php": ">=7.1" }, - "type": "library", + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "phpunit/phpunit": "^9 || ^8 || ^7" + }, + "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Serialization\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2259,58 +2961,60 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Gintautas Miselis" + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Codeception module for testing local filesystem", - "homepage": "http://codeception.com/", + "description": "Serialization tools for IPC and data storage in PHP.", + "homepage": "https://github.com/amphp/serialization", "keywords": [ - "codeception", - "filesystem" + "async", + "asynchronous", + "serialization", + "serialize" ], "support": { - "issues": "https://github.com/Codeception/module-filesystem/issues", - "source": "https://github.com/Codeception/module-filesystem/tree/1.0.3" + "issues": "https://github.com/amphp/serialization/issues", + "source": "https://github.com/amphp/serialization/tree/master" }, - "time": "2020-10-24T14:46:40+00:00" + "time": "2020-03-25T21:39:07+00:00" }, { - "name": "codeception/module-phpbrowser", - "version": "1.0.2", + "name": "amphp/sync", + "version": "v1.4.2", "source": { "type": "git", - "url": "https://github.com/Codeception/module-phpbrowser.git", - "reference": "770a6be4160a5c0c08d100dd51bff35f6056bbf1" + "url": "https://github.com/amphp/sync.git", + "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-phpbrowser/zipball/770a6be4160a5c0c08d100dd51bff35f6056bbf1", - "reference": "770a6be4160a5c0c08d100dd51bff35f6056bbf1", + "url": "https://api.github.com/repos/amphp/sync/zipball/85ab06764f4f36d63b1356b466df6111cf4b89cf", + "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf", "shasum": "" }, "require": { - "codeception/codeception": "^4.0", - "codeception/lib-innerbrowser": "^1.3", - "guzzlehttp/guzzle": "^6.3|^7.0", - "php": ">=5.6.0 <9.0" - }, - "conflict": { - "codeception/codeception": "<4.0" + "amphp/amp": "^2.2", + "php": ">=7.1" }, "require-dev": { - "codeception/module-rest": "^1.0" - }, - "suggest": { - "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.1", + "phpunit/phpunit": "^9 || ^8 || ^7" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions.php", + "src/ConcurrentIterator/functions.php" + ], + "psr-4": { + "Amp\\Sync\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2318,54 +3022,69 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Gintautas Miselis" + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" } ], - "description": "Codeception module for testing web application over HTTP", - "homepage": "http://codeception.com/", + "description": "Mutex, Semaphore, and other synchronization tools for Amp.", + "homepage": "https://github.com/amphp/sync", "keywords": [ - "codeception", - "functional-testing", - "http" + "async", + "asynchronous", + "mutex", + "semaphore", + "synchronization" ], "support": { - "issues": "https://github.com/Codeception/module-phpbrowser/issues", - "source": "https://github.com/Codeception/module-phpbrowser/tree/1.0.2" + "issues": "https://github.com/amphp/sync/issues", + "source": "https://github.com/amphp/sync/tree/v1.4.2" }, - "time": "2020-10-24T15:29:28+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-10-25T18:29:10+00:00" }, { - "name": "codeception/phpunit-wrapper", - "version": "8.1.4", + "name": "behat/gherkin", + "version": "v4.9.0", "source": { "type": "git", - "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3" + "url": "https://github.com/Behat/Gherkin.git", + "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3", - "reference": "f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4", + "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4", "shasum": "" }, "require": { - "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0", - "phpunit/phpunit": "^8.0", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0" + "php": "~7.2|~8.0" }, "require-dev": { - "codeception/specify": "*", - "vlucas/phpdotenv": "^3.0" + "cucumber/cucumber": "dev-gherkin-22.0.0", + "phpunit/phpunit": "~8|~9", + "symfony/yaml": "~3|~4|~5" + }, + "suggest": { + "symfony/yaml": "If you want to parse features, represented in YAML files" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { - "psr-4": { - "Codeception\\PHPUnit\\": "src/" + "psr-0": { + "Behat\\Gherkin": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2374,40 +3093,91 @@ ], "authors": [ { - "name": "Davert", - "email": "davert.php@resend.cc" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" } ], - "description": "PHPUnit classes used by Codeception", + "description": "Gherkin DSL parser for PHP", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "Cucumber", + "DSL", + "gherkin", + "parser" + ], "support": { - "issues": "https://github.com/Codeception/phpunit-wrapper/issues", - "source": "https://github.com/Codeception/phpunit-wrapper/tree/8.1.4" + "issues": "https://github.com/Behat/Gherkin/issues", + "source": "https://github.com/Behat/Gherkin/tree/v4.9.0" }, - "time": "2020-12-28T14:00:08+00:00" + "time": "2021-10-12T13:05:09+00:00" }, { - "name": "codeception/specify", - "version": "1.4.0", + "name": "codeception/codeception", + "version": "4.2.2", "source": { "type": "git", - "url": "https://github.com/Codeception/Specify.git", - "reference": "17ae6d4d6cb201ef5461f6587ecfcff8c177f854" + "url": "https://github.com/Codeception/Codeception.git", + "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Specify/zipball/17ae6d4d6cb201ef5461f6587ecfcff8c177f854", - "reference": "17ae6d4d6cb201ef5461f6587ecfcff8c177f854", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b88014f3348c93f3df99dc6d0967b0dbfa804474", + "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474", "shasum": "" }, "require": { - "myclabs/deep-copy": "~1.1", - "php": ">=7.1.0", - "phpunit/phpunit": ">=7.0 <10.0" + "behat/gherkin": "^4.4.0", + "codeception/lib-asserts": "^1.0 | 2.0.*@dev", + "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.1.1 | ^9.0", + "codeception/stub": "^2.0 | ^3.0 | ^4.0", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/psr7": "^1.4 | ^2.0", + "php": ">=5.6.0 <9.0", + "symfony/console": ">=2.7 <6.0", + "symfony/css-selector": ">=2.7 <6.0", + "symfony/event-dispatcher": ">=2.7 <6.0", + "symfony/finder": ">=2.7 <6.0", + "symfony/yaml": ">=2.7 <6.0" + }, + "require-dev": { + "codeception/module-asserts": "^1.0 | 2.0.*@dev", + "codeception/module-cli": "^1.0 | 2.0.*@dev", + "codeception/module-db": "^1.0 | 2.0.*@dev", + "codeception/module-filesystem": "^1.0 | 2.0.*@dev", + "codeception/module-phpbrowser": "^1.0 | 2.0.*@dev", + "codeception/specify": "~0.3", + "codeception/util-universalframework": "*@dev", + "monolog/monolog": "~1.8", + "squizlabs/php_codesniffer": "~2.0", + "symfony/process": ">=2.7 <6.0", + "vlucas/phpdotenv": "^2.0 | ^3.0 | ^4.0 | ^5.0" + }, + "suggest": { + "codeception/specify": "BDD-style code blocks", + "codeception/verify": "BDD-style assertions", + "hoa/console": "For interactive console functionality", + "stecman/symfony-console-completion": "For BASH autocompletion", + "symfony/phpunit-bridge": "For phpunit-bridge support" }, + "bin": [ + "codecept" + ], "type": "library", + "extra": { + "branch-alias": [] + }, "autoload": { - "psr-0": { - "Codeception\\": "src/" + "files": [ + "functions.php" + ], + "psr-4": { + "Codeception\\": "src/Codeception", + "Codeception\\Extension\\": "ext" } }, "notification-url": "https://packagist.org/downloads/", @@ -2417,207 +3187,119 @@ "authors": [ { "name": "Michael Bodnarchuk", - "email": "davert@codeception.com" - }, - { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" + "email": "davert@mail.ua", + "homepage": "https://codegyre.com" } ], - "description": "BDD code blocks for PHPUnit and Codeception", + "description": "BDD-style testing framework", + "homepage": "https://codeception.com/", + "keywords": [ + "BDD", + "TDD", + "acceptance testing", + "functional testing", + "unit testing" + ], "support": { - "issues": "https://github.com/Codeception/Specify/issues", - "source": "https://github.com/Codeception/Specify/tree/1.4.0" + "issues": "https://github.com/Codeception/Codeception/issues", + "source": "https://github.com/Codeception/Codeception/tree/4.2.2" }, - "time": "2020-08-27T20:17:29+00:00" + "funding": [ + { + "url": "https://opencollective.com/codeception", + "type": "open_collective" + } + ], + "time": "2022-08-13T13:28:25+00:00" }, { - "name": "codeception/stub", - "version": "3.7.0", + "name": "codeception/lib-asserts", + "version": "1.13.2", "source": { "type": "git", - "url": "https://github.com/Codeception/Stub.git", - "reference": "468dd5fe659f131fc997f5196aad87512f9b1304" + "url": "https://github.com/Codeception/lib-asserts.git", + "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/468dd5fe659f131fc997f5196aad87512f9b1304", - "reference": "468dd5fe659f131fc997f5196aad87512f9b1304", + "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/184231d5eab66bc69afd6b9429344d80c67a33b6", + "reference": "184231d5eab66bc69afd6b9429344d80c67a33b6", "shasum": "" }, "require": { - "phpunit/phpunit": "^8.4 | ^9.0" + "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3 | ^9.0", + "ext-dom": "*", + "php": ">=5.6.0 <9.0" }, "type": "library", "autoload": { - "psr-4": { - "Codeception\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", + "authors": [ + { + "name": "Michael Bodnarchuk", + "email": "davert@mail.ua", + "homepage": "http://codegyre.com" + }, + { + "name": "Gintautas Miselis" + }, + { + "name": "Gustavo Nieves", + "homepage": "https://medium.com/@ganieves" + } + ], + "description": "Assertion methods used by Codeception core and Asserts module", + "homepage": "https://codeception.com/", + "keywords": [ + "codeception" + ], "support": { - "issues": "https://github.com/Codeception/Stub/issues", - "source": "https://github.com/Codeception/Stub/tree/3.7.0" + "issues": "https://github.com/Codeception/lib-asserts/issues", + "source": "https://github.com/Codeception/lib-asserts/tree/1.13.2" }, - "time": "2020-07-03T15:54:43+00:00" + "time": "2020-10-21T16:26:20+00:00" }, { - "name": "codeception/verify", - "version": "1.5.0", + "name": "codeception/lib-innerbrowser", + "version": "1.5.1", "source": { "type": "git", - "url": "https://github.com/Codeception/Verify.git", - "reference": "ebf833c857825207a8abec541c07bdd724ea4676" + "url": "https://github.com/Codeception/lib-innerbrowser.git", + "reference": "31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Verify/zipball/ebf833c857825207a8abec541c07bdd724ea4676", - "reference": "ebf833c857825207a8abec541c07bdd724ea4676", + "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2", + "reference": "31b4b56ad53c3464fcb2c0a14d55a51a201bd3c2", "shasum": "" }, "require": { - "codeception/phpunit-wrapper": "^7.8.0 | ^8.1.2 | ^9.0.2", + "codeception/codeception": "4.*@dev", "ext-dom": "*", - "php": ">= 7.1", - "phpunit/phpunit": ">= 7.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/Codeception/function.php" - ], - "psr-4": { - "Codeception\\": "src\\Codeception" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert@codeception.com" - }, - { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" - } - ], - "description": "BDD assertion library for PHPUnit", - "support": { - "issues": "https://github.com/Codeception/Verify/issues", - "source": "https://github.com/Codeception/Verify/tree/master" - }, - "time": "2020-08-29T00:28:24+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.1", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2020-11-11T10:22:58+00:00" - }, - { - "name": "composer/semver", - "version": "1.7.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a", - "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a", - "shasum": "" + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.6.0 <9.0", + "symfony/browser-kit": ">=2.7 <6.0", + "symfony/dom-crawler": ">=2.7 <6.0" }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "conflict": { + "codeception/codeception": "<4.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5" + "codeception/util-universalframework": "dev-master" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2625,76 +3307,52 @@ ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Michael Bodnarchuk", + "email": "davert@mail.ua", + "homepage": "http://codegyre.com" }, { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "name": "Gintautas Miselis" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", + "description": "Parent library for all Codeception framework modules and PhpBrowser", + "homepage": "https://codeception.com/", "keywords": [ - "semantic", - "semver", - "validation", - "versioning" + "codeception" ], "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/1.7.2" + "issues": "https://github.com/Codeception/lib-innerbrowser/issues", + "source": "https://github.com/Codeception/lib-innerbrowser/tree/1.5.1" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2020-12-03T15:47:16+00:00" + "time": "2021-08-30T15:21:42+00:00" }, { - "name": "composer/xdebug-handler", - "version": "1.4.6", + "name": "codeception/module-asserts", + "version": "1.3.1", "source": { "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + "url": "https://github.com/Codeception/module-asserts.git", + "reference": "59374f2fef0cabb9e8ddb53277e85cdca74328de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "url": "https://api.github.com/repos/Codeception/module-asserts/zipball/59374f2fef0cabb9e8ddb53277e85cdca74328de", + "reference": "59374f2fef0cabb9e8ddb53277e85cdca74328de", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" + "codeception/codeception": "*@dev", + "codeception/lib-asserts": "^1.13.1", + "php": ">=5.6.0 <9.0" }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "conflict": { + "codeception/codeception": "<4.0" }, "type": "library", "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2702,254 +3360,102 @@ ], "authors": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" + "name": "Michael Bodnarchuk" }, { - "url": "https://github.com/composer", - "type": "github" + "name": "Gintautas Miselis" }, { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-03-25T17:01:18+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Gustavo Nieves", + "homepage": "https://medium.com/@ganieves" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Codeception module containing various assertions", + "homepage": "https://codeception.com/", "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.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%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.0", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", - "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", - "shasum": "" - }, - "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } + "assertions", + "asserts", + "codeception" ], - "description": "A more advanced JSONRPC implementation", "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" + "issues": "https://github.com/Codeception/module-asserts/issues", + "source": "https://github.com/Codeception/module-asserts/tree/1.3.1" }, - "time": "2021-01-10T17:48:47+00:00" + "time": "2020-10-21T16:48:15+00:00" }, { - "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "name": "codeception/module-cli", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "url": "https://github.com/Codeception/module-cli.git", + "reference": "1f841ad4a1d43e5d9e60a43c4cc9e5af8008024f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/Codeception/module-cli/zipball/1f841ad4a1d43e5d9e60a43c4cc9e5af8008024f", + "reference": "1f841ad4a1d43e5d9e60a43c4cc9e5af8008024f", "shasum": "" }, "require": { - "php": ">=7.1" + "codeception/codeception": "*@dev", + "php": ">=5.6.0 <9.0" }, - "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" + "conflict": { + "codeception/codeception": "<4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { - "psr-4": { - "LanguageServerProtocol\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "ISC" + "MIT" ], "authors": [ { - "name": "Felix Becker", - "email": "felix.b@outlook.com" + "name": "Michael Bodnarchuk" } ], - "description": "PHP classes for the Language Server Protocol", + "description": "Codeception module for testing basic shell commands and shell output", + "homepage": "http://codeception.com/", "keywords": [ - "language", - "microsoft", - "php", - "server" + "codeception" ], "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "issues": "https://github.com/Codeception/module-cli/issues", + "source": "https://github.com/Codeception/module-cli/tree/1.1.1" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2020-12-26T16:56:19+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "7.3.0", + "name": "codeception/module-filesystem", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "7008573787b430c1c1f650e3722d9bba59967628" + "url": "https://github.com/Codeception/module-filesystem.git", + "reference": "781be167fb1557bfc9b61e0a4eac60a32c534ec1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", - "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "url": "https://api.github.com/repos/Codeception/module-filesystem/zipball/781be167fb1557bfc9b61e0a4eac60a32c534ec1", + "reference": "781be167fb1557bfc9b61e0a4eac60a32c534ec1", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7 || ^2.0", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" + "codeception/codeception": "^4.0", + "php": ">=5.6.0 <9.0", + "symfony/finder": ">=2.7 <6.0" }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" + "conflict": { + "codeception/codeception": "<4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.3-dev" - } - }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2958,85 +3464,57 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Michael Bodnarchuk" }, { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "name": "Gintautas Miselis" } ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", + "description": "Codeception module for testing local filesystem", + "homepage": "http://codeception.com/", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" + "codeception", + "filesystem" ], "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + "issues": "https://github.com/Codeception/module-filesystem/issues", + "source": "https://github.com/Codeception/module-filesystem/tree/1.0.3" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" - } - ], - "time": "2021-03-23T11:33:13+00:00" + "time": "2020-10-24T14:46:40+00:00" }, { - "name": "guzzlehttp/promises", - "version": "1.4.1", + "name": "codeception/module-phpbrowser", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + "url": "https://github.com/Codeception/module-phpbrowser.git", + "reference": "8ba6bede11d0914e74d98691f427fd8f397f192e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "url": "https://api.github.com/repos/Codeception/module-phpbrowser/zipball/8ba6bede11d0914e74d98691f427fd8f397f192e", + "reference": "8ba6bede11d0914e74d98691f427fd8f397f192e", "shasum": "" }, "require": { - "php": ">=5.5" + "codeception/codeception": "^4.1", + "codeception/lib-innerbrowser": "^1.3", + "guzzlehttp/guzzle": "^6.3|^7.0", + "php": ">=5.6.0 <9.0" + }, + "conflict": { + "codeception/codeception": "<4.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "codeception/module-rest": "^1.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } + "suggest": { + "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" }, + "type": "library", "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3045,63 +3523,55 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Michael Bodnarchuk" + }, + { + "name": "Gintautas Miselis" } ], - "description": "Guzzle promises library", + "description": "Codeception module for testing web application over HTTP", + "homepage": "http://codeception.com/", "keywords": [ - "promise" + "codeception", + "functional-testing", + "http" ], "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" + "issues": "https://github.com/Codeception/module-phpbrowser/issues", + "source": "https://github.com/Codeception/module-phpbrowser/tree/1.0.3" }, - "time": "2021-03-07T09:25:29+00:00" + "time": "2022-05-21T13:50:41+00:00" }, { - "name": "guzzlehttp/psr7", - "version": "1.8.1", + "name": "codeception/phpunit-wrapper", + "version": "8.1.6", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" + "url": "https://github.com/Codeception/phpunit-wrapper.git", + "reference": "7d3479bab7e2b6349044db8af11cd05d57809f9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7d3479bab7e2b6349044db8af11cd05d57809f9c", + "reference": "7d3479bab7e2b6349044db8af11cd05d57809f9c", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0", + "phpunit/phpunit": "^8.0", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "codeception/specify": "*", + "vlucas/phpdotenv": "^3.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "Codeception\\PHPUnit\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3109,678 +3579,542 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" + "name": "Davert", + "email": "davert.php@resend.cc" } ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], + "description": "PHPUnit classes used by Codeception", "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.1" + "issues": "https://github.com/Codeception/phpunit-wrapper/issues", + "source": "https://github.com/Codeception/phpunit-wrapper/tree/8.1.6" }, - "time": "2021-03-21T16:25:00+00:00" + "time": "2022-05-23T06:22:33+00:00" }, { - "name": "hoa/compiler", - "version": "3.17.08.08", + "name": "codeception/specify", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/hoaproject/Compiler.git", - "reference": "aa09caf0bf28adae6654ca6ee415ee2f522672de" + "url": "https://github.com/Codeception/Specify.git", + "reference": "17ae6d4d6cb201ef5461f6587ecfcff8c177f854" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Compiler/zipball/aa09caf0bf28adae6654ca6ee415ee2f522672de", - "reference": "aa09caf0bf28adae6654ca6ee415ee2f522672de", + "url": "https://api.github.com/repos/Codeception/Specify/zipball/17ae6d4d6cb201ef5461f6587ecfcff8c177f854", + "reference": "17ae6d4d6cb201ef5461f6587ecfcff8c177f854", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0", - "hoa/file": "~1.0", - "hoa/iterator": "~2.0", - "hoa/math": "~1.0", - "hoa/protocol": "~1.0", - "hoa/regex": "~1.0", - "hoa/visitor": "~2.0" - }, - "require-dev": { - "hoa/json": "~2.0", - "hoa/test": "~2.0" + "myclabs/deep-copy": "~1.1", + "php": ">=7.1.0", + "phpunit/phpunit": ">=7.0 <10.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "autoload": { - "psr-4": { - "Hoa\\Compiler\\": "." + "psr-0": { + "Codeception\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" + "name": "Michael Bodnarchuk", + "email": "davert@codeception.com" }, { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Gustavo Nieves", + "homepage": "https://medium.com/@ganieves" } ], - "description": "The Hoa\\Compiler library.", - "homepage": "https://hoa-project.net/", - "keywords": [ - "algebraic", - "ast", - "compiler", - "context-free", - "coverage", - "exhaustive", - "grammar", - "isotropic", - "language", - "lexer", - "library", - "ll1", - "llk", - "parser", - "pp", - "random", - "regular", - "rule", - "sampler", - "syntax", - "token", - "trace", - "uniform" - ], + "description": "BDD code blocks for PHPUnit and Codeception", "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Compiler", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Compiler/issues", - "source": "https://central.hoa-project.net/Resource/Library/Compiler" - }, - "time": "2017-08-08T07:44:07+00:00" + "issues": "https://github.com/Codeception/Specify/issues", + "source": "https://github.com/Codeception/Specify/tree/1.4.0" + }, + "time": "2020-08-27T20:17:29+00:00" }, { - "name": "hoa/consistency", - "version": "1.17.05.02", + "name": "codeception/stub", + "version": "4.0.2", "source": { "type": "git", - "url": "https://github.com/hoaproject/Consistency.git", - "reference": "fd7d0adc82410507f332516faf655b6ed22e4c2f" + "url": "https://github.com/Codeception/Stub.git", + "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Consistency/zipball/fd7d0adc82410507f332516faf655b6ed22e4c2f", - "reference": "fd7d0adc82410507f332516faf655b6ed22e4c2f", + "url": "https://api.github.com/repos/Codeception/Stub/zipball/18a148dacd293fc7b044042f5aa63a82b08bff5d", + "reference": "18a148dacd293fc7b044042f5aa63a82b08bff5d", "shasum": "" }, "require": { - "hoa/exception": "~1.0", - "php": ">=5.5.0" + "php": "^7.4 | ^8.0", + "phpunit/phpunit": "^8.4 | ^9.0 | ^10.0 | 10.0.x-dev" }, "require-dev": { - "hoa/stream": "~1.0", - "hoa/test": "~2.0" + "consolidation/robo": "^3.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Hoa\\Consistency\\": "." - }, - "files": [ - "Prelude.php" - ] + "Codeception\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" - } - ], - "description": "The Hoa\\Consistency library.", - "homepage": "https://hoa-project.net/", - "keywords": [ - "autoloader", - "callable", - "consistency", - "entity", - "flex", - "keyword", - "library" + "MIT" ], + "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Consistency", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Consistency/issues", - "source": "https://central.hoa-project.net/Resource/Library/Consistency" - }, - "time": "2017-05-02T12:18:12+00:00" + "issues": "https://github.com/Codeception/Stub/issues", + "source": "https://github.com/Codeception/Stub/tree/4.0.2" + }, + "time": "2022-01-31T19:25:15+00:00" }, { - "name": "hoa/event", - "version": "1.17.01.13", + "name": "codeception/verify", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/hoaproject/Event.git", - "reference": "6c0060dced212ffa3af0e34bb46624f990b29c54" + "url": "https://github.com/Codeception/Verify.git", + "reference": "ebf833c857825207a8abec541c07bdd724ea4676" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Event/zipball/6c0060dced212ffa3af0e34bb46624f990b29c54", - "reference": "6c0060dced212ffa3af0e34bb46624f990b29c54", + "url": "https://api.github.com/repos/Codeception/Verify/zipball/ebf833c857825207a8abec541c07bdd724ea4676", + "reference": "ebf833c857825207a8abec541c07bdd724ea4676", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0" - }, - "require-dev": { - "hoa/test": "~2.0" + "codeception/phpunit-wrapper": "^7.8.0 | ^8.1.2 | ^9.0.2", + "ext-dom": "*", + "php": ">= 7.1", + "phpunit/phpunit": ">= 7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { + "files": [ + "src/Codeception/function.php" + ], "psr-4": { - "Hoa\\Event\\": "." + "Codeception\\": "src\\Codeception" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" + "name": "Michael Bodnarchuk", + "email": "davert@codeception.com" }, { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Gustavo Nieves", + "homepage": "https://medium.com/@ganieves" } ], - "description": "The Hoa\\Event library.", - "homepage": "https://hoa-project.net/", - "keywords": [ - "event", - "library", - "listener", - "observer" - ], + "description": "BDD assertion library for PHPUnit", "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Event", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Event/issues", - "source": "https://central.hoa-project.net/Resource/Library/Event" - }, - "time": "2017-01-13T15:30:50+00:00" + "issues": "https://github.com/Codeception/Verify/issues", + "source": "https://github.com/Codeception/Verify/tree/master" + }, + "time": "2020-08-29T00:28:24+00:00" }, { - "name": "hoa/exception", - "version": "1.17.01.16", + "name": "composer/pcre", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/hoaproject/Exception.git", - "reference": "091727d46420a3d7468ef0595651488bfc3a458f" + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Exception/zipball/091727d46420a3d7468ef0595651488bfc3a458f", - "reference": "091727d46420a3d7468ef0595651488bfc3a458f", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/event": "~1.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "hoa/test": "~2.0" + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "Hoa\\Exception\\": "." + "Composer\\Pcre\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" } ], - "description": "The Hoa\\Exception library.", - "homepage": "https://hoa-project.net/", + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", "keywords": [ - "exception", - "library" + "PCRE", + "preg", + "regex", + "regular expression" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Exception", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Exception/issues", - "source": "https://central.hoa-project.net/Resource/Library/Exception" - }, - "time": "2017-01-16T07:53:27+00:00" + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" }, { - "name": "hoa/file", - "version": "1.17.07.11", + "name": "composer/semver", + "version": "3.3.2", "source": { "type": "git", - "url": "https://github.com/hoaproject/File.git", - "reference": "35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca" + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/File/zipball/35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca", - "reference": "35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/event": "~1.0", - "hoa/exception": "~1.0", - "hoa/iterator": "~2.0", - "hoa/stream": "~1.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "hoa/test": "~2.0" + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "Hoa\\File\\": "." + "Composer\\Semver\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" }, { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], - "description": "The Hoa\\File library.", - "homepage": "https://hoa-project.net/", + "description": "Semver library that offers utilities, version constraint parsing and validation.", "keywords": [ - "Socket", - "directory", - "file", - "finder", - "library", - "link", - "temporary" + "semantic", + "semver", + "validation", + "versioning" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/File", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/File/issues", - "source": "https://central.hoa-project.net/Resource/Library/File" - }, - "time": "2017-07-11T07:42:15+00:00" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-04-01T19:23:25+00:00" }, { - "name": "hoa/iterator", - "version": "2.17.01.10", + "name": "composer/xdebug-handler", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/hoaproject/Iterator.git", - "reference": "d1120ba09cb4ccd049c86d10058ab94af245f0cc" + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Iterator/zipball/d1120ba09cb4ccd049c86d10058ab94af245f0cc", - "reference": "d1120ba09cb4ccd049c86d10058ab94af245f0cc", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "hoa/test": "~2.0" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "psr-4": { - "Hoa\\Iterator\\": "." + "Composer\\XdebugHandler\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "The Hoa\\Iterator library.", - "homepage": "https://hoa-project.net/", + "description": "Restarts a process without Xdebug.", "keywords": [ - "iterator", - "library" + "Xdebug", + "performance" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Iterator", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Iterator/issues", - "source": "https://central.hoa-project.net/Resource/Library/Iterator" - }, - "time": "2017-01-10T10:34:47+00:00" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" }, { - "name": "hoa/math", - "version": "1.17.05.16", + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", "source": { "type": "git", - "url": "https://github.com/hoaproject/Math.git", - "reference": "7150785d30f5d565704912116a462e9f5bc83a0c" + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Math/zipball/7150785d30f5d565704912116a462e9f5bc83a0c", - "reference": "7150785d30f5d565704912116a462e9f5bc83a0c", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", "shasum": "" }, "require": { - "hoa/compiler": "~3.0", - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0", - "hoa/iterator": "~2.0", - "hoa/protocol": "~1.0", - "hoa/zformat": "~1.0" + "php": ">=5.3.2" }, "require-dev": { - "hoa/test": "~2.0" + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Hoa\\Math\\": "." + "XdgBaseDir\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" - } - ], - "description": "The Hoa\\Math library.", - "homepage": "https://hoa-project.net/", - "keywords": [ - "arrangement", - "combination", - "combinatorics", - "counting", - "library", - "math", - "permutation", - "sampler", - "set" + "MIT" ], + "description": "implementation of xdg base directory specification for php", "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Math", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Math/issues", - "source": "https://central.hoa-project.net/Resource/Library/Math" - }, - "time": "2017-05-16T08:02:17+00:00" + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" }, { - "name": "hoa/protocol", - "version": "1.17.01.14", + "name": "doctrine/instantiator", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/hoaproject/Protocol.git", - "reference": "5c2cf972151c45f373230da170ea015deecf19e2" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Protocol/zipball/5c2cf972151c45f373230da170ea015deecf19e2", - "reference": "5c2cf972151c45f373230da170ea015deecf19e2", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "hoa/test": "~2.0" + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Hoa\\Protocol\\": "." - }, - "files": [ - "Wrapper.php" - ] + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "The Hoa\\Protocol library.", - "homepage": "https://hoa-project.net/", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "library", - "protocol", - "resource", - "stream", - "wrapper" + "constructor", + "instantiate" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Protocol", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Protocol/issues", - "source": "https://central.hoa-project.net/Resource/Library/Protocol" - }, - "time": "2017-01-14T12:26:10+00:00" + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.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%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" }, { - "name": "hoa/regex", - "version": "1.17.01.13", + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/hoaproject/Regex.git", - "reference": "7e263a61b6fb45c1d03d8e5ef77668518abd5bec" + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Regex/zipball/7e263a61b6fb45c1d03d8e5ef77668518abd5bec", - "reference": "7e263a61b6fb45c1d03d8e5ef77668518abd5bec", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0", - "hoa/math": "~1.0", - "hoa/protocol": "~1.0", - "hoa/ustring": "~4.0", - "hoa/visitor": "~2.0" + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" }, + "type": "library", "autoload": { "psr-4": { - "Hoa\\Regex\\": "." + "AdvancedJsonRpc\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "ISC" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Felix Becker", + "email": "felix.b@outlook.com" } ], - "description": "The Hoa\\Regex library.", - "homepage": "https://hoa-project.net/", - "keywords": [ - "compiler", - "library", - "regex" - ], + "description": "A more advanced JSONRPC implementation", "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Regex", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Regex/issues", - "source": "https://central.hoa-project.net/Resource/Library/Regex" - }, - "time": "2017-01-13T16:10:24+00:00" + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" }, { - "name": "hoa/stream", - "version": "1.17.02.21", + "name": "felixfbecker/language-server-protocol", + "version": "v1.5.2", "source": { "type": "git", - "url": "https://github.com/hoaproject/Stream.git", - "reference": "3293cfffca2de10525df51436adf88a559151d82" + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Stream/zipball/3293cfffca2de10525df51436adf88a559151d82", - "reference": "3293cfffca2de10525df51436adf88a559151d82", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/event": "~1.0", - "hoa/exception": "~1.0", - "hoa/protocol": "~1.0" + "php": ">=7.1" }, "require-dev": { - "hoa/test": "~2.0" + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" }, "type": "library", "extra": { @@ -3790,283 +4124,407 @@ }, "autoload": { "psr-4": { - "Hoa\\Stream\\": "." + "LanguageServerProtocol\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "ISC" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Felix Becker", + "email": "felix.b@outlook.com" } ], - "description": "The Hoa\\Stream library.", - "homepage": "https://hoa-project.net/", + "description": "PHP classes for the Language Server Protocol", "keywords": [ - "Context", - "bucket", - "composite", - "filter", - "in", - "library", - "out", - "protocol", - "stream", - "wrapper" + "language", + "microsoft", + "php", + "server" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Stream", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Stream/issues", - "source": "https://central.hoa-project.net/Resource/Library/Stream" - }, - "time": "2017-02-21T16:01:06+00:00" + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" + }, + "time": "2022-03-02T22:36:06+00:00" }, { - "name": "hoa/ustring", - "version": "4.17.01.16", + "name": "guzzlehttp/guzzle", + "version": "7.5.0", "source": { "type": "git", - "url": "https://github.com/hoaproject/Ustring.git", - "reference": "e6326e2739178799b1fe3fdd92029f9517fa17a0" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Ustring/zipball/e6326e2739178799b1fe3fdd92029f9517fa17a0", - "reference": "e6326e2739178799b1fe3fdd92029f9517fa17a0", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0" + "ext-json": "*", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { - "hoa/test": "~2.0" + "bamarni/composer-bin-plugin": "^1.8.1", + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { - "ext-iconv": "ext/iconv must be present (or a third implementation) to use Hoa\\Ustring::transcode().", - "ext-intl": "To get a better Hoa\\Ustring::toAscii() and Hoa\\Ustring::compareTo()." + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "7.5-dev" } }, "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Hoa\\Ustring\\": "." + "GuzzleHttp\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" }, { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], - "description": "The Hoa\\Ustring library.", - "homepage": "https://hoa-project.net/", + "description": "Guzzle is a PHP HTTP client library", "keywords": [ - "library", - "search", - "string", - "unicode" + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Ustring", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Ustring/issues", - "source": "https://central.hoa-project.net/Resource/Library/Ustring" - }, - "time": "2017-01-16T07:08:25+00:00" + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-08-28T15:39:27+00:00" }, { - "name": "hoa/visitor", - "version": "2.17.01.16", + "name": "guzzlehttp/promises", + "version": "1.5.2", "source": { "type": "git", - "url": "https://github.com/hoaproject/Visitor.git", - "reference": "c18fe1cbac98ae449e0d56e87469103ba08f224a" + "url": "https://github.com/guzzle/promises.git", + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Visitor/zipball/c18fe1cbac98ae449e0d56e87469103ba08f224a", - "reference": "c18fe1cbac98ae449e0d56e87469103ba08f224a", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { - "hoa/consistency": "~1.0" + "php": ">=5.5" }, "require-dev": { - "hoa/test": "~2.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.5-dev" } }, "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Hoa\\Visitor\\": "." + "GuzzleHttp\\Promise\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" }, { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], - "description": "The Hoa\\Visitor library.", - "homepage": "https://hoa-project.net/", + "description": "Guzzle promises library", "keywords": [ - "library", - "structure", - "visit", - "visitor" + "promise" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Visitor", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Visitor/issues", - "source": "https://central.hoa-project.net/Resource/Library/Visitor" - }, - "time": "2017-01-16T07:02:03+00:00" + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2022-08-28T14:55:35+00:00" }, { - "name": "hoa/zformat", - "version": "1.17.01.10", + "name": "guzzlehttp/psr7", + "version": "2.4.3", "source": { "type": "git", - "url": "https://github.com/hoaproject/Zformat.git", - "reference": "522c381a2a075d4b9dbb42eb4592dd09520e4ac2" + "url": "https://github.com/guzzle/psr7.git", + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Zformat/zipball/522c381a2a075d4b9dbb42eb4592dd09520e4ac2", - "reference": "522c381a2a075d4b9dbb42eb4592dd09520e4ac2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { - "hoa/consistency": "~1.0", - "hoa/exception": "~1.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.4-dev" } }, "autoload": { "psr-4": { - "Hoa\\Zformat\\": "." + "GuzzleHttp\\Psr7\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" }, { - "name": "Hoa community", - "homepage": "https://hoa-project.net/" + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], - "description": "The Hoa\\Zformat library.", - "homepage": "https://hoa-project.net/", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ - "library", - "parameter", - "zformat" + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" ], "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Zformat", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Zformat/issues", - "source": "https://central.hoa-project.net/Resource/Library/Zformat" - }, - "time": "2017-01-10T10:39:54+00:00" + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.4.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-10-26T14:07:24+00:00" }, { "name": "humbug/box", - "version": "3.8.3", + "version": "3.16.0", "source": { "type": "git", - "url": "https://github.com/humbug/box.git", - "reference": "43f13dee00a5ddc706d90a64fd7c5916e1588bde" + "url": "https://github.com/box-project/box.git", + "reference": "adb282ad00a20438fc881f8ec9207ed7446243b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humbug/box/zipball/43f13dee00a5ddc706d90a64fd7c5916e1588bde", - "reference": "43f13dee00a5ddc706d90a64fd7c5916e1588bde", + "url": "https://api.github.com/repos/box-project/box/zipball/adb282ad00a20438fc881f8ec9207ed7446243b9", + "reference": "adb282ad00a20438fc881f8ec9207ed7446243b9", "shasum": "" }, "require": { - "amphp/parallel-functions": "^0.1.3", - "beberlei/assert": "^3.2", - "composer/semver": "^1.5", - "composer/xdebug-handler": "^1.3.2", + "amphp/parallel-functions": "^1.1", + "composer-plugin-api": "^2.2", + "composer/semver": "^3.2", + "composer/xdebug-handler": "^2.0 || ^3.0", "ext-phar": "*", - "hoa/compiler": "^3.17", - "humbug/php-scoper": "^0.12", + "humbug/php-scoper": "^0.17", "justinrainbow/json-schema": "^5.2.9", + "laravel/serializable-closure": "^1.0", "nikic/iter": "^2.0", "nikic/php-parser": "^4.2", - "ocramius/package-versions": "^1.4", - "opis/closure": "^3.2", - "paragonie/pharaoh": "^0.5", - "php": "^7.2", - "phpseclib/phpseclib": "^2.0", + "paragonie/pharaoh": "^0.6", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-docblock": "^5.2", "psr/log": "^1.0", "seld/jsonlint": "^1.7", - "symfony/console": "^4.3.5", - "symfony/filesystem": "^4.2", - "symfony/finder": "^4.0", - "symfony/process": "^4.2", - "symfony/var-dumper": "^4.2", + "symfony/console": "^4.3.5 || ^5.2", + "symfony/filesystem": "^4.4 || ^5.2", + "symfony/finder": "^4.4 || ^5.2", + "symfony/process": "^4.4 || ^5.2", + "symfony/var-dumper": "^4.4 || ^5.2", + "webmozart/assert": "^1.9", "webmozart/path-util": "^2.3" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.3", - "infection/infection": "^0.10", "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^8.1", - "symfony/phpunit-bridge": "^4.2" + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.0", + "symfony/phpunit-bridge": "^4.2 || ^5.0" }, "suggest": { "ext-openssl": "To accelerate private key generation." @@ -4084,94 +4542,17 @@ } }, "autoload": { - "psr-4": { - "KevinGH\\Box\\": "src" - }, "files": [ "src/FileSystem/file_system.php", "src/consts.php", "src/functions.php" ], - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - }, - { - "name": "Théo Fidry", - "email": "theo.fidry@gmail.com" - } - ], - "description": "Fast, zero config application bundler with PHARs.", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/humbug/box/issues", - "source": "https://github.com/humbug/box/tree/3.8.3" - }, - "time": "2019-11-03T17:04:02+00:00" - }, - { - "name": "humbug/php-scoper", - "version": "0.12.3", - "source": { - "type": "git", - "url": "https://github.com/humbug/php-scoper.git", - "reference": "e69999927460a403f8f07bc91b1db2ff2fe934ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/humbug/php-scoper/zipball/e69999927460a403f8f07bc91b1db2ff2fe934ce", - "reference": "e69999927460a403f8f07bc91b1db2ff2fe934ce", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.0", - "ocramius/package-versions": "^1.1", - "php": "^7.2", - "roave/better-reflection": "^3.5", - "symfony/console": "^3.2 || ^4.0", - "symfony/filesystem": "^3.2 || ^4.0", - "symfony/finder": "^3.2 || ^4.0" - }, - "replace": { - "humbug/php-scoper": "self.version" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.1", - "humbug/box": "^3.8", - "phpunit/phpunit": "^8.0" - }, - "bin": [ - "bin/php-scoper" - ], - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": false - }, - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php", - "src/json.php" - ], "psr-4": { - "Humbug\\PhpScoper\\": "src/" - } + "KevinGH\\Box\\": "src" + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4179,79 +4560,37 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io" }, { "name": "Théo Fidry", "email": "theo.fidry@gmail.com" - }, - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com" } ], - "description": "Prefixes all PHP namespaces in a file or directory.", - "support": { - "issues": "https://github.com/humbug/php-scoper/issues", - "source": "https://github.com/humbug/php-scoper/tree/master" - }, - "time": "2019-06-09T17:44:41+00:00" - }, - { - "name": "jetbrains/phpstorm-stubs", - "version": "v2019.1", - "source": { - "type": "git", - "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "9e309771f362e979ecfb429303ad7a402c657234" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/9e309771f362e979ecfb429303ad7a402c657234", - "reference": "9e309771f362e979ecfb429303ad7a402c657234", - "shasum": "" - }, - "require-dev": { - "nikic/php-parser": "v4.0.1", - "php": "^7.1", - "phpdocumentor/reflection-docblock": "^4.3", - "phpunit/phpunit": "7.1.4" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "PHP runtime & extensions header files for PhpStorm", - "homepage": "https://www.jetbrains.com/phpstorm", + "description": "Fast, zero config application bundler with PHARs.", "keywords": [ - "autocomplete", - "code", - "inference", - "inspection", - "jetbrains", - "phpstorm", - "stubs", - "type" + "phar" ], "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2019.1" + "issues": "https://github.com/box-project/box/issues", + "source": "https://github.com/box-project/box/tree/3.16.0" }, - "time": "2019-03-25T16:59:23+00:00" + "time": "2022-02-13T23:10:13+00:00" }, { "name": "justinrainbow/json-schema", - "version": "5.2.10", + "version": "5.2.12", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b" + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", - "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", "shasum": "" }, "require": { @@ -4306,43 +4645,104 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.10" + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + }, + "time": "2022-04-13T08:02:27+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" }, - "time": "2020-05-27T16:41:55+00:00" + "time": "2022-09-08T13:45:54+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4358,7 +4758,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -4366,20 +4766,20 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v2.1.0", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e" + "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e", - "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", + "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", "shasum": "" }, "require": { @@ -4387,10 +4787,10 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.6" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -4415,36 +4815,31 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/master" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.1.0" }, - "time": "2020-04-16T18:48:43+00:00" + "time": "2022-12-08T20:46:14+00:00" }, { "name": "nikic/iter", - "version": "v2.1.0", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/nikic/iter.git", - "reference": "a7f3aa313c1315e14cf1d7e520c0f781f584a42f" + "reference": "d1323929952ddcb0b06439991f93bde3816a39e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/iter/zipball/a7f3aa313c1315e14cf1d7e520c0f781f584a42f", - "reference": "a7f3aa313c1315e14cf1d7e520c0f781f584a42f", + "url": "https://api.github.com/repos/nikic/iter/zipball/d1323929952ddcb0b06439991f93bde3816a39e9", + "reference": "d1323929952ddcb0b06439991f93bde3816a39e9", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { "files": [ "src/iter.func.php", @@ -4470,9 +4865,9 @@ ], "support": { "issues": "https://github.com/nikic/iter/issues", - "source": "https://github.com/nikic/iter/tree/v2.1.0" + "source": "https://github.com/nikic/iter/tree/v2.2.0" }, - "time": "2020-09-19T15:58:13+00:00" + "time": "2021-08-02T15:04:32+00:00" }, { "name": "openlss/lib-array2xml", @@ -4527,83 +4922,18 @@ }, "time": "2019-03-29T20:06:56+00:00" }, - { - "name": "opis/closure", - "version": "3.6.2", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/06e2ebd25f2869e54a306dda991f7db58066f7f6", - "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0 || ^8.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, - "files": [ - "functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "support": { - "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.2" - }, - "time": "2021-04-09T13:42:10+00:00" - }, { "name": "paragonie/constant_time_encoding", - "version": "v2.4.0", + "version": "v2.6.3", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" + "reference": "58c3f47f650c94ec05a151692652a868995d2938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", - "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", "shasum": "" }, "require": { @@ -4657,30 +4987,30 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2020-12-06T15:14:20+00:00" + "time": "2022-06-14T06:56:20+00:00" }, { "name": "paragonie/pharaoh", - "version": "v0.5.0", + "version": "v0.6.0", "source": { "type": "git", "url": "https://github.com/paragonie/pharaoh.git", - "reference": "060418e946de2f39a3618ad70d9b6d0a61437b83" + "reference": "d33976a45429edc9c4282e7b0f2b6c3a3a5783fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/pharaoh/zipball/060418e946de2f39a3618ad70d9b6d0a61437b83", - "reference": "060418e946de2f39a3618ad70d9b6d0a61437b83", + "url": "https://api.github.com/repos/paragonie/pharaoh/zipball/d33976a45429edc9c4282e7b0f2b6c3a3a5783fc", + "reference": "d33976a45429edc9c4282e7b0f2b6c3a3a5783fc", "shasum": "" }, "require": { "paragonie/constant_time_encoding": "^2", "paragonie/sodium_compat": "^1.3", - "php": "^7", + "php": "^7|^8", "ulrichsg/getopt-php": "^3" }, "require-dev": { - "vimeo/psalm": "^1|^2" + "vimeo/psalm": "^1|^2|^3" }, "bin": [ "pharaoh" @@ -4717,7 +5047,7 @@ "issues": "https://github.com/paragonie/pharaoh/issues", "source": "https://github.com/paragonie/pharaoh" }, - "time": "2018-11-02T16:45:56+00:00" + "time": "2020-12-03T04:57:05+00:00" }, { "name": "paragonie/random_compat", @@ -4771,16 +5101,16 @@ }, { "name": "paragonie/sodium_compat", - "version": "v1.14.0", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/paragonie/sodium_compat.git", - "reference": "a1cfe0b21faf9c0b61ac0c6188c4af7fd6fd0db3" + "reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/a1cfe0b21faf9c0b61ac0c6188c4af7fd6fd0db3", - "reference": "a1cfe0b21faf9c0b61ac0c6188c4af7fd6fd0db3", + "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/cb15e403ecbe6a6cc515f855c310eb6b1872a933", + "reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933", "shasum": "" }, "require": { @@ -4851,9 +5181,9 @@ ], "support": { "issues": "https://github.com/paragonie/sodium_compat/issues", - "source": "https://github.com/paragonie/sodium_compat/tree/v1.14.0" + "source": "https://github.com/paragonie/sodium_compat/tree/v1.19.0" }, - "time": "2020-12-03T16:26:19+00:00" + "time": "2022-09-26T03:40:35+00:00" }, { "name": "phalcon/ide-stubs", @@ -4924,16 +5254,16 @@ }, { "name": "phar-io/manifest", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { @@ -4978,208 +5308,87 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2020-06-27T14:33:11+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" - }, - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } + "php": "^7.2 || ^8.0" }, + "type": "library", "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2019-12-28T18:55:12+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5188,51 +5397,59 @@ ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" } ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/master" + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" }, - "time": "2017-07-14T14:27:02+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { - "name": "phpseclib/phpseclib", - "version": "2.0.31", + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", "source": { "type": "git", - "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/233a920cb38636a43b18d428f9a8db1f0a1a08f4", - "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": ">=5.3.3" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "phing/phing": "~2.7", - "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4", - "squizlabs/php_codesniffer": "~2.0" - }, - "suggest": { - "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", - "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", - "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", - "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, "autoload": { - "files": [ - "phpseclib/bootstrap.php" - ], "psr-4": { - "phpseclib\\": "phpseclib/" + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -5241,106 +5458,57 @@ ], "authors": [ { - "name": "Jim Wigginton", - "email": "terrafrost@php.net", - "role": "Lead Developer" - }, - { - "name": "Patrick Monnerat", - "email": "pm@datasphere.ch", - "role": "Developer" - }, - { - "name": "Andreas Fischer", - "email": "bantu@phpbb.com", - "role": "Developer" - }, - { - "name": "Hans-Jürgen Petrich", - "email": "petrich@tronic-media.com", - "role": "Developer" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" }, { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "role": "Developer" + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], - "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", - "homepage": "http://phpseclib.sourceforge.net", - "keywords": [ - "BigInteger", - "aes", - "asn.1", - "asn1", - "blowfish", - "crypto", - "cryptography", - "encryption", - "rsa", - "security", - "sftp", - "signature", - "signing", - "ssh", - "twofish", - "x.509", - "x509" - ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { - "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/2.0.31" + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "funding": [ - { - "url": "https://github.com/terrafrost", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpseclib", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", - "type": "tidelift" - } - ], - "time": "2021-04-06T13:56:45+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.10.3", + "name": "phpdocumentor/type-resolver", + "version": "1.6.2", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -5349,43 +5517,29 @@ ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2020-03-05T15:02:03+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.14", + "version": "7.0.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c" + "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c", - "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { @@ -5394,7 +5548,7 @@ "php": ">=7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1 || ^4.0", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", @@ -5437,7 +5591,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.14" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" }, "funding": [ { @@ -5445,20 +5599,20 @@ "type": "github" } ], - "time": "2020-12-02T13:39:03+00:00" + "time": "2021-07-26T12:20:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.3", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { @@ -5497,7 +5651,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, "funding": [ { @@ -5505,7 +5659,7 @@ "type": "github" } ], - "time": "2020-11-30T08:25:21+00:00" + "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", @@ -5613,29 +5767,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.1.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -5660,7 +5814,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" }, "funding": [ { @@ -5669,20 +5823,20 @@ } ], "abandoned": true, - "time": "2020-11-30T08:38:46+00:00" + "time": "2020-08-04T08:28:15+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.15", + "version": "8.5.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "038d4196d8e8cb405cd5e82cedfe413ad6eef9ef" + "reference": "33c126b09a42de5c99e5e8032b54e8221264a74e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/038d4196d8e8cb405cd5e82cedfe413ad6eef9ef", - "reference": "038d4196d8e8cb405cd5e82cedfe413ad6eef9ef", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33c126b09a42de5c99e5e8032b54e8221264a74e", + "reference": "33c126b09a42de5c99e5e8032b54e8221264a74e", "shasum": "" }, "require": { @@ -5694,27 +5848,23 @@ "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.1", + "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", + "sebastian/comparator": "^3.0.5", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", + "sebastian/exporter": "^3.1.5", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", @@ -5754,19 +5904,23 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.15" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.31" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2021-03-17T07:27:54+00:00" + "time": "2022-10-28T05:57:37+00:00" }, { "name": "psr/http-client", @@ -5821,21 +5975,22 @@ "time": "2020-06-29T06:28:15+00:00" }, { - "name": "psr/http-message", + "name": "psr/http-factory", "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.0.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -5858,33 +6013,34 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Common interfaces for PSR-7 HTTP message factories", "keywords": [ + "factory", "http", - "http-message", + "message", "psr", + "psr-17", "psr-7", "request", "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/master" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2019-04-30T12:38:16+00:00" }, { - "name": "psr/log", - "version": "1.1.3", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { @@ -5893,12 +6049,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5911,101 +6067,47 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "log", + "http", + "http-message", "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" - }, - "time": "2020-03-23T09:12:05+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } + "psr-7", + "request", + "response" ], - "description": "A polyfill for getallheaders.", "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" + "source": "https://github.com/php-fig/http-message/tree/master" }, - "time": "2019-03-08T08:55:37+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { - "name": "roave/better-reflection", - "version": "3.5.0", + "name": "psr/log", + "version": "1.1.4", "source": { "type": "git", - "url": "https://github.com/Roave/BetterReflection.git", - "reference": "a93d26f6f08add54943d752dad1da64c464c2e69" + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/a93d26f6f08add54943d752dad1da64c464c2e69", - "reference": "a93d26f6f08add54943d752dad1da64c464c2e69", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "ext-json": "*", - "jetbrains/phpstorm-stubs": "2019.1", - "nikic/php-parser": "^4.2.1", - "php": ">=7.2.0,<7.5.0", - "phpdocumentor/reflection-docblock": "^4.1.1", - "phpdocumentor/type-resolver": "^0.4.0", - "roave/signature": "^1.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^8.1.0" - }, - "suggest": { - "composer/composer": "Required to use the ComposerSourceLocator" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Roave\\BetterReflection\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -6014,71 +6116,65 @@ ], "authors": [ { - "name": "James Titcumb", - "email": "james@asgrim.com", - "homepage": "https://github.com/asgrim" - }, - { - "name": "Gary Hockin", - "email": "gary@roave.com", - "homepage": "https://github.com/geeh" - }, - { - "name": "Jaroslav Hanslík", - "email": "kukulich@kukulich.cz", - "homepage": "https://github.com/kukulich" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Better Reflection - an improved code reflection API", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], "support": { - "issues": "https://github.com/Roave/BetterReflection/issues", - "source": "https://github.com/Roave/BetterReflection/tree/3.5.0" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2019-05-28T00:00:03+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { - "name": "roave/signature", - "version": "1.1.0", + "name": "ralouphie/getallheaders", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/Roave/Signature.git", - "reference": "c4e8a59946bad694ab5682a76e7884a9157a8a2c" + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/Signature/zipball/c4e8a59946bad694ab5682a76e7884a9157a8a2c", - "reference": "c4e8a59946bad694ab5682a76e7884a9157a8a2c", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, "require": { - "php": "^7.1 || ^7.2" + "php": ">=5.6" }, "require-dev": { - "infection/infection": "^0.7.1", - "phpunit/phpunit": "^7.0", - "squizlabs/php_codesniffer": "^3.2" + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" }, "type": "library", "autoload": { - "psr-4": { - "Roave\\Signature\\": "src" - } + "files": [ + "src/getallheaders.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Sign and verify stuff", + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", "support": { - "issues": "https://github.com/Roave/Signature/issues", - "source": "https://github.com/Roave/Signature/tree/1.1.0" + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" }, - "time": "2020-10-01T07:27:11+00:00" + "time": "2019-03-08T08:55:37+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -6137,16 +6233,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -6199,7 +6295,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -6207,7 +6303,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -6340,16 +6436,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.3", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -6358,7 +6454,7 @@ }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -6405,7 +6501,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -6413,20 +6509,20 @@ "type": "github" } ], - "time": "2020-11-30T07:47:53+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { @@ -6469,7 +6565,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" }, "funding": [ { @@ -6477,7 +6573,7 @@ "type": "github" } ], - "time": "2020-11-30T07:43:24+00:00" + "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", @@ -6811,23 +6907,24 @@ }, { "name": "seld/jsonlint", - "version": "1.8.3", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" + "reference": "4211420d25eba80712bff236a98960ef68b866b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", + "reference": "4211420d25eba80712bff236a98960ef68b866b7", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ "bin/jsonlint" @@ -6844,410 +6941,122 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2020-11-11T09:19:24+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-04-09T00:54:41+00:00" - }, - { - "name": "symfony/browser-kit", - "version": "v5.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/browser-kit.git", - "reference": "3ca3a57ce9860318b20a924fec5daf5c6db44d93" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/3ca3a57ce9860318b20a924fec5daf5c6db44d93", - "reference": "3ca3a57ce9860318b20a924fec5daf5c6db44d93", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/dom-crawler": "^4.4|^5.0" - }, - "require-dev": { - "symfony/css-selector": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/mime": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\BrowserKit\\": "" - }, - "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": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/browser-kit/tree/v5.2.4" - }, - "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": "2021-02-22T06:48:33+00:00" - }, - { - "name": "symfony/css-selector", - "version": "v5.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "f65f217b3314504a1ec99c2d6ef69016bb13490f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/f65f217b3314504a1ec99c2d6ef69016bb13490f", - "reference": "f65f217b3314504a1ec99c2d6ef69016bb13490f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\CssSelector\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Converts CSS selectors to XPath expressions", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.2.4" - }, - "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": "2021-01-27T10:01:46+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", - "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" } ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/master" + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/Seldaek", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2022-04-01T13:37:23+00:00" }, { - "name": "symfony/dom-crawler", - "version": "v5.2.4", + "name": "squizlabs/php_codesniffer", + "version": "3.7.1", "source": { "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "400e265163f65aceee7e904ef532e15228de674b" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/400e265163f65aceee7e904ef532e15228de674b", - "reference": "400e265163f65aceee7e904ef532e15228de674b", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "masterminds/html5": "<2.6" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" }, "require-dev": { - "masterminds/html5": "^2.6", - "symfony/css-selector": "^4.4|^5.0" - }, - "suggest": { - "symfony/css-selector": "" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\DomCrawler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Greg Sherwood", + "role": "lead" } ], - "description": "Eases DOM navigation for HTML and XML documents", - "homepage": "https://symfony.com", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.2.4" + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "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": "2021-02-15T18:55:04+00:00" + "time": "2022-06-18T07:21:10+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v4.4.20", + "name": "symfony/browser-kit", + "version": "v5.4.11", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c" + "url": "https://github.com/symfony/browser-kit.git", + "reference": "081fe28a26b6bd671dea85ef3a4b5003f3c88027" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c352647244bd376bf7d31efbd5401f13f50dad0c", - "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/081fe28a26b6bd671dea85ef3a4b5003f3c88027", + "reference": "081fe28a26b6bd671dea85ef3a4b5003f3c88027", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" - }, - "conflict": { - "symfony/dependency-injection": "<3.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "1.1" + "php": ">=7.2.5", + "symfony/dom-crawler": "^4.4|^5.0|^6.0", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/error-handler": "~3.4|~4.4", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^3.4|^4.0|^5.0" + "symfony/css-selector": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0" }, "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/process": "" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" + "Symfony\\Component\\BrowserKit\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -7267,10 +7076,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.20" + "source": "https://github.com/symfony/browser-kit/tree/v5.4.11" }, "funding": [ { @@ -7286,43 +7095,34 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2022-07-27T15:50:05+00:00" }, { - "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.9", + "name": "symfony/css-selector", + "version": "v5.4.17", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7" + "url": "https://github.com/symfony/css-selector.git", + "reference": "052ef49b660f9ad2a3adb311c555c9bc11ba61f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7", - "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/052ef49b660f9ad2a3adb311c555c9bc11ba61f4", + "reference": "052ef49b660f9ad2a3adb311c555c9bc11ba61f4", "shasum": "" }, "require": { - "php": ">=7.1.3" - }, - "suggest": { - "psr/event-dispatcher": "", - "symfony/event-dispatcher-implementation": "" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, "autoload": { "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7330,26 +7130,22 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to dispatching event", + "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.9" + "source": "https://github.com/symfony/css-selector/tree/v5.4.17" }, "funding": [ { @@ -7365,30 +7161,43 @@ "type": "tidelift" } ], - "time": "2020-07-06T13:19:58+00:00" + "time": "2022-12-23T11:40:44+00:00" }, { - "name": "symfony/filesystem", - "version": "v4.4.21", + "name": "symfony/dom-crawler", + "version": "v5.4.17", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "940826c465be2690c9fae91b2793481e5cbd6834" + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "32a07d910edc138a1dd5508c17c6b9bc1eb27a1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/940826c465be2690c9fae91b2793481e5cbd6834", - "reference": "940826c465be2690c9fae91b2793481e5cbd6834", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/32a07d910edc138a1dd5508c17c6b9bc1eb27a1b", + "reference": "32a07d910edc138a1dd5508c17c6b9bc1eb27a1b", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/polyfill-ctype": "~1.8" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "masterminds/html5": "<2.6" + }, + "require-dev": { + "masterminds/html5": "^2.6", + "symfony/css-selector": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/css-selector": "" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Filesystem\\": "" + "Symfony\\Component\\DomCrawler\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -7408,10 +7217,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides basic utilities for the filesystem", + "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v4.4.21" + "source": "https://github.com/symfony/dom-crawler/tree/v5.4.17" }, "funding": [ { @@ -7427,29 +7236,53 @@ "type": "tidelift" } ], - "time": "2021-03-28T09:59:32+00:00" + "time": "2022-12-22T10:31:03+00:00" }, { - "name": "symfony/finder", - "version": "v4.4.20", + "name": "symfony/event-dispatcher", + "version": "v5.4.17", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2543795ab1570df588b9bbd31e1a2bd7037b94f6", - "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", + "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Finder\\": "" + "Symfony\\Component\\EventDispatcher\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -7469,10 +7302,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Finds files and directories via an intuitive fluent interface", + "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/finder/tree/v4.4.20" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.17" }, "funding": [ { @@ -7488,24 +7321,25 @@ "type": "tidelift" } ], - "time": "2021-02-12T10:48:09+00:00" + "time": "2022-12-12T15:54:21+00:00" }, { "name": "symfony/process", - "version": "v4.4.20", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a" + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/7e950b6366d4da90292c2e7fa820b3c1842b965a", - "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -7533,7 +7367,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.20" + "source": "https://github.com/symfony/process/tree/v5.4.11" }, "funding": [ { @@ -7549,32 +7383,32 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/yaml", - "version": "v5.2.5", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "298a08ddda623485208506fcee08817807a251dd" + "reference": "edcdc11498108f8967fe95118a7ec8624b94760e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/298a08ddda623485208506fcee08817807a251dd", - "reference": "298a08ddda623485208506fcee08817807a251dd", + "url": "https://api.github.com/repos/symfony/yaml/zipball/edcdc11498108f8967fe95118a7ec8624b94760e", + "reference": "edcdc11498108f8967fe95118a7ec8624b94760e", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-ctype": "~1.8" + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<4.4" + "symfony/console": "<5.3" }, "require-dev": { - "symfony/console": "^4.4|^5.0" + "symfony/console": "^5.3|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -7608,7 +7442,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.2.5" + "source": "https://github.com/symfony/yaml/tree/v5.4.17" }, "funding": [ { @@ -7624,20 +7458,20 @@ "type": "tidelift" } ], - "time": "2021-03-06T07:59:01+00:00" + "time": "2022-12-13T09:57:04+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -7666,7 +7500,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/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, "funding": [ { @@ -7674,7 +7508,7 @@ "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2021-07-28T10:34:58+00:00" }, { "name": "ulrichsg/getopt-php", @@ -7728,16 +7562,16 @@ }, { "name": "vimeo/psalm", - "version": "4.7.0", + "version": "4.30.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d4377c0baf3ffbf0b1ec6998e8d1be2a40971005" + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d4377c0baf3ffbf0b1ec6998e8d1be2a40971005", - "reference": "d4377c0baf3ffbf0b1ec6998e8d1be2a40971005", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", "shasum": "" }, "require": { @@ -7745,8 +7579,9 @@ "amphp/byte-stream": "^1.5", "composer/package-versions-deprecated": "^1.8.0", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1", + "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-ctype": "*", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -7756,11 +7591,12 @@ "felixfbecker/advanced-json-rpc": "^3.0.3", "felixfbecker/language-server-protocol": "^1.5", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.10.1", + "nikic/php-parser": "^4.13", "openlss/lib-array2xml": "^1.0", "php": "^7.1|^8", "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", "webmozart/path-util": "^2.3" }, "provide": { @@ -7774,16 +7610,17 @@ "phpdocumentor/reflection-docblock": "^5", "phpmyadmin/sql-parser": "5.1.0||dev-master", "phpspec/prophecy": ">=1.9.0", + "phpstan/phpdoc-parser": "1.2.* || 1.6.4", "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.13", - "slevomat/coding-standard": "^6.3.11", + "psalm/plugin-phpunit": "^0.16", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3", - "weirdan/phpunit-appveyor-reporter": "^1.0.0", + "symfony/process": "^4.3 || ^5.0 || ^6.0", "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "suggest": { - "ext-igbinary": "^2.0.5" + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" }, "bin": [ "psalm", @@ -7802,13 +7639,13 @@ } }, "autoload": { - "psr-4": { - "Psalm\\": "src/Psalm/" - }, "files": [ "src/functions.php", "src/spl_object_id.php" - ] + ], + "psr-4": { + "Psalm\\": "src/Psalm/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7827,67 +7664,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.7.0" - }, - "time": "2021-03-29T03:54:38+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/vimeo/psalm/tree/4.30.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-11-06T20:37:08+00:00" }, { "name": "webmozart/path-util", @@ -7937,19 +7716,21 @@ "issues": "https://github.com/webmozart/path-util/issues", "source": "https://github.com/webmozart/path-util/tree/2.3.0" }, + "abandoned": "symfony/filesystem", "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.2", + "php": ">=8.0", "ext-pdo": "*", - "ext-phalcon": "^4.0.0" + "ext-json": "*", + "ext-phalcon": ">=5.0.1" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 45554e93b..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,58 +0,0 @@ -version: "3.6" -services: - service_php: - build: - context: ./docker/php - working_dir: /app - restart: always - volumes: - - ./:/app - - ./docker/php/mods/psr.ini:/etc/php/7.4/fpm/conf.d/20-psr.ini - - ./docker/php/mods/phalcon.ini:/etc/php/7.4/fpm/conf.d/50-phalcon.ini - - ./docker/php/mods/psr.ini:/etc/php/7.4/cli/conf.d/20-psr.ini - - ./docker/php/mods/phalcon.ini:/etc/php/7.4/cli/conf.d/50-phalcon.ini - depends_on: - - service_mysql - - service_postgres - - service_nginx: - image: nginx:alpine - restart: always - ports: - - 8081:80 - volumes: - - ./:/app - - ./docker/nginx/conf.d:/etc/nginx/conf.d - - ./docker/nginx/fastcgi.conf:/etc/nginx/fastcgi.conf - - ./docker/nginx/fastcgi-php.conf:/etc/nginx/fastcgi-php.conf - depends_on: - - service_php - - service_mysql: - image: mariadb - restart: always - environment: - - MYSQL_DATABASE=devtools - - MYSQL_USER=devtools - - MYSQL_PASSWORD=password - - MYSQL_ROOT_PASSWORD=password - volumes: - - db_mysql_data:/var/lib/mysql/ - - ./docker/mysql/config:/etc/mysql/conf.d/ - - service_postgres: - image: postgis/postgis:13-master - restart: always - environment: - - POSTGRES_USER=devtools - - POSTGRES_PASSWORD=password - - POSTGRES_DB=devtools - volumes: - - db_postgres_data:/var/lib/postgresql/data - healthcheck: - test: pg_isready -q -d devtools -U devtools - timeout: 5s - -volumes: - db_mysql_data: - db_postgres_data: diff --git a/docker/mysql/my.cnf b/docker/mysql/my.cnf deleted file mode 100644 index 6b30bb6dd..000000000 --- a/docker/mysql/my.cnf +++ /dev/null @@ -1,6 +0,0 @@ -[mysqld] -sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" -max_connections = 500 -max_allowed_packet = 32mb -skip-host-cache -skip-name-resolve diff --git a/docker/nginx/conf.d/default.conf b/docker/nginx/conf.d/default.conf deleted file mode 100644 index 0c150662f..000000000 --- a/docker/nginx/conf.d/default.conf +++ /dev/null @@ -1,33 +0,0 @@ -server { - listen 80; - listen [::]:80; - - root /app/dummy/public/; - index index.php index.html index.htm; - - client_max_body_size 128M; - - location / { - try_files $uri $uri/ /index.php?_url=$uri&$args; - } - - location /webtools { - try_files $uri $uri/ /webtools.php?_url=$uri&$args; - } - - location ~ \.php$ { - fastcgi_pass service_php:8000; - include fastcgi-php.conf; - - fastcgi_buffers 16 32k; - fastcgi_buffer_size 32k; - - fastcgi_connect_timeout 600; - fastcgi_send_timeout 600; - fastcgi_read_timeout 600; - } - - location ~ /\.(ht|svn|git) { - deny all; - } -} diff --git a/docker/nginx/fastcgi-php.conf b/docker/nginx/fastcgi-php.conf deleted file mode 100644 index 78b0877b3..000000000 --- a/docker/nginx/fastcgi-php.conf +++ /dev/null @@ -1,13 +0,0 @@ -# regex to split $uri to $fastcgi_script_name and $fastcgi_path -fastcgi_split_path_info ^(.+?\.php)(/.*)$; - -# Check that the PHP script exists before passing it -try_files $uri /index.php =404; - -# Bypass the fact that try_files resets $fastcgi_path_info -# see: http://trac.nginx.org/nginx/ticket/321 -set $path_info $fastcgi_path_info; -fastcgi_param PATH_INFO $path_info; - -fastcgi_index index.php; -include fastcgi.conf; diff --git a/docker/nginx/fastcgi.conf b/docker/nginx/fastcgi.conf deleted file mode 100644 index 091738c60..000000000 --- a/docker/nginx/fastcgi.conf +++ /dev/null @@ -1,26 +0,0 @@ - -fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; -fastcgi_param QUERY_STRING $query_string; -fastcgi_param REQUEST_METHOD $request_method; -fastcgi_param CONTENT_TYPE $content_type; -fastcgi_param CONTENT_LENGTH $content_length; - -fastcgi_param SCRIPT_NAME $fastcgi_script_name; -fastcgi_param REQUEST_URI $request_uri; -fastcgi_param DOCUMENT_URI $document_uri; -fastcgi_param DOCUMENT_ROOT $document_root; -fastcgi_param SERVER_PROTOCOL $server_protocol; -fastcgi_param REQUEST_SCHEME $scheme; -fastcgi_param HTTPS $https if_not_empty; - -fastcgi_param GATEWAY_INTERFACE CGI/1.1; -fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; - -fastcgi_param REMOTE_ADDR $remote_addr; -fastcgi_param REMOTE_PORT $remote_port; -fastcgi_param SERVER_ADDR $server_addr; -fastcgi_param SERVER_PORT $server_port; -fastcgi_param SERVER_NAME $server_name; - -# PHP only, required if PHP was built with --enable-force-cgi-redirect -fastcgi_param REDIRECT_STATUS 200; diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile deleted file mode 100644 index ae0998cb9..000000000 --- a/docker/php/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -FROM phalconphp/build:debian-buster - -LABEL description="Docker image to build Phalcon on Debian Buster" \ - maintainer="Serghei Iakovlev " \ - vendor=Phalcon \ - name="com.phalconphp.images.build.buster-7.4" - -ENV PATH=/root/composer/vendor/bin:/app/vendor/bin:/app/bin:/app:${PATH} - -# Installing php and extentions -RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ - && echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \ - && apt-get update \ - && apt-get install --no-install-recommends -yq \ - mc nano git wget curl zip unzip htop re2c \ - php7.4-cli \ - php7.4-fpm \ - php7.4-dev \ - php7.4-common \ - php7.4-curl \ - php7.4-gettext \ - php7.4-intl \ - php7.4-mbstring \ - php7.4-mysqli \ - php7.4-opcache \ - php7.4-pdo_* \ - php7.4-pgsql \ - php7.4-shmop \ - php7.4-xml \ - php7.4-xml \ - php7.4-zip \ - php-pear \ - && apt-get autoremove -y \ - && apt-get autoclean -y \ - && apt-get clean -y \ - && rm -rf /tmp/* /var/tmp/* \ - && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ - && find /var/cache -type f -delete \ - && find /var/log -type f | while read f; do echo -n '' > ${f}; done - -# Updating and installing pecl exts -RUN pecl update-channels -RUN pecl install psr - -# Setting up phalcon -ADD https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh /tmp -RUN bash /tmp/script.deb.sh -RUN apt-get install php7.4-phalcon - -# Installing composer -RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \ - && curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \ - && php /tmp/composer-setup.php \ - --no-ansi \ - --install-dir=/usr/local/bin \ - --filename=composer - -# Editing www.conf -RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d \ - && sed -i -e "s/^;clear_env = no$/clear_env = no/" /etc/php/7.4/fpm/pool.d/www.conf \ - && sed -i -e "/listen = .*/c\listen = [::]:8000" /etc/php/7.4/fpm/pool.d/www.conf - -WORKDIR /app - -EXPOSE 8000 - -CMD ["php-fpm7.4", "--nodaemonize", "--fpm-config=/etc/php/7.4/fpm/pool.d/www.conf"] diff --git a/docker/php/mods/phalcon.ini b/docker/php/mods/phalcon.ini deleted file mode 100644 index 65414413f..000000000 --- a/docker/php/mods/phalcon.ini +++ /dev/null @@ -1,3 +0,0 @@ -; configuration for phalcon module -; priority=50 -extension=phalcon.so diff --git a/docker/php/mods/psr.ini b/docker/php/mods/psr.ini deleted file mode 100644 index 96143a487..000000000 --- a/docker/php/mods/psr.ini +++ /dev/null @@ -1,3 +0,0 @@ -; configuration for psr module -; priority=20 -extension=psr.so diff --git a/dummy/.gitignore b/dummy/.gitignore deleted file mode 100644 index f961aba68..000000000 --- a/dummy/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# Please do not use this ignore file to define platform specific files. -# -# For these purposes create a global .gitignore file, which is a list of rules -# for ignoring files in every Git repository on your computer. -# -# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore - -* -!.gitignore diff --git a/phalcon b/phalcon index 2a1d0167c..3f13a6704 100755 --- a/phalcon +++ b/phalcon @@ -21,14 +21,16 @@ use Phalcon\DevTools\Commands\Builtin\Module; use Phalcon\DevTools\Commands\Builtin\Project; use Phalcon\DevTools\Commands\Builtin\Scaffold; use Phalcon\DevTools\Commands\Builtin\Serve; +use Phalcon\DevTools\Commands\Builtin\Task; use Phalcon\DevTools\Commands\Builtin\Webtools; use Phalcon\DevTools\Commands\CommandsListener; use Phalcon\DevTools\Commands\DotPhalconMissingException; +use Phalcon\DevTools\Exception\PDODriverNotFoundException; use Phalcon\DevTools\Script; use Phalcon\DevTools\Script\Color; use Phalcon\DevTools\Version; use Phalcon\Events\Manager as EventsManager; -use Phalcon\Exception as PhalconException; +use Exception as PhalconException; try { require dirname(__FILE__) . '/bootstrap/autoload.php'; @@ -44,6 +46,7 @@ try { Info::class, Enumerate::class, Controller::class, + Task::class, Module::class, Model::class, AllModels::class, @@ -72,6 +75,11 @@ try { } catch (PhalconException $e) { fwrite(STDERR, Color::error($e->getMessage()) . PHP_EOL); exit(1); +} catch (PDODriverNotFoundException $e) { + $e->writeNicelyFormattedErrorOutput(); + fwrite(STDERR, 'Backtrace:'. PHP_EOL); + fwrite(STDERR, $e->getTraceAsString() . PHP_EOL); + exit(1); } catch (Exception $e) { fwrite(STDERR, 'ERROR: ' . $e->getMessage() . PHP_EOL); exit(1); diff --git a/phalcon-completion.bash b/phalcon-completion.bash index 891bf966c..947cdec90 100644 --- a/phalcon-completion.bash +++ b/phalcon-completion.bash @@ -12,7 +12,7 @@ _phalcon() local cur prev _get_comp_words_by_ref -n = cur prev - commands="commands list enumerate controller create-controller model \ + commands="commands list enumerate controller create-controller create-task model \ create-model all-models create-all-models project create-project scaffold \ create-scaffold migration create-migration webtools create-webtools" diff --git a/src/Bootstrap.php b/src/Bootstrap.php index 7cdde1e3c..412d28047 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -37,12 +37,12 @@ use Phalcon\DevTools\Providers\ViewCacheProvider; use Phalcon\DevTools\Providers\ViewProvider; use Phalcon\DevTools\Providers\VoltProvider; -use Phalcon\Di; +use Phalcon\Di\Di; use Phalcon\Di\DiInterface; use Phalcon\Di\FactoryDefault; use Phalcon\Di\ServiceProviderInterface; use Phalcon\Mvc\Application as MvcApplication; -use Phalcon\Text; +use Phalcon\Support\HelperFactory; /** * @method mixed getShared($name, $parameters=null) @@ -403,7 +403,8 @@ public function setParameters(array $parameters): Bootstrap */ public function setParameter(string $parameter, $value): Bootstrap { - $method = 'set' . Text::camelize($parameter); + $helper = new HelperFactory(); + $method = 'set' . $helper->camelize($parameter); if (method_exists($this, $method)) { $this->$method($value); diff --git a/src/Builder/Component/AbstractComponent.php b/src/Builder/Component/AbstractComponent.php index 2c618b725..2d1dd63bc 100644 --- a/src/Builder/Component/AbstractComponent.php +++ b/src/Builder/Component/AbstractComponent.php @@ -12,18 +12,24 @@ namespace Phalcon\DevTools\Builder\Component; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\DevTools\Builder\Exception\BuilderException; use Phalcon\DevTools\Builder\Path; +use Phalcon\DevTools\Generator\AbstractEntityGenerator; use Phalcon\DevTools\Script\Color; use Phalcon\DevTools\Validation\Validator\Namespaces; -use Phalcon\Validation; +use Phalcon\Filter\Validation; /** * Base class for builder components */ abstract class AbstractComponent { + /** + * @var AbstractEntityGenerator + */ + protected $generator = null; + /** * Builder Options * @@ -104,7 +110,7 @@ public function isAbsolutePath(string $path): bool */ public function isConsole(): bool { - return PHP_SAPI == 'cli'; + return PHP_SAPI === 'cli'; } /** diff --git a/src/Builder/Component/AllModels.php b/src/Builder/Component/AllModels.php index 2588b30ad..3a749f343 100644 --- a/src/Builder/Component/AllModels.php +++ b/src/Builder/Component/AllModels.php @@ -12,6 +12,7 @@ namespace Phalcon\DevTools\Builder\Component; +use Phalcon\Db\Adapter\Pdo\AbstractPdo; use Phalcon\DevTools\Builder\Exception\BuilderException; use Phalcon\DevTools\Script\Color; use Phalcon\DevTools\Utils; @@ -55,7 +56,7 @@ public function build(): void $this->options->offsetSet('directory', $this->path->getRootPath()); - if (gettype($this->options->get('config')) == 'object') { + if (is_object($this->options->get('config'))) { $config = $this->options->get('config'); } else { $config = $this->getConfig(); @@ -98,7 +99,7 @@ public function build(): void unset($configArray['adapter']); /** - * @var \Phalcon\Db\Adapter\Pdo\AbstractPdo $db + * @var AbstractPdo $db */ $db = new $adapterName($configArray); @@ -129,7 +130,7 @@ public function build(): void } $camelCaseName = Utils::camelize($name); - $refSchema = ($adapter != 'Postgresql') ? $schema : $config->database->dbname; + $refSchema = $adapter !== 'Postgresql' ? $schema : $config->database->dbname; $referenceList[$name] = $db->describeReferences($name, $schema); foreach ($referenceList[$name] as $reference) { diff --git a/src/Builder/Component/Controller.php b/src/Builder/Component/Controller.php index 7d2e668e6..b3262721b 100644 --- a/src/Builder/Component/Controller.php +++ b/src/Builder/Component/Controller.php @@ -13,8 +13,9 @@ namespace Phalcon\DevTools\Builder\Component; use Phalcon\DevTools\Builder\Exception\BuilderException; +use Phalcon\DevTools\Generator\AbstractEntityGenerator; +use Phalcon\DevTools\Generator\Entity\ControllerEntityGenerator; use Phalcon\DevTools\Utils; -use SplFileObject; /** * Builder to generate controller @@ -37,18 +38,46 @@ public function __construct(array $options = []) $options['force'] = false; } + if (!isset($options['suffix'])) { + $options['suffix'] = 'Controller'; + } + parent::__construct($options); } /** * @throws BuilderException */ - public function build() + public function build(array $actions = []): self { if (!$this->options->has('name')) { throw new BuilderException('The controller name is required.'); } + $name = str_replace(' ', '_', $this->options->get('name')); + $baseClass = $this->options->get('baseClass'); + $namespace = $this->constructNamespace(); + $className = Utils::camelize($name) . $this->options->get('suffix'); + + $this->generator = new ControllerEntityGenerator($className, $baseClass, $namespace); + $this->generator->setStrict(); + $this->generator->addMethods($actions); + + return $this; + } + + /** + * @throws BuilderException + */ + public function write(array $actions = []): string + { + if (null === $this->generator) { + $this->build($actions); + } + + $name = str_replace(' ', '_', $this->options->get('name')); + $className = Utils::camelize($name) . $this->options->get('suffix'); + if ($this->options->has('directory')) { $this->path->setRootPath($this->options->get('directory')); } @@ -62,58 +91,50 @@ public function build() $controllersDir = $config->path('application.controllersDir'); } - $name = str_replace(' ', '_', $this->options->get('name')); - $className = Utils::camelize($name); - // Oops! We are in APP_PATH and try to get controllersDir from outside from project dir - if ($this->isConsole() && substr($controllersDir, 0, 3) === '../') { + if ($this->isConsole() && strpos($controllersDir, '../') === 0) { $controllersDir = ltrim($controllersDir, './'); } - $baseClass = $this->options->get('baseClass'); - $controllerPath = rtrim($controllersDir, '\\/') . DIRECTORY_SEPARATOR . $className . "Controller.php"; - - $namespace = $this->constructNamespace(); - $code = "options->has('force')) { throw new BuilderException(sprintf('The Controller %s already exists.', $name)); } - $controller = new SplFileObject($controllerPath, 'w'); - if (!$controller->fwrite($code)) { - throw new BuilderException( - sprintf('Unable to write to %s. Check write-access of a file.', $controller->getRealPath()) - ); - } + $this->generator->save($controllerPath); if ($this->isConsole()) { $this->notifySuccess(sprintf('Controller "%s" was successfully created.', $name)); - $this->notifyInfo($controller->getRealPath()); + $this->notifyInfo($controllerPath); } - return $className . 'Controller.php'; + return $className; + } + + /** + * @throws BuilderException + */ + public function getGenerator(): AbstractEntityGenerator + { + if (null === $this->generator) { + $this->build(); + } + + return $this->generator; } /** * @return string * @throws BuilderException */ - protected function constructNamespace(): string + protected function constructNamespace(): ?string { - $namespace = $this->options->has('namespace') - ? (string) $this->options->get('namespace') : null; + $namespace = $this->options->has('namespace') ? (string) $this->options->get('namespace') : null; if ($namespace === null) { - return ''; - } - - if ($this->checkNamespace($namespace) && !empty(trim($namespace))) { - return 'namespace ' . $this->options->get('namespace') . ';' . PHP_EOL . PHP_EOL; + return null; } - return ''; + return $this->checkNamespace($namespace) && !empty(trim($namespace)) ? $namespace : null; } } diff --git a/src/Builder/Component/Model.php b/src/Builder/Component/Model.php index 6a2ab9261..e51363315 100644 --- a/src/Builder/Component/Model.php +++ b/src/Builder/Component/Model.php @@ -1,4 +1,5 @@ 'Date', //'Decimal' => 'Decimal' ]; - /** * Options container * @@ -56,6 +62,7 @@ class Model extends AbstractComponent * Create Builder object * * @param array $options + * * @throws InvalidArgumentException */ public function __construct(array $options) @@ -83,7 +90,7 @@ public function __construct(array $options) parent::__construct($options); $this->modelOptions->setOption('config', $this->modelOptions->getOption('config')); - $this->modelOptions->setOption('snippet', new Snippet()); + $this->modelOptions->setOption('snippet', new ModelSnippet()); } /** @@ -93,8 +100,10 @@ public function __construct(array $options) */ public function build(): void { - $config = $this->modelOptions->getOption('config'); + /** @var ModelSnippet $snippet */ $snippet = $this->modelOptions->getOption('snippet'); + $config = $this->modelOptions->getOption('config'); + $helper = new HelperFactory(); if ($this->modelOptions->hasOption('directory')) { $this->path->setRootPath($this->modelOptions->getOption('directory')); @@ -102,400 +111,382 @@ public function build(): void $methodRawCode = []; $this->setModelsDir(); - $this->setModelPath(); - - $modelPath = $this->modelOptions->getOption('modelPath'); - - $this->checkDataBaseParam(); - - if (isset($config->devtools->loader)) { - /** @noinspection PhpIncludeInspection */ - require_once $config->devtools->loader; + $modelPath = $this->setModelPath(); + if (file_exists($modelPath) && !is_writable($modelPath)) { + throw new WriteFileException(sprintf('Unable to write to %s. Check write-access of a file.', $modelPath)); } - $namespace = $this->modelOptions->hasOption('namespace') - ? (string) $this->modelOptions->getOption('namespace') : ''; + $db = $this->getDb($config); - if ($this->checkNamespace($namespace) && !empty(trim($namespace))) { - $namespace = 'namespace ' . $this->modelOptions->getOption('namespace') . ';' . PHP_EOL . PHP_EOL; + $namespace = $this->modelOptions->getValidOptionOrDefault('namespace', ''); + if (!$this->checkNamespace($namespace) || empty(trim($namespace))) { + $namespace = null; } + $baseClass = $this->modelOptions->getValidOptionOrDefault('extends', \Phalcon\Mvc\Model::class); + $className = $this->modelOptions->getOption('className'); + $fullClassName = $this->getFullClassName($this->modelOptions->getOption('className')); + $modelGenerator = new ModelEntityGenerator($className, $baseClass, $namespace); + $modelMethodsHelper = new ModelMethodsHelper(); + $modelGenerator->setMethodsHelper($modelMethodsHelper); $genDocMethods = $this->modelOptions->getValidOptionOrDefault('genDocMethods', false); $useSettersGetters = $this->modelOptions->getValidOptionOrDefault('genSettersGetters', false); - - $adapter = $config->database->adapter ?? 'Mysql'; - $this->isSupportedAdapter($adapter); - - if (is_object($config->database)) { - $configArray = $config->database->toArray(); - } else { - $configArray = $config->database; - } - - // An array for use statements - $uses = []; - - $adapterName = 'Phalcon\Db\Adapter\Pdo\\' . $adapter; - unset($configArray['adapter']); - - /** @var AbstractPdo $db */ - $db = new $adapterName($configArray); - - $initialize = []; - - if ($this->modelOptions->hasOption('schema')) { - $schema = $this->modelOptions->getOption('schema'); - } else { - $schema = Utils::resolveDbSchema($config->database); - } - - if ($schema) { - $initialize['schema'] = $snippet->getThisMethod('setSchema', $schema); - } - $initialize['source'] = $snippet->getThisMethod('setSource', $this->modelOptions->getOption('name')); + $schema = $this->modelOptions->getValidOptionOrDefault('schema', Utils::resolveDbSchema($config->database)); $table = $this->modelOptions->getOption('name'); - if (!$db->tableExists($table, $schema)) { throw new InvalidArgumentException(sprintf('Table "%s" does not exist.', $table)); } - $fields = $db->describeColumns($table, $schema); - $referenceList = $this->getReferenceList($schema, $db); - - foreach ($referenceList as $tableName => $references) { - foreach ($references as $reference) { - if ($reference->getReferencedTable() !== $this->modelOptions->getOption('name')) { - continue; - } - - $entityNamespace = $this->modelOptions->hasOption('namespace') - ? $this->modelOptions->getOption('namespace')."\\" : ''; - - $refColumns = $reference->getReferencedColumns(); - $columns = $reference->getColumns(); - $initialize[] = $snippet->getRelation( - 'hasMany', - $this->getFieldName($refColumns[0]), - $entityNamespace . Text::camelize($tableName, '_-'), - $this->getFieldName($columns[0]), - "['alias' => '" . Text::camelize($tableName, '_-') . "']" - ); - } - } - - foreach ($db->describeReferences($this->modelOptions->getOption('name'), $schema) as $reference) { - $entityNamespace = $this->modelOptions->hasOption('namespace') - ? $this->modelOptions->getOption('namespace') : ''; - - $refColumns = $reference->getReferencedColumns(); - $columns = $reference->getColumns(); - $initialize[] = $snippet->getRelation( - 'belongsTo', - $this->getFieldName($columns[0]), - $this->getEntityClassName($reference, $entityNamespace), - $this->getFieldName($refColumns[0]), - "['alias' => '" . Text::camelize($reference->getReferencedTable(), '_-') . "']" - ); - } - - $alreadyInitialized = false; - $alreadyValidations = false; - $alreadyFind = false; - $alreadyFindFirst = false; - $alreadyColumnMapped = false; - $attributes = []; if (file_exists($modelPath)) { try { - $possibleMethods = []; - if ($useSettersGetters) { - foreach ($fields as $field) { - /** @var \Phalcon\Db\Column $field */ - $methodName = Text::camelize($field->getName(), '_-'); - - $possibleMethods['set' . $methodName] = true; - $possibleMethods['get' . $methodName] = true; - } - } - /** @noinspection PhpIncludeInspection */ require_once $modelPath; $linesCode = file($modelPath); - $fullClassName = $this->modelOptions->getOption('className'); - if ($this->modelOptions->hasOption('namespace')) { - $fullClassName = $this->modelOptions->getOption('namespace').'\\'.$fullClassName; + $imports = preg_grep('/^use\s(.*);$/', $linesCode); + foreach ($imports as $import) { + $importClass = trim(str_replace(['use', ';'], '', $import)); + $modelGenerator->addImport($importClass); } - $reflection = new ReflectionClass($fullClassName); - foreach ($reflection->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() !== $fullClassName) { - continue; - } - $methodName = $method->getName(); - if (isset($possibleMethods[$methodName])) { - continue; - } - - $indent = PHP_EOL; - if ($method->getDocComment()) { - $firstLine = $linesCode[$method->getStartLine() - 1]; - preg_match('#^\s+#', $firstLine, $matches); - if (isset($matches[0])) { - $indent .= $matches[0]; - } - } + $reflection = ReflectionClass::createFromName($fullClassName); - $methodDeclaration = join( - '', - array_slice( - $linesCode, - $method->getStartLine() - 1, - $method->getEndLine() - $method->getStartLine() + 1 - ) - ); + $possibleMethods = []; + if ($useSettersGetters) { + foreach ($fields as $field) { + /** @var Column $field */ + $methodName = $helper->camelize($field->getName(), '_-'); - $methodRawCode[$methodName] = $indent . $method->getDocComment() . PHP_EOL . $methodDeclaration; - - switch ($methodName) { - case 'initialize': - $alreadyInitialized = true; - break; - case 'validation': - $alreadyValidations = true; - break; - case 'find': - $alreadyFind = true; - break; - case 'findFirst': - $alreadyFindFirst = true; - break; - case 'columnMap': - $alreadyColumnMapped = true; - break; + $possibleMethods['set' . $methodName] = true; + $possibleMethods['get' . $methodName] = true; } } + $modelGenerator->createMethodsFromReflection( + $fullClassName, + $reflection, + $possibleMethods + ); $possibleFieldsTransformed = []; foreach ($fields as $field) { $fieldName = $this->getFieldName($field->getName()); $possibleFieldsTransformed[$fieldName] = true; } + $modelGenerator->createPropertiesFromReflection( + $fullClassName, + $reflection, + $possibleFieldsTransformed + ); - if (method_exists($reflection, 'getReflectionConstants')) { - foreach ($reflection->getReflectionConstants() as $constant) { - if ($constant->getDeclaringClass()->getName() !== $fullClassName) { - continue; - } - - $constantsPreg = '/const(\s+)' . $constant->getName() . '([\s=;]+)/'; - $attribute = $this->getAttribute($linesCode, $constantsPreg, $constant); - if (!empty($attribute)) { - $attributes[] = $attribute; - } - } - } - - foreach ($reflection->getProperties() as $property) { - $propertyName = $property->getName(); - if (!empty($possibleFieldsTransformed[$propertyName]) - || $property->getDeclaringClass()->getName() !== $fullClassName - ) { - continue; - } - - $modifiersPreg = ''; - switch ($property->getModifiers()) { - case ReflectionProperty::IS_PUBLIC: - $modifiersPreg = '^(\s*)public(\s+)'; - break; - case ReflectionProperty::IS_PRIVATE: - $modifiersPreg = '^(\s*)private(\s+)'; - break; - case ReflectionProperty::IS_PROTECTED: - $modifiersPreg = '^(\s*)protected(\s+)'; - break; - case ReflectionProperty::IS_STATIC + ReflectionProperty::IS_PUBLIC: - $modifiersPreg = '^(\s*)(public?)(\s+)static(\s+)'; - break; - case ReflectionProperty::IS_STATIC + ReflectionProperty::IS_PROTECTED: - $modifiersPreg = '^(\s*)protected(\s+)static(\s+)'; - break; - case ReflectionProperty::IS_STATIC + ReflectionProperty::IS_PRIVATE: - $modifiersPreg = '^(\s*)private(\s+)static(\s+)'; - break; - } - - $modifiersPreg = '/' . $modifiersPreg . '\$' . $propertyName . '([\s=;]+)/'; - $attribute = $this->getAttribute($linesCode, $modifiersPreg, $property); - if (!empty($attribute)) { - $attributes[] = $attribute; - } - } - } catch (\Exception $e) { + $modelGenerator->createConstantsFromReflection($fullClassName, $reflection); + } catch (\Throwable $throwable) { throw new RuntimeException( - sprintf( - 'Failed to create the model "%s". Error: %s', - $this->modelOptions->getOption('className'), - $e->getMessage() - ) + sprintf('Failed to create the model "%s". Error: %s', $className, $throwable->getMessage()) ); } } - $validations = []; - foreach ($fields as $field) { - $fieldName = $this->getFieldName($field->getName()); - - if ($field->getType() === Column::TYPE_CHAR) { - $domain = []; - if (preg_match('/\((.*)\)/', (string)$field->getType(), $matches)) { - foreach (explode(',', $matches[1]) as $item) { - $domain[] = $item; - } - } - if (count($domain)) { - $varItems = join(', ', $domain); - $validations[] = $snippet->getValidateInclusion($fieldName, $varItems); - } - } - - if ($field->getName() === 'email') { - $validations[] = $snippet->getValidateEmail($fieldName); - $uses[] = $snippet->getUseAs(EmailValidator::class, 'EmailValidator'); - } - } - - if (count($validations)) { - $validations[] = $snippet->getValidationEnd(); - } - - // Check if there has been an extender class - $extends = $this->modelOptions->getValidOptionOrDefault('extends', '\Phalcon\Mvc\Model'); - // Check if there have been any excluded fields $exclude = []; if ($this->modelOptions->hasOption('excludeFields')) { $keys = explode(',', $this->modelOptions->getOption('excludeFields')); if (count($keys) > 0) { foreach ($keys as $key) { - $exclude[trim($key)] = ''; + $exclude[trim($key)] = true; } } } - $setters = []; - $getters = []; foreach ($fields as $field) { - if (array_key_exists(strtolower($field->getName()), $exclude)) { + if (isset($exclude[strtolower($field->getName())])) { continue; } $type = $this->getPHPType($field->getType()); $fieldName = $this->getFieldName($field->getName()); - $attributes[] = $snippet->getAttributes( + $modelGenerator->addPropertyFromColumn( + $field, + $fieldName, $type, $useSettersGetters ? 'protected' : 'public', - $field, - $this->modelOptions->getOption('annotate'), - $fieldName + $this->modelOptions->getValidOptionOrDefault('annotate', false) ); if ($useSettersGetters) { $methodName = Utils::camelize($field->getName(), '_-'); - $setters[] = $snippet->getSetter($field->getName(), $fieldName, $type, $methodName); + $modelGenerator->addSetter($field, $methodName, $type, $fieldName); + $modelGenerator->addGetter($field, $methodName, $type, $fieldName, $this->typeMap); + } + } + + if (!$modelMethodsHelper->alreadyValidations()) { + $validations = []; + foreach ($fields as $field) { + $fieldName = $this->getFieldName($field->getName()); + + if ($field->getType() === Column::TYPE_CHAR) { + $domain = []; + if (preg_match('/\((.*)\)/', (string)$field->getType(), $matches)) { + foreach (explode(',', $matches[1]) as $item) { + $domain[] = $item; + } + } + if (count($domain)) { + $varItems = join(', ', $domain); + $validations[] = $snippet->getValidateInclusion($fieldName, $varItems); + } + } - if (isset($this->typeMap[$type])) { - $getters[] = $snippet->getGetterMap($fieldName, $type, $methodName, $this->typeMap[$type]); - } else { - $getters[] = $snippet->getGetter($fieldName, $type, $methodName); + if ($field->getName() === 'email') { + $validations[] = $snippet->getValidateEmail($fieldName); + $modelGenerator->addImport(EmailValidator::class, 'EmailValidator'); } } + + if (count($validations)) { + array_unshift($validations, '$validator = new Validation();'); + $validations[] = 'return $this->validate($validator);'; + + $modelGenerator->addMethod('validation') + ->setBody(implode('', $validations)) + ->addComments([ + "Validations and business logic\n", + '@return bool', + ]); + $modelGenerator->addImport(Validation::class); + } } - $validationsCode = ''; - if (!$alreadyValidations && count($validations) > 0) { - $validationsCode = $snippet->getValidationsMethod($validations); - $uses[] = $snippet->getUse(Validation::class); + if (!$modelMethodsHelper->alreadyInitialized()) { + $initialize = []; + if ($schema) { + $initialize['schema'] = "\$this->setSchema('{$schema}');" . PHP_EOL; + } + $initialize['source'] = "\$this->setSource('{$table}');" . PHP_EOL; + + $referenceList = $this->getReferenceList($schema, $db); + foreach ($referenceList as $tableName => $references) { + foreach ($references as $reference) { + if ($reference->getReferencedTable() !== $table) { + continue; + } + + $refColumns = $reference->getReferencedColumns(); + $columns = $reference->getColumns(); + $initialize[] = $snippet->getRelation( + 'hasMany', + $this->getFieldName($refColumns[0]), + $this->getEntityClassName($tableName), + $this->getFieldName($columns[0]), + $this->getEntityAlias($tableName) + ); + } + } + + foreach ($db->describeReferences($table, $schema) as $reference) { + $refColumns = $reference->getReferencedColumns(); + $columns = $reference->getColumns(); + $initialize[] = $snippet->getRelation( + 'belongsTo', + $this->getFieldName($columns[0]), + $this->getEntityClassName($reference->getReferencedTable()), + $this->getFieldName($refColumns[0]), + $this->getEntityAlias($reference->getReferencedTable()) + ); + } + + $modelGenerator->addMethod('initialize') + ->setBody(implode('', $initialize)) + ->addComments(['Initialize method for model.']); + } + + if (!$modelMethodsHelper->alreadyFind()) { + $modelGenerator->addMethod('find') + ->setStatic() + ->setBody('return parent::find($parameters);') + ->setReturnType(ResultsetInterface::class) + ->addArguments([ + new MethodArgumentDto('parameters', null, false, null), + ]) + ->addComments([ + "Allows to query a set of records that match the specified conditions\n", + '@param mixed $parameters', + "@return {$className}[]|{$className}|ResultsetInterface", + ]); + $modelGenerator->addImport(ResultsetInterface::class); + } + + if (!$modelMethodsHelper->alreadyFindFirst()) { + $modelGenerator->addMethod('findFirst') + ->setStatic() + ->setBody('return parent::findFirst($parameters);') + ->setReturnType(ModelInterface::class, true) + ->addArguments([ + new MethodArgumentDto('parameters', null, false, null), + ]) + ->addComments([ + "Allows to query the first record that match the specified conditions\n", + '@param mixed $parameters', + "@return {$className}|ResultInterface|ModelInterface|null", + ]); + $modelGenerator->addImport(ResultInterface::class); + $modelGenerator->addImport(ModelInterface::class); } - $initCode = ''; - if (!$alreadyInitialized && count($initialize) > 0) { - $initCode = $snippet->getInitialize($initialize); + if ($genDocMethods) { + $modelGenerator->addClassComments([ + $className, + !empty($namespace) ? '@package ' . str_replace(['namespace ', ';', "\r", "\n"], '', $namespace) : '', + '@autogenerated by Phalcon Developer Tools', + '@date ' . date('Y-m-d, H:i:s'), + ]); } - $license = ''; - if (file_exists('license.txt')) { - $license = trim(file_get_contents('license.txt')) . PHP_EOL . PHP_EOL; + if ($this->modelOptions->hasOption('mapColumn') && + $this->modelOptions->getOption('mapColumn') && + !$modelMethodsHelper->alreadyColumnMapped() + ) { + $modelGenerator->addMethod('columnMap') + ->setBody( + $snippet->getColumnMap( + $fields, + $this->modelOptions->getValidOptionOrDefault('camelize', false) + ) + ) + ->addComments([ + 'Independent Column Mapping.', + "Keys are the real names in the table and the values their names in the application\n", + '@return array', + ]); } - if (!$alreadyFind) { - $methodRawCode[] = $snippet->getModelFind($this->modelOptions->getOption('className')); + $abstract = $this->modelOptions->getValidOptionOrDefault('abstract', false); + if ($abstract) { + $modelGenerator->setClassAbstract(); } - if (!$alreadyFindFirst) { - $methodRawCode[] = $snippet->getModelFindFirst($this->modelOptions->getOption('className')); + $code = $this->setLicense($modelGenerator); + if (!file_put_contents($modelPath, $code)) { + throw new WriteFileException(sprintf('Unable to write to %s', $modelPath)); } - $content = join('', $attributes); + if ($this->isConsole()) { + $msgSuccess = $abstract ? 'Abstract ' : ''; + $msgSuccess .= 'Model "%s" was successfully created.'; + $this->notifySuccess(sprintf($msgSuccess, $helper->camelize($table, '_-'))); + } + } + + protected function setLicense(ModelEntityGenerator $modelGenerator): string + { + if (file_exists('license.txt')) { + $license = trim(file_get_contents('license.txt')) . PHP_EOL . PHP_EOL; + if (false !== strpos($license, '*')) { + return str_replace( + 'printCode(new PsrPrinter()) + ); + } - if ($useSettersGetters) { - $content .= join('', $setters) . join('', $getters); + $licenseLines = explode("\n", $license); + $modelGenerator->addComments($licenseLines); } - $content .= $validationsCode . $initCode; - foreach ($methodRawCode as $methodCode) { - $content .= $methodCode; + return $modelGenerator->printCode(new PsrPrinter()); + } + + /** + * Set path to folder where models are + * + * @throw InvalidParameterException + */ + protected function setModelsDir(): void + { + if ($this->modelOptions->hasOption('modelsDir')) { + $this->modelOptions->setOption( + 'modelsDir', + rtrim($this->modelOptions->getOption('modelsDir'), '/\\') . DIRECTORY_SEPARATOR + ); + + return; } - $classDoc = ''; - if ($genDocMethods) { - $classDoc = $snippet->getClassDoc($this->modelOptions->getOption('className'), $namespace); + if ($modelsDir = $this->modelOptions->getOption('config')->path('application.modelsDir')) { + $this->modelOptions->setOption('modelsDir', rtrim($modelsDir, '/\\') . DIRECTORY_SEPARATOR); + + return; } - if ($this->modelOptions->hasOption('mapColumn') && - $this->modelOptions->getOption('mapColumn') && - !$alreadyColumnMapped - ) { - $content .= $snippet->getColumnMap($fields, $this->modelOptions->getOption('camelize')); + throw new InvalidParameterException("Builder doesn't know where is the models directory."); + } + + /** + * Set path to model + * + * @throw WriteFileException + */ + protected function setModelPath(): string + { + $modelPath = $this->modelOptions->getOption('modelsDir'); + + if (!$this->isAbsolutePath($modelPath)) { + $modelPath = $this->path->getRootPath($modelPath); } - $useDefinition = ''; - if (!empty($uses)) { - usort($uses, function ($a, $b) { - return strlen($a) - strlen($b); - }); + $modelPath .= $this->modelOptions->getOption('className') . '.php'; - $useDefinition = join("\n", $uses) . PHP_EOL . PHP_EOL; + if (file_exists($modelPath) && !$this->modelOptions->getOption('force')) { + throw new WriteFileException( + sprintf( + 'The model file "%s.php" already exists in models dir', + $this->modelOptions->getOption('className') + ) + ); } - $abstract = ($this->modelOptions->getOption('abstract') ? 'abstract ' : ''); + $this->modelOptions->setOption('modelPath', $modelPath); - $code = $snippet->getClass( - $namespace, - $useDefinition, - $classDoc, - $abstract, - $this->modelOptions, - $extends, - $content, - $license - ); + return $modelPath; + } - if (file_exists($modelPath) && !is_writable($modelPath)) { - throw new WriteFileException(sprintf('Unable to write to %s. Check write-access of a file.', $modelPath)); + /** + * @throw InvalidParameterException + */ + protected function checkDatabaseParam(): void + { + if (!isset($this->modelOptions->getOption('config')->database)) { + throw new InvalidParameterException('Database configuration cannot be loaded from your config file.'); } - if (!file_put_contents($modelPath, $code)) { - throw new WriteFileException(sprintf('Unable to write to %s', $modelPath)); + if (!isset($this->modelOptions->getOption('config')->database->adapter)) { + throw new InvalidParameterException( + "Adapter was not found in the config. " . "Please specify a config variable [database][adapter]" + ); } + } - if ($this->isConsole()) { - $msgSuccess = ($this->modelOptions->getOption('abstract') ? 'Abstract ' : ''); - $msgSuccess .= 'Model "%s" was successfully created.'; - $this->notifySuccess(sprintf($msgSuccess, Text::camelize($this->modelOptions->getOption('name'), '_-'))); + /** + * @throws BuilderException + */ + protected function getDb($config): AbstractPdo + { + $this->checkDatabaseParam(); + if (isset($config->devtools->loader)) { + /** @noinspection PhpIncludeInspection */ + require_once $config->devtools->loader; } + + $adapter = $config->database->adapter ?? 'Mysql'; + $this->isSupportedAdapter($adapter); + $configArray = is_object($config->database) ? $config->database->toArray() : $config->database; + + $adapterName = "\Phalcon\Db\Adapter\Pdo\\{$adapter}"; + unset($configArray['adapter']); + + return new $adapterName($configArray); } /** @@ -537,6 +528,7 @@ protected function getAttribute(array $linesCode, string $pattern, $attribute): if (!empty($attribute->getDocComment())) { $attributeFormatted = " " . $attribute->getDocComment() . PHP_EOL . $attribute; } + return $attributeFormatted; } @@ -558,64 +550,51 @@ protected function getFieldName(string $fieldName): string } /** - * Set path to model + * @param string $tableName * - * @throw WriteFileException + * @return string */ - protected function setModelPath(): void - { - $modelPath = $this->modelOptions->getOption('modelsDir'); - - if (!$this->isAbsolutePath($modelPath)) { - $modelPath = $this->path->getRootPath($modelPath); - } - - $modelPath .= $this->modelOptions->getOption('className') . '.php'; - - if (file_exists($modelPath) && !$this->modelOptions->getOption('force')) { - throw new WriteFileException(sprintf( - 'The model file "%s.php" already exists in models dir', - $this->modelOptions->getOption('className') - )); - } - - $this->modelOptions->setOption('modelPath', $modelPath); + protected function getEntityAlias(string $tableName): string + { + $helper = new HelperFactory(); + return "['alias' => '" . $helper->camelize($tableName, '_-') . "']"; } /** - * @throw InvalidParameterException + * @param string $classname + * + * @return string */ - protected function checkDataBaseParam(): void + protected function getFullClassName(string $classname): string { - if (!isset($this->modelOptions->getOption('config')->database)) { - throw new InvalidParameterException('Database configuration cannot be loaded from your config file.'); + $namespace = $this->modelOptions->getValidOptionOrDefault('namespace', ''); + if (!empty($namespace)) { + $namespace .= "\\"; } - if (!isset($this->modelOptions->getOption('config')->database->adapter)) { - throw new InvalidParameterException( - "Adapter was not found in the config. " . - "Please specify a config variable [database][adapter]" - ); - } + return $namespace . $classname; } /** - * @param ReferenceInterface $reference - * @param string $namespace + * Get reference full class name + * + * @param string $reference + * * @return string */ - protected function getEntityClassName(ReferenceInterface $reference, string $namespace): string + protected function getEntityClassName(string $reference): string { - $referencedTable = Utils::camelize($reference->getReferencedTable()); + $classname = Utils::camelize($reference); - return "{$namespace}\\{$referencedTable}"; + return $this->getFullClassName($classname); } /** * Get reference list from option * - * @param string $schema + * @param string|null $schema * @param AbstractPdo $db + * * @return array */ protected function getReferenceList(?string $schema, AbstractPdo $db): array @@ -632,33 +611,11 @@ protected function getReferenceList(?string $schema, AbstractPdo $db): array return $referenceList; } - /** - * Set path to folder where models are - * - * @throw InvalidParameterException - */ - protected function setModelsDir(): void - { - if ($this->modelOptions->hasOption('modelsDir')) { - $this->modelOptions->setOption( - 'modelsDir', - rtrim($this->modelOptions->getOption('modelsDir'), '/\\') . DIRECTORY_SEPARATOR - ); - return; - } - - if ($modelsDir = $this->modelOptions->getOption('config')->path('application.modelsDir')) { - $this->modelOptions->setOption('modelsDir', rtrim($modelsDir, '/\\') . DIRECTORY_SEPARATOR); - return; - } - - throw new InvalidParameterException("Builder doesn't know where is the models directory."); - } - /** * Returns the associated PHP type * - * @param int $type + * @param int $type + * * @return string */ protected function getPHPType(int $type): string diff --git a/src/Builder/Component/Project.php b/src/Builder/Component/Project.php index 42ccae0cb..47d93b625 100644 --- a/src/Builder/Component/Project.php +++ b/src/Builder/Component/Project.php @@ -26,10 +26,10 @@ */ class Project extends AbstractComponent { - const TYPE_MICRO = 'micro'; - const TYPE_SIMPLE = 'simple'; - const TYPE_MODULES = 'modules'; - const TYPE_CLI = 'cli'; + public const TYPE_MICRO = 'micro'; + public const TYPE_SIMPLE = 'simple'; + public const TYPE_MODULES = 'modules'; + public const TYPE_CLI = 'cli'; /** * Current Project Type diff --git a/src/Builder/Component/Scaffold.php b/src/Builder/Component/Scaffold.php index dbc2f21bb..63fb2d5f0 100644 --- a/src/Builder/Component/Scaffold.php +++ b/src/Builder/Component/Scaffold.php @@ -13,12 +13,18 @@ namespace Phalcon\DevTools\Builder\Component; use Phalcon\Db\Column; +use Phalcon\DevTools\Builder\Component\Controller as ControllerBuilder; use Phalcon\DevTools\Builder\Component\Model as ModelBuilder; use Phalcon\DevTools\Builder\Exception\BuilderException; use Phalcon\DevTools\Script\Color; +use Phalcon\DevTools\Snippet\ControllerSnippet; use Phalcon\DevTools\Utils; use Phalcon\Di\FactoryDefault; -use Phalcon\Text; +use Phalcon\Mvc\Model\Criteria; +use Phalcon\Paginator\Adapter\Model as ModelPaginator; +use Phalcon\Tag; +use Phalcon\Support\HelperFactory; +use SplFileObject; /** * Build CRUDs using Phalcon @@ -45,8 +51,8 @@ private function getPossibleLabel(string $fieldName): string */ private function getPossibleSingular(string $className): string { - if (substr($className, strlen($className) - 1, 1) == 's') { - return substr($className, 0, strlen($className) - 1); + if ($className[strlen($className) - 1] === 's') { + return substr($className, 0, -1); } return $className; @@ -58,7 +64,7 @@ private function getPossibleSingular(string $className): string */ private function getPossiblePlural(string $className): string { - if (substr($className, strlen($className) - 1, 1) == 's') { + if ($className[strlen($className) - 1] === 's') { return $className; } @@ -71,7 +77,8 @@ private function getPossiblePlural(string $className): string public function build(): bool { $name = $this->options->get('name'); - $config = $this->options->get('config'); + $config = $this->options->get('config'); + $helper = new HelperFactory(); if ($name === null) { throw new BuilderException('Table name is required.'); @@ -136,8 +143,8 @@ public function build(): bool $this->options->offsetSet('viewsDir', $viewPath); $this->options->offsetSet('manager', $di->getShared('modelsManager')); - $this->options->offsetSet('className', Text::camelize($name)); - $this->options->offsetSet('fileName', Text::uncamelize($this->options->get('className'))); + $this->options->offsetSet('className', $helper->camelize($name)); + $this->options->offsetSet('fileName', $helper->uncamelize($this->options->get('className'))); $modelsNamespace = ''; if ($this->options->has('modelsNamespace') && @@ -146,7 +153,7 @@ public function build(): bool $modelsNamespace = $this->options->get('modelsNamespace'); } - $modelName = Text::camelize($name); + $modelName = $helper->camelize($name); if ($modelsNamespace) { $modelClass = '\\' . trim($modelsNamespace, '\\') . '\\' . $modelName; @@ -192,7 +199,8 @@ public function build(): bool $relationField = ''; $single = $name; - $this->options->offsetSet('name', strtolower(Text::camelize($single))); + $this->options->offsetSet('name', strtolower($helper->camelize($single))); + $this->options->offsetSet('baseClass', 'ControllerBase'); $this->options->offsetSet('plural', $this->getPossiblePlural($name)); $this->options->offsetSet('singular', $this->getPossibleSingular($name)); $this->options->offsetSet('modelClass', $modelClass); @@ -229,66 +237,6 @@ public function build(): bool return true; } - /** - * @param string $var - * @param mixed $fields - * @param bool $useGetSetters - * @param null|string $identityField - * - * @return string - */ - private function captureFilterInput(string $var, $fields, bool $useGetSetters, string $identityField = null): string - { - $code = ''; - foreach ($fields as $field => $dataType) { - if ($identityField !== null && $field === $identityField) { - continue; - } - - if (\in_array($dataType, [Column::TYPE_DECIMAL, Column::TYPE_INTEGER])) { - $fieldCode = '$this->request->getPost("'.$field.'", "int")'; - } elseif ($field === 'email') { - $fieldCode = '$this->request->getPost("'.$field.'", "email")'; - } else { - $fieldCode = '$this->request->getPost("'.$field.'")'; - } - - $code .= '$' . Utils::lowerCamelizeWithDelimiter($var, '-', true) . '->'; - if ($useGetSetters) { - $code .= 'set' . Utils::lowerCamelizeWithDelimiter($field, '_', true) . '(' . $fieldCode . ')'; - } else { - $code .= Utils::lowerCamelizeWithDelimiter($field, '-_', true) . ' = ' . $fieldCode; - } - - $code .= ';' . PHP_EOL . "\t\t"; - } - - return $code; - } - - /** - * @param string $var - * @param mixed $fields - * @param bool $useGetSetters - * @return string - */ - private function assignTagDefaults(string $var, $fields, bool $useGetSetters): string - { - $code = ''; - foreach ($fields as $field => $dataType) { - if ($useGetSetters) { - $accessor = 'get' . Text::camelize($field) . '()'; - } else { - $accessor = $field; - } - - $code .= '$this->tag->setDefault("' . $field . '", $' . - Utils::lowerCamelizeWithDelimiter($var, '-', true) . '->' . $accessor . ');' . PHP_EOL . "\t\t\t"; - } - - return $code; - } - /** * @param string $attribute * @param int $dataType @@ -413,7 +361,7 @@ private function makeFields(string $action): string $code = ''; foreach ($this->options->get('dataTypes') as $attribute => $dataType) { - if (($action == 'new' || $action == 'edit') && $attribute == $identityField) { + if (($action === 'new' || $action === 'edit') && $attribute == $identityField) { continue; } @@ -435,7 +383,7 @@ private function makeFieldsVolt(string $action): string $code = ''; foreach ($this->options->get('dataTypes') as $attribute => $dataType) { - if (($action == 'new' || $action == 'edit') && $attribute == $identityField) { + if (($action === 'new' || $action === 'edit') && $attribute == $identityField) { continue; } @@ -451,109 +399,94 @@ private function makeFieldsVolt(string $action): string */ private function makeController(): void { - $controllerPath = $this->options->get('controllersDir') . $this->options->get('className') . 'Controller.php'; - if (file_exists($controllerPath) && !$this->options->has('force')) { - return; - } - - $code = file_get_contents($this->options->get('templatePath') . '/scaffold/no-forms/Controller.php'); - $usesNamespaces = false; - - $controllerNamespace = $this->options->has('controllersNamespace') - ? (string) $this->options->get('controllersNamespace') : ''; - - if (!empty(trim($controllerNamespace)) && $this->checkNamespace($controllerNamespace)) { - $code = str_replace( - '$namespace$', - 'namespace ' . $controllerNamespace.';' . PHP_EOL, - $code - ); - $usesNamespaces = true; - } else { - $code = str_replace('$namespace$', ' ', $code); - } - - $modelNamespace = (string)$this->options->get('modelsNamespace'); - if (($this->options->has('modelsNamespace') && $modelNamespace && $this->checkNamespace($modelNamespace)) - || $usesNamespaces - ) { - $code = str_replace( - '$useFullyQualifiedModelName$', - "use " . ltrim($this->options->get('modelClass'), '\\') . ';', - $code - ); - } else { - $code = str_replace('$useFullyQualifiedModelName$', '', $code); - } - - $code = str_replace('$fullyQualifiedModelName$', $this->options->get('modelClass'), $code); - - $code = str_replace( - '$singularVar$', - '$' . Utils::lowerCamelizeWithDelimiter($this->options->get('singular'), '-', true), - $code - ); - $code = str_replace('$singular$', $this->options->get('singular'), $code); - - $code = str_replace( - '$pluralVar$', - '$' . Utils::lowerCamelizeWithDelimiter($this->options->get('plural'), '-', true), - $code - ); - $code = str_replace('$plural$', $this->options->get('plural'), $code); - - $code = str_replace('$className$', $this->options->get('className'), $code); - - $code = str_replace('$assignInputFromRequestCreate$', $this->captureFilterInput( - $this->options->get('singular'), - $this->options->get('dataTypes'), - (bool) $this->options->get('genSettersGetters'), - $this->options->get('identityField') - ), $code); - - $code = str_replace('$assignInputFromRequestUpdate$', $this->captureFilterInput( - $this->options->get('singular'), - $this->options->get('dataTypes'), - (bool) $this->options->get('genSettersGetters'), - $this->options->get('identityField') - ), $code); - - $code = str_replace('$assignTagDefaults$', $this->assignTagDefaults( - $this->options->get('singular'), - $this->options->get('dataTypes'), - (bool) $this->options->get('genSettersGetters') - ), $code); - - $attributes = $this->options->get('attributes'); - - $code = str_replace('$pkVar$', '$' . $attributes[0], $code); - - if ((bool) $this->options->get('genSettersGetters')) { - $code = str_replace('$pkGet$', 'get' . Text::camelize($attributes[0]) . '()', $code); - } else { - $code = str_replace('$pkGet$', $attributes[0], $code); - } - - $code = str_replace('$pk$', $attributes[0], $code); + $nsOptKey = 'controllersNamespace'; + $controllerNamespace = $this->options->has($nsOptKey) ? (string)$this->options->get($nsOptKey) : ''; + if (empty(trim($controllerNamespace)) || !$this->checkNamespace($controllerNamespace)) { + $controllerNamespace = null; + } + + $baseClass = $controllerNamespace . '\\' . $this->options->get('baseClass'); + $controllerBuilder = new ControllerBuilder([ + 'name' => $this->options->get('className'), + 'directory' => $this->options->get('directory'), + 'controllersDir' => $this->options->get('controllersDir'), + 'baseClass' => $baseClass, + 'namespace' => $controllerNamespace, + 'force' => $this->options->get('force'), + ]); + $controllerBuilder->build(); + + $generator = $controllerBuilder->getGenerator(); + $generator->addImport(Criteria::class); + $generator->addImport(ModelPaginator::class); + $generator->addImport(Tag::class); + + $nsOptKey = 'modelsNamespace'; + $modelClass = $fullyQualifiedModelName = $this->options->get('modelClass'); + $modelNamespace = $this->options->has($nsOptKey) ? (string)$this->options->get($nsOptKey) : ''; + if (!empty(trim($modelNamespace)) && $this->checkNamespace($modelNamespace)) { + $generator->addImport($fullyQualifiedModelName); + $modelClass = str_replace([$modelNamespace . '\\', '\\'], '', $modelClass); + } + + $snippet = new ControllerSnippet($modelClass, $this->options); + $generator->addMethods([ + 'indexAction' => [ + 'comments' => ['Index action'], + 'body' => '//', + ], + 'searchAction' => [ + 'comments' => ["Searches for $snippet->plural"], + 'body' => $snippet->getSearchAction(), + ], + 'newAction' => [ + 'comments' => ['Displays the creation form'], + 'body' => '//', + ], + 'editAction' => [ + 'comments' => [ + "Edits a $snippet->singular\n", + "@param string $snippet->pkVar", + ], + 'arguments' => [$snippet->pk], + 'body' => $snippet->getEditAction(), + ], + 'createAction' => [ + 'comments' => ["Creates a new $snippet->singular"], + 'body' => $snippet->getCreateAction(), + ], + 'saveAction' => [ + 'comments' => ["Saves a $snippet->singular edited"], + 'body' => $snippet->getSaveAction(), + ], + 'deleteAction' => [ + 'comments' => [ + "Deletes a $snippet->singular\n", + "@param string $snippet->pkVar", + ], + 'arguments' => [$snippet->pk], + 'body' => $snippet->getDeleteAction(), + ], + ]); + + $className = $controllerBuilder->write(); if ($this->isConsole()) { - echo $controllerPath, PHP_EOL; + echo $className . PHP_EOL; } - - $code = str_replace("\t", " ", $code); - file_put_contents($controllerPath, $code); } /** * Make layouts of model using scaffold * - * @return $this + * @return void + * @throws BuilderException */ - private function makeLayouts() + private function makeLayouts(): void { $dirPathLayouts = $this->options->get('viewsDir') . 'layouts'; - if (!is_dir($dirPathLayouts)) { - mkdir($dirPathLayouts, 0777, true); + if (!is_dir($dirPathLayouts) && !mkdir($dirPathLayouts, 0777, true) && !is_dir($dirPathLayouts)) { + throw new BuilderException(sprintf('Directory "%s" was not created', $dirPathLayouts)); } $fileName = $this->options->get('fileName'); @@ -577,20 +510,19 @@ private function makeLayouts() $code = str_replace("\t", " ", $code); file_put_contents($viewPath, $code); } - - return $this; } /** * Make View layouts * - * @return $this + * @return void + * @throws BuilderException */ - private function makeLayoutsVolt() + private function makeLayoutsVolt(): void { $dirPathLayouts = $this->options->get('viewsDir') . 'layouts'; - if (!is_dir($dirPathLayouts)) { - mkdir($dirPathLayouts, 0777, true); + if (!is_dir($dirPathLayouts) && !mkdir($dirPathLayouts, 0777, true) && !is_dir($dirPathLayouts)) { + throw new BuilderException(sprintf('Directory "%s" was not created', $dirPathLayouts)); } $fileName = Text::uncamelize($this->options->get('fileName')); @@ -615,8 +547,6 @@ private function makeLayoutsVolt() $code = str_replace("\t", " ", $code); file_put_contents($viewPath, $code); } - - return $this; } /** @@ -626,8 +556,8 @@ private function makeLayoutsVolt() private function makeView(string $type): void { $dirPath = $this->options->get('viewsDir') . $this->options->get('fileName'); - if (!is_dir($dirPath)) { - mkdir($dirPath); + if (!is_dir($dirPath) && !mkdir($dirPath) && !is_dir($dirPath)) { + throw new BuilderException(sprintf('Directory "%s" was not created', $dirPath)); } $viewPath = $dirPath . DIRECTORY_SEPARATOR . $type . '.phtml'; @@ -641,8 +571,11 @@ private function makeView(string $type): void } $code = file_get_contents($templatePath); - $code = str_replace('$plural$', $this->options->get('plural'), $code); - $code = str_replace('$captureFields$', self::makeFields($type), $code); + $code = str_replace( + ['$plural$', '$captureFields$'], + [$this->options->get('plural'), $this->makeFields($type)], + $code + ); if ($this->isConsole()) { echo $viewPath, PHP_EOL; @@ -659,8 +592,8 @@ private function makeView(string $type): void private function makeViewVolt(string $type): void { $dirPath = $this->options->get('viewsDir') . $this->options->get('fileName'); - if (!is_dir($dirPath)) { - mkdir($dirPath, 0777, true); + if (!is_dir($dirPath) && !mkdir($dirPath, 0777, true) && !is_dir($dirPath)) { + throw new BuilderException(sprintf('Directory "%s" was not created', $dirPath)); } $viewPath = $dirPath . DIRECTORY_SEPARATOR . $type . '.volt'; @@ -675,8 +608,11 @@ private function makeViewVolt(string $type): void $code = file_get_contents($templatePath); - $code = str_replace('$plural$', $this->options->get('plural'), $code); - $code = str_replace('$captureFields$', self::makeFieldsVolt($type), $code); + $code = str_replace( + ['$plural$', '$captureFields$'], + [$this->options->get('plural'), $this->makeFieldsVolt($type)], + $code + ); if ($this->isConsole()) { echo $viewPath, PHP_EOL; @@ -694,8 +630,8 @@ private function makeViewVolt(string $type): void private function makeViewSearch(): void { $dirPath = $this->options->get('viewsDir') . $this->options->get('fileName'); - if (!is_dir($dirPath)) { - mkdir($dirPath); + if (!is_dir($dirPath) && !mkdir($dirPath) && !is_dir($dirPath)) { + throw new BuilderException(sprintf('Directory "%s" was not created', $dirPath)); } $viewPath = $dirPath . DIRECTORY_SEPARATOR . 'search.phtml'; @@ -739,15 +675,17 @@ private function makeViewSearch(): void $code = file_get_contents($templatePath); - $code = str_replace('$plural$', $this->options->get('plural'), $code); - $code = str_replace('$headerColumns$', $headerCode, $code); - $code = str_replace('$rowColumns$', $rowCode, $code); $code = str_replace( - '$singularVar$', - '$' . Utils::lowerCamelizeWithDelimiter($this->options->get('singular'), '-', true), + ['$plural$', '$headerColumns$', '$rowColumns$', '$singularVar$', '$pk$'], + [ + $this->options->get('plural'), + $headerCode, + $rowCode, + '$' . Utils::lowerCamelizeWithDelimiter($this->options->get('singular'), '-', true), + $idField + ], $code ); - $code = str_replace('$pk$', $idField, $code); if ($this->isConsole()) { echo $viewPath, PHP_EOL; @@ -760,11 +698,11 @@ private function makeViewSearch(): void /** * @throws BuilderException */ - private function makeViewSearchVolt() + private function makeViewSearchVolt(): void { $dirPath = $this->options->get('viewsDir') . $this->options->get('fileName'); - if (!is_dir($dirPath)) { - mkdir($dirPath); + if (!is_dir($dirPath) && !mkdir($dirPath) && !is_dir($dirPath)) { + throw new BuilderException(sprintf('Directory "%s" was not created', $dirPath)); } $viewPath = $dirPath . DIRECTORY_SEPARATOR . 'search.volt'; @@ -808,15 +746,17 @@ private function makeViewSearchVolt() $code = file_get_contents($templatePath); - $code = str_replace('$plural$', $this->options->get('plural'), $code); - $code = str_replace('$headerColumns$', $headerCode, $code); - $code = str_replace('$rowColumns$', $rowCode, $code); $code = str_replace( - '$singularVar$', - Utils::lowerCamelizeWithDelimiter($this->options->get('singular'), '-', true), + ['$plural$', '$headerColumns$', '$rowColumns$', '$singularVar$', '$pk$'], + [ + $this->options->get('plural'), + $headerCode, + $rowCode, + Utils::lowerCamelizeWithDelimiter($this->options->get('singular'), '-', true), + $idField + ], $code ); - $code = str_replace('$pk$', $idField, $code); if ($this->isConsole()) { echo $viewPath, PHP_EOL; diff --git a/src/Builder/Component/Task.php b/src/Builder/Component/Task.php new file mode 100644 index 000000000..dea4f7ccc --- /dev/null +++ b/src/Builder/Component/Task.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Builder\Component; + +use Phalcon\DevTools\Builder\Exception\BuilderException; +use Phalcon\DevTools\Generator\AbstractEntityGenerator; +use Phalcon\DevTools\Generator\Entity\ControllerEntityGenerator; +use Phalcon\DevTools\Utils; + +/** + * Builder to generate task + */ +class Task extends AbstractComponent +{ + /** + * Create Builder object + * + * @param array $options Builder options + * @throws BuilderException + */ + public function __construct(array $options = []) + { + if (!isset($options['name'])) { + throw new BuilderException('Please specify the task name.'); + } + + if (!isset($options['force'])) { + $options['force'] = false; + } + + if (!isset($options['suffix'])) { + $options['suffix'] = 'Task'; + } + + parent::__construct($options); + } + + /** + * @throws BuilderException + */ + public function build(array $actions = []): self + { + if (!$this->options->has('name')) { + throw new BuilderException('The task name is required.'); + } + + $name = str_replace(' ', '_', $this->options->get('name')); + $baseClass = $this->options->get('baseClass'); + $namespace = $this->constructNamespace(); + $className = Utils::camelize($name) . $this->options->get('suffix'); + + $this->generator = new ControllerEntityGenerator($className, $baseClass, $namespace); + $this->generator->setStrict(); + $this->generator->addMethods($actions); + + return $this; + } + + /** + * @throws BuilderException + */ + public function write(array $actions = []): string + { + if (null === $this->generator) { + $this->build($actions); + } + + $name = str_replace(' ', '_', $this->options->get('name')); + $className = Utils::camelize($name) . $this->options->get('suffix'); + + if ($this->options->has('directory')) { + $this->path->setRootPath($this->options->get('directory')); + } + + if (!$tasksDir = $this->options->get('tasksDir')) { + $config = $this->getConfig(); + if (empty($config->path('application.tasksDir'))) { + throw new BuilderException('Please specify a task directory.'); + } + + $tasksDir = $config->path('application.tasksDir'); + } + + // Oops! We are in APP_PATH and try to get tasksDir from outside from project dir + if ($this->isConsole() && strpos($tasksDir, '../') === 0) { + $tasksDir = ltrim($tasksDir, './'); + } + + $taskPath = rtrim($tasksDir, '\\/') . DIRECTORY_SEPARATOR . "{$className}.php"; + if (file_exists($taskPath) && !$this->options->has('force')) { + throw new BuilderException(sprintf('The Task %s already exists.', $name)); + } + + $this->generator->save($taskPath); + + if ($this->isConsole()) { + $this->notifySuccess(sprintf('Task "%s" was successfully created.', $name)); + $this->notifyInfo($taskPath); + } + + return $className; + } + + /** + * @throws BuilderException + */ + public function getGenerator(): AbstractEntityGenerator + { + if (null === $this->generator) { + $this->build(); + } + + return $this->generator; + } + + /** + * @return string + * @throws BuilderException + */ + protected function constructNamespace(): ?string + { + $namespace = $this->options->has('namespace') ? (string) $this->options->get('namespace') : null; + + if ($namespace === null) { + return null; + } + + return $this->checkNamespace($namespace) && !empty(trim($namespace)) ? $namespace : null; + } +} diff --git a/src/Builder/Exception/BuilderException.php b/src/Builder/Exception/BuilderException.php index 2bf160370..576e337cc 100644 --- a/src/Builder/Exception/BuilderException.php +++ b/src/Builder/Exception/BuilderException.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Builder\Exception; -use Phalcon\Exception; +use Exception; /** * Exception Builder made diff --git a/src/Builder/Path.php b/src/Builder/Path.php index d79d8a2bd..fa20af45f 100644 --- a/src/Builder/Path.php +++ b/src/Builder/Path.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Builder; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\Config\Adapter\Ini as ConfigIni; use Phalcon\DevTools\Builder\Exception\BuilderException; use RecursiveDirectoryIterator; @@ -80,7 +80,8 @@ public function getConfig($type = null): Config */ public function setRootPath(?string $path = null) { - $this->rootPath = rtrim(str_replace('/', DIRECTORY_SEPARATOR, $path), '\\/') . DIRECTORY_SEPARATOR; + if ($path) + $this->rootPath = rtrim(str_replace('/', DIRECTORY_SEPARATOR, $path), '\\/') . DIRECTORY_SEPARATOR; return $this; } diff --git a/src/Builder/Project/Cli.php b/src/Builder/Project/Cli.php index 100edc8d0..0cec99de9 100644 --- a/src/Builder/Project/Cli.php +++ b/src/Builder/Project/Cli.php @@ -12,6 +12,8 @@ namespace Phalcon\DevTools\Builder\Project; +use Phalcon\DevTools\Builder\Component\Controller as ControllerBuilder; +use Phalcon\DevTools\Builder\Exception\BuilderException; use Phalcon\DevTools\Script\Color; /** @@ -36,6 +38,7 @@ class Cli extends ProjectBuilder * Build project * * @return bool + * @throws BuilderException */ public function build(): bool { @@ -66,16 +69,16 @@ private function createLauncher() DIRECTORY_SEPARATOR . 'launcher'; $putFile = $this->options->get('projectPath') . 'run'; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); chmod($putFile, 0755); - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + if (stripos(PHP_OS, 'WIN') === 0) { $getFile = $this->options->get('templatePath') . DIRECTORY_SEPARATOR . 'project' . DIRECTORY_SEPARATOR . 'cli' . DIRECTORY_SEPARATOR . 'launcher.bat'; $putFile = $this->options->get('projectPath') . 'run.bat'; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); } return $this; @@ -85,16 +88,39 @@ private function createLauncher() * Create Default Tasks * * @return $this + * @throws BuilderException */ private function createDefaultTasks() { - $getFile = $this->options->get('templatePath') . '/project/cli/MainTask.php'; - $putFile = $this->options->get('projectPath') . 'app/tasks/MainTask.php'; - $this->generateFile($getFile, $putFile); - - $getFile = $this->options->get('templatePath') . '/project/cli/VersionTask.php'; - $putFile = $this->options->get('projectPath') . 'app/tasks/VersionTask.php'; - $this->generateFile($getFile, $putFile); + $extends = '\Phalcon\Cli\Task'; + + $controllerBuilder = new ControllerBuilder([ + 'name' => 'Main', + 'suffix' => 'Task', + 'directory' => $this->options->get('projectPath'), + 'controllersDir' => $this->options->get('projectPath') . 'app/tasks/', + 'baseClass' => $extends, + 'force' => true, + ]); + $controllerBuilder->build(['mainAction' => [ + 'body' => 'echo "Congratulations! You are now flying with Phalcon CLI!";', + ]])->write(); + + $controllerBuilder = new ControllerBuilder([ + 'name' => 'Version', + 'suffix' => 'Task', + 'directory' => $this->options->get('projectPath'), + 'controllersDir' => $this->options->get('projectPath') . 'app/tasks/', + 'baseClass' => $extends, + 'force' => true, + ]); + $controllerBuilder->build(['mainAction' => [ + 'body' => function () { + $config = $this->getDI()->get('config'); + + echo $config['version']; + }, + ]])->write(); return $this; } @@ -108,7 +134,7 @@ private function createBootstrapFiles() { $getFile = $this->options->get('templatePath') . '/project/cli/bootstrap.php'; $putFile = $this->options->get('projectPath') . 'app/bootstrap.php'; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); return $this; } @@ -124,15 +150,15 @@ private function createConfig() $getFile = $this->options->get('templatePath') . '/project/cli/config.' . $type; $putFile = $this->options->get('projectPath') . 'app/config/config.' . $type; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); $getFile = $this->options->get('templatePath') . '/project/cli/services.php'; $putFile = $this->options->get('projectPath') . 'app/config/services.php'; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); $getFile = $this->options->get('templatePath') . '/project/cli/loader.php'; $putFile = $this->options->get('projectPath') . 'app/config/loader.php'; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); return $this; } diff --git a/src/Builder/Project/Micro.php b/src/Builder/Project/Micro.php index 05db01824..04e12e0c9 100644 --- a/src/Builder/Project/Micro.php +++ b/src/Builder/Project/Micro.php @@ -62,15 +62,15 @@ public function build() */ private function createIndexViewFiles() { - $engine = $this->options->get('templateEngine') == 'volt' ? 'volt' : 'phtml'; + $engine = $this->options->get('templateEngine') === 'volt' ? 'volt' : 'phtml'; $getFile = $this->options->get('templatePath') . '/project/micro/views/index.' . $engine; $putFile = $this->options->get('projectPath') . 'app/views/index.' . $engine; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); $getFile = $this->options->get('templatePath') . '/project/micro/views/404.' . $engine; $putFile = $this->options->get('projectPath') . 'app/views/404.' . $engine; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); return $this; } @@ -82,7 +82,7 @@ private function createIndexViewFiles() */ private function createHtaccessFiles() { - if (file_exists($this->options->get('projectPath') . '.htaccess') == false) { + if (!file_exists($this->options->get('projectPath') . '.htaccess')) { $code = '' . PHP_EOL . "\t" . 'RewriteEngine on' . PHP_EOL . "\t" . 'RewriteRule ^$ public/ [L]' . PHP_EOL . @@ -91,14 +91,14 @@ private function createHtaccessFiles() file_put_contents($this->options->get('projectPath') . '.htaccess', $code); } - if (file_exists($this->options->get('projectPath') . 'public/.htaccess') == false) { + if (!file_exists($this->options->get('projectPath') . 'public/.htaccess')) { file_put_contents( $this->options->get('projectPath') . 'public/.htaccess', file_get_contents($this->options->get('templatePath') . '/project/micro/htaccess') ); } - if (file_exists($this->options->get('projectPath') . 'index.html') == false) { + if (!file_exists($this->options->get('projectPath') . 'index.html')) { $code = '

Mod-Rewrite is not enabled

' . '

Please enable rewrite module on your web server to continue'; file_put_contents($this->options->get('projectPath') . 'index.html', $code); @@ -116,7 +116,7 @@ private function createBootstrapFile() { $getFile = $this->options->get('templatePath') . '/project/micro/index.php'; $putFile = $this->options->get('projectPath') . 'public/index.php'; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); return $this; } diff --git a/src/Builder/Project/Modules.php b/src/Builder/Project/Modules.php index 324c451ff..7fde93e9f 100644 --- a/src/Builder/Project/Modules.php +++ b/src/Builder/Project/Modules.php @@ -25,8 +25,6 @@ */ class Modules extends ProjectBuilder { - use ProjectAware; - /** * Project directories * @var array @@ -94,19 +92,15 @@ public function build() */ private function createControllerFile() { - $namespace = $this->options->get('name'); - if (strtolower(trim($namespace)) == 'default') { - $namespace = 'MyDefault'; - } - - $builder = new ControllerBuilder([ + $controllerBuilder = new ControllerBuilder([ 'name' => 'index', + 'directory' => $this->options->get('projectPath'), 'controllersDir' => $this->options->get('projectPath') . 'app/modules/frontend/controllers/', - 'namespace' => ucfirst($namespace) . '\Modules\Frontend\Controllers', - 'baseClass' => 'ControllerBase' + 'namespace' => "{$this->getNamespace()}\Modules\Frontend\Controllers", + 'baseClass' => "{$this->getNamespace()}\Modules\Frontend\Controllers\ControllerBase", ]); - $builder->build(); + $controllerBuilder->build(['indexAction' => []])->write(); return $this; } @@ -118,15 +112,15 @@ private function createControllerFile() */ private function createIndexViewFiles() { - $engine = $this->options->get('templateEngine') == 'volt' ? 'volt' : 'phtml'; + $engine = $this->options->get('templateEngine') === 'volt' ? 'volt' : 'phtml'; $getFile = $this->options->get('templatePath') . '/project/modules/views/index.' . $engine; $putFile = $this->options->get('projectPath') . 'app/modules/frontend/views/index.' . $engine; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); $getFile = $this->options->get('templatePath') . '/project/modules/views/index/index.' . $engine; $putFile = $this->options->get('projectPath') . 'app/modules/frontend/views/index/index.' . $engine; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); return $this; } @@ -153,16 +147,42 @@ private function createModules() * Create Default Tasks * * @return $this + * @throws BuilderException */ private function createDefaultTasks() { - $getFile = $this->options->get('templatePath') . '/project/modules/MainTask.php'; - $putFile = $this->options->get('projectPath') . 'app/modules/cli/tasks/MainTask.php'; - $this->generateFile($getFile, $putFile, $this->options->get('name')); + $extends = '\Phalcon\Cli\Task'; + $namespace = "{$this->getNamespace()}\Modules\Cli\Tasks"; + + $controllerBuilder = new ControllerBuilder([ + 'name' => 'Main', + 'suffix' => 'Task', + 'directory' => $this->options->get('projectPath'), + 'controllersDir' => $this->options->get('projectPath') . 'app/modules/cli/tasks/', + 'namespace' => $namespace, + 'baseClass' => $extends, + 'force' => true, + ]); + $controllerBuilder->build(['mainAction' => [ + 'body' => 'echo "Congratulations! You are now flying with Phalcon CLI!";', + ]])->write(); + + $controllerBuilder = new ControllerBuilder([ + 'name' => 'Version', + 'suffix' => 'Task', + 'directory' => $this->options->get('projectPath'), + 'controllersDir' => $this->options->get('projectPath') . 'app/modules/cli/tasks/', + 'namespace' => $namespace, + 'baseClass' => $extends, + 'force' => true, + ]); + $controllerBuilder->build(['mainAction' => [ + 'body' => function () { + $config = $this->getDI()->get('config'); - $getFile = $this->options->get('templatePath') . '/project/modules/VersionTask.php'; - $putFile = $this->options->get('projectPath') . 'app/modules/cli/tasks/VersionTask.php'; - $this->generateFile($getFile, $putFile, $this->options->get('name')); + echo $config['version']; + }, + ]])->write(); return $this; } @@ -171,12 +191,20 @@ private function createDefaultTasks() * Create ControllerBase * * @return $this + * @throws BuilderException */ private function createControllerBase() { - $getFile = $this->options->get('templatePath') . '/project/modules/ControllerBase.php'; - $putFile = $this->options->get('projectPath') . 'app/modules/frontend/controllers/ControllerBase.php'; - $this->generateFile($getFile, $putFile, $this->options->get('name')); + $controllerBuilder = new ControllerBuilder([ + 'name' => 'ControllerBase', + 'directory' => $this->options->get('projectPath'), + 'controllersDir' => $this->options->get('projectPath') . 'app/modules/frontend/controllers', + 'namespace' => "{$this->getNamespace()}\Modules\Frontend\Controllers", + 'baseClass' => '\Phalcon\Mvc\Controller', + 'suffix' => '', + ]); + + $controllerBuilder->build()->write(); return $this; } @@ -188,7 +216,7 @@ private function createControllerBase() */ private function createHtaccessFiles() { - if (file_exists($this->options->get('projectPath') . '.htaccess') == false) { + if (!file_exists($this->options->get('projectPath') . '.htaccess')) { $code = '' . PHP_EOL . "\t" . 'RewriteEngine on' . PHP_EOL . "\t" . 'RewriteRule ^$ public/ [L]' . PHP_EOL . @@ -197,14 +225,14 @@ private function createHtaccessFiles() file_put_contents($this->options->get('projectPath') . '.htaccess', $code); } - if (file_exists($this->options->get('projectPath') . 'public/.htaccess') == false) { + if (!file_exists($this->options->get('projectPath') . 'public/.htaccess')) { file_put_contents( $this->options->get('projectPath') . 'public/.htaccess', file_get_contents($this->options->get('templatePath') . '/project/modules/htaccess') ); } - if (file_exists($this->options->get('projectPath') . 'index.html') == false) { + if (!file_exists($this->options->get('projectPath') . 'index.html')) { $code = '

Mod-Rewrite is not enabled

' . '

Please enable rewrite module on your web server to continue'; file_put_contents($this->options->get('projectPath') . 'index.html', $code); @@ -237,7 +265,7 @@ private function createBootstrapFiles() $this->generateFile($getFile, $putFile, $this->options->get('name')); chmod($putFile, 0755); - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + if (stripos(PHP_OS, 'WIN') === 0) { $getFile = $this->options->get('templatePath') . '/project/modules/launcher.bat'; $putFile = $this->options->get('projectPath') . 'run.bat'; $this->generateFile($getFile, $putFile, $this->options->get('name')); diff --git a/src/Builder/Project/ProjectAware.php b/src/Builder/Project/ProjectAware.php deleted file mode 100644 index b570cec35..000000000 --- a/src/Builder/Project/ProjectAware.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view - * the LICENSE file that was distributed with this source code. - */ - -namespace Phalcon\DevTools\Builder\Project; - -use Phalcon\Config; - -/** - * @property Config $options - * @method static generateFile(string $fromFile, string $toFile, string $name = '') - */ -trait ProjectAware -{ - /** - * Create .htrouter.php file - * - * @param string $templatePath - * @param string $projectPath - * - * @return $this - */ - protected function createHtrouterFile($projectPath = null, $templatePath = null) - { - if (!$projectPath) { - $projectPath = $this->options->get('projectPath'); - } - - if (!$templatePath) { - $templatePath = $this->options->get('templatePath'); - } - - $fromFile = rtrim($templatePath, '\\/') . DIRECTORY_SEPARATOR . '.htrouter.php'; - $toFile = $projectPath . '.htrouter.php'; - - $this->generateFile($fromFile, $toFile); - - return $this; - } -} diff --git a/src/Builder/Project/ProjectBuilder.php b/src/Builder/Project/ProjectBuilder.php index ac5210f63..5c9e6fa6a 100644 --- a/src/Builder/Project/ProjectBuilder.php +++ b/src/Builder/Project/ProjectBuilder.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Builder\Project; -use Phalcon\Config; +use Phalcon\Config\Config; /** * Abstract Builder to create application skeletons @@ -106,18 +106,15 @@ protected function getVariableValues() * * @return $this */ - protected function generateFile($getFile, $putFile, $name = '') + protected function generateFile(string $getFile, string $putFile, string $name = '') { if (!file_exists($putFile)) { touch($putFile); - $fh = fopen($putFile, "w+"); + $fh = fopen($putFile, 'wb+'); $str = file_get_contents($getFile); if ($name) { - $namespace = ucfirst($name); - if (strtolower(trim($name)) == 'default') { - $namespace = 'MyDefault'; - } + $namespace = $this->getNamespace(); $str = preg_replace('/@@name@@/', $name, $str); $str = preg_replace('/@@namespace@@/', $namespace, $str); @@ -136,4 +133,40 @@ protected function generateFile($getFile, $putFile, $name = '') return $this; } + + /** + * Create .htrouter.php file + * + * @param string|null $templatePath + * @param string|null $projectPath + * + * @return $this + */ + protected function createHtrouterFile(string $projectPath = null, string $templatePath = null) + { + if (!$projectPath) { + $projectPath = $this->options->get('projectPath'); + } + + if (!$templatePath) { + $templatePath = $this->options->get('templatePath'); + } + + $fromFile = rtrim($templatePath, '\\/') . DIRECTORY_SEPARATOR . '.htrouter.php'; + $toFile = $projectPath . '.htrouter.php'; + + $this->generateFile($fromFile, $toFile, $this->options->get('name')); + + return $this; + } + + protected function getNamespace(string $name = ''): string + { + $namespace = $name ? ucfirst($name) : ucfirst($this->options->get('name', '')); + if (strtolower(trim($name)) === 'default') { + $namespace = 'MyDefault'; + } + + return $namespace; + } } diff --git a/src/Builder/Project/Simple.php b/src/Builder/Project/Simple.php index 5ef606419..acbee632a 100644 --- a/src/Builder/Project/Simple.php +++ b/src/Builder/Project/Simple.php @@ -15,15 +15,13 @@ use Phalcon\DevTools\Builder\Component\Controller as ControllerBuilder; use Phalcon\DevTools\Builder\Exception\BuilderException; use Phalcon\DevTools\Web\Tools; -use Phalcon\Exception; +use Exception; /** * Builder to create Simple application skeletons */ class Simple extends ProjectBuilder { - use ProjectAware; - /** * Project directories * @@ -58,7 +56,7 @@ class Simple extends ProjectBuilder */ public function build() { - + $this ->buildDirectories() ->getVariableValues() @@ -85,14 +83,14 @@ public function build() */ private function createControllerFile() { - $builder = new ControllerBuilder([ + $controllerBuilder = new ControllerBuilder([ 'name' => 'index', 'directory' => $this->options->get('projectPath'), 'controllersDir' => $this->options->get('projectPath') . 'app/controllers', 'baseClass' => 'ControllerBase' ]); - $builder->build(); + $controllerBuilder->build()->write(); return $this; } @@ -104,15 +102,15 @@ private function createControllerFile() */ private function createIndexViewFiles() { - $engine = $this->options->get('templateEngine') == 'volt' ? 'volt' : 'phtml'; + $engine = $this->options->get('templateEngine') === 'volt' ? 'volt' : 'phtml'; $getFile = $this->options->get('templatePath') . '/project/simple/views/index.' . $engine; $putFile = $this->options->get('projectPath') . 'app/views/index.' . $engine; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); $getFile = $this->options->get('templatePath') . '/project/simple/views/index/index.' . $engine; $putFile = $this->options->get('projectPath') . 'app/views/index/index.' . $engine; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); return $this; } @@ -121,12 +119,19 @@ private function createIndexViewFiles() * Create ControllerBase * * @return $this + * @throws BuilderException */ private function createControllerBase() { - $getFile = $this->options->get('templatePath') . '/project/simple/ControllerBase.php'; - $putFile = $this->options->get('projectPath') . 'app/controllers/ControllerBase.php'; - $this->generateFile($getFile, $putFile, $this->options->get('name')); + $controllerBuilder = new ControllerBuilder([ + 'name' => 'ControllerBase', + 'directory' => $this->options->get('projectPath'), + 'controllersDir' => $this->options->get('projectPath') . 'app/controllers', + 'baseClass' => '\Phalcon\Mvc\Controller', + 'suffix' => '', + ]); + + $controllerBuilder->build()->write(); return $this; } @@ -138,7 +143,7 @@ private function createControllerBase() */ private function createHtaccessFiles() { - if (file_exists($this->options->get('projectPath') . '.htaccess') == false) { + if (!file_exists($this->options->get('projectPath') . '.htaccess')) { $code = '' . PHP_EOL . "\t" . 'RewriteEngine on' . PHP_EOL . "\t" . 'RewriteRule ^$ public/ [L]' . PHP_EOL . @@ -147,14 +152,14 @@ private function createHtaccessFiles() file_put_contents($this->options->get('projectPath') . '.htaccess', $code); } - if (file_exists($this->options->get('projectPath') . 'public/.htaccess') == false) { + if (!file_exists($this->options->get('projectPath') . 'public/.htaccess')) { file_put_contents( $this->options->get('projectPath') . 'public/.htaccess', file_get_contents($this->options->get('templatePath') . '/project/simple/htaccess') ); } - if (file_exists($this->options->get('projectPath') . 'index.html') == false) { + if (!file_exists($this->options->get('projectPath') . 'index.html')) { $code = '

Mod-Rewrite is not enabled

' . '

Please enable rewrite module on your web server to continue'; file_put_contents($this->options->get('projectPath') . 'index.html', $code); @@ -172,7 +177,7 @@ private function createBootstrapFiles() { $getFile = $this->options->get('templatePath') . '/project/simple/index.php'; $putFile = $this->options->get('projectPath') . 'public/index.php'; - $this->generateFile($getFile, $putFile); + $this->generateFile($getFile, $putFile, $this->options->get('name')); return $this; } diff --git a/src/Commands/Builtin/AllModels.php b/src/Commands/Builtin/AllModels.php index 83632154c..575ccb189 100644 --- a/src/Commands/Builtin/AllModels.php +++ b/src/Commands/Builtin/AllModels.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Commands\Builtin; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\Config\Adapter\Ini as ConfigIni; use Phalcon\DevTools\Builder\Component\AllModels as AllModelsBuilder; use Phalcon\DevTools\Builder\Exception\BuilderException; diff --git a/src/Commands/Builtin/Controller.php b/src/Commands/Builtin/Controller.php index b3ac7775f..2420e94cf 100644 --- a/src/Commands/Builtin/Controller.php +++ b/src/Commands/Builtin/Controller.php @@ -46,10 +46,11 @@ public function getPossibleParams(): array * {@inheritdoc} * * @param array $parameters - * @return mixed + * + * @return string * @throws BuilderException */ - public function run(array $parameters) + public function run(array $parameters): string { $controllerBuilder = new ControllerBuilder([ 'name' => $this->getOption(['name', 1]), @@ -60,7 +61,7 @@ public function run(array $parameters) 'force' => $this->isReceivedOption('force') ]); - return $controllerBuilder->build(); + return $controllerBuilder->build(['indexAction' => []])->write(); } /** diff --git a/src/Commands/Builtin/Migration.php b/src/Commands/Builtin/Migration.php index f6be62068..9b37b70aa 100644 --- a/src/Commands/Builtin/Migration.php +++ b/src/Commands/Builtin/Migration.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Commands\Builtin; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\DevTools\Commands\Command; use Phalcon\DevTools\Commands\CommandsException; use Phalcon\DevTools\Script\Color; diff --git a/src/Commands/Builtin/Model.php b/src/Commands/Builtin/Model.php index 1ff80c0b4..7142a3876 100644 --- a/src/Commands/Builtin/Model.php +++ b/src/Commands/Builtin/Model.php @@ -12,14 +12,14 @@ namespace Phalcon\DevTools\Commands\Builtin; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\Config\Adapter\Ini as ConfigIni; use Phalcon\DevTools\Builder\Component\Model as ModelBuilder; use Phalcon\DevTools\Builder\Exception\BuilderException; use Phalcon\DevTools\Commands\Command; use Phalcon\DevTools\Script\Color; use Phalcon\DevTools\Utils; -use Phalcon\Text; +use Phalcon\Support\HelperFactory; /** * Model Command @@ -66,6 +66,7 @@ public function run(array $parameters): void { $name = $this->getOption(['name', 1]); $className = Utils::camelize(isset($parameters[1]) ? $parameters[1] : $name, '_-'); + $helper = new HelperFactory(); $modelBuilder = new ModelBuilder( [ @@ -73,7 +74,7 @@ public function run(array $parameters): void 'schema' => $this->getOption('schema'), 'config' => $this->getConfigObject(), 'className' => $className, - 'fileName' => Text::uncamelize($className), + 'fileName' => $helper->uncamelize($className), 'genSettersGetters' => $this->isReceivedOption('get-set'), 'genDocMethods' => $this->isReceivedOption('doc'), 'namespace' => $this->getOption('namespace'), diff --git a/src/Commands/Builtin/Project.php b/src/Commands/Builtin/Project.php index 64104e49c..f48298dcd 100644 --- a/src/Commands/Builtin/Project.php +++ b/src/Commands/Builtin/Project.php @@ -58,7 +58,7 @@ public function run(array $parameters) $projectType = $this->getOption(['type', 2], null, 'simple'); $projectPath = $this->getOption(['directory', 3], null, '.'); $templatePath = $this->getOption(['template-path'], null, TEMPLATE_PATH); - $enableWebtools = $this->getOption(['enable-webtools', 4], null, false); + $enableWebTools = $this->getOption(['enable-webtools', 4], null, false); $force = $this->getOption(['force', 5], null, false); $useConfigIni = $this->getOption('use-config-ini'); $templateEngine = $this->getOption(['template-engine'], null, "phtml"); @@ -67,11 +67,11 @@ public function run(array $parameters) 'name' => $projectName, 'type' => $projectType, 'directory' => $projectPath, - 'enableWebTools' => $enableWebtools, + 'enableWebTools' => $enableWebTools, 'force' => $force, 'templatePath' => $templatePath, 'templateEngine' => $templateEngine, - 'useConfigIni' => $useConfigIni + 'useConfigIni' => $useConfigIni, ]); return $builder->build(); diff --git a/src/Commands/Builtin/Scaffold.php b/src/Commands/Builtin/Scaffold.php index f4170b69e..0011a202e 100644 --- a/src/Commands/Builtin/Scaffold.php +++ b/src/Commands/Builtin/Scaffold.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Commands\Builtin; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\DevTools\Builder\Component\Scaffold as ScaffoldBuilder; use Phalcon\DevTools\Builder\Exception\BuilderException; use Phalcon\DevTools\Commands\Command; @@ -53,11 +53,12 @@ public function getPossibleParams(): array * {@inheritdoc} * * @param array $parameters - * @return mixed + * + * @return bool * @throws CommandsException * @throws BuilderException */ - public function run(array $parameters) + public function run(array $parameters): bool { $name = $this->getOption(['table-name', 1]); $templatePath = $this->getOption(['template-path'], null, TEMPLATE_PATH); @@ -111,7 +112,7 @@ public function getHelp(): void $this->printParameters($this->getPossibleParams()); } - protected function getDirectoryPath() + protected function getDirectoryPath(): string { $path = $this->isReceivedOption('directory') ? $this->getOption('directory') : ''; diff --git a/src/Commands/Builtin/Serve.php b/src/Commands/Builtin/Serve.php index aac757bc4..c642ba52d 100644 --- a/src/Commands/Builtin/Serve.php +++ b/src/Commands/Builtin/Serve.php @@ -16,7 +16,7 @@ use Phalcon\DevTools\Script\Color; use Phalcon\DevTools\Utils\SystemInfo; use Phalcon\Di\FactoryDefault; -use Phalcon\Registry; +use Phalcon\Support\Registry; /** * Serve Command diff --git a/src/Commands/Builtin/Task.php b/src/Commands/Builtin/Task.php new file mode 100644 index 000000000..8483d4c86 --- /dev/null +++ b/src/Commands/Builtin/Task.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Commands\Builtin; + +use Phalcon\DevTools\Builder\Component\Task as TaskBuilder; +use Phalcon\DevTools\Builder\Exception\BuilderException; +use Phalcon\DevTools\Commands\Command; +use Phalcon\DevTools\Script\Color; + +/** + * Task Command + * + * Create a handler for the command line. + */ +class Task extends Command +{ + /** + * {@inheritdoc} + * + * @return array + */ + public function getPossibleParams(): array + { + return [ + 'name=s' => 'Task name', + 'namespace=s' => "Task's namespace [option]", + 'directory=s' => 'Base path on which project is located [optional]', + 'output=s' => 'Directory where the task should be created [optional]', + 'base-class=s' => 'Base class to be inherited by the task [optional]', + 'force' => 'Force to rewrite task [optional]', + 'help' => 'Shows this help [optional]', + ]; + } + + /** + * {@inheritdoc} + * + * @param array $parameters + * + * @return string + * @throws BuilderException + */ + public function run(array $parameters): string + { + $taskBuilder = new TaskBuilder([ + 'name' => $this->getOption(['name', 1]), + 'suffix' => 'Task', + 'directory' => $this->getOption('directory'), + 'tasksDir' => $this->getOption('output'), + 'namespace' => $this->getOption('namespace'), + 'baseClass' => $this->getOption('base-class', null, '\\' . \Phalcon\Cli\Task::class), + 'force' => $this->isReceivedOption('force'), + ]); + + return $taskBuilder->build(['mainAction' => []])->write(); + } + + /** + * {@inheritdoc} + * + * @return array + */ + public function getCommands(): array + { + return ['task', 'create-task']; + } + + /** + * {@inheritdoc} + * + * @return void + */ + public function getHelp(): void + { + print Color::head('Help:') . PHP_EOL; + print Color::colorize(' Creates a task') . PHP_EOL . PHP_EOL; + + print Color::head('Usage:') . PHP_EOL; + print Color::colorize(' task [name] [directory]', Color::FG_GREEN) . PHP_EOL . PHP_EOL; + + print Color::head('Arguments:') . PHP_EOL; + print Color::colorize(' help', Color::FG_GREEN); + print Color::colorize("\tShows this help text") . PHP_EOL . PHP_EOL; + + $this->printParameters($this->getPossibleParams()); + } + + /** + * {@inheritdoc} + * + * @return int + */ + public function getRequiredParams(): int + { + return 1; + } +} diff --git a/src/Commands/Builtin/Webtools.php b/src/Commands/Builtin/Webtools.php index b3a0e83e1..7e94eb50b 100644 --- a/src/Commands/Builtin/Webtools.php +++ b/src/Commands/Builtin/Webtools.php @@ -16,7 +16,7 @@ use Phalcon\DevTools\Commands\CommandsException; use Phalcon\DevTools\Script\Color; use Phalcon\DevTools\Web\Tools; -use Phalcon\Exception; +use Exception; /** * Webtools Command diff --git a/src/Commands/Command.php b/src/Commands/Command.php index 250412125..4106c9205 100644 --- a/src/Commands/Command.php +++ b/src/Commands/Command.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Commands; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\Config\Adapter\Ini as IniConfig; use Phalcon\Config\Adapter\Json as JsonConfig; use Phalcon\Config\Adapter\Yaml as YamlConfig; @@ -20,7 +20,7 @@ use Phalcon\DevTools\Script; use Phalcon\DevTools\Script\Color; use Phalcon\Events\Manager as EventsManager; -use Phalcon\Filter; +use Phalcon\Filter\Filter; abstract class Command implements CommandsInterface { diff --git a/src/Commands/CommandsException.php b/src/Commands/CommandsException.php index baf45cd8c..09268071f 100644 --- a/src/Commands/CommandsException.php +++ b/src/Commands/CommandsException.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Commands; -use Phalcon\Exception; +use Exception; /** * Commands Exception diff --git a/src/Error/ErrorHandler.php b/src/Error/ErrorHandler.php index b705f49dc..f0585bcc8 100644 --- a/src/Error/ErrorHandler.php +++ b/src/Error/ErrorHandler.php @@ -13,7 +13,7 @@ namespace Phalcon\DevTools\Error; use Phalcon\Di\Injectable; -use Phalcon\Logger; +use Phalcon\Logger\Logger; class ErrorHandler extends Injectable { diff --git a/src/Exception/PDODriverNotFoundException.php b/src/Exception/PDODriverNotFoundException.php new file mode 100644 index 000000000..2b476a8e5 --- /dev/null +++ b/src/Exception/PDODriverNotFoundException.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Exception; + +use PDOException; +use Phalcon\Devtools\Script\Color; +use PDO; + +class PDODriverNotFoundException extends PDOException +{ + protected $adapter = ''; + + public function __construct($message, $adapter = '') + { + parent::__construct($message); + $this->adapter = $adapter; + } + + public function getAdapter() + { + return $this->adapter; + } + + public function writeNicelyFormattedErrorOutput() + { + fwrite(STDERR, Color::error($this->getMessage()) . PHP_EOL); + + if (!extension_loaded('PDO')) { + fwrite(STDERR, Color::error('PDO extension is not loaded') . PHP_EOL); + } else { + $loadedDrivers = PDO::getAvailableDrivers(); + fwrite(STDERR, 'PDO Drivers loaded:' . PHP_EOL); + fwrite(STDERR, print_r($loadedDrivers, true). PHP_EOL); + } + } +} diff --git a/src/Exception/ProviderException.php b/src/Exception/ProviderException.php index 3693b4237..67ceb2f53 100644 --- a/src/Exception/ProviderException.php +++ b/src/Exception/ProviderException.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Exception; -use Phalcon\Exception; +use Exception; class ProviderException extends Exception { diff --git a/src/Generator/AbstractEntityGenerator.php b/src/Generator/AbstractEntityGenerator.php new file mode 100644 index 000000000..37e99b6be --- /dev/null +++ b/src/Generator/AbstractEntityGenerator.php @@ -0,0 +1,450 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator; + +use Nette\PhpGenerator\ClassType; +use Nette\PhpGenerator\PhpFile; +use Nette\PhpGenerator\PhpNamespace; +use Nette\PhpGenerator\Printer; +use Nette\PhpGenerator\PsrPrinter; +use Phalcon\DevTools\Builder\Exception\BuilderException; +use Phalcon\DevTools\Generator\Helper\ReflectionHelper; +use Phalcon\DevTools\Generator\Signature\ConstantGenerator; +use Phalcon\DevTools\Generator\Signature\MethodGenerator; +use Phalcon\DevTools\Generator\Signature\PropertyGenerator; +use Roave\BetterReflection\Reflection\ReflectionClass; +use Roave\BetterReflection\Reflection\ReflectionClassConstant; +use Roave\BetterReflection\Reflection\ReflectionMethod; +use Roave\BetterReflection\Reflection\ReflectionProperty; +use SplFileObject; + +abstract class AbstractEntityGenerator +{ + /** + * @var PhpFile + */ + protected $file; + /** + * @var PhpFile|PhpNamespace + */ + protected $handler; + /** + * @var ClassType + */ + protected $class; + /** + * @var MethodGenerator[] + */ + protected $methods; + /** + * @var ConstantGenerator[] + */ + protected $constants; + /** + * @var PropertyGenerator[] + */ + protected $properties; + + public function __construct(string $className, ?string $baseClass = null, ?string $namespace = null) + { + $this->file = new PhpFile(); + if (null !== $namespace) { + $this->handler = $this->file->addNamespace($namespace); + } else { + $this->handler = $this->file; + } + + $this->class = $this->handler->addClass($className); + if (null !== $baseClass) { + $this->class->setExtends($baseClass); + $this->handler->addUse($baseClass); + } + } + + public function printCode(Printer $printer): string + { + return $printer->printFile($this->file); + } + + public function setStrict(bool $strict = true): self + { + $this->file->setStrictTypes($strict); + + return $this; + } + + public function setClassAbstract(): self + { + $this->class->setAbstract(); + + return $this; + } + + public function addImplements(string $interface): void + { + $this->class->addImplement($interface); + $this->handler->addUse($interface); + } + + public function addComments(array $comments): void + { + foreach ($comments as $comment) { + $this->handler->addComment($comment); + } + } + + public function addClassComments(array $comments): void + { + foreach ($comments as $comment) { + $this->class->addComment($comment); + } + } + + public function hasImport(string $import): bool + { + $cleanImports = $this->getCleanImports(); + foreach ($cleanImports as $cleanImport) { + if (in_array($import, $cleanImport, true)) { + return true; + } + } + + return false; + } + + public function getImports(): array + { + if ($this->handler instanceof PhpFile) { + $imports = []; + foreach ($this->handler->getNamespaces() as $item) { + $imports[] = $item->getUses(); + } + + return array_merge(...$imports); + } + + if ($this->handler instanceof PhpNamespace) { + return $this->handler->getUses(); + } + + return []; + } + + public function getCleanImports(): array + { + $cleanImports = []; + $imports = $this->getImports(); + foreach ($imports as $alias => $import) { + if (false !== strpos($alias, 'as')) { + $importArr = explode(' as ', $import); + $newAlias = explode(' as ', $alias)[0] ?? 0; + $cleanImports[$newAlias] = []; + if (isset($importArr[1])) { + $cleanImports[$newAlias][] = '\\'. $importArr[0]; + } + if (isset($importArr[1])) { + $cleanImports[$newAlias][] = $importArr[1]; + } + + } else { + $cleanImports[$alias] = ['\\'. $import, $alias]; + } + } + + return $cleanImports; + } + + public function addImport(string $class, ?string $alias = null): self + { + if (!$this->hasImport($class)) { + if (null !== $alias) { + $this->handler->addUse($class, $alias); + } else { + $this->handler->addUse($class); + } + } + + return $this; + } + + public function addImports(array $imports): self + { + foreach ($imports as $import) { + $this->addImport(...$import); + } + + return $this; + } + + public function hasConstant(string $name): bool + { + return isset($this->constants[$name]); + } + + public function getConstant(string $name): ConstantGenerator + { + if (!isset($this->constants[$name])) { + $this->addConstant($name); + } + + return $this->constants[$name]; + } + + public function addConstant( + string $name, + $value = null, + ?string $visibility = 'public', + array $comments = [] + ): ConstantGenerator { + $constant = new ConstantGenerator($this->class->addConstant($name, $value)); + $constant->setAccessMode($visibility); + $constant->addComments($comments); + + $this->afterConstantCreation($name); + + return $constant; + } + + public function addConstantFromReflection(ReflectionClassConstant $constant): ConstantGenerator + { + return $this->addConstant( + $constant->getName(), + $constant->getValue(), + ReflectionHelper::getAccessMode($constant), + ReflectionHelper::parseComments($constant->getDocComment()) + ); + } + + public function hasProperty(string $name): bool + { + return isset($this->constants[$name]); + } + + public function getProperty(string $name): PropertyGenerator + { + if (!isset($this->properties[$name])) { + $this->addProperty($name); + } + + return $this->properties[$name]; + } + + public function addProperty( + string $name, + $value = PropertyGenerator::NO_VALUE, + ?string $type = null, + bool $isStatic = false, + bool $isNullable = false, + ?string $visibility = 'public', + array $comments = [] + ): PropertyGenerator { + $property = new PropertyGenerator($this->class->addProperty($name), $this->handler); + $property->setAccessMode($visibility); + $property->setType($type); + $property->setStatic($isStatic); + $property->setNullable($isNullable); + $property->addComments($comments); + + if ($value !== PropertyGenerator::NO_VALUE) { + $property->setValue($value); + } + + $this->afterPropertyCreation($name); + + return $property; + } + + public function addPropertyFromReflection(ReflectionProperty $property): PropertyGenerator + { + $propertyType = $property->getType(); + + return $this->addProperty( + $property->getName(), + $property->getValue() ?? PropertyGenerator::NO_VALUE, + null !== $propertyType ? (string)$propertyType : null, + $property->isStatic(), + $property->allowsNull(), + ReflectionHelper::getAccessMode($property), + ReflectionHelper::parseComments($property->getDocComment()) + ); + } + + public function hasMethod(string $name): bool + { + return isset($this->methods[$name]); + } + + public function getMethod(string $name): MethodGenerator + { + if (!isset($this->methods[$name])) { + $this->addMethod($name); + } + + return $this->methods[$name]; + } + + public function addMethod( + string $name, + string $accessMode = 'public', + ?string $returnType = null, + bool $returnTypeNullable = false, + bool $isFinal = false, + bool $isStatic = false + ): MethodGenerator { + $method = new MethodGenerator($this->class->addMethod($name), $this->handler); + $method->setAccessMode($accessMode); + $method->setReturnType($returnType, $returnTypeNullable); + $method->setFinal($isFinal); + $method->setStatic($isStatic); + + $this->methods[$name] = $method; + + $this->afterMethodCreation($name); + + return $method; + } + + public function addMethodFromReflection(ReflectionMethod $reflectionMethod): MethodGenerator + { + $name = $reflectionMethod->getName(); + $body = ReflectionHelper::cleanFQCN($this->getCleanImports(), $reflectionMethod->getBodyCode()); + $returnType = $reflectionMethod->getReturnType(); + $comments = ReflectionHelper::parseComments($reflectionMethod->getDocComment()); + + $arguments = []; + $parameters = $reflectionMethod->getParameters(); + foreach ($parameters as $parameter) { + $arguments[] = ReflectionHelper::getTypeReference($parameter); + } + + return $this->addMethod( + $name, + ReflectionHelper::getAccessMode($reflectionMethod), + null !== $returnType ? (string)$returnType : null, + null !== $returnType && $returnType->allowsNull(), + $reflectionMethod->isFinal(), + $reflectionMethod->isStatic() + )->setBody($body)->addComments($comments)->addArguments($arguments); + } + + public function createConstantsFromReflection( + string $fullClassName, + ?ReflectionClass $reflection = null + ): void { + if (null === $reflection) { + $reflection = ReflectionClass::createFromName($fullClassName); + } + if (method_exists($reflection, 'getReflectionConstants')) { + foreach ($reflection->getReflectionConstants() as $constant) { + if (ReflectionHelper::isInClass($constant, $fullClassName)) { + continue; + } + + $this->addConstantFromReflection($constant); + } + } + } + + public function createPropertiesFromReflection( + string $fullClassName, + ?ReflectionClass $reflection = null, + array $ignored = [] + ): void { + if (null === $reflection) { + $reflection = ReflectionClass::createFromName($fullClassName); + } + foreach ($reflection->getProperties() as $property) { + $propertyName = $property->getName(); + if (!empty($ignored[$propertyName]) || ReflectionHelper::isInClass($property, $fullClassName)) { + continue; + } + + $this->addPropertyFromReflection($property); + } + } + + public function createMethodsFromReflection( + string $fullClassName, + ?ReflectionClass $reflection = null, + array $ignored = [] + ): void { + if (null === $reflection) { + $reflection = ReflectionClass::createFromName($fullClassName); + } + foreach ($reflection->getMethods() as $method) { + $methodName = $method->getName(); + if (isset($ignored[$methodName]) || ReflectionHelper::isInClass($method, $fullClassName)) { + continue; + } + + $this->addMethodFromReflection($method); + } + } + + public function addMethods(array $methods = []): void + { + foreach ($methods as $name => $params) { + $method = $this->addMethod($name); + if (isset($params['comments'])) { + $method->addComments($params['comments']); + } + if (isset($params['arguments'])) { + $method->addArguments($params['arguments']); + } + if (isset($params['body'])) { + $method->setBody($params['body']); + } + if (isset($params['final'])) { + $method->setFinal($params['final']); + } + if (isset($params['return'])) { + $method->setReturnType( + $params['return']['type'] ?? null, $params['return']['nullable'] ?? false + ); + } + if (isset($params['static'])) { + $method->setStatic($params['static']); + } + if (isset($params['accessMode'])) { + $method->setAccessMode($params['accessMode']); + } + } + } + + /** + * @throws BuilderException + */ + public function save(string $path, string $mode = 'wb+'): void + { + $code = $this->printCode(new PsrPrinter()); + $file = new SplFileObject($path, $mode); + if (!$file->fwrite($code)) { + throw new BuilderException( + sprintf('Unable to write to %s. Check write-access of a file.', $file->getRealPath()) + ); + } + } + + public function afterMethodCreation(string $methodName): void + { + } + + public function afterPropertyCreation(string $propertyName): void + { + } + + public function afterConstantCreation(string $constantName): void + { + } +} diff --git a/src/Generator/Entity/ControllerEntityGenerator.php b/src/Generator/Entity/ControllerEntityGenerator.php new file mode 100644 index 000000000..30ce95e6f --- /dev/null +++ b/src/Generator/Entity/ControllerEntityGenerator.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator\Entity; + +use Phalcon\DevTools\Generator\AbstractEntityGenerator; + +class ControllerEntityGenerator extends AbstractEntityGenerator +{ +} diff --git a/src/Generator/Entity/ModelEntityGenerator.php b/src/Generator/Entity/ModelEntityGenerator.php new file mode 100644 index 000000000..14afffe9f --- /dev/null +++ b/src/Generator/Entity/ModelEntityGenerator.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator\Entity; + +use Phalcon\Db\ColumnInterface; +use Phalcon\DevTools\Generator\AbstractEntityGenerator; +use Phalcon\DevTools\Generator\Helper\ModelMethodsHelper; +use Phalcon\DevTools\Generator\Signature\MethodGenerator; +use Phalcon\DevTools\Generator\Signature\PropertyGenerator; + +class ModelEntityGenerator extends AbstractEntityGenerator +{ + protected $methodsHelper; + + public function setMethodsHelper(ModelMethodsHelper $methodsHelper): void + { + $this->methodsHelper = $methodsHelper; + } + + public function addPropertyFromColumn( + ColumnInterface $field, + string $fieldName, + string $type, + string $accessMode, + bool $annotate = false + ): PropertyGenerator { + $property = $this->addProperty($fieldName); + $property->setAccessMode($accessMode); + + $comments = ["\n@var $type"]; + if ($annotate) { + if ($field->isPrimary()) { + $comments[] = '@Primary'; + } + if ($field->isAutoIncrement()) { + $comments[] = '@Identity'; + } + $name = $field->getName(); + $size = $field->getSize() ? ', length=' . $field->getSize() : ''; + $nullable = $field->isNotNull() ? 'false' : 'true'; + $comments[] = "@Column(column=\"$name\", type=\"$type\"$size, nullable=$nullable)"; + + } + $property->addComments($comments); + + return $property; + } + + public function addSetter( + ColumnInterface $field, + string $methodName, + string $type, + string $fieldName + ): MethodGenerator { + $bodyParts = [ + "\$this->$fieldName = \$$fieldName;\n", + "\nreturn \$this;\n", + ]; + + return $this->addMethod('set' . $methodName) + ->addArguments([$fieldName]) + ->setBody(implode('', $bodyParts)) + ->addComments([ + "Method to set the value of field {$field->getName()}\n", + "@param $type \$$fieldName", + '@return $this', + ]); + } + + public function addGetter( + ColumnInterface $field, + string $methodName, + string $type, + string $fieldName, + array $typeMap + ): MethodGenerator { + if (isset($typeMap[$type])) { + $typeMapType = $typeMap[$type]; + $bodyParts = [ + "if (\$this->$fieldName) {\n", + "return new $typeMapType(\$this->$fieldName);\n", + "} else {\n", + "return null;\n", + "}", + ]; + } else { + $bodyParts = [ + "\nreturn \$this->$fieldName;\n", + ]; + } + + return $this->addMethod('get' . $methodName) + ->setBody(implode('', $bodyParts)) + ->addComments([ + "Returns the value of field {$field->getName()}\n", + "@return $type", + ]); + } + + public function afterMethodCreation(string $methodName): void + { + $this->methodsHelper->setState($methodName); + } +} diff --git a/src/Generator/Helper/MethodArgumentDto.php b/src/Generator/Helper/MethodArgumentDto.php new file mode 100644 index 000000000..d9932eee3 --- /dev/null +++ b/src/Generator/Helper/MethodArgumentDto.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator\Helper; + +class MethodArgumentDto +{ + public const NO_VALUE = '#no_value_argument#'; + + private $name; + private $type; + private $nullable; + private $ref; + private $default; + + public function __construct( + string $name, + ?string $type = null, + bool $nullable = false, + $default = self::NO_VALUE, + bool $ref = false + ) { + $this->name = $name; + $this->type = $type; + $this->nullable = $nullable; + $this->ref = $ref; + $this->default = $default; + } + + /** + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @return bool + */ + public function isNullable(): bool + { + return $this->nullable; + } + + /** + * @return bool + */ + public function isRef(): bool + { + return $this->ref; + } + + /** + * @return mixed|null + */ + public function getDefault() + { + return $this->default; + } +} diff --git a/src/Generator/Helper/ModelMethodsHelper.php b/src/Generator/Helper/ModelMethodsHelper.php new file mode 100644 index 000000000..57eca8751 --- /dev/null +++ b/src/Generator/Helper/ModelMethodsHelper.php @@ -0,0 +1,60 @@ +hasInitialize = true; + break; + case 'validation': + $this->hasValidations = true; + break; + case 'find': + $this->hasFind = true; + break; + case 'findFirst': + $this->hasFindFirst = true; + break; + case 'columnMap': + $this->hasColumnMapped = true; + break; + } + } + + public function alreadyInitialized(): bool + { + return $this->hasInitialize; + } + + public function alreadyValidations(): bool + { + return $this->hasValidations; + } + + public function alreadyFind(): bool + { + return $this->hasFind; + } + + public function alreadyFindFirst(): bool + { + return $this->hasFindFirst; + } + + public function alreadyColumnMapped(): bool + { + return $this->hasColumnMapped; + } +} diff --git a/src/Generator/Helper/ReflectionHelper.php b/src/Generator/Helper/ReflectionHelper.php new file mode 100644 index 000000000..27bf22263 --- /dev/null +++ b/src/Generator/Helper/ReflectionHelper.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator\Helper; + +use Roave\BetterReflection\Reflection\ReflectionClassConstant; +use Roave\BetterReflection\Reflection\ReflectionConstant; +use Roave\BetterReflection\Reflection\ReflectionMethod; +use Roave\BetterReflection\Reflection\ReflectionParameter; +use Roave\BetterReflection\Reflection\ReflectionProperty; + +class ReflectionHelper +{ + public static function parseComments(?string $docBlock = null): ?array + { + if (null === $docBlock) { + return null; + } + $filteredDocBlock = str_replace(["/**\n", "\n */", " *"], ['', '', ""], $docBlock); + + return array_map('trim', explode("\n", $filteredDocBlock)); + } + + public static function getTypeReference(?ReflectionParameter $type = null): ?MethodArgumentDto + { + if (null === $type) { + return null; + } + + return new MethodArgumentDto( + $type->getName(), + null !== $type->getType() ? (string)$type->getType() : null, + $type->allowsNull(), + $type->isDefaultValueAvailable() ? $type->getDefaultValue() : MethodArgumentDto::NO_VALUE, + $type->isPassedByReference() + ); + } + + public static function cleanFQCN(array $imports, string $code): string + { + $imports = array_reverse($imports); + foreach ($imports as $import) { + [$className, $alias] = $import; + if (false !== strpos($code, $className)) { + $code = str_replace($className, $alias, $code); + } + } + + return $code; + } + + /** + * @param ReflectionMethod|ReflectionConstant|ReflectionProperty|ReflectionClassConstant $handler + * + * @return string + */ + public static function getAccessMode($handler): string + { + if ($handler->isProtected()) { + return 'protected'; + } + if ($handler->isPublic()) { + return 'public'; + } + + return 'private'; + } + + /** + * @param ReflectionMethod|ReflectionConstant|ReflectionProperty|ReflectionClassConstant $handler + * @param string $fullClassName + * + * @return bool + */ + public static function isInClass($handler, string $fullClassName): bool + { + return $handler->getDeclaringClass()->getName() !== $fullClassName; + } +} diff --git a/src/Generator/Signature/ConstantGenerator.php b/src/Generator/Signature/ConstantGenerator.php new file mode 100644 index 000000000..518fb4dd3 --- /dev/null +++ b/src/Generator/Signature/ConstantGenerator.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator\Signature; + +use Nette\PhpGenerator\Constant; + +class ConstantGenerator +{ + private $constant; + + public function __construct(Constant $constant) + { + $this->constant = $constant; + } + + public function addComments(array $comments): void + { + foreach ($comments as $comment) { + $this->constant->addComment($comment); + } + } + + public function setAccessMode(string $accessMode): void + { + if ($accessMode === 'private') { + $this->constant->setPrivate(); + } elseif ($accessMode === 'protected') { + $this->constant->setProtected(); + } else { + $this->constant->setPublic(); + } + } +} diff --git a/src/Generator/Signature/MethodGenerator.php b/src/Generator/Signature/MethodGenerator.php new file mode 100644 index 000000000..914564acd --- /dev/null +++ b/src/Generator/Signature/MethodGenerator.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator\Signature; + +use Closure; +use Nette\PhpGenerator\Method; +use Phalcon\DevTools\Generator\Helper\MethodArgumentDto; +use Roave\BetterReflection\Reflection\ReflectionFunction; + +class MethodGenerator +{ + private $method; + private $handler; + + public function __construct(Method $method, $handler) + { + $this->method = $method; + $this->handler = $handler; + } + + public function addComments(array $comments): self + { + foreach ($comments as $comment) { + $this->method->addComment($comment); + } + + return $this; + } + + public function addArguments(array $arguments): self + { + foreach ($arguments as $argument) { + if (\is_string($argument)) { + $this->method->addParameter($argument); + } elseif ($argument instanceof MethodArgumentDto) { + $parameter = $this->method->addParameter($argument->getName()); + if (null !== $argument->getType()) { + if (false !== strpos($argument->getType(), '\\')) { + $this->handler->addUse($argument->getType()); + } + $parameter->setType($argument->getType()); + } + if ($argument->isNullable()) { + $parameter->setNullable(); + } + if ($argument->isRef()) { + $parameter->setReference(); + } + if (MethodArgumentDto::NO_VALUE !== $argument->getDefault()) { + $parameter->setDefaultValue($argument->getDefault()); + } + } + } + + return $this; + } + + public function setAccessMode(string $accessMode): self + { + if ($accessMode === 'private') { + $this->method->setPrivate(); + } elseif ($accessMode === 'protected') { + $this->method->setProtected(); + } else { + $this->method->setPublic(); + } + + return $this; + } + + public function setReturnType(?string $returnType = null, bool $returnTypeNullable = false): self + { + if (null !== $returnType) { + $this->method->setReturnType($returnType); + if ($returnTypeNullable) { + $this->method->setReturnNullable(); + } + } + + return $this; + } + + public function setFinal(bool $isFinal = true): self + { + if ($isFinal) { + $this->method->setFinal(); + } + + return $this; + } + + public function setStatic(bool $isStatic = true): self + { + if ($isStatic) { + $this->method->setStatic(); + } + + return $this; + } + + public function setBody($body): self + { + if ($body instanceof Closure || is_callable($body)) { + $body = ReflectionFunction::createFromClosure($body)->getBodyCode(); + } else { + $body = (string)$body; + } + + $this->method->setBody($body); + + return $this; + } +} diff --git a/src/Generator/Signature/PropertyGenerator.php b/src/Generator/Signature/PropertyGenerator.php new file mode 100644 index 000000000..4f9e9b2fb --- /dev/null +++ b/src/Generator/Signature/PropertyGenerator.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Generator\Signature; + +use Closure; +use Nette\PhpGenerator\Property; +use Roave\BetterReflection\Reflection\ReflectionFunction; + +class PropertyGenerator +{ + public const NO_VALUE = '#no_value_property#'; + private $property; + private $handler; + + public function __construct(Property $property, $handler) + { + $this->property = $property; + $this->handler = $handler; + } + + public function addComments(array $comments): void + { + foreach ($comments as $comment) { + $this->property->addComment($comment); + } + } + + public function setAccessMode(string $accessMode): void + { + if ($accessMode === 'private') { + $this->property->setPrivate(); + } elseif ($accessMode === 'protected') { + $this->property->setProtected(); + } else { + $this->property->setPublic(); + } + } + + public function setNullable(bool $isNullable = false): void + { + if ($isNullable) { + $this->property->setNullable(); + } + } + + public function setStatic(bool $isStatic = false): void + { + if ($isStatic) { + $this->property->setStatic(); + } + } + + public function setType(?string $type = null): void + { + if (null !== $type) { + if (false !== strpos($type, '\\')) { + $this->handler->addUse($type); + } + $this->property->setType($type); + } + } + + public function setValue($value): void + { + if ($value instanceof Closure || is_callable($value)) { + $value = ReflectionFunction::createFromClosure($value)->getBodyCode(); + } + + $this->property->setValue($value); + } +} diff --git a/src/Generator/Snippet.php b/src/Generator/Snippet.php deleted file mode 100644 index 89946e4d7..000000000 --- a/src/Generator/Snippet.php +++ /dev/null @@ -1,505 +0,0 @@ - - * - * For the full copyright and license information, please view - * the LICENSE file that was distributed with this source code. - */ - -namespace Phalcon\DevTools\Generator; - -use Phalcon\DevTools\Options\OptionsAware as ModelOption; -use Phalcon\DevTools\Utils; - -class Snippet -{ - public function getSetter($originalFieldName, $fieldName, $type, $setterName) - { - $templateSetter = <<%s = \$%s; - - return \$this; - } -EOD; - return PHP_EOL.sprintf($templateSetter, $originalFieldName, $type, $fieldName, $setterName, $fieldName, $fieldName, $fieldName).PHP_EOL; - } - - public function getValidateInclusion($fieldName, $varItems) - { - $templateValidateInclusion = <<validate( - new InclusionIn( - [ - 'field' => '%s', - 'domain' => [%s], - 'required' => true, - ] - ) - ); -EOD; - return PHP_EOL.sprintf($templateValidateInclusion, $fieldName, $varItems).PHP_EOL; - } - - public function getValidationsMethod(array $pieces) - { - $templateValidations = <<getOption('className'), - $extends, - $content) - .PHP_EOL; - } - - public function getClassDoc($className, $namespace = '') - { - if (!empty($namespace)) { - $namespace = str_replace('namespace ', '', $namespace); - $namespace = str_replace(';', '', $namespace); - $namespace = str_replace(["\r", "\n"], '', $namespace); - - $namespace = PHP_EOL . ' * @package ' . $namespace; - } - - $classDoc = <<add( - '%s', - new EmailValidator( - [ - 'model' => \$this, - 'message' => 'Please enter a correct email address', - ] - ) - ); -EOD; - return sprintf($templateValidateEmail, $fieldName).PHP_EOL.PHP_EOL; - } - - public function getValidationEnd() - { - return <<validate(\$validator); -EOD; - } - - public function getAttributes($type, $visibility, \Phalcon\Db\ColumnInterface $field, $annotate = false, $customFieldName = null) - { - $fieldName = $customFieldName ?: $field->getName(); - - if ($annotate) { - $templateAttributes = <<isPrimary() ? PHP_EOL.' * @Primary' : '', - $field->isAutoIncrement() ? PHP_EOL.' * @Identity' : '', - $field->getName(), - $type, - $field->getSize() ? ', length=' . $field->getSize() : '', - $field->isNotNull() ? 'false' : 'true', $visibility, $fieldName).PHP_EOL; - } else { - $templateAttributes = <<%s) { - return new %s(\$this->%s); - } else { - return null; - } - } -EOD; - return PHP_EOL.sprintf($templateGetterMap, $fieldName, $type, $setterName, $fieldName, $typeMap, $fieldName).PHP_EOL; - } - - public function getGetter($fieldName, $type, $getterName) - { - $templateGetter = <<%s; - } -EOD; - return PHP_EOL.sprintf($templateGetter, $fieldName, $type, $getterName, $fieldName).PHP_EOL; - } - - public function getInitialize(array $pieces) - { - $templateInitialize = << $val) { - if (is_bool($val)) { - $val = $val ? 'true':'false'; - } elseif (!is_numeric($val)) { - $val = "'{$val}'"; - } - - $values[] = sprintf('\'%s\' => %s', $name, $val); - } - - return '['. join(',', $values). ']'; - } - - /** - * @param \Phalcon\Db\ColumnInterface[] $fields - * @param bool $camelize - * @return string - */ - public function getColumnMap($fields, $camelize = false) - { - $template = <<getName(); - $contents[] = sprintf('\'%s\' => \'%s\'', $name, $camelize ? Utils::lowerCamelize($name) : $name); - } - - return PHP_EOL.sprintf($template, join(",\n ", $contents)).PHP_EOL; - } - - public function getMigrationMorph($className, $table, $tableDefinition) - { - $template = <<morphTable('%s', [ -%s -EOD; - return sprintf($template, $className, $className, $table, $this->getMigrationDefinition('columns', $tableDefinition)); - } - - public function getMigrationUp() - { - return <<batchInsert('%s', [ - %s - ] - ); -EOD; - return sprintf($template, $table, join(",\n ", $allFields)); - } - - public function getMigrationAfterCreateTable($table, $allFields) - { - $template = <<batchInsert('%s', [ - %s - ] - ); - } -EOD; - return sprintf($template, $table, join(",\n ", $allFields)); - } - - public function getMigrationBatchDelete($table) - { - $template = <<batchDelete('%s'); -EOD; - return sprintf($template, $table); - } - - public function getMigrationDefinition(string $name, $definition) - { - $template = << [ - %s - ], - -EOD; - return sprintf($template, $name, join(",\n ", $definition)); - } - - public function getColumnDefinition($field, $fieldDefinition) - { - $template = << + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Snippet; + +use Phalcon\Config\Config; +use Phalcon\Db\Column; +use Phalcon\DevTools\Utils; + +class ControllerSnippet +{ + public $modelClass; + public $plural; + public $singular; + public $pk; + public $pkVar; + public $pkGet; + public $singularVar; + public $assignInputRequest; + public $assignTagDefault; + + public function __construct(string $modelClass, Config $options) + { + $dataTypes = $options->get('dataTypes'); + $genSetGet = (bool)$options->get('genSettersGetters'); + $identityField = $options->get('identityField'); + $attributes = $options->get('attributes'); + + $this->modelClass = $modelClass; + $this->plural = $options->get('plural'); + $this->singular = $options->get('singular'); + $this->pk = $attributes[0] ?? ''; + $this->pkVar = '$' . $this->pk; + $this->pkGet = $genSetGet ? 'get' . Utils::camelize($this->pk, '_-') . '()' : $this->pk; + $this->singularVar = '$' . Utils::lowerCamelizeWithDelimiter($this->singular, '-', true); + $this->assignInputRequest = $this->captureFilterInput($this->singular, $dataTypes, $genSetGet, $identityField); + $this->assignTagDefault = $this->assignTagDefaults($this->singular, $dataTypes, $genSetGet); + } + + public function getSearchAction(): string + { + return sprintf( + ' +$numberPage = $this->request->getQuery("page", "int", 1); +$parameters = Criteria::fromInput($this->di, %s::class, $_GET)->getParams(); +$parameters["order"] = "%s"; + +$paginator = new Model([ + "model" => %s::class, + "parameters" => $parameters, + "limit" => 10, + "page" => $numberPage, +]); + +$paginate = $paginator->paginate(); + +if (0 === $paginate->getTotalItems()) { + $this->flash->notice("The search did not find any %s"); + + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", + ]); + + return; +} + +$this->view->page = $paginate; +', + $this->modelClass, + $this->pk, + $this->modelClass, + $this->plural, + $this->plural + ); + } + + public function getEditAction(): string + { + return sprintf( + ' +if (!$this->request->isPost()) { + /** @var %s %s */ + %s = %s::findFirstBy%s(%s); + if (!%s) { + $this->flash->error("%s was not found"); + + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", + ]); + + return; + } + + $this->view->%s = %s->%s; + +%s +} +', + $this->modelClass, + $this->singularVar, + $this->singularVar, + $this->modelClass, + $this->pk, + $this->pkVar, + $this->singularVar, + $this->singular, + $this->plural, + $this->pk, + $this->singularVar, + $this->pkGet, + $this->assignTagDefault + ); + } + + public function getCreateAction(): string + { + return sprintf( + ' +if (!$this->request->isPost()) { + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "index" + ]); + + return; +} + +%s = new %s(); +%s + +if (!%s->save()) { + foreach (%s->getMessages() as $message) { + $this->flash->error($message); + } + + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "new", + ]); + + return; +} + +$this->flash->success("%s was created successfully"); + +$this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", +]); +', + $this->plural, + $this->singularVar, + $this->modelClass, + $this->assignInputRequest, + $this->singularVar, + $this->singularVar, + $this->plural, + $this->singular, + $this->plural + ); + } + + public function getSaveAction(): string + { + return sprintf( + ' +if (!$this->request->isPost()) { + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", + ]); + + return; +} + +%s = $this->request->getPost("%s"); +/** @var %s %s */ +%s = %s::findFirstBy%s(%s); + +if (!%s) { + $this->flash->error("%s does not exist " . %s); + + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", + ]); + + return; +} + +%s + +if (!%s->save()) { + foreach (%s->getMessages() as $message) { + $this->flash->error($message); + } + + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "edit", + "params" => [%s->%s], + ]); + + return; +} + +$this->flash->success("%s was updated successfully"); + +$this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", +]); +', + $this->plural, + $this->pkVar, + $this->pk, + $this->modelClass, + $this->singularVar, + $this->singularVar, + $this->modelClass, + $this->pk, + $this->pkVar, + $this->singularVar, + $this->singular, + $this->pkVar, + $this->plural, + $this->assignInputRequest, + $this->singularVar, + $this->singularVar, + $this->plural, + $this->singularVar, + $this->pkGet, + $this->singular, + $this->plural + ); + } + + public function getDeleteAction(): string + { + return sprintf( + ' +/** @var %s %s */ +%s = %s::findFirstBy%s(%s); +if (!%s) { + $this->flash->error("%s was not found"); + + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", + ]); + + return; +} + +if (!%s->delete()) { + + foreach (%s->getMessages() as $message) { + $this->flash->error($message); + } + + $this->dispatcher->forward([ + "controller" => "%s", + "action" => "search", + ]); + + return; +} + +$this->flash->success("%s was deleted successfully"); + +$this->dispatcher->forward([ + "controller" => "%s", + "action" => "index", +]); +', + $this->modelClass, + $this->singularVar, + $this->singularVar, + $this->modelClass, + $this->pk, + $this->pkVar, + $this->singularVar, + $this->singular, + $this->plural, + $this->singularVar, + $this->singularVar, + $this->plural, + $this->singular, + $this->plural + ); + } + + /** + * @param string $var + * @param mixed $fields + * @param bool $useGetSet + * @param null|string $identityField + * + * @return string + */ + private function captureFilterInput(string $var, $fields, bool $useGetSet, string $identityField = null): string + { + $codes = []; + foreach ($fields as $field => $dataType) { + if ($identityField !== null && $field === $identityField) { + continue; + } + + if (\in_array($dataType, [Column::TYPE_DECIMAL, Column::TYPE_INTEGER])) { + $fieldCode = '$this->request->getPost("' . $field . '", "int")'; + } elseif ($field === 'email') { + $fieldCode = '$this->request->getPost("' . $field . '", "email")'; + } else { + $fieldCode = '$this->request->getPost("' . $field . '")'; + } + + $code = '$' . Utils::lowerCamelizeWithDelimiter($var, '-', true) . '->'; + if ($useGetSet) { + $code .= 'set' . Utils::camelize($field, '_-') . '(' . $fieldCode . ');'; + } else { + $code .= $field . ' = ' . $fieldCode . ';'; + } + + $codes[] = $code; + } + + return implode(PHP_EOL, $codes); + } + + /** + * @param string $var + * @param mixed $fields + * @param bool $useGetSetters + * + * @return string + */ + private function assignTagDefaults(string $var, $fields, bool $useGetSetters): string + { + $code = []; + foreach ($fields as $field => $dataType) { + if ($useGetSetters) { + $accessor = 'get' . Utils::camelize($field, '_-') . '()'; + } else { + $accessor = $field; + } + + $code[] = "\t" . + "\$this->tag->setDefault('$field', $" . + Utils::lowerCamelizeWithDelimiter($var, '-', true) . + '->' . + $accessor . + ');'; + } + + return implode(PHP_EOL, $code); + } +} diff --git a/src/Snippet/ModelSnippet.php b/src/Snippet/ModelSnippet.php new file mode 100644 index 000000000..4b79f389d --- /dev/null +++ b/src/Snippet/ModelSnippet.php @@ -0,0 +1,94 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Phalcon\DevTools\Snippet; + +use Phalcon\Db\ColumnInterface; +use Phalcon\DevTools\Options\OptionsAware as ModelOption; +use Phalcon\DevTools\Utils; + +class ModelSnippet +{ + /** + * @param ModelOption $modelOptions + * @param string $namespace + * @param string $useDefinition + * @param string $classDoc + * @param string $abstract + * @param string $extends + * @param string $content + * @param string $license + * @return string + */ + public function getClass( + ModelOption $modelOptions, + string $namespace, + string $useDefinition, + string $classDoc = '', + string $abstract = '', + string $extends = '', + string $content = '', + string $license = '' + ): string { + $className = $modelOptions->getOption('className'); + + $code = 'validate(new InclusionIn([ + 'field' => '$fieldName', + 'domain' => [$varItems], + 'required' => true, +]));" . PHP_EOL; + } + + public function getValidateEmail($fieldName): string + { + return " +\$validator->add('$fieldName', new EmailValidator([ + 'model' => \$this, + 'message' => 'Please enter a correct email address', +]));" . PHP_EOL; + } + + /** + * @param ColumnInterface[] $fields + * @param bool $camelize + * + * @return string + */ + public function getColumnMap(array $fields, bool $camelize): string + { + $contents = []; + foreach ($fields as $field) { + $name = $field->getName(); + $alias = $camelize ? Utils::lowerCamelize($name) : $name; + $contents[] = "'$name' => '$alias',"; + } + + return sprintf("return [\n %s\n];", implode("\n ", $contents)); + } + + public function getRelation($relation, $column1, $entity, $column2, $alias): string + { + $templateRelation = "\$this->%s('%s', '%s', '%s', %s);" . PHP_EOL; + + return sprintf($templateRelation, $relation, $column1, $entity, $column2, $alias); + } +} diff --git a/src/Utils.php b/src/Utils.php index a4dee30e8..bd197a566 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -13,7 +13,7 @@ namespace Phalcon\DevTools; use InvalidArgumentException; -use Phalcon\Config; +use Phalcon\Config\Config; class Utils { diff --git a/src/Utils/DbUtils.php b/src/Utils/DbUtils.php index f2b026f6c..2af9b5bc5 100644 --- a/src/Utils/DbUtils.php +++ b/src/Utils/DbUtils.php @@ -12,7 +12,7 @@ namespace Phalcon\DevTools\Utils; -use Phalcon\Config; +use Phalcon\Config\Config; use Phalcon\Di\Injectable; /** diff --git a/src/Utils/FsUtils.php b/src/Utils/FsUtils.php index 3d4a68c26..a6a7e2fd3 100644 --- a/src/Utils/FsUtils.php +++ b/src/Utils/FsUtils.php @@ -16,7 +16,7 @@ use DirectoryIterator; use Iterator; use Phalcon\DevTools\Exception\InvalidArgumentException; -use Phalcon\Text; +use Phalcon\Support\HelperFactory; use RuntimeException; use SplFileInfo; @@ -42,11 +42,14 @@ public function normalize(string $path): string return ''; } + $helper = new HelperFactory(); + $method = 'set' . $helper->camelize($parameter); + $normalized = preg_replace('#\p{C}+|^\./#u', '', $path); $normalized = preg_replace('#/\.(?=/)|^\./|(/|^)\./?$#', '', $normalized); $normalized = str_replace(['\\', '/'], DS, $normalized); - return Text::reduceSlashes($normalized); + return $helper->reduceSlashes($normalized); } /** diff --git a/src/Utils/SystemInfo.php b/src/Utils/SystemInfo.php index 9da2b293a..98585a0bd 100644 --- a/src/Utils/SystemInfo.php +++ b/src/Utils/SystemInfo.php @@ -12,12 +12,12 @@ namespace Phalcon\DevTools\Utils; -use Phalcon\DevTools\Version; +use Phalcon\DevTools\Version as DevToolsVersion; +use Phalcon\DevTools\PhalconVersion; use Phalcon\Di\Injectable; -use Phalcon\Registry; -use Phalcon\Url; -use Phalcon\Url\UrlInterface; -use Phalcon\Version as PhVersion; +use Phalcon\Support\Registry; +use Phalcon\Mvc\Url; +use Phalcon\Mvc\Url\UrlInterface; /** * @property Registry $registry @@ -53,11 +53,19 @@ public function getUris(): array ]; } + /** + * @return string + */ + public function getPhalconVersion(): string + { + return (new \Phalcon\Support\Version())->get(); + } + public function getVersions(): array { return [ - 'Phalcon DevTools Version' => Version::get(), - 'Phalcon Version' => PhVersion::get(), + 'Phalcon DevTools Version' => DevToolsVersion::get(), + 'Phalcon Version' => $this->getPhalconVersion(), 'AdminLTE Version' => '3.0.1', ]; } diff --git a/src/Validation/Validator/Namespaces.php b/src/Validation/Validator/Namespaces.php index 1feb84371..c67908aff 100644 --- a/src/Validation/Validator/Namespaces.php +++ b/src/Validation/Validator/Namespaces.php @@ -13,8 +13,8 @@ namespace Phalcon\DevTools\Validation\Validator; use Phalcon\Messages\Message; -use Phalcon\Validation; -use Phalcon\Validation\AbstractValidator; +use Phalcon\Filter\Validation; +use Phalcon\Filter\Validation\AbstractValidator; /** * Check for namespace diff --git a/src/Version.php b/src/Version.php index ad7b3d736..834547f61 100644 --- a/src/Version.php +++ b/src/Version.php @@ -12,22 +12,65 @@ namespace Phalcon\DevTools; -use Phalcon\Version as PhVersion; - /** * This class allows to get the installed version of the Developer Tools */ -class Version extends PhVersion +class Version { /** - * {@inheritdoc} - * * @return array */ // phpcs:disable - protected static function _getVersion(): array + protected static function getVersion(): array { - return [4, 1, 0, 0, 0]; + return [5, 0, 0, 0, 0]; } // phpcs:enable + + public static function get(): string + { + [$major, $medium, $minor, $special, $specialNumber] = self::getVersion(); + + $result = $major . '.' . $medium . '.' . $minor; + $suffix = self::getSpecial($special); + + if ($suffix !== '') { + /** + * A pre-release version should be denoted by appending alpha/beta or RC and + * a patch version. + * examples 5.0.0alpha2, 5.0.0beta1, 5.0.0RC3 + */ + $result .= $suffix; + + if ($specialNumber !== 0) { + $result .= $specialNumber; + } + } + + return $result; + } + + /** + * Translates a number to a special release. + * @param int $special + * @return string + */ + protected static function getSpecial(int $special): string + { + switch ($special) { + case 1: + $suffix = 'alpha'; + break; + case 2: + $suffix = 'beta'; + break; + case 3: + $suffix = 'RC'; + break; + default: + $suffix = ''; + } + + return $suffix; + } } diff --git a/src/Web/Tools/Controllers/ControllersController.php b/src/Web/Tools/Controllers/ControllersController.php index 75be3b1eb..ae7433b13 100644 --- a/src/Web/Tools/Controllers/ControllersController.php +++ b/src/Web/Tools/Controllers/ControllersController.php @@ -192,16 +192,16 @@ public function generateAction() $controllerBuilder = new ControllerBuilder([ 'name' => $this->request->getPost('name', 'string'), 'basePath' => $this->request->getPost('basePath', 'string'), + 'controllersDir' => $this->request->getPost('controllersDir', 'string'), 'namespace' => $this->request->getPost('namespace', 'string'), 'baseClass' => $this->request->getPost('baseClass', 'string'), 'force' => $this->request->getPost('force', 'int'), - 'controllersDir' => $this->request->getPost('controllersDir', 'string') ]); - $fileName = $controllerBuilder->build(); + $className = $controllerBuilder->build(['indexAction' => []])->write(); $this->flashSession->success( - sprintf('Controller "%s" was created successfully', str_replace('.php', '', $fileName)) + sprintf('Controller "%s" was created successfully', $className) ); return $this->response->redirect('/webtools.php/controllers/list'); diff --git a/src/Web/Tools/Controllers/MigrationsController.php b/src/Web/Tools/Controllers/MigrationsController.php index ae1129307..2e5ed5222 100644 --- a/src/Web/Tools/Controllers/MigrationsController.php +++ b/src/Web/Tools/Controllers/MigrationsController.php @@ -187,7 +187,6 @@ public function runAction() $this->tag->setDefault('basePath', $basePath); $this->tag->setDefault('migrationsDir', $migrationsDir); - $this->view->setVars( [ 'migration_path' => $migrationsDir, @@ -201,6 +200,7 @@ protected function prepareVersions(): void if (!$migrationsDir || !is_dir($migrationsDir) || !is_readable($migrationsDir)) { $this->tag->setDefault('oldVersion', 'None'); + return; } diff --git a/src/Web/Tools/Controllers/ModelsController.php b/src/Web/Tools/Controllers/ModelsController.php index 591ae631e..19ad4376b 100644 --- a/src/Web/Tools/Controllers/ModelsController.php +++ b/src/Web/Tools/Controllers/ModelsController.php @@ -24,7 +24,7 @@ use Phalcon\Mvc\Dispatcher; use Phalcon\Mvc\DispatcherInterface; use Phalcon\Tag; -use Phalcon\Text; +use Phalcon\Support\HelperFactory; /** * @property Dispatcher|DispatcherInterface $dispatcher @@ -190,7 +190,8 @@ public function generateAction() if ($this->request->isPost()) { try { $tableName = $this->request->getPost('tableName', 'string'); - $component = '@' == $tableName ? AllModels::class : Model::class; + $component = '@' === $tableName ? AllModels::class : Model::class; + $helper = new HelperFactory(); /** @var AllModels $modelBuilder */ $modelBuilder = new $component([ @@ -209,7 +210,7 @@ public function generateAction() $modelBuilder->build(); - if ($tableName == '@') { + if ('@' === $tableName) { if (($n = count($modelBuilder->exist)) > 0) { $mList = implode(', ', $modelBuilder->exist); @@ -227,7 +228,7 @@ public function generateAction() } else { $message = sprintf( 'Model "%s" was created successfully', - Text::camelize(basename($tableName, '.php')) + $helper->camelize(basename($tableName, '.php')) ); } diff --git a/src/Web/Tools/Controllers/ScaffoldController.php b/src/Web/Tools/Controllers/ScaffoldController.php index 5a2ebf4df..685d40042 100644 --- a/src/Web/Tools/Controllers/ScaffoldController.php +++ b/src/Web/Tools/Controllers/ScaffoldController.php @@ -22,7 +22,7 @@ use Phalcon\Mvc\Dispatcher; use Phalcon\Mvc\DispatcherInterface; use Phalcon\Tag; -use Phalcon\Text; +use Phalcon\Support\HelperFactory; /** * @property Dispatcher|DispatcherInterface $dispatcher @@ -49,6 +49,7 @@ public function generateAction() if ($this->request->isPost()) { try { $tableName = $this->request->getPost('tableName', 'string'); + $helper = new HelperFactory(); $options = [ 'name' => $tableName, @@ -59,12 +60,13 @@ public function generateAction() 'templatePath' => $this->request->getPost('templatesPath', 'string'), 'templateEngine' => $this->request->getPost('templateEngine', 'string'), 'modelsNamespace' => $this->request->getPost('modelsNamespace', 'string'), + 'controllersNamespace' => $this->request->getPost('controllersNamespace', 'string'), ]; $scaffoldBuilder = new Scaffold(array_merge($options, ['config' => $this->config->toArray()])); $scaffoldBuilder->build(); $this->flashSession->success( - sprintf('Scaffold for table "%s" was generated successfully', Text::camelize($tableName)) + sprintf('Scaffold for table "%s" was generated successfully', $helper->camelize($tableName)) ); return $this->response->redirect('/webtools.php/migrations/list'); diff --git a/src/Web/Tools/Views/controllers/generate.volt b/src/Web/Tools/Views/controllers/generate.volt index b97f9c744..9a83fa344 100644 --- a/src/Web/Tools/Views/controllers/generate.volt +++ b/src/Web/Tools/Views/controllers/generate.volt @@ -23,7 +23,7 @@

- {{ input("namespace", 'eg. My\Awesome\Namespace') }} + {{ input("namespace", 'eg. My\\Awesome\\Namespace') }}
diff --git a/src/Web/Tools/Views/models/generate.volt b/src/Web/Tools/Views/models/generate.volt index ee197a987..a693b2509 100644 --- a/src/Web/Tools/Views/models/generate.volt +++ b/src/Web/Tools/Views/models/generate.volt @@ -15,7 +15,7 @@
- {{ input("namespace", 'eg. My\Awesome\Namespace') }} + {{ input("namespace", 'eg. My\\Awesome\\Namespace') }}
diff --git a/src/Web/Tools/Views/scaffold/generate.volt b/src/Web/Tools/Views/scaffold/generate.volt index cd8f93df5..2ad8703e6 100644 --- a/src/Web/Tools/Views/scaffold/generate.volt +++ b/src/Web/Tools/Views/scaffold/generate.volt @@ -13,7 +13,14 @@
- {{ input("modelsNamespace", 'eg. My\Awesome\Namespace') }} + {{ input("modelsNamespace", 'eg. My\\Awesome\\Namespace') }} +
+
+ +
+ +
+ {{ input("controllersNamespace", 'eg. My\\Awesome\\Namespace') }}
diff --git a/templates/module/Module.php b/templates/module/Module.php index 1dfc8668d..eeba0f8b3 100644 --- a/templates/module/Module.php +++ b/templates/module/Module.php @@ -4,7 +4,7 @@ namespace @@FQMN@@; use Phalcon\Di\DiInterface; -use Phalcon\Loader; +use Phalcon\Autoload\Loader; use Phalcon\Mvc\View; use Phalcon\Mvc\View\Engine\Php as PhpEngine; use Phalcon\Mvc\ModuleDefinitionInterface; @@ -16,9 +16,9 @@ class Module implements ModuleDefinitionInterface /** * Registers an autoloader related to the module * - * @param DiInterface $di + * @param DiInterface $container */ - public function registerAutoloaders(DiInterface $di = null) + public function registerAutoloaders(DiInterface $container = null) { $loader = new Loader(); @@ -33,17 +33,17 @@ public function registerAutoloaders(DiInterface $di = null) /** * Registers services related to the module * - * @param DiInterface $di + * @param DiInterface $container */ - public function registerServices(DiInterface $di) + public function registerServices(DiInterface $container) { /** * Try to load local configuration */ if (file_exists(@@configName@@)) { - - $config = $di['config']; - + + $config = $container['config']; + $override = @@configLoader@@; if ($config instanceof Config) { @@ -56,12 +56,12 @@ public function registerServices(DiInterface $di) /** * Setting up the view component */ - $di['view'] = function () { + $container['view'] = function () { $config = $this->getConfig(); $view = new View(); $view->setViewsDir($config->get('application')->viewsDir); - + $view->registerEngines([ '.volt' => 'voltShared', '.phtml' => PhpEngine::class @@ -73,7 +73,7 @@ public function registerServices(DiInterface $di) /** * Database connection is created based in the parameters defined in the configuration file */ - $di['db'] = function () { + $container['db'] = function () { $config = $this->getConfig(); $dbConfig = $config->database->toArray(); diff --git a/templates/project/cli/MainTask.php b/templates/project/cli/MainTask.php deleted file mode 100644 index 53c0fae08..000000000 --- a/templates/project/cli/MainTask.php +++ /dev/null @@ -1,10 +0,0 @@ -getDI()->get('config'); - - echo $config['version']; - } -} diff --git a/templates/project/cli/config.php b/templates/project/cli/config.php index 98578401e..f98559910 100644 --- a/templates/project/cli/config.php +++ b/templates/project/cli/config.php @@ -1,6 +1,6 @@ [ 'adapter' => 'Mysql', 'host' => 'localhost', diff --git a/templates/project/cli/loader.php b/templates/project/cli/loader.php index c135b9ac8..4c09f9ee8 100644 --- a/templates/project/cli/loader.php +++ b/templates/project/cli/loader.php @@ -1,6 +1,6 @@ registerDirs([ APP_PATH . '/tasks', APP_PATH . '/models' diff --git a/templates/project/micro/config.php b/templates/project/micro/config.php index f0340ab35..cc12fdae2 100644 --- a/templates/project/micro/config.php +++ b/templates/project/micro/config.php @@ -7,7 +7,7 @@ defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..')); defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app'); -return new \Phalcon\Config([ +return new \Phalcon\Config\Config([ 'database' => [ 'adapter' => 'Mysql', 'host' => 'localhost', diff --git a/templates/project/micro/loader.php b/templates/project/micro/loader.php index f5d85759a..5e67fbcc9 100644 --- a/templates/project/micro/loader.php +++ b/templates/project/micro/loader.php @@ -3,7 +3,7 @@ /** * Registering an autoloader */ -$loader = new \Phalcon\Loader(); +$loader = new \Phalcon\Autoload\Loader(); $loader->registerDirs( [ diff --git a/templates/project/micro/services.php b/templates/project/micro/services.php index b44fab6be..74fc71926 100644 --- a/templates/project/micro/services.php +++ b/templates/project/micro/services.php @@ -2,7 +2,7 @@ declare(strict_types=1); use Phalcon\Mvc\View\Simple as View; -use Phalcon\Url as UrlResolver; +use Phalcon\Mvc\Url as UrlResolver; /** * Shared configuration service diff --git a/templates/project/modules/ControllerBase.php b/templates/project/modules/ControllerBase.php deleted file mode 100644 index 2354136ff..000000000 --- a/templates/project/modules/ControllerBase.php +++ /dev/null @@ -1,11 +0,0 @@ -set('view', function () { + $container->set('view', function () { $view = new View(); $view->setDI($this); $view->setViewsDir(__DIR__ . '/views/'); diff --git a/templates/project/modules/VersionTask.php b/templates/project/modules/VersionTask.php deleted file mode 100644 index c2a7d5d49..000000000 --- a/templates/project/modules/VersionTask.php +++ /dev/null @@ -1,14 +0,0 @@ -getDI()->get('config'); - - echo $config['version']; - } -} diff --git a/templates/project/modules/config.php b/templates/project/modules/config.php index 8c816402b..0b1b04f5d 100644 --- a/templates/project/modules/config.php +++ b/templates/project/modules/config.php @@ -6,7 +6,7 @@ defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..')); defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app'); -return new \Phalcon\Config([ +return new \Phalcon\Config\Config([ 'version' => '1.0', 'database' => [ diff --git a/templates/project/modules/loader.php b/templates/project/modules/loader.php index 878e433a8..cd1dc7e60 100644 --- a/templates/project/modules/loader.php +++ b/templates/project/modules/loader.php @@ -1,6 +1,6 @@ [ 'adapter' => 'Mysql', 'host' => 'localhost', diff --git a/templates/project/simple/loader.php b/templates/project/simple/loader.php index 5c4d859e2..b1fc7689d 100644 --- a/templates/project/simple/loader.php +++ b/templates/project/simple/loader.php @@ -1,6 +1,6 @@ request->getQuery('page', 'int', 1); - $parameters = Criteria::fromInput($this->di, '$fullyQualifiedModelName$', $_GET)->getParams(); - $parameters['order'] = "$pk$"; - - $paginator = new Model( - [ - 'model' => '$fullyQualifiedModelName$', - 'parameters' => $parameters, - 'limit' => 10, - 'page' => $numberPage, - ] - ); - - $paginate = $paginator->paginate(); - - if (0 === $paginate->getTotalItems()) { - $this->flash->notice("The search did not find any $plural$"); - - $this->dispatcher->forward([ - "controller" => "$plural$", - "action" => "index" - ]); - - return; - } - - $this->view->page = $paginate; - } - - /** - * Displays the creation form - */ - public function newAction() - { - // - } - - /** - * Edits a $singular$ - * - * @param string $pkVar$ - */ - public function editAction($pkVar$) - { - if (!$this->request->isPost()) { - $singularVar$ = $className$::findFirstBy$pk$($pkVar$); - if (!$singularVar$) { - $this->flash->error("$singular$ was not found"); - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'index' - ]); - - return; - } - - $this->view->$pk$ = $singularVar$->$pkGet$; - - $assignTagDefaults$ - } - } - - /** - * Creates a new $singular$ - */ - public function createAction() - { - if (!$this->request->isPost()) { - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'index' - ]); - - return; - } - - $singularVar$ = new $className$(); - $assignInputFromRequestCreate$ - - if (!$singularVar$->save()) { - foreach ($singularVar$->getMessages() as $message) { - $this->flash->error($message); - } - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'new' - ]); - - return; - } - - $this->flash->success("$singular$ was created successfully"); - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'index' - ]); - } - - /** - * Saves a $singular$ edited - * - */ - public function saveAction() - { - - if (!$this->request->isPost()) { - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'index' - ]); - - return; - } - - $pkVar$ = $this->request->getPost("$pk$"); - $singularVar$ = $className$::findFirstBy$pk$($pkVar$); - - if (!$singularVar$) { - $this->flash->error("$singular$ does not exist " . $pkVar$); - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'index' - ]); - - return; - } - - $assignInputFromRequestUpdate$ - - if (!$singularVar$->save()) { - - foreach ($singularVar$->getMessages() as $message) { - $this->flash->error($message); - } - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'edit', - 'params' => [$singularVar$->$pkGet$] - ]); - - return; - } - - $this->flash->success("$singular$ was updated successfully"); - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'index' - ]); - } - - /** - * Deletes a $singular$ - * - * @param string $pkVar$ - */ - public function deleteAction($pkVar$) - { - $singularVar$ = $className$::findFirstBy$pk$($pkVar$); - if (!$singularVar$) { - $this->flash->error("$singular$ was not found"); - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'index' - ]); - - return; - } - - if (!$singularVar$->delete()) { - - foreach ($singularVar$->getMessages() as $message) { - $this->flash->error($message); - } - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => 'search' - ]); - - return; - } - - $this->flash->success("$singular$ was deleted successfully"); - - $this->dispatcher->forward([ - 'controller' => "$plural$", - 'action' => "index" - ]); - } -} diff --git a/tests/_data/acceptance/mysql/config.php b/tests/_data/acceptance/mysql/config.php index d7ab12b18..a7c1cf04d 100644 --- a/tests/_data/acceptance/mysql/config.php +++ b/tests/_data/acceptance/mysql/config.php @@ -8,7 +8,7 @@ defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..')); defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app'); -return new \Phalcon\Config([ +return new \Phalcon\Config\Config([ 'database' => [ 'adapter' => 'Mysql', 'host' => '127.0.0.1', @@ -21,6 +21,7 @@ 'application' => [ 'appDir' => APP_PATH . '/', 'controllersDir' => APP_PATH . '/controllers/', + 'tasksDir' => APP_PATH . '/tasks/', 'modelsDir' => APP_PATH . '/models/', 'migrationsDir' => APP_PATH . '/migrations/', 'viewsDir' => APP_PATH . '/views/', diff --git a/tests/_data/acceptance/pgsql/config.php b/tests/_data/acceptance/pgsql/config.php index abc0a1888..9c461ee62 100644 --- a/tests/_data/acceptance/pgsql/config.php +++ b/tests/_data/acceptance/pgsql/config.php @@ -7,7 +7,7 @@ defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..')); defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app'); -return new \Phalcon\Config([ +return new \Phalcon\Config\Config([ 'database' => [ 'adapter' => 'Postgresql', 'host' => 'localhost', @@ -19,6 +19,7 @@ 'application' => [ 'appDir' => APP_PATH . '/', 'controllersDir' => APP_PATH . '/controllers/', + 'tasksDir' => APP_PATH . '/tasks/', 'modelsDir' => APP_PATH . '/models/', 'migrationsDir' => APP_PATH . '/migrations/', 'viewsDir' => APP_PATH . '/views/', diff --git a/tests/_data/console/app/models/files/TestModel.php b/tests/_data/console/app/models/files/TestModel.php index f304a9b41..626b6c806 100644 --- a/tests/_data/console/app/models/files/TestModel.php +++ b/tests/_data/console/app/models/files/TestModel.php @@ -1,10 +1,13 @@ setSchema("devtools"); - $this->setSource("testModel"); + $this->setSchema('devtools'); + $this->setSource('testModel'); } /** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters - * @return TestModel[]|TestModel|\Phalcon\Mvc\Model\ResultSetInterface + * @return TestModel[]|TestModel|ResultsetInterface */ - public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInterface + public static function find($parameters = null): ResultsetInterface { return parent::find($parameters); } @@ -57,11 +57,10 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt * Allows to query the first record that match the specified conditions * * @param mixed $parameters - * @return TestModel|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null + * @return TestModel|ResultInterface|ModelInterface|null */ - public static function findFirst($parameters = null): ?\Phalcon\Mvc\ModelInterface + public static function findFirst($parameters = null): ?ModelInterface { return parent::findFirst($parameters); } - } diff --git a/tests/_data/console/app/models/files/TestModel2.php b/tests/_data/console/app/models/files/TestModel2.php index 0dd97ff8c..9d5ce9cfa 100644 --- a/tests/_data/console/app/models/files/TestModel2.php +++ b/tests/_data/console/app/models/files/TestModel2.php @@ -1,10 +1,13 @@ setSchema("devtools"); - $this->setSource("test-model2"); + $this->setSchema('devtools'); + $this->setSource('test-model2'); } /** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters - * @return TestModel2[]|TestModel2|\Phalcon\Mvc\Model\ResultSetInterface + * @return TestModel2[]|TestModel2|ResultsetInterface */ - public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInterface + public static function find($parameters = null): ResultsetInterface { return parent::find($parameters); } @@ -43,11 +45,10 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt * Allows to query the first record that match the specified conditions * * @param mixed $parameters - * @return TestModel2|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null + * @return TestModel2|ResultInterface|ModelInterface|null */ - public static function findFirst($parameters = null): ?\Phalcon\Mvc\ModelInterface + public static function findFirst($parameters = null): ?ModelInterface { return parent::findFirst($parameters); } - } diff --git a/tests/_data/console/app/models/files/TestModel3.php b/tests/_data/console/app/models/files/TestModel3.php index 6d92c31d1..8ea3565da 100644 --- a/tests/_data/console/app/models/files/TestModel3.php +++ b/tests/_data/console/app/models/files/TestModel3.php @@ -1,10 +1,13 @@ setSchema("devtools"); - $this->setSource("test_model3"); + $this->setSchema('devtools'); + $this->setSource('test_model3'); } /** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters - * @return TestModel3[]|TestModel3|\Phalcon\Mvc\Model\ResultSetInterface + * @return TestModel3[]|TestModel3|ResultsetInterface */ - public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInterface + public static function find($parameters = null): ResultsetInterface { return parent::find($parameters); } @@ -43,11 +45,10 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt * Allows to query the first record that match the specified conditions * * @param mixed $parameters - * @return TestModel3|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null + * @return TestModel3|ResultInterface|ModelInterface|null */ - public static function findFirst($parameters = null): ?\Phalcon\Mvc\ModelInterface + public static function findFirst($parameters = null): ?ModelInterface { return parent::findFirst($parameters); } - } diff --git a/tests/_data/console/app/models/files/TestModel5.php b/tests/_data/console/app/models/files/TestModel5.php index c279eaec0..b32735dcd 100644 --- a/tests/_data/console/app/models/files/TestModel5.php +++ b/tests/_data/console/app/models/files/TestModel5.php @@ -1,10 +1,13 @@ setSource("TestModel5"); + $this->setSource('TestModel5'); } /** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters - * @return TestModel5[]|TestModel5|\Phalcon\Mvc\Model\ResultSetInterface + * @return TestModel5[]|TestModel5|ResultsetInterface */ - public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInterface + public static function find($parameters = null): ResultsetInterface { return parent::find($parameters); } @@ -42,11 +44,10 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt * Allows to query the first record that match the specified conditions * * @param mixed $parameters - * @return TestModel5|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null + * @return TestModel5|ResultInterface|ModelInterface|null */ - public static function findFirst($parameters = null): ?\Phalcon\Mvc\ModelInterface + public static function findFirst($parameters = null): ?ModelInterface { return parent::findFirst($parameters); } - } diff --git a/tests/_data/console/app/models/files/Testmodel4.php b/tests/_data/console/app/models/files/Testmodel4.php index 358b7834f..243920228 100644 --- a/tests/_data/console/app/models/files/Testmodel4.php +++ b/tests/_data/console/app/models/files/Testmodel4.php @@ -1,10 +1,13 @@ setSchema("devtools"); - $this->setSource("Testmodel4"); + $this->setSchema('devtools'); + $this->setSource('Testmodel4'); } /** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters - * @return Testmodel4[]|Testmodel4|\Phalcon\Mvc\Model\ResultSetInterface + * @return Testmodel4[]|Testmodel4|ResultsetInterface */ - public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInterface + public static function find($parameters = null): ResultsetInterface { return parent::find($parameters); } @@ -43,11 +45,10 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt * Allows to query the first record that match the specified conditions * * @param mixed $parameters - * @return Testmodel4|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null + * @return Testmodel4|ResultInterface|ModelInterface|null */ - public static function findFirst($parameters = null): ?\Phalcon\Mvc\ModelInterface + public static function findFirst($parameters = null): ?ModelInterface { return parent::findFirst($parameters); } - } diff --git a/tests/_data/console/app/mysql/config.php b/tests/_data/console/app/mysql/config.php index 683a83e70..bce6ff080 100644 --- a/tests/_data/console/app/mysql/config.php +++ b/tests/_data/console/app/mysql/config.php @@ -1,7 +1,7 @@ [ @@ -21,6 +21,7 @@ ], 'application' => [ 'controllersDir' => app_path() . '/controllers/', + 'tasksDir' => app_path() . '/tasks/', 'modelsDir' => app_path() . '/models/', 'viewsDir' => app_path() . '/views/', ], diff --git a/tests/_data/console/app/postgresql/config.php b/tests/_data/console/app/postgresql/config.php index 6a1bdb295..a5b79d613 100644 --- a/tests/_data/console/app/postgresql/config.php +++ b/tests/_data/console/app/postgresql/config.php @@ -1,7 +1,7 @@ [ diff --git a/tests/_data/fixtures/Traits/DiTrait.php b/tests/_data/fixtures/Traits/DiTrait.php index 2ac7603cd..e5df515d0 100644 --- a/tests/_data/fixtures/Traits/DiTrait.php +++ b/tests/_data/fixtures/Traits/DiTrait.php @@ -18,16 +18,16 @@ use Phalcon\Cache\Adapter\Libmemcached as StorageLibmemcached; use Phalcon\Cache\Adapter\Stream as StorageStream; use Phalcon\Cli\Console; -use Phalcon\Crypt; +use Phalcon\Encryption\Crypt; use Phalcon\Db\Adapter\AdapterInterface; use Phalcon\Db\Adapter\PdoFactory; -use Phalcon\Di; +use Phalcon\Di\; use Phalcon\Di\DiInterface; use Phalcon\Di\FactoryDefault; use Phalcon\Di\FactoryDefault\Cli as CliFactoryDefault; -use Phalcon\Escaper; +use Phalcon\Html\Escaper; use Phalcon\Events\Manager as EventsManager; -use Phalcon\Filter; +use Phalcon\Filter\Filter; use Phalcon\Http\Request; use Phalcon\Http\Response; use Phalcon\Mvc\Model\Manager as ModelsManager; @@ -42,7 +42,7 @@ use Phalcon\Storage\AdapterFactory as StorageAdapterFactory; use Phalcon\Storage\Exception; use Phalcon\Storage\SerializerFactory; -use Phalcon\Url; +use Phalcon\Mvc\Url; use function getOptionsLibmemcached; use function getOptionsModelCacheStream; diff --git a/tests/unit/Access/Policy/IpTest.php b/tests/unit/Access/Policy/IpTest.php index b4adc367b..e1f6a325a 100644 --- a/tests/unit/Access/Policy/IpTest.php +++ b/tests/unit/Access/Policy/IpTest.php @@ -37,4 +37,15 @@ public function testCheckIp(string $ip, string $allowedIp, bool $expected): void $this->assertSame($expected, $checkIpMethod->invokeArgs($ipClass, [$allowedIp])); } + + /** + * @dataProvider IPsDataProvider + */ + public function testIsAllowedAccess(): void + { + $class = $this->createMock(Ip::class); + $class->method('isAllowedAccess')->willReturn(true); + + $this->assertTrue($class->isAllowedAccess('devtools', [])); + } } diff --git a/tests/unit/Builder/Component/TaskTest.php b/tests/unit/Builder/Component/TaskTest.php new file mode 100644 index 000000000..39b41829b --- /dev/null +++ b/tests/unit/Builder/Component/TaskTest.php @@ -0,0 +1,18 @@ +createMock(Task::class); + + $this->assertInstanceOf(AbstractComponent::class, $class); + } +} diff --git a/tests/unit/Generator/Entity/AbstractGeneratorTest.php b/tests/unit/Generator/Entity/AbstractGeneratorTest.php new file mode 100644 index 000000000..22f47c052 --- /dev/null +++ b/tests/unit/Generator/Entity/AbstractGeneratorTest.php @@ -0,0 +1,117 @@ +generator = $this->getMockForAbstractClass( + AbstractEntityGenerator::class, + [self::CLASS_NAME, self::BASE_CLASS, self::NAMESPACE] + ); + } + + public function testPrint(): void + { + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('class AbstractEntity extends BaseEntity', $code); + } + + public function testHasMethods(): void + { + $this->generator->setStrict(); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('declare(strict_types=1);', $code); + } + + public function testAbstract(): void + { + $this->generator->setClassAbstract(); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('abstract class AbstractEntity extends BaseEntity', $code); + } + + public function testImplements(): void + { + $this->generator->addImplements(UploadedFileInterface::class); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('use Psr\Http\Message\UploadedFileInterface;', $code); + $this->assertStringContainsString('implements UploadedFileInterface', $code); + } + + public function testAddMethod(): void + { + $this->generator->addMethod('test'); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public function test()', $code); + } + + public function testAddImport(): void + { + $this->generator->addImport(self::class); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('use ' . self::class . ';', $code); + } + + public function testAddConstant(): void + { + $this->generator->addConstant('test'); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public const test = null;', $code); + } + + public function testAddProperty(): void + { + $this->generator->addProperty('test'); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public $test;', $code); + } + + public function testAddMethods(): void + { + $this->generator->addMethods([ + 'testFunction1' => [], + 'testFunction2' => [], + ]); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public function testFunction1()', $code); + $this->assertStringContainsString('public function testFunction2()', $code); + } + + public function testGetCleanImports(): void + { + $imports = $this->generator->getCleanImports(); + + $this->assertSame([ + "AbstractEntity" => [ + 0 => "\App\Entities\AbstractEntity", + 1 => "AbstractEntity", + ], + "BaseEntity" => [], + ], $imports); + } +} diff --git a/tests/unit/Generator/Entity/ControllerGeneratorTest.php b/tests/unit/Generator/Entity/ControllerGeneratorTest.php new file mode 100644 index 000000000..708173165 --- /dev/null +++ b/tests/unit/Generator/Entity/ControllerGeneratorTest.php @@ -0,0 +1,113 @@ +generator = new ControllerEntityGenerator( + self::CLASS_NAME, self::BASE_CLASS, self::NAMESPACE + ); + } + + public function testPrint(): void + { + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('class ClassEntity extends BaseEntity', $code); + } + + public function testStrict(): void + { + $this->generator->setStrict(); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('declare(strict_types=1);', $code); + } + + public function testAbstract(): void + { + $this->generator->setClassAbstract(); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('abstract class ClassEntity extends BaseEntity', $code); + } + + public function testImplements(): void + { + $this->generator->addImplements(UploadedFileInterface::class); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('use Psr\Http\Message\UploadedFileInterface;', $code); + $this->assertStringContainsString('implements UploadedFileInterface', $code); + } + + public function testAddMethod(): void + { + $this->generator->addMethod('test'); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public function test()', $code); + } + + public function testAddImport(): void + { + $this->generator->addImport(self::class); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('use ' . self::class . ';', $code); + } + + public function testAddConstant(): void + { + $this->generator->addConstant('test'); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public const test = null;', $code); + } + + public function testAddProperty(): void + { + $this->generator->addProperty('test'); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public $test;', $code); + } + + public function testAddMethods(): void + { + $this->generator->addMethods([ + 'testFunction1' => [], + 'testFunction2' => [], + ]); + $code = $this->generator->printCode(new PsrPrinter()); + + $this->assertStringContainsString('public function testFunction1()', $code); + $this->assertStringContainsString('public function testFunction2()', $code); + } + + public function testGetCleanImports(): void + { + $imports = $this->generator->getCleanImports(); + + $this->assertSame([ + "ClassEntity" => [], + "BaseEntity" => [], + ], $imports); + } +} diff --git a/tests/unit/Generator/Helper/MethodArgumentDtoTest.php b/tests/unit/Generator/Helper/MethodArgumentDtoTest.php new file mode 100644 index 000000000..896131166 --- /dev/null +++ b/tests/unit/Generator/Helper/MethodArgumentDtoTest.php @@ -0,0 +1,34 @@ +methodArgumentDto = new MethodArgumentDto( + 'testName', 'testType' + ); + } + + public function testInstance(): void + { + $this->assertInstanceOf(MethodArgumentDto::class, $this->methodArgumentDto); + } + + public function testGetters(): void + { + $this->assertSame('testName', $this->methodArgumentDto->getName()); + $this->assertSame('testType', $this->methodArgumentDto->getType()); + $this->assertFalse($this->methodArgumentDto->isNullable()); + $this->assertFalse($this->methodArgumentDto->isRef()); + $this->assertSame(MethodArgumentDto::NO_VALUE, $this->methodArgumentDto->getDefault()); + } +} diff --git a/tests/unit/Generator/Helper/ModelMethodHelperTest.php b/tests/unit/Generator/Helper/ModelMethodHelperTest.php new file mode 100644 index 000000000..68050d70d --- /dev/null +++ b/tests/unit/Generator/Helper/ModelMethodHelperTest.php @@ -0,0 +1,41 @@ +modelMethodsHelper = new ModelMethodsHelper(); + } + + public function testInstance(): void + { + $this->assertInstanceOf(ModelMethodsHelper::class, $this->modelMethodsHelper); + } + + public function testState(): void + { + $this->modelMethodsHelper->setState('initialize'); + $this->assertTrue($this->modelMethodsHelper->alreadyInitialized()); + + $this->modelMethodsHelper->setState('findFirst'); + $this->assertTrue($this->modelMethodsHelper->alreadyFindFirst()); + + $this->modelMethodsHelper->setState('find'); + $this->assertTrue($this->modelMethodsHelper->alreadyFind()); + + $this->modelMethodsHelper->setState('validation'); + $this->assertTrue($this->modelMethodsHelper->alreadyValidations()); + + $this->modelMethodsHelper->setState('columnMap'); + $this->assertTrue($this->modelMethodsHelper->alreadyColumnMapped()); + } +} diff --git a/tests/unit/Generator/SnippetTest.php b/tests/unit/Generator/SnippetTest.php deleted file mode 100644 index 354fa86bf..000000000 --- a/tests/unit/Generator/SnippetTest.php +++ /dev/null @@ -1,54 +0,0 @@ -snippet = new Snippet(); - } - - public function testGetClass(): void - { - $expected = << 'Test', - ]); - - $classString = $this->snippet->getClass( - 'namespace Test\DevTools;' . PHP_EOL . PHP_EOL, - '', - '', - '', - $options, - 'BaseClass', - '' - ); - - $this->assertSame($expected, $classString); - } -} diff --git a/tests/unit/Options/OptionsAwareTest.php b/tests/unit/Options/OptionsAwareTest.php new file mode 100644 index 000000000..9e58f0834 --- /dev/null +++ b/tests/unit/Options/OptionsAwareTest.php @@ -0,0 +1,45 @@ +optionsAwareConfig = new OptionsAware(); + } + + public function testImplementation(): void + { + $this->assertInstanceOf(OptionsAware::class, $this->optionsAwareConfig); + } + + public function testSetGetOption(): void + { + $this->optionsAwareConfig->setOption('testKey', 'testValue'); + + $this->assertSame('testValue', $this->optionsAwareConfig->getOption('testKey')); + } + + public function testSetGetValidOptionOrDefaultValue(): void + { + $this->optionsAwareConfig->setValidOptionOrDefaultValue('testKey', '', 'defaultValue'); + + $this->assertSame('defaultValue', $this->optionsAwareConfig->getOption('testKey')); + } + + public function testHasOption(): void + { + $this->optionsAwareConfig->setOption('testKey', 'testValue'); + + $this->assertTrue($this->optionsAwareConfig->hasOption('testKey')); + } +} diff --git a/tests/unit/Snippet/ControllerSnippetTest.php b/tests/unit/Snippet/ControllerSnippetTest.php new file mode 100644 index 000000000..5b23eee48 --- /dev/null +++ b/tests/unit/Snippet/ControllerSnippetTest.php @@ -0,0 +1,75 @@ +getOptions(); + $snippet = new ControllerSnippet(self::MODEL_CLASS, $options); + $data = $snippet->getSearchAction(); + + $this->assertStringContainsString(self::MODEL_CLASS, $data); + } + + public function testEditAction(): void + { + $options = $this->getOptions(); + $snippet = new ControllerSnippet(self::MODEL_CLASS, $options); + $data = $snippet->getEditAction(); + + $this->assertStringContainsString(self::MODEL_CLASS, $data); + } + + public function testCreateAction(): void + { + $options = $this->getOptions(); + $snippet = new ControllerSnippet(self::MODEL_CLASS, $options); + $data = $snippet->getCreateAction(); + + $this->assertStringContainsString(self::MODEL_CLASS, $data); + } + + public function testSaveAction(): void + { + $options = $this->getOptions(); + $snippet = new ControllerSnippet(self::MODEL_CLASS, $options); + $data = $snippet->getSaveAction(); + + $this->assertStringContainsString(self::MODEL_CLASS, $data); + } + + public function testDeleteAction(): void + { + $options = $this->getOptions(); + $snippet = new ControllerSnippet(self::MODEL_CLASS, $options); + $data = $snippet->getDeleteAction(); + + $this->assertStringContainsString(self::MODEL_CLASS, $data); + } + + private function getOptions(): Config + { + return new Config([ + 'plural' => 'record', + 'singular' => 'Record', + 'genSettersGetters' => true, + 'identityField' => null, + 'dataTypes' => [], + 'attributes' => [], + ]); + } +} diff --git a/tests/unit/Snippet/ModelSnippetTest.php b/tests/unit/Snippet/ModelSnippetTest.php new file mode 100644 index 000000000..0cf5dd29f --- /dev/null +++ b/tests/unit/Snippet/ModelSnippetTest.php @@ -0,0 +1,83 @@ +snippet = new ModelSnippet(); + } + + public function testGetClass(): void + { + $expected = << 'Test', + ]); + + $classString = $this->snippet->getClass( + $options, + 'namespace Test\DevTools;' . PHP_EOL . PHP_EOL, + '', + '', + '', + 'BaseClass', + '' + ); + + $this->assertSame($expected, $classString); + } + + public function testGetValidateInclusion(): void + { + $validateInclusion = $this->snippet->getValidateInclusion( + 'test', + '1, 2, 3' + ); + + $this->assertStringContainsString("'domain' => [1, 2, 3],", $validateInclusion); + } + + public function testGetValidateEmail(): void + { + $validateEmail = $this->snippet->getValidateEmail( + 'email_field' + ); + + $this->assertStringContainsString("\$validator->add('email_field'", $validateEmail); + } + + public function testGetColumnMap(): void + { + $columnMap = $this->snippet->getColumnMap( + [], true + ); + + $this->assertStringContainsString("return [\n \n];", $columnMap); + } +} diff --git a/tests/unit/UtilsTest.php b/tests/unit/UtilsTest.php index 4215cf4bd..3eb02751f 100644 --- a/tests/unit/UtilsTest.php +++ b/tests/unit/UtilsTest.php @@ -13,9 +13,10 @@ namespace Phalcon\DevTools\Tests\Unit; +use Phalcon\Config\Config; use Phalcon\DevTools\Utils; use Phalcon\DevTools\Tests\Support\Module\UnitTest; -use Phalcon\Text; +use Phalcon\Support\HelperFactory; final class UtilsTest extends UnitTest { @@ -103,6 +104,7 @@ function ($string, $expected) { */ public function shouldUncamelizeString() { + $helper = new HelperFactory(); $this->specify( "Method Text::uncamelize hasn't returned proper string", function ($string, $expected) { @@ -110,11 +112,23 @@ function ($string, $expected) { }, [ 'examples' => [ - [Text::uncamelize('MyFooBar'), 'my_foo_bar'], - [Text::uncamelize('MyFooBar', '-'), 'my-foo-bar'], - [Text::uncamelize('MyFooBar', '_'), 'my_foo_bar'] + [$helper->camelize('MyFooBar'), 'my_foo_bar'], + [$helper->camelize('MyFooBar', '-'), 'my-foo-bar'], + [$helper->camelize('MyFooBar', '_'), 'my_foo_bar'] ] ] ); } + + public function testResolveDbSchema() + { + $dbSchema = Utils::resolveDbSchema(new Config([ + 'dbname' => 'devtools', + 'schema' => 'public', + 'adapter' => 'Mysql', + ])); + + + $this->assertSame('public', $dbSchema); + } }