diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 4dcbb6f..1a07786 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -3,18 +3,37 @@ name: PHP Composer on: [push] jobs: - build: + test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + with: + path: 'kirby-reporter' - - name: Validate composer.json and composer.lock - run: composer validate + - name: Install Starterkit + run: | + git clone https://github.com/getkirby/starterkit.git + mkdir starterkit/site/plugins - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest + - name: Update Kirby + run: | + rm -rf starterkit/kirby + composer require getkirby/cms:3.6.0-rc.1@dev + mv kirby starterkit + cd starterkit/kirby + composer install - - name: Run test suite - run: composer run-script test + - name: Install + run: | + mv kirby-reporter starterkit/site/plugins + cd starterkit/site/plugins/kirby-reporter + composer install + + - name: Tests + run: | + cd starterkit/site/plugins/kirby-reporter + export KIRBY_REPORTER_TEST=true + composer validate + composer test diff --git a/composer.json b/composer.json index 87fa657..16f95be 100755 --- a/composer.json +++ b/composer.json @@ -18,16 +18,15 @@ "ext-json": "*", "getkirby/composer-installer": "^1.2", "ql/uri-template": "^1.1", - "guzzlehttp/guzzle": "~7.0" + "guzzlehttp/guzzle": "~7.4.0" }, "config": { "optimize-autoloader": true }, "require-dev": { - "phpunit/phpunit": "^8", - "spatie/phpunit-watcher": "dev-master" + "phpunit/phpunit": "^9.5.10" }, "scripts": { - "test": "phpunit --bootstrap vendor/autoload.php tests" + "test": "phpunit --bootstrap tests/bootstrap.php tests" } } diff --git a/composer.lock b/composer.lock index 1f8fc78..1c88dd2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "72cf3fb490a88388bfa26cc0f46754c5", + "content-hash": "6f8f868d8b3217d3ac7320834dfdd27e", "packages": [ { "name": "getkirby/composer-installer", @@ -55,24 +55,25 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.3.0", + "version": "7.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "7008573787b430c1c1f650e3722d9bba59967628" + "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", - "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/868b3571a039f0ebc11ac8f344f4080babe2cb94", + "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7 || ^2.0", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.8.3 || ^2.1", "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2" }, "provide": { "psr/http-client-implementation": "1.0" @@ -82,7 +83,7 @@ "ext-curl": "*", "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { "ext-curl": "Required for CURL handler support", @@ -92,7 +93,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.4-dev" } }, "autoload": { @@ -108,19 +109,43 @@ "MIT" ], "authors": [ + { + "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://sagikazarmark.hu" + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", @@ -134,7 +159,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + "source": "https://github.com/guzzle/guzzle/tree/7.4.0" }, "funding": [ { @@ -146,15 +171,11 @@ "type": "github" }, { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" } ], - "time": "2021-03-23T11:33:13+00:00" + "time": "2021-10-18T09:52:00+00:00" }, { "name": "guzzlehttp/promises", @@ -614,112 +635,38 @@ "source": "https://github.com/ralouphie/getallheaders/tree/develop" }, "time": "2019-03-08T08:55:37+00:00" - } - ], - "packages-dev": [ + }, { - "name": "clue/stdio-react", + "name": "symfony/deprecation-contracts", "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/clue/reactphp-stdio.git", - "reference": "5722686d3cc0cdf2ccedb6079bfd066220611f00" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/5722686d3cc0cdf2ccedb6079bfd066220611f00", - "reference": "5722686d3cc0cdf2ccedb6079bfd066220611f00", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", "shasum": "" }, "require": { - "clue/term-react": "^1.0 || ^0.1.1", - "clue/utf8-react": "^1.0 || ^0.1", - "php": ">=5.3", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", - "react/stream": "^1.0 || ^0.7 || ^0.6" - }, - "require-dev": { - "clue/arguments": "^2.0", - "clue/commander": "^1.2", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "suggest": { - "ext-mbstring": "Using ext-mbstring should provide slightly better performance for handling I/O" + "php": ">=7.1" }, "type": "library", - "autoload": { - "psr-4": { - "Clue\\React\\Stdio\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering" - } - ], - "description": "Async, event-driven console input & output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP", - "homepage": "https://github.com/clue/reactphp-stdio", - "keywords": [ - "async", - "autocomplete", - "autocompletion", - "cli", - "history", - "interactive", - "reactphp", - "readline", - "stdin", - "stdio", - "stdout" - ], - "support": { - "issues": "https://github.com/clue/reactphp-stdio/issues", - "source": "https://github.com/clue/reactphp-stdio/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://clue.engineering/support", - "type": "custom" + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" }, - { - "url": "https://github.com/clue", - "type": "github" + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } - ], - "time": "2020-11-20T14:28:39+00:00" - }, - { - "name": "clue/term-react", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/clue/reactphp-term.git", - "reference": "eb6eb063eda04a714ef89f066586a2c49588f7ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-term/zipball/eb6eb063eda04a714ef89f066586a2c49588f7ca", - "reference": "eb6eb063eda04a714ef89f066586a2c49588f7ca", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/stream": "^1.0 || ^0.7" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3" }, - "type": "library", "autoload": { - "psr-4": { - "Clue\\React\\Term\\": "src/" - } + "files": [ + "function.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -727,108 +674,37 @@ ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering" - } - ], - "description": "Streaming terminal emulator, built on top of ReactPHP.", - "homepage": "https://github.com/clue/reactphp-term", - "keywords": [ - "C0", - "CSI", - "ansi", - "apc", - "ascii", - "c1", - "control codes", - "dps", - "osc", - "pm", - "reactphp", - "streaming", - "terminal", - "vt100", - "xterm" - ], - "support": { - "issues": "https://github.com/clue/reactphp-term/issues", - "source": "https://github.com/clue/reactphp-term/tree/v1.3.0" - }, - "funding": [ - { - "url": "https://clue.engineering/support", - "type": "custom" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2020-11-06T11:50:12+00:00" - }, - { - "name": "clue/utf8-react", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/clue/reactphp-utf8.git", - "reference": "8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-utf8/zipball/8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96", - "reference": "8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 ||^5.7 || ^4.8", - "react/stream": "^1.0 || ^0.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Clue\\React\\Utf8\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Streaming UTF-8 parser, built on top of ReactPHP.", - "homepage": "https://github.com/clue/reactphp-utf8", - "keywords": [ - "reactphp", - "streaming", - "unicode", - "utf-8", - "utf8" - ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/clue/reactphp-utf8/issues", - "source": "https://github.com/clue/reactphp-utf8/tree/v1.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" }, "funding": [ { - "url": "https://clue.engineering/support", + "url": "https://symfony.com/sponsor", "type": "custom" }, { - "url": "https://github.com/clue", + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-11-06T11:48:09+00:00" - }, + "time": "2021-03-23T23:28:01+00:00" + } + ], + "packages-dev": [ { "name": "doctrine/instantiator", "version": "1.4.0", @@ -899,176 +775,118 @@ "time": "2020-11-10T18:47:58+00:00" }, { - "name": "evenement/evenement", - "version": "v3.0.1", + "name": "myclabs/deep-copy", + "version": "1.10.2", "source": { "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { - "php": ">=7.0" + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { - "psr-0": { - "Evenement": "src" - } + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - } - ], - "description": "Événement is a very simple event dispatching library for PHP", + "description": "Create deep copies (clones) of your objects", "keywords": [ - "event-dispatcher", - "event-emitter" + "clone", + "copy", + "duplicate", + "object", + "object graph" ], "support": { - "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/master" + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" }, - "time": "2017-07-23T21:35:13+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" }, { - "name": "jolicode/jolinotif", - "version": "v2.3.0", + "name": "nikic/php-parser", + "version": "v4.13.0", "source": { "type": "git", - "url": "https://github.com/jolicode/JoliNotif.git", - "reference": "9cca717bbc47aa2ffeca51d77daa13b824a489ee" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/9cca717bbc47aa2ffeca51d77daa13b824a489ee", - "reference": "9cca717bbc47aa2ffeca51d77daa13b824a489ee", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { - "php": ">=7.0", - "symfony/process": "^3.3|^4.0|^5.0" + "ext-tokenizer": "*", + "php": ">=7.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "symfony/finder": "^3.3|^4.0|^5.0", - "symfony/phpunit-bridge": "^3.4.26|^4.0|^5.0" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ - "jolinotif" + "bin/php-parse" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "4.9-dev" } }, "autoload": { "psr-4": { - "Joli\\JoliNotif\\": "src/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Loïck Piera", - "email": "pyrech@gmail.com" - } - ], - "description": "Send desktop notifications on Windows, Linux, MacOS.", - "keywords": [ - "MAC", - "growl", - "linux", - "notification", - "windows" - ], - "support": { - "issues": "https://github.com/jolicode/JoliNotif/issues", - "source": "https://github.com/jolicode/JoliNotif/tree/v2.3.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/jolicode/jolinotif", - "type": "tidelift" + "name": "Nikita Popov" } ], - "time": "2021-03-07T12:30:00+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", + "description": "A PHP parser written in PHP", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "parser", + "php" ], "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2021-09-20T12:20:58+00:00" }, { "name": "phar-io/manifest", @@ -1236,16 +1054,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -1256,7 +1074,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1286,9 +1105,9 @@ "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/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1409,40 +1228,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.15", + "version": "9.2.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "819f92bba8b001d4363065928088de22f25a3a48" + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", - "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": ">=7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "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", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.12.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -1470,7 +1293,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" }, "funding": [ { @@ -1478,32 +1301,32 @@ "type": "github" } ], - "time": "2021-07-26T12:20:09+00:00" + "time": "2021-09-17T05:39:03+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", - "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1530,7 +1353,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" }, "funding": [ { @@ -1538,26 +1361,38 @@ "type": "github" } ], - "time": "2021-07-19T06:46:01+00:00" + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1574,41 +1409,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.3", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1627,14 +1468,14 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { @@ -1642,33 +1483,32 @@ "type": "github" } ], - "time": "2020-11-30T08:20:02+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "4.0.4", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1683,17 +1523,18 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -1701,21 +1542,20 @@ "type": "github" } ], - "abandoned": true, - "time": "2020-08-04T08:28:15+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.21", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", - "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -1726,32 +1566,35 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", + "myclabs/deep-copy": "^1.10.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.4", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", - "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" + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -1759,12 +1602,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1787,7 +1633,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" }, "funding": [ { @@ -1799,240 +1645,144 @@ "type": "github" } ], - "time": "2021-09-25T07:37:20+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { - "name": "react/event-loop", - "version": "v1.2.0", + "name": "sebastian/cli-parser", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/be6dee480fc4692cec0504e65eb486e3be1aa6f2", - "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "suggest": { - "ext-event": "~1.0 for ExtEventLoop", - "ext-pcntl": "For signal handling support when using the StreamSelectLoop", - "ext-uv": "* for ExtUvLoop" + "phpunit/phpunit": "^9.3" }, "type": "library", - "autoload": { - "psr-4": { - "React\\EventLoop\\": "src" + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", - "keywords": [ - "asynchronous", - "event-loop" - ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.2.0" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2021-07-11T12:31:24+00:00" + "time": "2020-09-28T06:08:49+00:00" }, { - "name": "react/stream", - "version": "v1.2.0", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/reactphp/stream.git", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.8", - "react/event-loop": "^1.2" + "php": ">=7.3" }, "require-dev": { - "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.3" }, "type": "library", - "autoload": { - "psr-4": { - "React\\Stream\\": "src" + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", - "keywords": [ - "event-driven", - "io", - "non-blocking", - "pipe", - "reactphp", - "readable", - "stream", - "writable" - ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.2.0" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2021-07-11T12:37:55+00:00" + "time": "2020-10-26T13:08:54+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2054,7 +1804,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -2062,34 +1812,34 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2128,7 +1878,64 @@ ], "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/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" }, "funding": [ { @@ -2136,33 +1943,33 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "3.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2194,7 +2001,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" }, "funding": [ { @@ -2202,27 +2009,27 @@ "type": "github" } ], - "time": "2020-11-30T07:59:04+00:00" + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "4.2.4", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -2230,7 +2037,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2257,7 +2064,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" }, "funding": [ { @@ -2265,34 +2072,34 @@ "type": "github" } ], - "time": "2020-11-30T07:53:42+00:00" + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.3", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2334,7 +2141,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/4.0.3" }, "funding": [ { @@ -2342,30 +2149,30 @@ "type": "github" } ], - "time": "2020-11-30T07:47:53+00:00" + "time": "2020-09-28T05:24:23+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.1", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "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/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -2373,7 +2180,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2398,7 +2205,64 @@ ], "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/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" }, "funding": [ { @@ -2406,34 +2270,34 @@ "type": "github" } ], - "time": "2020-11-30T07:43:24+00:00" + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2455,7 +2319,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -2463,32 +2327,32 @@ "type": "github" } ], - "time": "2020-11-30T07:40:27+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2510,7 +2374,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -2518,32 +2382,32 @@ "type": "github" } ], - "time": "2020-11-30T07:37:18+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.1", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2573,7 +2437,7 @@ "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" }, "funding": [ { @@ -2581,1203 +2445,209 @@ "type": "github" } ], - "time": "2020-11-30T07:34:24+00:00" + "time": "2020-10-26T13:17:30+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:30:19+00:00" - }, - { - "name": "sebastian/type", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:25:11+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" - }, - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "spatie/phpunit-watcher", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/spatie/phpunit-watcher.git", - "reference": "1642c533c50029e91c1a3a71c76fae03138fc4f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/1642c533c50029e91c1a3a71c76fae03138fc4f4", - "reference": "1642c533c50029e91c1a3a71c76fae03138fc4f4", - "shasum": "" - }, - "require": { - "clue/stdio-react": "^2.4", - "jolicode/jolinotif": "^2.2", - "php": "^7.2 | ^8.0", - "symfony/console": "^5.2", - "symfony/finder": "^5.2", - "symfony/process": "^5.2", - "symfony/yaml": "^5.2", - "yosymfony/resource-watcher": "^2.0" - }, - "conflict": { - "yosymfony/resource-watcher": "<2.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.0 | ^9.0" - }, - "default-branch": true, - "bin": [ - "phpunit-watcher" - ], - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\PhpUnitWatcher\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "Automatically rerun PHPUnit tests when source code changes", - "homepage": "https://github.com/spatie/phpunit-watcher", - "keywords": [ - "phpunit-watcher", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/phpunit-watcher/issues", - "source": "https://github.com/spatie/phpunit-watcher/tree/master" - }, - "time": "2021-05-06T16:49:49+00:00" - }, - { - "name": "symfony/console", - "version": "v5.3.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" - }, - "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", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "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": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.3.7" - }, - "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-08-25T20:02:16+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-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" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-03-23T23:28:01+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.3.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.3.7" - }, - "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-08-04T21:20:46+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.23.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, - "files": [ - "bootstrap.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" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" - }, - "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-05-27T12:26:48+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.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" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" - }, - "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-05-27T12:26:48+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.23.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", - "shasum": "" - }, - "require": { - "php": ">=7.1" + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "abandoned": true, + "time": "2020-09-28T06:45:17+00:00" }, { - "name": "symfony/process", - "version": "v5.3.7", + "name": "sebastian/type", + "version": "2.3.4", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", - "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "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": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.7" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { - "name": "symfony/service-contracts", - "version": "v2.4.0", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1" - }, - "suggest": { - "symfony/service-implementation": "" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "symfony/string", - "version": "v5.3.7", + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "php": ">=7.1" }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "files": [ - "Resources/functions.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "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": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.3.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } - ], - "time": "2021-08-26T08:00:08+00:00" - }, - { - "name": "symfony/yaml", - "version": "v5.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", - "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<4.4" - }, - "require-dev": { - "symfony/console": "^4.4|^5.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Polyfill\\Ctype\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3786,18 +2656,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Loads and dumps YAML files", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], "support": { - "source": "https://github.com/symfony/yaml/tree/v5.3.6" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -3813,7 +2689,7 @@ "type": "tidelift" } ], - "time": "2021-07-29T06:20:01+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "theseer/tokenizer", @@ -3922,70 +2798,11 @@ "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, "time": "2021-03-09T10:59:23+00:00" - }, - { - "name": "yosymfony/resource-watcher", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/yosymfony/resource-watcher.git", - "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", - "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "symfony/finder": "^2.7|^3.0|^4.0|^5.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7", - "symfony/filesystem": "^2.7|^3.0|^4.0|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Yosymfony\\ResourceWatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Victor Puertas", - "email": "vpgugr@gmail.com" - } - ], - "description": "A simple resource watcher using Symfony Finder", - "homepage": "http://yosymfony.com", - "keywords": [ - "finder", - "resources", - "symfony", - "watcher" - ], - "support": { - "issues": "https://github.com/yosymfony/resource-watcher/issues", - "source": "https://github.com/yosymfony/resource-watcher/tree/master" - }, - "time": "2020-01-04T15:36:55+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "spatie/phpunit-watcher": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/index.js b/index.js index d2f0ec8..394c35f 100644 --- a/index.js +++ b/index.js @@ -2,4 +2,4 @@ * vue-slim-tabs v0.3.0 * (c) 2017-present egoist <0x142857@gmail.com> * Released under the MIT License. - */Object.defineProperty(d,"__esModule",{value:!0});var _={name:"tabs",props:{defaultIndex:{default:0,type:Number},onSelect:{type:Function}},data:function(){return{selectedIndex:this.defaultIndex}},methods:{switchTab:function(t,s,r){r||(this.selectedIndex=s,this.onSelect&&this.onSelect(t,s))}},render:function(){var t=this,s=arguments[0],r=this.$slots.default.filter(function(l){return l.componentOptions}),o=[];return r.forEach(function(l,u){var c=l.componentOptions.propsData,i=c.title,a=c.titleSlot,f=c.disabled,p=a?t.$slots[a]:i,n=f===!0||f==="";o.push(s("li",{class:"vue-tab",attrs:{role:"tab","aria-selected":t.selectedIndex===u?"true":"false","aria-disabled":n?"true":"false"},on:{click:function(v){return t.switchTab(v,u,n)}}},[p]))}),s("div",{class:"vue-tabs",attrs:{role:"tabs"}},[s("ul",{class:"vue-tablist",attrs:{role:"tablist"}},[this.$slots.left,o,this.$slots.right]),r[this.selectedIndex]])}},m={name:"tab",props:["title","titleSlot","disabled"],render:function(){var t=arguments[0];return t("div",{class:"vue-tabpanel",attrs:{role:"tabpanel"}},[this.$slots.default])}};function C(e){e.component(_.name,_),e.component(m.name,m)}var S=d.Tabs=_,T=d.Tab=m;d.install=C;var F=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.data?s("k-textarea-field",{attrs:{label:"Preview",value:e.data,buttons:!1,disabled:"true"}}):s("k-text",[e._v(" "+e._s(e.$t("reporter.tab.preview.empty"))+" ")])},I=[];function h(e,t,s,r,o,l,u,c){var i=typeof e=="function"?e.options:e;t&&(i.render=t,i.staticRenderFns=s,i._compiled=!0),r&&(i.functional=!0),l&&(i._scopeId="data-v-"+l);var a;if(u?(a=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!n&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(n=__VUE_SSR_CONTEXT__),o&&o.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(u)},i._ssrRegister=a):o&&(a=c?function(){o.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(i.functional){i._injectStyles=a;var f=i.render;i.render=function(y,v){return a.call(v),f(y,v)}}else{var p=i.beforeCreate;i.beforeCreate=p?[].concat(p,a):[a]}return{exports:e,options:i}}const x={name:"IssuePreview",props:{data:String}},b={};var R=h(x,F,I,!1,O,null,null,null);function O(e){for(let t in b)this[t]=b[t]}var E=function(){return R.exports}(),L=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"k-kit-form",on:{input:function(r){return e.somethingChanged()}}},[e.errors.length?s("k-box",{staticClass:"k-kit-form--note",attrs:{theme:"negative"}},[s("k-icon",{attrs:{type:"alert"}}),e._l(e.errors,function(r){return s("p",[e._v(e._s(r))])})],2):e._e(),e.hasResponse?s("k-box",{staticClass:"k-kit-form--note",attrs:{theme:"positive"}},[s("k-icon",{attrs:{type:"check"}}),s("p",{domProps:{innerHTML:e._s(e.successMessage)}})],1):e._e(),s("k-form",[s("k-grid",{staticClass:"title-field"},[s("k-column",[s("k-text-field",{attrs:{name:"title",label:e.$t("reporter.form.field.title"),required:""},model:{value:e.issue.title,callback:function(r){e.$set(e.issue,"title",r)},expression:"issue.title"}})],1)],1),s("tabs",[s("tab",{attrs:{title:e.$t("reporter.tab.write")}},[s("k-fieldset",{attrs:{fields:e.fields},on:{submit:function(r){return r.preventDefault(),e.checkForm(r)}},model:{value:e.issue.formFields,callback:function(r){e.$set(e.issue,"formFields",r)},expression:"issue.formFields"}})],1),s("tab",{attrs:{title:e.$t("reporter.tab.preview")}},[s("issue-preview",{attrs:{data:e.previewData}})],1)],1),s("k-line-field"),s("k-button",{class:{"is-loading":e.loading},attrs:{disabled:e.loading,icon:e.buttonIcon},on:{click:e.checkForm}},[e._v(" "+e._s(e.$t("reporter.form.button.save"))+" ")])],1)],1)},M=[],K="";const P={name:"IssueForm",components:{IssuePreview:E,Tabs:S,Tab:T},props:{fields:{type:Object},previewData:{type:String}},computed:{hasResponse(){return Object.keys(this.response).length>1},buttonIcon(){return this.loading?"loader":"check"},successMessage(){return this.$t("reporter.form.success",{issueLink:this.issueLink})},issueLink(){const e=this.response.issueUrl,t=this.response.issueId;return this.$t("reporter.form.issue.link",{issueLink:e,issueId:t})}},data(){return{errors:[],response:{},loading:!1,previewClicked:!1,dirty:!0,previewData:{},issue:{title:null,formFields:{}}}},mounted(){const e=this.$el.querySelectorAll(".vue-tab")[1];e.addEventListener("click",()=>{this.previewClicked&&this.loadPreview(),this.previewClicked=!0}),e.addEventListener("mouseenter",()=>{this.dirty&&this.loadPreview()}),this.$el.querySelectorAll(".vue-tab")[0].addEventListener("click",()=>{this.dirty=!1,this.previewClicked=!1})},methods:{somethingChanged(){this.dirty=!0},loadPreview(){this.$api.post("reporter/report?preview=true",this.issue).then(t=>{this.previewData=t,this.dirty=!1})},checkForm(){this.errors=[],!this.issue.title&&this.issue.title<3&&this.errors.push(this.$t("reporter.form.error.title")),this.errors.length||this.submit()},submit(){this.loading=!0;const e=this.$api.post("reporter/report",this.issue);e.then(t=>{t.status>=200&&t.status<300?(this.response=t,this.issue={},this.$store.dispatch("notification/success",":)")):t.status===401?(this.errors.push(this.$t("reporter.form.error.authFailed")),this.response={}):t.status===400?(this.errors.push(t.message),this.response={}):t.status===404?(this.errors.push(this.$t("reporter.form.error.repoNotFound")),this.response={}):t.status===501?(this.errors.push(this.$t("reporter.form.error.platform.unsupported")),this.response={}):this.response={},this.loading=!1}),e.catch(t=>{this.errors.push(this.$t(t.message)),this.loading=!1,this.response={}})}}},$={};var j=h(P,L,M,!1,D,null,null,null);function D(e){for(let t in $)this[t]=$[t]}var k=function(){return j.exports}(),q=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("k-inside",[s("k-view",{staticClass:"k-issue-tracker-view"},[s("k-header",[e._v(e._s(e.$t("reporter.headline")))]),s("k-text",[e._v(e._s(e.$t("reporter.description")))]),s("issue-form",{attrs:{fields:e.fields}})],1)],1)},N=[];const V={components:{IssueForm:k},props:{fields:Object},data(){return{fields:{}}},async created(){this.$api.get("reporter/fields").then(e=>{this.fields=e})}},g={};var U=h(V,q,N,!1,A,null,null,null);function A(e){for(let t in g)this[t]=g[t]}var X=function(){return U.exports}(),z=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("section",[s("header",{staticClass:"k-section-header"},[s("k-headline",[e._v(" "+e._s(e.headline)+" ")])],1),s("issue-form",{attrs:{fields:e.fields}})],1)},H=[],Q="";const W={components:{IssueForm:k},props:{fields:Object,headline:String},data(){return{fields:{}}},async created(){this.$api.get("reporter/fields").then(e=>{this.fields=e})}},w={};var B=h(W,z,H,!1,G,null,null,null);function G(e){for(let t in w)this[t]=w[t]}var J=function(){return B.exports}();panel.plugin("gearsdigital/kirby-reporter",{components:{"k-reporter-view":X},sections:{reporter:J}})})();})(); + */Object.defineProperty(d,"__esModule",{value:!0});var _={name:"tabs",props:{defaultIndex:{default:0,type:Number},onSelect:{type:Function}},data:function(){return{selectedIndex:this.defaultIndex}},methods:{switchTab:function(s,t,r){r||(this.selectedIndex=t,this.onSelect&&this.onSelect(s,t))}},render:function(){var s=this,t=arguments[0],r=this.$slots.default.filter(function(l){return l.componentOptions}),o=[];return r.forEach(function(l,c){var u=l.componentOptions.propsData,i=u.title,a=u.titleSlot,p=u.disabled,h=a?s.$slots[a]:i,n=p===!0||p==="";o.push(t("li",{class:"vue-tab",attrs:{role:"tab","aria-selected":s.selectedIndex===c?"true":"false","aria-disabled":n?"true":"false"},on:{click:function(v){return s.switchTab(v,c,n)}}},[h]))}),t("div",{class:"vue-tabs",attrs:{role:"tabs"}},[t("ul",{class:"vue-tablist",attrs:{role:"tablist"}},[this.$slots.left,o,this.$slots.right]),r[this.selectedIndex]])}},m={name:"tab",props:["title","titleSlot","disabled"],render:function(){var s=arguments[0];return s("div",{class:"vue-tabpanel",attrs:{role:"tabpanel"}},[this.$slots.default])}};function C(e){e.component(_.name,_),e.component(m.name,m)}var S=d.Tabs=_,T=d.Tab=m;d.install=C;var F=function(){var e=this,s=e.$createElement,t=e._self._c||s;return e.data?t("k-textarea-field",{attrs:{label:"Preview",value:e.data,buttons:!1,disabled:"true"}}):t("k-text",[e._v(" "+e._s(e.$t("reporter.tab.preview.empty"))+" ")])},I=[];function f(e,s,t,r,o,l,c,u){var i=typeof e=="function"?e.options:e;s&&(i.render=s,i.staticRenderFns=t,i._compiled=!0),r&&(i.functional=!0),l&&(i._scopeId="data-v-"+l);var a;if(c?(a=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!n&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(n=__VUE_SSR_CONTEXT__),o&&o.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(c)},i._ssrRegister=a):o&&(a=u?function(){o.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(i.functional){i._injectStyles=a;var p=i.render;i.render=function(y,v){return a.call(v),p(y,v)}}else{var h=i.beforeCreate;i.beforeCreate=h?[].concat(h,a):[a]}return{exports:e,options:i}}const x={name:"IssuePreview",props:{data:String}},b={};var R=f(x,F,I,!1,O,null,null,null);function O(e){for(let s in b)this[s]=b[s]}var E=function(){return R.exports}(),L=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"k-kit-form",on:{input:function(r){return e.somethingChanged()}}},[e.errors.length?t("k-box",{staticClass:"k-kit-form--note",attrs:{theme:"negative"}},[t("k-icon",{attrs:{type:"alert"}}),e._l(e.errors,function(r){return t("p",[e._v(e._s(r))])})],2):e._e(),e.hasResponse?t("k-box",{staticClass:"k-kit-form--note",attrs:{theme:"positive"}},[t("k-icon",{attrs:{type:"check"}}),t("p",{domProps:{innerHTML:e._s(e.successMessage)}})],1):e._e(),t("k-form",[t("k-grid",{staticClass:"title-field"},[t("k-column",[t("k-text-field",{attrs:{name:"title",label:e.$t("reporter.form.field.title"),required:""},model:{value:e.issue.title,callback:function(r){e.$set(e.issue,"title",r)},expression:"issue.title"}})],1)],1),t("tabs",[t("tab",{attrs:{title:e.$t("reporter.tab.write")}},[t("k-fieldset",{attrs:{fields:e.fields},on:{submit:function(r){return r.preventDefault(),e.checkForm(r)}},model:{value:e.issue.formFields,callback:function(r){e.$set(e.issue,"formFields",r)},expression:"issue.formFields"}})],1),t("tab",{attrs:{title:e.$t("reporter.tab.preview")}},[t("issue-preview",{attrs:{data:e.previewData}})],1)],1),t("k-line-field"),t("k-button",{class:{"is-loading":e.loading},attrs:{disabled:e.loading,icon:e.buttonIcon},on:{click:e.checkForm}},[e._v(" "+e._s(e.$t("reporter.form.button.save"))+" ")])],1)],1)},M=[],K="";const P={name:"IssueForm",components:{IssuePreview:E,Tabs:S,Tab:T},props:{fields:{type:Object},previewData:{type:String}},computed:{hasResponse(){return Object.keys(this.response).length>1},buttonIcon(){return this.loading?"loader":"check"},successMessage(){return this.$t("reporter.form.success",{issueLink:this.issueLink})},issueLink(){const e=this.response.issueUrl,s=this.response.issueId;return this.$t("reporter.form.issue.link",{issueLink:e,issueId:s})}},data(){return{errors:[],response:{},loading:!1,previewClicked:!1,dirty:!0,previewData:{},issue:{title:null,formFields:{}}}},mounted(){const e=this.$el.querySelectorAll(".vue-tab")[1];e.addEventListener("click",()=>{this.previewClicked&&this.loadPreview(),this.previewClicked=!0}),e.addEventListener("mouseenter",()=>{this.dirty&&this.loadPreview()}),this.$el.querySelectorAll(".vue-tab")[0].addEventListener("click",()=>{this.dirty=!1,this.previewClicked=!1})},methods:{somethingChanged(){this.dirty=!0},loadPreview(){this.$api.post("reporter/report/preview",this.issue).then(s=>{this.previewData=s,this.dirty=!1})},checkForm(){this.errors=[],!this.issue.title&&this.issue.title<3&&this.errors.push(this.$t("reporter.form.error.title")),this.errors.length||this.submit()},submit(){this.loading=!0,this.$api.post("reporter/report",this.issue).then(s=>{this.response=s,this.loading=!1,this.issue={}},s=>{this.errors.push(this.$t(s)),this.loading=!1,this.response={}})}}},$={};var j=f(P,L,M,!1,q,null,null,null);function q(e){for(let s in $)this[s]=$[s]}var k=function(){return j.exports}(),D=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("k-inside",[t("k-view",{staticClass:"k-issue-tracker-view"},[t("k-header",[e._v(e._s(e.$t("reporter.headline")))]),t("k-text",[e._v(e._s(e.$t("reporter.description")))]),t("issue-form",{attrs:{fields:e.fields}})],1)],1)},V=[];const N={components:{IssueForm:k},props:{fields:Object},data(){return{fields:{}}},async created(){this.$api.get("reporter/fields").then(e=>{this.fields=e})}},g={};var U=f(N,D,V,!1,A,null,null,null);function A(e){for(let s in g)this[s]=g[s]}var X=function(){return U.exports}(),z=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("section",[t("header",{staticClass:"k-section-header"},[t("k-headline",[e._v(" "+e._s(e.headline)+" ")])],1),t("issue-form",{attrs:{fields:e.fields}})],1)},H=[],Q="";const W={components:{IssueForm:k},props:{fields:Object,headline:String},data(){return{fields:{}}},async created(){this.$api.get("reporter/fields").then(e=>{this.fields=e})}},w={};var B=f(W,z,H,!1,G,null,null,null);function G(e){for(let s in w)this[s]=w[s]}var J=function(){return B.exports}();panel.plugin("gearsdigital/kirby-reporter",{components:{"k-reporter-view":X},sections:{reporter:J}})})();})(); diff --git a/index.php b/index.php index 8076c86..736c298 100755 --- a/index.php +++ b/index.php @@ -2,20 +2,23 @@ use Kirby\Cms\App as Kirby; use Kirby\Cms\Blueprint; -use KirbyReporter\Client\CreateClient; -use KirbyReporter\Client\CreateVendor; -use KirbyReporter\Client\ErrorResponse; -use KirbyReporter\Client\PayloadInterceptor; +use Kirby\Cms\Response; +use KirbyReporter\Model\FormData; +use KirbyReporter\Report\ReportClient; +use KirbyReporter\Report\ReportTemplateParser; +use KirbyReporter\Vendor\Vendor; @include_once __DIR__.'/vendor/autoload.php'; -if (empty(option('kirby-reporter.enabled', false)) === true) { +if (empty(option('kirby-reporter.enabled', false)) === true + // this is only neccessary to run tests in CI env + && !getenv("KIRBY_REPORTER_TEST")) { return false; } $url = option('kirby-reporter.repository'); $token = option('kirby-reporter.token'); -$bitbucketUser = option('kirby-reporter.bitbucket.user'); +$user = option('kirby-reporter.bitbucket.user'); Kirby::plugin('gearsdigital/kirby-reporter', [ 'areas' => [ @@ -53,27 +56,42 @@ [ 'pattern' => 'reporter/report', 'method' => 'post', - 'action' => function () use ($url, $token, $bitbucketUser) { + 'action' => function () use ($url, $token, $user) { try { - $isPreview = get('preview'); - $requestBody = kirby()->request()->body()->data(); - $vendor = new CreateVendor($url); - $client = new CreateClient($vendor, $token, $bitbucketUser); - $payload = new PayloadInterceptor($requestBody); + // get body from post request + $requestData = kirby()->request()->body()->data(); - if ($isPreview) { - return json_encode($payload->renderIssueTemplate()); - } + // create formdata model (to ensure shape of form data) + $formData = new FormData($requestData); - $response = $client->api->createIssue($payload->get()); + // detect the current vendor based on given config url + $vendor = new Vendor($url, $token, $user); - return json_encode($response); + // create a report client which is responsible for everything related to the detected vendor + $client = new ReportClient($vendor); + + // creates a report based on created client + return $client->createReport($formData)->toJson(); } catch (Exception $e) { - $errorResponse = new ErrorResponse($e); + return new Response(json_encode($e->getMessage()), 'application/json', $e->getCode()); + } + } + ], + [ + 'pattern' => 'reporter/report/preview', + 'method' => 'post', + 'action' => function () use ($url, $token, $user) { + $requestData = kirby()->request()->body()->data(); + $formData = new FormData($requestData); + if (isset($formData->getFormFields()['description'])) { + $parsedTemplate = (new class { + use ReportTemplateParser; + })->parseTemplate($formData->getFormFields()); - return json_encode($errorResponse); + return new Response(json_encode(trim($parsedTemplate)), 'application/json'); } - }, + return new Response(null, 'application/json', 204); + } ], [ 'pattern' => 'reporter/fields', diff --git a/lib/Client/BitbucketCloud.php b/lib/Client/BitbucketCloud.php deleted file mode 100644 index 3d6569e..0000000 --- a/lib/Client/BitbucketCloud.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class BitbucketCloud extends Client implements ClientInterface -{ - private string $urlTemplate = "https://api.bitbucket.org/2.0/repositories/{user}/{repo}/issues"; - - public function __construct(CreateVendor $vendor, $accessToken, $user = null) - { - parent::__construct($vendor, $accessToken, $this->urlTemplate, $user); - } - - public function createIssue(array $requestBody): ResponseMapper - { - $mapper = new RequestDataMapper($requestBody, [ - 'description' => ['content.raw'], - ]); - $request = $this->post($this->getIssueUrlTemplate(), $mapper->getMappedData(), [ - "Authorization" => "Basic ".$this->getBasicAuth(), - ]); - - $response = new Response($request); - $url = $response->body['repository']['links']['html']['href'].'/issues/'.$response->body['id']; - $id = $response->body['id']; - $status = $response->status; - - return new ResponseMapper($url, $id, $status); - } - - private function getBasicAuth(): string - { - return base64_encode($this->getUser().':'.$this->getAccessToken()); - } -} diff --git a/lib/Client/BitbucketReport.php b/lib/Client/BitbucketReport.php new file mode 100644 index 0000000..746c8dc --- /dev/null +++ b/lib/Client/BitbucketReport.php @@ -0,0 +1,55 @@ +vendor = $vendor; + } + + public final function report(FormData $reportData): ReportResponse + { + $url = $this->expandUrl($this->urlTemplate, [ + "user" => $this->vendor->getOwner(), + "repo" => $this->vendor->getRepository(), + ]); + + $reportData = [ + "title" => $reportData->getTitle(), + "description" => $this->parseTemplate($reportData->getFormFields()), + ]; + + $header = ["Authorization" => "Basic ".$this->getBasicAuth()]; + $request = $this->post($url, $reportData, $header); + + $status = $request->getStatusCode(); + $response = json_decode($request->getBody()->getContents(), true); + $issueId = $response['id']; + $issueUrl = $response['repository']['links']['html']['href'].'/issues/'.$issueId; + + return new ReportResponse($status, $issueUrl, $issueId); + } + + private function getBasicAuth(): string + { + return base64_encode($this->vendor->getUser().':'.$this->vendor->getToken()); + } +} diff --git a/lib/Client/Client.php b/lib/Client/Client.php deleted file mode 100644 index b8ced7d..0000000 --- a/lib/Client/Client.php +++ /dev/null @@ -1,100 +0,0 @@ -vendor = $vendor; - $this->setUrl($urlTemplate); - $this->setToken($accessToken); - - if ($user) { - $this->user = $user; - } - } - - /** - * Expanded url template. - * - * @param string $url - * - * @throws Exception - */ - private function setUrl(string $url): void - { - $this->issueUrl = $this->expandUrl( - $url, - [ - 'user' => $this->vendor->owner, - 'repo' => $this->vendor->repository, - ] - ); - } - - /** - * @throws Exception - */ - private function setToken($accessToken): void - { - if (is_null($accessToken)) { - throw new Exception('reporter.form.error.optionNotFound.token'); - } - $this->accessToken = $accessToken; - } - - /** - * Allow children to get the issue url (template). - * - * @return string|null - */ - protected function getIssueUrlTemplate(): ?string - { - return $this->issueUrl; - } - - /** - * Allow children to get the access token. - * - * @return null|string - */ - protected function getAccessToken(): ?string - { - return $this->accessToken; - } - - /** - * Return detected or specified user. - * - * @return string|null - */ - protected function getUser(): ?string - { - if ($this->user != null) { - return $this->user; - } - - return $this->vendor->owner; - } -} diff --git a/lib/Client/ClientInterface.php b/lib/Client/ClientInterface.php deleted file mode 100644 index f45d63f..0000000 --- a/lib/Client/ClientInterface.php +++ /dev/null @@ -1,8 +0,0 @@ - - */ -class CreateClient -{ - public $api; - - /** - * @throws Exception - */ - public function __construct(CreateVendor $vendor, $token, $user) - { - switch ($vendor->name) { - case 'github': - $this->api = new Github($vendor, $token); - break; - case 'gitlab': - $this->api = new Gitlab($vendor, $token); - break; - case 'bitbucket': - $this->api = new BitbucketCloud($vendor, $token, $user); - break; - } - } -} diff --git a/lib/Client/CreateVendor.php b/lib/Client/CreateVendor.php deleted file mode 100644 index 0906a5a..0000000 --- a/lib/Client/CreateVendor.php +++ /dev/null @@ -1,113 +0,0 @@ - - */ -class CreateVendor -{ - - use Config; - - /** - * This is root url from which all other properties - * are extracted. - * - * Must be this format: https://vender.com/owner/repository - * - * @var null | string - */ - public $url = null; - - /** - * Resolved Provider. - * - * @var null|string - */ - public $name = null; - - /** - * Resolved repository owner. - * - * @var null|string - */ - public $owner = null; - - /** - * Resolved repository. - * - * @var null|string - */ - public $repository = null; - - /** - * Vendor constructor. - * - * @param string $url - * - * @throws Exception reporter.form.error.platform.unsupported - */ - public function __construct($url) - { - $this->setUrl($url); - $this->name = $this->extractProviderName(); - $this->owner = $this->getPathSegment(); - $this->repository = $this->getPathSegment(1); - if (!$this->isSupportedPlatform()) { - throw new Exception('reporter.form.error.platform.unsupported', 501); - } - } - - private function setUrl($url): void - { - if (!filter_var($url, FILTER_VALIDATE_URL)) { - throw new Exception('reporter.form.error.optionNotFound.url'); - } - $this->url = $url; - } - - private function extractProviderName() - { - $hostname = parse_url($this->url, PHP_URL_HOST); - if (preg_match( - '/(?P[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', - $hostname, - $regs - ) - ) { - return strtok($regs['domain'], '.'); - } - - return null; - } - - private function getPathSegment(int $positon = 0): string - { - $urlPath = parse_url($this->url, PHP_URL_PATH); - $pathArray = explode('/', ltrim($urlPath, '/')); - $fragment = $pathArray[$positon]; - if (is_null($fragment)) { - return $this->url; - } - - return $fragment; - } - - private function isSupportedPlatform(): bool - { - return in_array($this->name, $this->providers); - } -} diff --git a/lib/Client/ErrorResponse.php b/lib/Client/ErrorResponse.php deleted file mode 100644 index 1fac392..0000000 --- a/lib/Client/ErrorResponse.php +++ /dev/null @@ -1,35 +0,0 @@ -setStatus($exception->getCode()); - $this->setMessage($exception->getMessage()); - } - - /** - * @param mixed $status - */ - public function setStatus($status): void - { - $this->status = $status; - } - - public function setMessage($message) - { - $this->message = $message; - } -} diff --git a/lib/Client/Github.php b/lib/Client/Github.php deleted file mode 100644 index 17b59b2..0000000 --- a/lib/Client/Github.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class Github extends Client implements ClientInterface -{ - private string $urlTemplate = "https://api.github.com/repos/{user}/{repo}/issues"; - - public function __construct(CreateVendor $vendor, $accessToken) - { - parent::__construct($vendor, $accessToken, $this->urlTemplate); - } - - public function createIssue(array $requestBody): ResponseMapper - { - $mapper = new RequestDataMapper($requestBody, [ - 'title' => 'title', - 'description' => 'body', - ]); - - $request = $this->post($this->getIssueUrlTemplate(), $mapper->getMappedData(), [ - "Authorization" => "token ".$this->getAccessToken(), - ]); - - $response = new Response($request); - $url = $response->body['html_url']; - $id = $response->body['number']; - $status = $response->status; - - return new ResponseMapper($url, $id, $status); - } -} diff --git a/lib/Client/GithubReport.php b/lib/Client/GithubReport.php new file mode 100644 index 0000000..4c7ca42 --- /dev/null +++ b/lib/Client/GithubReport.php @@ -0,0 +1,50 @@ +vendor = $vendor; + } + + public final function report(FormData $reportData): ReportResponse + { + $url = $this->expandUrl($this->urlTemplate, [ + "user" => $this->vendor->getOwner(), + "repo" => $this->vendor->getRepository(), + ]); + + $reportData = [ + "title" => $reportData->getTitle(), + "body" => $this->parseTemplate($reportData->getFormFields()), + ]; + + $header = ["Authorization" => "token ".$this->vendor->getToken()]; + $request = $this->post($url, $reportData, $header); + $body = json_decode($request->getBody()->getContents(), true); + + $status = $request->getStatusCode(); + $issueId = $body['number']; + $issueUrl = $body['html_url']; + + return new ReportResponse($status, $issueUrl, $issueId); + } +} diff --git a/lib/Client/Gitlab.php b/lib/Client/Gitlab.php deleted file mode 100644 index 520ea03..0000000 --- a/lib/Client/Gitlab.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Gitlab extends Client implements ClientInterface -{ - private string $urlTemplate = "https://gitlab.com/api/v4/projects/{user}%2F{repo}/issues"; - - public function __construct(CreateVendor $vendor, $accessToken) - { - parent::__construct($vendor, $accessToken, $this->urlTemplate); - } - - public function createIssue(array $requestBody): ResponseMapper - { - $request = $this->post( - $this->getIssueUrlTemplate(), - $requestBody, - [ - "Private-Token" => $this->getAccessToken(), - ] - ); - - $response = new Response($request); - $url = $response->body['web_url']; - $id = $response->body['iid']; - $status = $response->status; - - return new ResponseMapper($url, $id, $status); - } -} diff --git a/lib/Client/GitlabReport.php b/lib/Client/GitlabReport.php new file mode 100644 index 0000000..75e50eb --- /dev/null +++ b/lib/Client/GitlabReport.php @@ -0,0 +1,50 @@ +vendor = $vendor; + } + + public final function report(FormData $reportData): ReportResponse + { + $url = $this->expandUrl($this->urlTemplate, [ + "user" => $this->vendor->getOwner(), + "repo" => $this->vendor->getRepository(), + ]); + + $reportData = [ + "title" => $reportData->getTitle(), + "description" => $this->parseTemplate($reportData->getFormFields()), + ]; + + $header = ["Private-Token" => $this->vendor->getToken()]; + $request = $this->post($url, $reportData, $header); + $body = json_decode($request->getBody()->getContents(), true); + + $status = $request->getStatusCode(); + $issueId = $body['iid']; + $issueUrl = $body['web_url']; + + return new ReportResponse($status, $issueUrl, $issueId); + } +} diff --git a/lib/Client/PayloadInterceptor.php b/lib/Client/PayloadInterceptor.php deleted file mode 100644 index cf47b5f..0000000 --- a/lib/Client/PayloadInterceptor.php +++ /dev/null @@ -1,44 +0,0 @@ -payload = $payload; - } - - public function get(): array - { - return [ - 'title' => (string)$this->payload['title'], - 'description' => (string)$this->renderIssueTemplate(), - ]; - } - - public function renderIssueTemplate(): string - { - return Tpl::load( - $this->getTemplate(), - ['fields' => $this->payload['formFields']] - ); - } - - private function getTemplate(): string - { - $templateRoot = kirby()->root('templates'); - $pluginRoot = kirby()->plugin($this->pluginName); - $templatePath = file_exists($templateRoot . DS . $this->template) - ? $templateRoot - : $pluginRoot->root() . DS . "templates"; - - return $templatePath . DS . $this->template; - } -} diff --git a/lib/Client/RequestDataMapper.php b/lib/Client/RequestDataMapper.php deleted file mode 100644 index fe39432..0000000 --- a/lib/Client/RequestDataMapper.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -class RequestDataMapper -{ - use ArrayTransformator; - - public $mappedData; - - public function __construct(array $responseBody, array $fieldMap) - { - $this->mappedData = $this->transform($responseBody, $fieldMap); - } - - public function getMappedData() - { - return $this->mappedData; - } -} diff --git a/lib/Client/Response.php b/lib/Client/Response.php deleted file mode 100644 index f83c1f0..0000000 --- a/lib/Client/Response.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ -class Response -{ - /** - * @var int - */ - public $status; - - /** - * @var array - */ - public $body; - - public function __construct(ResponseInterface $response) - { - $this->status = $response->getStatusCode(); - $this->body = json_decode($response->getBody()->getContents(), true); - } -} diff --git a/lib/Client/ResponseMapper.php b/lib/Client/ResponseMapper.php deleted file mode 100644 index c254984..0000000 --- a/lib/Client/ResponseMapper.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -class ResponseMapper -{ - - public int $status; - - public string $issueId; - - public string $issueUrl; - - public function __construct($issueUrl, $issueId, $status) - { - $this->setStatus($status); - $this->setIssueUrl($issueUrl); - $this->setIssueId($issueId); - } - - public function setIssueId($id) - { - $this->issueId = $id; - } - - public function setIssueUrl($url) - { - $this->issueUrl = $url; - } - - public function setStatus($status) - { - $this->status = $status; - } - -} diff --git a/lib/Client/ResponseModel.php b/lib/Client/ResponseModel.php deleted file mode 100644 index 72d7407..0000000 --- a/lib/Client/ResponseModel.php +++ /dev/null @@ -1,27 +0,0 @@ -status = $status; - } - - public function setIssueId($rissueId): void - { - $this->rissueId = $rissueId; - } - - public function setIssueUrl($issueUrl): void - { - $this->issueUrl = $issueUrl; - } - -} diff --git a/lib/Exception/MissingTokenException.php b/lib/Exception/MissingTokenException.php new file mode 100644 index 0000000..439ff4d --- /dev/null +++ b/lib/Exception/MissingTokenException.php @@ -0,0 +1,8 @@ +setMessage('reporter.form.error.badRequest'); + } elseif ($code == 401 || $code == 403) { + $this->setMessage('reporter.form.error.authFailed'); + } elseif ($code == 404) { + $this->setMessage('reporter.form.error.repoNotFound'); + } elseif($code == 0 || $code > 404) { + $this->setMessage('reporter.form.error.apiCommunicationError'); + } + } + + public function setMessage(string $message): void + { + $this->message = $message; + } +} diff --git a/lib/Exception/UnsupportedPlatformException.php b/lib/Exception/UnsupportedPlatformException.php new file mode 100644 index 0000000..d6752d8 --- /dev/null +++ b/lib/Exception/UnsupportedPlatformException.php @@ -0,0 +1,7 @@ + - */ -trait ArrayTransformator -{ - - /** - * Transform array keys based on key map. - * - * This method will replace all array keys in given $input by using $hashMap as reference. - * If the $input value is an array it will check for an "dot path" and create a nested array structure. - * - * @param array $input Datasource on which the map is applied - * @param array $hashMap Key-Value store of key to be replaced - * - * @return array - * @example - * - * $map = ['title' => 'name']; - * $input = ['title' => 'Hello World!'] - * - * -> ['name' => 'Hello World!'] - */ - public function transform(array $input, array $hashMap): array - { - if (empty($hashMap) || empty($input)) { - return $input; - } - foreach ($hashMap as $key => $value) { - if ($key != $value) { - if (is_array($value)) { - $this->replaceByPath($input, $value[0], $input[$key]); - } else { - $this->replace($input, $key, $value); - } - unset($input[$key]); - } - } - - return $input; - } - - /** - * Replace key in array - * - * @param array $haystack - * @param string $needle - * @param string $value - * - * @return array - */ - private function replace(array &$haystack, string $needle, $value): array - { - if ($needle != $value) { - $haystack[$value] = $haystack[$needle]; - } - - return $haystack; - } - - /** - * Replace by path - * - * @param $arr - * @param $path - * @param $value - * @param string $separator - */ - private function replaceByPath(&$arr, $path, $value, $separator = '.') - { - $keys = explode($separator, $path); - foreach ($keys as $key) { - $arr = &$arr[$key]; - } - $arr = $value; - } -} diff --git a/lib/Mixins/Config.php b/lib/Mixins/Config.php deleted file mode 100644 index 9bcf96e..0000000 --- a/lib/Mixins/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -trait Request -{ - /** - * Make a post request to given $url; - * - * @param string $url - * @param $body - * @param $headers - * - * @return ResponseInterface - */ - public function post($url, $body, $headers): ResponseInterface - { - // it might make sense to refactor this if neccessary - $client = new Client(); - $headers['Content-Type'] = 'application/json'; - - return $client->post( - $url, - [ - 'headers' => $headers, - 'json' => $body, - ] - ); - } -} diff --git a/lib/Model/FormData.php b/lib/Model/FormData.php new file mode 100644 index 0000000..bd38bc7 --- /dev/null +++ b/lib/Model/FormData.php @@ -0,0 +1,35 @@ +setTitle($formData['title'] ?? ''); + $this->setFormFields($formData['formFields'] ?? ['formFields' => []]); + } + + public function getTitle(): string + { + return $this->title; + } + + private function setTitle(string $title): void + { + $this->title = $title; + } + + public function getFormFields(): array + { + return $this->formFields; + } + + private function setFormFields(array $formFields): void + { + $this->formFields = $formFields; + } +} diff --git a/lib/Report/ReportClient.php b/lib/Report/ReportClient.php new file mode 100644 index 0000000..b7895a1 --- /dev/null +++ b/lib/Report/ReportClient.php @@ -0,0 +1,43 @@ + + */ +class ReportClient +{ + /** + * @var BitbucketReport|GithubReport|GitlabReport + */ + public $client; + + public function __construct(Vendor $vendor) + { + if ($vendor->getName() == 'bitbucket') { + $this->client = new BitbucketReport($vendor); + } + + if ($vendor->getName() == 'github') { + $this->client = new GithubReport($vendor); + } + + if ($vendor->getName() == 'gitlab') { + $this->client = new GitlabReport($vendor); + } + } + + public final function createReport(FormData $formData): ReportResponse + { + return $this->client->report($formData); + } +} diff --git a/lib/Report/ReportInterface.php b/lib/Report/ReportInterface.php new file mode 100644 index 0000000..452a942 --- /dev/null +++ b/lib/Report/ReportInterface.php @@ -0,0 +1,14 @@ + + */ +interface ReportInterface +{ + public function report(FormData $reportData): ReportResponse; +} diff --git a/lib/Report/ReportResponse.php b/lib/Report/ReportResponse.php new file mode 100644 index 0000000..d68c430 --- /dev/null +++ b/lib/Report/ReportResponse.php @@ -0,0 +1,48 @@ + + */ +class ReportResponse +{ + public int $status; + public string $issueId; + public string $issueUrl; + + public function __construct(int $status, string $issueUrl, string $issueId) + { + $this->setStatus($status); + $this->setIssueUrl($issueUrl); + $this->setIssueId($issueId); + } + + public final function toJson(): string + { + return json_encode([ + "status" => $this->status, + "issueUrl" => $this->issueUrl, + "issueId" => $this->issueId, + ]); + } + + private function setIssueId(string $id): void + { + $this->issueId = $id; + } + + private function setIssueUrl(string $url): void + { + $this->issueUrl = $url; + } + + private function setStatus(int $status): void + { + $this->status = $status; + } + +} diff --git a/lib/Report/ReportTemplateParser.php b/lib/Report/ReportTemplateParser.php new file mode 100644 index 0000000..e6355bf --- /dev/null +++ b/lib/Report/ReportTemplateParser.php @@ -0,0 +1,25 @@ +getReportTemplate(), ['fields' => $templateData]); + } + + private function getReportTemplate(): string + { + $template = 'reporter.php'; + $templateRoot = kirby()->root('templates'); + $pluginRoot = kirby()->plugin($this->pluginName); + $templatePath = file_exists($templateRoot.DS.$template) ? $templateRoot : $pluginRoot->root().DS."templates"; + + return $templatePath.DS.$template; + } +} diff --git a/lib/Mixins/Expander.php b/lib/Traits/Expander.php similarity index 66% rename from lib/Mixins/Expander.php rename to lib/Traits/Expander.php index c2ac92a..39f44be 100644 --- a/lib/Mixins/Expander.php +++ b/lib/Traits/Expander.php @@ -1,6 +1,6 @@ */ trait Expander @@ -22,10 +24,9 @@ trait Expander * @return string * @throws Exception */ - private function expandUrl(string $template, array $data) + public final function expandUrl(string $template, array $data): string { $tpl = new UriTemplate($template); - - return $tpl->expand($data); + return rtrim($tpl->expand($data), '/'); } } diff --git a/lib/Traits/Request.php b/lib/Traits/Request.php new file mode 100644 index 0000000..30766d4 --- /dev/null +++ b/lib/Traits/Request.php @@ -0,0 +1,43 @@ + + */ +trait Request +{ + private ?Client $client = null; + + /** @throws ReportClientException */ + public final function post(string $url, array $body, array $headers): ResponseInterface + { + if (!$this->client) { + $this->client = new Client(); + } + + $headers['Content-Type'] = 'application/json'; + + try { + return $this->client->post($url, [ + 'headers' => $headers, + 'json' => $body, + ]); + } catch (GuzzleException $e) { + throw new ReportClientException($e->getMessage(), $e->getCode()); + } + } + + public function setClient(Client $client): void + { + $this->client = $client; + } +} diff --git a/lib/Vendor/Vendor.php b/lib/Vendor/Vendor.php new file mode 100644 index 0000000..079a292 --- /dev/null +++ b/lib/Vendor/Vendor.php @@ -0,0 +1,156 @@ + + */ +class Vendor +{ + use Vendors; + + private string $url; + + private string $name; + + private string $token; + + private string $owner; + + private string $repository; + + private string $user; + + /** + * @throws UnsupportedPlatformException|OptionNotFoundException + */ + public function __construct(?string $url, ?string $token, ?string $user = null) + { + $this->setUrl($url); + $this->setToken($token); + $this->setName($this->extractProviderName()); + $this->setOwner($this->getPathSegment()); + $this->setRepository($this->getPathSegment(1)); + $this->setUser($user); + + if (!$this->isSupportedPlatform()) { + throw new UnsupportedPlatformException('reporter.form.error.platform.unsupported', 400); + } + } + + public function getName(): ?string + { + return $this->name; + } + + private function setName(?string $name): void + { + $this->name = $name; + } + + public function getUrl(): string + { + return $this->url; + } + + /** @throws OptionNotFoundException */ + private function setUrl(?string $url): void + { + if ($this->isDefined($url)) { + throw new OptionNotFoundException('reporter.form.error.optionNotFound.url', 400); + } + + $this->url = $url; + } + + public function getToken(): string + { + return $this->token; + } + + /** @throws OptionNotFoundException */ + private function setToken(?string $token): void + { + if ($this->isDefined($token)) { + throw new OptionNotFoundException('reporter.form.error.optionNotFound.token', 400); + } + + $this->token = $token; + } + + public function getOwner(): string + { + return $this->owner; + } + + private function setOwner(string $owner): void + { + $this->owner = $owner; + } + + public function getRepository(): string + { + return $this->repository; + } + + private function setRepository(string $repository): void + { + $this->repository = $repository; + } + + private function setUser(?string $user): void + { + $this->user = $user == null ? $this->getOwner() : $user; + } + + public function getUser(): string + { + return $this->user; + } + + private function extractProviderName(): ?string + { + $hostname = parse_url($this->url, PHP_URL_HOST); + if (preg_match( + '/(?P[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', + $hostname, + $regs + ) + ) { + return strtok($regs['domain'], '.'); + } + + return null; + } + + private function getPathSegment(int $positon = 0): string + { + $urlPath = parse_url($this->url, PHP_URL_PATH); + $pathArray = explode('/', ltrim($urlPath, '/')); + $fragment = $pathArray[$positon]; + if (is_null($fragment)) { + return $this->url; + } + + return $fragment; + } + + private function isSupportedPlatform(): bool + { + return in_array($this->name, $this->providers); + } + + private function isDefined(?string $value): bool + { + if (empty($value)) { + return true; + } + + return false; + } +} diff --git a/lib/Vendor/Vendors.php b/lib/Vendor/Vendors.php new file mode 100644 index 0000000..6bbd618 --- /dev/null +++ b/lib/Vendor/Vendors.php @@ -0,0 +1,18 @@ + - */ -trait ArrayTransformator -{ - - /** - * Transform array keys based on key map. - * - * This method will replace all array keys in given $input by using $hashMap as reference. - * If the $input value is an array it will check for an "dot path" and create a nested array structure. - * - * @param array $input Datasource on which the map is applied - * @param array $hashMap Key-Value store of key to be replaced - * - * @return array - * @example - * - * $map = ['title' => 'name']; - * $input = ['title' => 'Hello World!'] - * - * -> ['name' => 'Hello World!'] - */ - public function transform(array $input, array $hashMap): array - { - if (empty($hashMap) || empty($input)) { - return $input; - } - foreach ($hashMap as $key => $value) { - if ($key != $value) { - if (is_array($value)) { - $this->replaceByPath($input, $value[0], $input[$key]); - } else { - $this->replace($input, $key, $value); - } - unset($input[$key]); - } - } - - return $input; - } - - /** - * Replace key in array - * - * @param array $haystack - * @param string $needle - * @param string $value - * - * @return array - */ - private function replace(array &$haystack, string $needle, $value): array - { - if ($needle != $value) { - $haystack[$value] = $haystack[$needle]; - } - - return $haystack; - } - - /** - * Replace by path - * - * @param $arr - * @param $path - * @param $value - * @param string $separator - */ - private function replaceByPath(&$arr, $path, $value, $separator = '.') - { - $keys = explode($separator, $path); - foreach ($keys as $key) { - $arr = &$arr[$key]; - } - $arr = $value; - } -} diff --git a/lib/mixins/Config.php b/lib/mixins/Config.php deleted file mode 100644 index 9bcf96e..0000000 --- a/lib/mixins/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -trait Expander -{ - /** - * Utilizes RFC 6570 (Level 4) Url expansion. - * - * @param string $template - * @param array $data - * - * @return string - * @throws Exception - */ - private function expandUrl(string $template, array $data) - { - $tpl = new UriTemplate($template); - - return $tpl->expand($data); - } -} diff --git a/lib/mixins/Request.php b/lib/mixins/Request.php deleted file mode 100644 index 91238a0..0000000 --- a/lib/mixins/Request.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -trait Request -{ - /** - * Make a post request to given $url; - * - * @param string $url - * @param $body - * @param $headers - * - * @return ResponseInterface - */ - public function post($url, $body, $headers): ResponseInterface - { - // it might make sense to refactor this if neccessary - $client = new Client(); - $headers['Content-Type'] = 'application/json'; - - return $client->post( - $url, - [ - 'headers' => $headers, - 'json' => $body, - ] - ); - } -} diff --git a/src/components/IssueForm.vue b/src/components/IssueForm.vue index cb12d1a..f9e2b21 100644 --- a/src/components/IssueForm.vue +++ b/src/components/IssueForm.vue @@ -109,7 +109,7 @@ export default { this.dirty = true; }, loadPreview() { - const request = this.$api.post('reporter/report?preview=true', this.issue); + const request = this.$api.post('reporter/report/preview', this.issue); request.then(response => { this.previewData = response; this.dirty = false; @@ -130,37 +130,17 @@ export default { const request = this.$api.post('reporter/report', this.issue); - request.then(response => { - if (response.status >= 200 && response.status < 300) { + request.then( + response => { this.response = response; + this.loading = false; this.issue = {}; - this.$store.dispatch("notification/success", ":)"); - } else if (response.status === 401) { - this.errors.push(this.$t('reporter.form.error.authFailed')); - this.response = {}; - } else if (response.status === 400) { - this.errors.push(response.message); - this.response = {}; - } else if (response.status === 404) { - this.errors.push(this.$t('reporter.form.error.repoNotFound')); - this.response = {}; - } - // 501 is defined by this appplication -> CreateVendor.php:70 - else if (response.status === 501) { - this.errors.push(this.$t('reporter.form.error.platform.unsupported')); - this.response = {}; - } else { + }, + reject => { + this.errors.push(this.$t(reject)); + this.loading = false; this.response = {}; - } - - this.loading = false; - }); - - request.catch((e) => { - this.errors.push(this.$t(e.message)); - this.loading = false; - this.response = {}; - }); + }); } } } diff --git a/templates/reporter.php b/templates/reporter.php index ea88fae..c710162 100644 --- a/templates/reporter.php +++ b/templates/reporter.php @@ -1,3 +1,3 @@ ## Issue Template - + diff --git a/tests/ArrayTransformatorTest.php b/tests/ArrayTransformatorTest.php deleted file mode 100644 index c48281e..0000000 --- a/tests/ArrayTransformatorTest.php +++ /dev/null @@ -1,90 +0,0 @@ -arrayTransformatorTraitMock = $this->getMockForTrait(ArrayTransformator::class); - } - - protected function tearDown(): void - { - $this->arrayTransformatorTraitMock = null; - } - - /** - * @dataProvider arrayProvider - * - * @param $expected - * @param $data - * @param $map - */ - public function testTransform($expected, $data, $map) - { - $this->assertEquals($expected, $this->arrayTransformatorTraitMock->transform($data, $map)); - } - - public function arrayProvider() - { - return [ - 'empty-arrays' => [ - [], // $expected - [], // $input - [], // $map - ], - [ - ['lastname'], - ['lastname'], - [], - ], - [ - ['lastname' => 'peter'], - ['lastname' => 'peter'], - [], - ], - [ - ['name' => 'peter'], - ['lastname' => 'peter'], - ['lastname' => 'name'], - ], - 'map-same-key' => [ - ['lastname' => 'peter'], - ['lastname' => 'peter'], - ['lastname' => 'lastname'], - ], - [ - ['name' => 'peter', 'street' => 'downing street 10'], - ['lastname' => 'peter', 'street' => 'downing street 10'], - ['lastname' => 'name'], - ], - [ - ['name' => 'peter', 'road' => 'downing street 10'], - ['lastname' => 'peter', 'street' => 'downing street 10'], - ['lastname' => 'name', 'street' => 'road'], - ], - "map-properties" => [ - ['name' => 'peter', 'content' => 'downing street 10'], - ['title' => 'peter', 'description' => 'downing street 10'], - ['title' => 'name', 'description' => ['content']], - ], - "nested-map-properties" => [ - ['name' => 'peter', 'content' => ['raw' => 'downing street 10']], - ['title' => 'peter', 'description' => 'downing street 10'], - ['title' => 'name', 'description' => ['content.raw']], - ], - "deep-nested-map-properties" => [ - ['name' => 'peter', 'content' => ['raw' => ['really' => ['deep' => 'downing street 10']]]], - ['title' => 'peter', 'description' => 'downing street 10'], - ['title' => 'name', 'description' => ['content.raw.really.deep']], - ], - ]; - } -} diff --git a/tests/Client/BitbucketReportTest.php b/tests/Client/BitbucketReportTest.php new file mode 100644 index 0000000..2be42bc --- /dev/null +++ b/tests/Client/BitbucketReportTest.php @@ -0,0 +1,66 @@ +vendor = new Vendor('https://bitbucket.org/test/test-repo', '1234567890', 'test-dev'); + + $this->response = json_encode([ + "id" => 46, + "repository" => [ + "links" => [ + "html" => [ + "href" => "https://bitbucket.org/test/test-repo", + ], + ], + ], + ]); + } + + public function test_should_send_form_data_to_bitbucket_api() + { + $mock = new MockHandler([new Response(201, [], $this->response),]); + $handlerStack = HandlerStack::create($mock); + $client = new Client(['handler' => $handlerStack]); + + $reporter = new BitbucketReport($this->vendor); + $reporter->setClient($client); + $formData = new FormData([ + 'title' => 'Lorem', + 'formFields' => [ + 'description' => 'Test', + ], + ]); + $response = $reporter->report($formData); + + // request + $this->assertEquals("/2.0/repositories/test/test-repo/issues", $mock->getLastRequest()->getUri()->getPath()); + $this->assertEquals('Basic dGVzdC1kZXY6MTIzNDU2Nzg5MA==', $mock->getLastRequest()->getHeader("Authorization")[0]); + $this->assertEquals('application/json', $mock->getLastRequest()->getHeader("Content-Type")[0]); + + // response + $this->assertInstanceOf(ReportResponse::class, $response); + $this->assertEquals(201, $response->status); + $this->assertEquals(46, $response->issueId); + $this->assertEquals("https://bitbucket.org/test/test-repo/issues/46", $response->issueUrl); + } +} diff --git a/tests/Client/GithubReportTest.php b/tests/Client/GithubReportTest.php new file mode 100644 index 0000000..5cdbaed --- /dev/null +++ b/tests/Client/GithubReportTest.php @@ -0,0 +1,59 @@ +vendor = new Vendor('https://github.org/test/test-repo', '1234567890'); + $this->response = json_encode([ + "number" => 46, + "html_url" => "https://github.com/test/test-repo/issues/46", + ]); + } + + public function test_should_send_form_data_to_gitlab_api() + { + $mock = new MockHandler([new Response(201, [], $this->response)]); + $handlerStack = HandlerStack::create($mock); + $client = new Client(['handler' => $handlerStack]); + + $reporter = new GithubReport($this->vendor); + $reporter->setClient($client); + $formData = new FormData([ + 'title' => 'Lorem', + 'formFields' => [ + 'description' => 'Test', + ], + ]); + $response = $reporter->report($formData); + + // request + $this->assertEquals("/repos/test/test-repo/issues", $mock->getLastRequest()->getUri()->getPath()); + $this->assertEquals('token 1234567890', $mock->getLastRequest()->getHeader("Authorization")[0]); + $this->assertEquals('application/json', $mock->getLastRequest()->getHeader("Content-Type")[0]); + + // response + $this->assertInstanceOf(ReportResponse::class, $response); + $this->assertEquals(201, $response->status); + $this->assertEquals(46, $response->issueId); + $this->assertEquals("https://github.com/test/test-repo/issues/46", $response->issueUrl); + } +} diff --git a/tests/Client/GitlabReportTest.php b/tests/Client/GitlabReportTest.php new file mode 100644 index 0000000..32f0336 --- /dev/null +++ b/tests/Client/GitlabReportTest.php @@ -0,0 +1,59 @@ +vendor = new Vendor('https://gitlab.org/test/test-repo', '1234567890'); + $this->response = json_encode([ + "iid" => 46, + "web_url" => "https://gitlab.com/test/test-repo/issues/46", + ]); + } + + public function test_should_send_form_data_to_gitlab_api() + { + $mock = new MockHandler([new Response(201, [], $this->response)]); + $handlerStack = HandlerStack::create($mock); + $client = new Client(['handler' => $handlerStack]); + + $reporter = new GitlabReport($this->vendor); + $reporter->setClient($client); + $formData = new FormData([ + 'title' => 'Lorem', + 'formFields' => [ + 'description' => 'Test', + ], + ]); + $response = $reporter->report($formData); + + // request + $this->assertEquals("/api/v4/projects/test%2Ftest-repo/issues", $mock->getLastRequest()->getUri()->getPath()); + $this->assertEquals('1234567890', $mock->getLastRequest()->getHeader("Private-Token")[0]); + $this->assertEquals('application/json', $mock->getLastRequest()->getHeader("Content-Type")[0]); + + // response + $this->assertInstanceOf(ReportResponse::class, $response); + $this->assertEquals(201, $response->status); + $this->assertEquals(46, $response->issueId); + $this->assertEquals("https://gitlab.com/test/test-repo/issues/46", $response->issueUrl); + } +} diff --git a/tests/CreateVendorTest.php b/tests/CreateVendorTest.php deleted file mode 100644 index 9be2d1c..0000000 --- a/tests/CreateVendorTest.php +++ /dev/null @@ -1,60 +0,0 @@ -assertEquals('github', $vendor->name); - } - - public function test_extract_user_from_url() - { - $vendor = new CreateVendor('https://github.com/gearsdigital/kirby-reporter'); - $this->assertEquals('gearsdigital', $vendor->owner); - } - - public function test_extract_repository_from_url() - { - $vendor = new CreateVendor('https://github.com/gearsdigital/kirby-reporter'); - $this->assertEquals('kirby-reporter', $vendor->repository); - } - - public function test_exception_platform_not_supported() - { - $this->expectExceptionMessage('reporter.form.error.platform.unsupported'); - new CreateVendor('https://lorem.com/gearsdigital/kirby-reporter'); - } - - /** - * @dataProvider valueProvider - * - * @param $value - * - * @throws Exception - */ - public function test_exception_on_missing_url($value) - { - $this->expectExceptionMessage('reporter.form.error.optionNotFound.url'); - new CreateVendor($value); - } - - public function valueProvider() - { - return [ - 'empty-string' => [''], - 'plain-string' => ['lorem'], - 'empty-array' => [[]], - 'empty-null' => [null], - 'empty-false' => [false] - ]; - } - -} diff --git a/tests/Report/ReportClientTest.php b/tests/Report/ReportClientTest.php new file mode 100644 index 0000000..076d7a3 --- /dev/null +++ b/tests/Report/ReportClientTest.php @@ -0,0 +1,104 @@ +assertInstanceOf(BitbucketReport::class, $client->client); + $this->assertTrue(method_exists($client->client, 'report')); + } + + public function test_create_gitlab_client() + { + $vendor = new Vendor('https://gitlab.com/test/test-repo', '1234567890'); + $client = new ReportClient($vendor); + $this->assertInstanceOf(GitlabReport::class, $client->client); + $this->assertTrue(method_exists($client->client, 'report')); + } + + public function test_create_github_client() + { + $vendor = new Vendor('https://github.com/test/test-repo', '1234567890'); + $client = new ReportClient($vendor); + $this->assertInstanceOf(GithubReport::class, $client->client); + $this->assertTrue(method_exists($client->client, 'report')); + } + + public function test_has_report_method() + { + $vendor = new Vendor('https://github.com/test/test-repo', '1234567890'); + $client = new ReportClient($vendor); + $this->assertTrue(method_exists($client, 'createReport')); + } + + public function test_throws_ReportClientException_auth_fail() + { + $this->test_exeption(401, 'reporter.form.error.authFailed'); + } + + public function test_throws_ReportClientException_not_found() + { + $this->test_exeption(404, 'reporter.form.error.repoNotFound'); + } + + public function test_throws_ReportClientException_bad_request() + { + $this->test_exeption(400, 'reporter.form.error.badRequest'); + } + + /** @dataProvider statusCodeProvider */ + public function test_throws_ReportClientException_for_unhandled(int $statusCode) + { + $this->test_exeption($statusCode, 'reporter.form.error.apiCommunicationError'); + } + + public function statusCodeProvider(): array + { + return [ + [405], + [500], + [501], + ]; + } + + private function test_exeption(int $code, string $message) + { + $vendor = new Vendor('https://bitbucket.org/test/test-repo', '1234567890'); + $mock = new MockHandler([new Response($code)]); + $handlerStack = HandlerStack::create($mock); + $client = new Client(['handler' => $handlerStack]); + + $formData = new FormData([]); + $reporter = new BitbucketReport($vendor); + $reporter->setClient($client); + + $this->expectException(ReportClientException::class); + $this->expectExceptionMessage($message); + $this->expectExceptionCode($code); + + $reporter->report($formData); + } +} + diff --git a/tests/Traits/ExpanderTest.php b/tests/Traits/ExpanderTest.php new file mode 100644 index 0000000..8d5bb5d --- /dev/null +++ b/tests/Traits/ExpanderTest.php @@ -0,0 +1,30 @@ +getObjectForTrait(Expander::class); + $template = "https://lorem.com/{test}/{fragment}"; + $expandedTemplate = $expander->expandUrl($template, ['test' => "losabim", "fragment" => "oxygenium"]); + + $this->assertEquals("https://lorem.com/losabim/oxygenium", $expandedTemplate); + } + + public function test_expand_url_with_missing_data() + { + $expander = $this->getObjectForTrait(Expander::class); + $template = "https://lorem.com/{test}/{fragment}"; + $expandedTemplate = $expander->expandUrl($template, ['test' => "losabim"]); + + $this->assertEquals("https://lorem.com/losabim", $expandedTemplate); + } +} diff --git a/tests/Vendor/VendorTest.php b/tests/Vendor/VendorTest.php new file mode 100644 index 0000000..5dd377f --- /dev/null +++ b/tests/Vendor/VendorTest.php @@ -0,0 +1,58 @@ +assertEquals('github', $vendor->getName()); + $this->assertEquals('gearsdigital', $vendor->getUser()); + $this->assertEquals('gearsdigital', $vendor->getOwner()); + $this->assertEquals('kirby-reporter', $vendor->getRepository()); + $this->assertEquals('a3bKJSHp3Er3VuyP6Wc', $vendor->getToken()); + $this->assertEquals('https://github.com/gearsdigital/kirby-reporter', $vendor->getUrl()); + } + + public function test_exception_platform_not_supported() + { + $this->expectException(UnsupportedPlatformException::class); + $this->expectExceptionMessage('reporter.form.error.platform.unsupported'); + $this->expectExceptionCode(400); + new Vendor('https://lorem.com/gearsdigital/kirby-reporter', 'a3bKJSHp3Er3VuyP6Wc'); + } + + public function test_exception_option_url_not_found() + { + $this->expectException(OptionNotFoundException::class); + $this->expectExceptionMessage('reporter.form.error.optionNotFound.url'); + $this->expectExceptionCode(400); + new Vendor(null, 'a3bKJSHp3Er3VuyP6Wc'); + } + + public function test_exception_option_token_not_found() + { + $this->expectException(OptionNotFoundException::class); + $this->expectExceptionMessage('reporter.form.error.optionNotFound.token'); + $this->expectExceptionCode(400); + new Vendor('https://github.com/gearsdigital/kirby-reporter', ''); + } + + public function test_override_owner_with_user() + { + $vendor = new Vendor('https://github.com/gearsdigital/kirby-reporter', 'a3bKJSHp3Er3VuyP6Wc', 'custom-user'); + $this->assertEquals('custom-user', $vendor->getUser()); + $this->assertEquals('gearsdigital', $vendor->getOwner()); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..d7f2f7d --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,10 @@ + [ + 'content' => __DIR__.'/kirby/content', + 'blueprints' => __DIR__.'/kirby/blueprints', + ], +]);