diff --git a/composer.json b/composer.json index 8c47e5c..c9ae453 100644 --- a/composer.json +++ b/composer.json @@ -14,17 +14,17 @@ "require": { "php": "^7.2", "ext-json": "*", - "illuminate/support": "^6.0", - "illuminate/database": "^6.0", - "illuminate/http": "^6.0", - "illuminate/routing": "^6.0", - "illuminate/auth": "^6.0", + "illuminate/support": "^7.0", + "illuminate/database": "^7.0", + "illuminate/http": "^7.0", + "illuminate/routing": "^7.0", + "illuminate/auth": "^7.0", "guzzlehttp/guzzle": "^6.3", "lcobucci/jwt": "^3.3" }, "require-dev": { "phpunit/phpunit": "^8.0", - "orchestra/testbench": "^4.0" + "orchestra/testbench": "^5.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index a338f3c..7940f5d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,65 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fd23e0c75e93427997ecd119bc8a4b73", + "content-hash": "0a71be688c9dee8082695f55805c7436", "packages": [ + { + "name": "brick/math", + "version": "0.8.14", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "6f7a46b5c3d487b277f38fbd17df57d348cace8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/6f7a46b5c3d487b277f38fbd17df57d348cace8a", + "reference": "6f7a46b5c3d487b277f38fbd17df57d348cace8a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "php-coveralls/php-coveralls": "2.*", + "phpunit/phpunit": "7.*", + "vimeo/psalm": "3.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "time": "2020-02-17T13:57:43+00:00" + }, { "name": "doctrine/inflector", - "version": "v1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a" + "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", "shasum": "" }, "require": { @@ -42,6 +87,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -50,10 +99,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -71,20 +116,20 @@ "singularize", "string" ], - "time": "2018-01-09T20:05:19+00:00" + "time": "2019-10-30T19:59:35+00:00" }, { "name": "doctrine/lexer", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", "shasum": "" }, "require": { @@ -98,7 +143,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -133,7 +178,7 @@ "parser", "php" ], - "time": "2019-07-30T19:33:28+00:00" + "time": "2019-10-30T14:39:59+00:00" }, { "name": "dragonmantank/cron-expression", @@ -191,27 +236,27 @@ }, { "name": "egulias/email-validator", - "version": "2.1.11", + "version": "2.1.17", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23" + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/92dd169c32f6f55ba570c309d83f5209cefb5e23", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a", + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "satooshi/php-coveralls": "^1.0.1", - "symfony/phpunit-bridge": "^4.4@dev" + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -245,94 +290,50 @@ "validation", "validator" ], - "time": "2019-08-13T17:33:27+00:00" - }, - { - "name": "erusev/parsedown", - "version": "1.7.3", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", - "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2019-03-17T18:48:37+00:00" + "time": "2020-02-13T22:36:52+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "version": "6.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", "shasum": "" }, "require": { + "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", + "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" + "psr/log": "^1.1" }, "suggest": { + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "6.5-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\": "src/" - } + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -356,7 +357,7 @@ "rest", "web service" ], - "time": "2018-04-22T15:46:56+00:00" + "time": "2019-12-23T11:57:10+00:00" }, { "name": "guzzlehttp/promises", @@ -482,45 +483,47 @@ }, { "name": "laravel/framework", - "version": "v6.0.3", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "56789e9dec750e0fbe8e9e6ae90a01a4e6887902" + "reference": "36d8958b5b8058ef0641806e490f91102fdea70d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/56789e9dec750e0fbe8e9e6ae90a01a4e6887902", - "reference": "56789e9dec750e0fbe8e9e6ae90a01a4e6887902", + "url": "https://api.github.com/repos/laravel/framework/zipball/36d8958b5b8058ef0641806e490f91102fdea70d", + "reference": "36d8958b5b8058ef0641806e490f91102fdea70d", "shasum": "" }, "require": { "doctrine/inflector": "^1.1", "dragonmantank/cron-expression": "^2.0", "egulias/email-validator": "^2.1.10", - "erusev/parsedown": "^1.7", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", + "league/commonmark": "^1.3", "league/flysystem": "^1.0.8", - "monolog/monolog": "^1.12|^2.0", - "nesbot/carbon": "^2.0", + "monolog/monolog": "^2.0", + "nesbot/carbon": "^2.17", "opis/closure": "^3.1", - "php": "^7.2", + "php": "^7.2.5", "psr/container": "^1.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7", + "ramsey/uuid": "^3.7|^4.0", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.3.4", - "symfony/debug": "^4.3.4", - "symfony/finder": "^4.3.4", - "symfony/http-foundation": "^4.3.4", - "symfony/http-kernel": "^4.3.4", - "symfony/process": "^4.3.4", - "symfony/routing": "^4.3.4", - "symfony/var-dumper": "^4.3.4", - "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^3.3" + "symfony/console": "^5.0", + "symfony/error-handler": "^5.0", + "symfony/finder": "^5.0", + "symfony/http-foundation": "^5.0", + "symfony/http-kernel": "^5.0", + "symfony/mime": "^5.0", + "symfony/process": "^5.0", + "symfony/routing": "^5.0", + "symfony/var-dumper": "^5.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "vlucas/phpdotenv": "^4.0", + "voku/portable-ascii": "^1.4.8" }, "conflict": { "tightenco/collect": "<5.5.33" @@ -551,6 +554,7 @@ "illuminate/routing": "self.version", "illuminate/session": "self.version", "illuminate/support": "self.version", + "illuminate/testing": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", "illuminate/view": "self.version" @@ -559,16 +563,15 @@ "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3", + "guzzlehttp/guzzle": "^6.3.1|^7.0", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.2.3", + "mockery/mockery": "^1.3.1", "moontoast/math": "^1.1", - "orchestra/testbench-core": "^4.0", + "orchestra/testbench-core": "^5.0", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^8.4|^9.0", "predis/predis": "^1.1.1", - "symfony/cache": "^4.3", - "true/punycode": "^2.1" + "symfony/cache": "^5.0" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", @@ -577,25 +580,29 @@ "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "filp/whoops": "Required for friendly error pages in development (^2.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0).", - "laravel/tinker": "Required to use the tinker console command (^1.0).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", + "mockery/mockery": "Required to use mocking (^1.3.1).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -623,7 +630,7 @@ "framework", "laravel" ], - "time": "2019-09-10T18:46:24+00:00" + "time": "2020-03-24T15:17:51+00:00" }, { "name": "lcobucci/jwt", @@ -680,18 +687,92 @@ ], "time": "2019-05-24T18:30:49+00:00" }, + { + "name": "league/commonmark", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "75542a366ccbe1896ed79fcf3e8e68206d6c4257" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/75542a366ccbe1896ed79fcf3e8e68206d6c4257", + "reference": "75542a366ccbe1896ed79fcf3e8e68206d6c4257", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.1", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan-shim": "^0.11.5", + "phpunit/phpunit": "^7.5", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" + }, + "bin": [ + "bin/commonmark" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "time": "2020-03-25T19:55:28+00:00" + }, { "name": "league/flysystem", - "version": "1.0.55", + "version": "1.0.66", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6" + "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/33c91155537c6dc899eacdc54a13ac6303f156e6", - "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/021569195e15f8209b1c4bebb78bd66aa4f08c21", + "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21", "shasum": "" }, "require": { @@ -703,7 +784,7 @@ }, "require-dev": { "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" + "phpunit/phpunit": "^5.7.26" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -762,20 +843,20 @@ "sftp", "storage" ], - "time": "2019-08-24T11:17:19+00:00" + "time": "2020-03-17T18:58:12+00:00" }, { "name": "monolog/monolog", - "version": "2.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "68545165e19249013afd1d6f7485aecff07a2d22" + "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/68545165e19249013afd1d6f7485aecff07a2d22", - "reference": "68545165e19249013afd1d6f7485aecff07a2d22", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c861fcba2ca29404dc9e617eedd9eff4616986b8", + "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8", "shasum": "" }, "require": { @@ -843,31 +924,32 @@ "logging", "psr-3" ], - "time": "2019-08-30T09:56:44+00:00" + "time": "2019-12-20T14:22:59+00:00" }, { "name": "nesbot/carbon", - "version": "2.24.0", + "version": "2.32.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "934459c5ac0658bc765ad1e53512c7c77adcac29" + "reference": "ecb525c766deb3bbbb6a0082ea0e41d3d9ae477c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/934459c5ac0658bc765ad1e53512c7c77adcac29", - "reference": "934459c5ac0658bc765ad1e53512c7c77adcac29", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ecb525c766deb3bbbb6a0082ea0e41d3d9ae477c", + "reference": "ecb525c766deb3bbbb6a0082ea0e41d3d9ae477c", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", - "symfony/translation": "^3.4 || ^4.0" + "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { + "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", "kylekatarnls/multi-tester": "^1.1", - "phpmd/phpmd": "dev-php-7.1-compatibility", + "phpmd/phpmd": "^2.8", "phpstan/phpstan": "^0.11", "phpunit/phpunit": "^7.5 || ^8.0", "squizlabs/php_codesniffer": "^3.4" @@ -877,6 +959,9 @@ ], "type": "library", "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -903,27 +988,27 @@ "homepage": "http://github.com/kylekatarnls" } ], - "description": "A API extension for DateTime that supports 281 different languages.", + "description": "An API extension for DateTime that supports 281 different languages.", "homepage": "http://carbon.nesbot.com", "keywords": [ "date", "datetime", "time" ], - "time": "2019-08-31T16:37:55+00:00" + "time": "2020-03-26T13:04:10+00:00" }, { "name": "opis/closure", - "version": "3.4.0", + "version": "3.5.1", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7" + "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/60a97fff133b1669a5b1776aa8ab06db3f3962b7", - "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7", + "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", + "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", "shasum": "" }, "require": { @@ -936,7 +1021,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "3.5.x-dev" } }, "autoload": { @@ -971,92 +1056,52 @@ "serialization", "serialize" ], - "time": "2019-09-02T21:07:33+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" + "time": "2019-11-29T22:36:02+00:00" }, { "name": "phpoption/phpoption", - "version": "1.5.0", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae", + "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "4.7.*" + "bamarni/composer-bin-plugin": "^1.3", + "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.7-dev" } }, "autoload": { - "psr-0": { - "PhpOption\\": "src/" + "psr-4": { + "PhpOption\\": "src/PhpOption/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache2" + "Apache-2.0" ], "authors": [ { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" } ], "description": "Option Type for PHP", @@ -1066,7 +1111,7 @@ "php", "type" ], - "time": "2015-07-25T16:39:46+00:00" + "time": "2020-03-21T18:07:53+00:00" }, { "name": "psr/container", @@ -1117,6 +1162,52 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "time": "2019-01-08T18:20:26+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -1169,16 +1260,16 @@ }, { "name": "psr/log", - "version": "1.1.0", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -1187,7 +1278,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -1212,7 +1303,7 @@ "psr", "psr-3" ], - "time": "2018-11-20T15:27:04+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "psr/simple-cache", @@ -1302,100 +1393,160 @@ "description": "A polyfill for getallheaders.", "time": "2019-03-08T08:55:37+00:00" }, + { + "name": "ramsey/collection", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "fzaninotto/faker": "^1.5", + "jakub-onderka/php-parallel-lint": "^1", + "jangregor/phpstan-prophecy": "^0.6", + "mockery/mockery": "^1.3", + "phpstan/extension-installer": "^1", + "phpstan/phpdoc-parser": "0.4.1", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP 7.2+ library for representing and manipulating collections.", + "homepage": "https://github.com/ramsey/collection", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "time": "2020-01-05T00:22:59+00:00" + }, { "name": "ramsey/uuid", - "version": "3.8.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" + "reference": "2c9644b1d0c2bc58732413252bcbb6dce2eb0e0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", - "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/2c9644b1d0c2bc58732413252bcbb6dce2eb0e0e", + "reference": "2c9644b1d0c2bc58732413252bcbb6dce2eb0e0e", "shasum": "" }, "require": { - "paragonie/random_compat": "^1.0|^2.0|9.99.99", - "php": "^5.4 || ^7.0", + "brick/math": "^0.8", + "ext-json": "*", + "php": "^7.2 || ^8", + "ramsey/collection": "^1.0", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1.0 | ~2.0.0", - "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", - "ircmaxell/random-lib": "^1.1", - "jakub-onderka/php-parallel-lint": "^0.9.0", - "mockery/mockery": "^0.9.9", + "codeception/aspect-mock": "^3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2", + "doctrine/annotations": "^1.8", + "goaop/framework": "^2", + "jakub-onderka/php-parallel-lint": "^1", + "mockery/mockery": "^1.3", "moontoast/math": "^1.1", - "php-mock/php-mock-phpunit": "^0.3|^1.1", - "phpunit/phpunit": "^4.7|^5.0|^6.5", - "squizlabs/php_codesniffer": "^2.3" + "paragonie/random-lib": "^2", + "php-mock/php-mock-mockery": "^1.3", + "php-mock/php-mock-phpunit": "^2.5", + "phpstan/extension-installer": "^1.0", + "phpstan/phpdoc-parser": "0.4.3", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "psy/psysh": "^0.10.0", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "3.9.4" }, "suggest": { - "ext-ctype": "Provides support for PHP Ctype functions", - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { "psr-4": { "Ramsey\\Uuid\\": "src/" - } + }, + "files": [ + "src/functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" - }, - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", "identifier", "uuid" ], - "time": "2018-07-19T23:38:55+00:00" + "time": "2020-03-22T02:34:13+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.1", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a" + "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", - "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", "shasum": "" }, "require": { @@ -1444,44 +1595,45 @@ "mail", "mailer" ], - "time": "2019-04-21T09:21:45+00:00" + "time": "2019-11-12T09:31:26+00:00" }, { "name": "symfony/console", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "de63799239b3881b8a08f8481b22348f77ed7b36" + "reference": "d29e2d36941de13600c399e393a60b8cfe59ac49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/de63799239b3881b8a08f8481b22348f77ed7b36", - "reference": "de63799239b3881b8a08f8481b22348f77ed7b36", + "url": "https://api.github.com/repos/symfony/console/zipball/d29e2d36941de13600c399e393a60b8cfe59ac49", + "reference": "d29e2d36941de13600c399e393a60b8cfe59ac49", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1" + "symfony/service-contracts": "^1.1|^2" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3", - "symfony/process": "<3.3" + "symfony/dependency-injection": "<4.4", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/var-dumper": "^4.3" + "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", @@ -1492,7 +1644,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1519,29 +1671,29 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-08-26T08:26:39+00:00" + "time": "2020-02-24T15:05:31+00:00" }, { "name": "symfony/css-selector", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03" + "reference": "a0b51ba9938ccc206d9284de7eb527c2d4550b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/c6e5e2a00db768c92c3ae131532af4e1acc7bd03", - "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/a0b51ba9938ccc206d9284de7eb527c2d4550b44", + "reference": "a0b51ba9938ccc206d9284de7eb527c2d4550b44", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1572,41 +1724,40 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2019-08-20T14:07:54+00:00" + "time": "2020-02-04T09:41:09+00:00" }, { - "name": "symfony/debug", - "version": "v4.3.4", + "name": "symfony/error-handler", + "version": "v5.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced" + "url": "https://github.com/symfony/error-handler.git", + "reference": "24a938d9913f42d006ee1ca0164ea1f29c1067ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/afcdea44a2e399c1e4b52246ec8d54c715393ced", - "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/24a938d9913f42d006ee1ca0164ea1f29c1067ec", + "reference": "24a938d9913f42d006ee1ca0164ea1f29c1067ec", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" + "php": "^7.2.5", + "psr/log": "^1.0", + "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { - "symfony/http-kernel": "~3.4|~4.0" + "symfony/http-kernel": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Debug\\": "" + "Symfony\\Component\\ErrorHandler\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1626,43 +1777,43 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com", - "time": "2019-08-20T14:27:59+00:00" + "time": "2020-02-29T10:07:09+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2" + "reference": "b45ad88b253c5a9702ce218e201d89c85d148cea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2", - "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b45ad88b253c5a9702ce218e201d89c85d148cea", + "reference": "b45ad88b253c5a9702ce218e201d89c85d148cea", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" + "php": "^7.2.5", + "symfony/event-dispatcher-contracts": "^2" }, "conflict": { - "symfony/dependency-injection": "<3.4" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "1.1" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "^3.4|^4.0", - "symfony/service-contracts": "^1.1", - "symfony/stopwatch": "~3.4|~4.0" + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" }, "suggest": { "symfony/dependency-injection": "", @@ -1671,7 +1822,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1698,33 +1849,33 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-08-26T08:55:16+00:00" + "time": "2020-02-22T20:09:08+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.5", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c61766f4440ca687de1084a5c00b08e167a2575c" + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c", - "reference": "c61766f4440ca687de1084a5c00b08e167a2575c", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5", + "psr/event-dispatcher": "^1" }, "suggest": { - "psr/event-dispatcher": "", "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1756,29 +1907,29 @@ "interoperability", "standards" ], - "time": "2019-06-20T06:46:26+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/finder", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2" + "reference": "6251f201187ca9d66f6b099d3de65d279e971138" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2", - "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2", + "url": "https://api.github.com/repos/symfony/finder/zipball/6251f201187ca9d66f6b099d3de65d279e971138", + "reference": "6251f201187ca9d66f6b099d3de65d279e971138", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1805,35 +1956,35 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-08-14T12:26:46+00:00" + "time": "2020-02-14T07:43:07+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62" + "reference": "6f9c2ba72f4295d7ce6cf9f79dbb18036291d335" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/fcae1cff5b57b2a9c3aabefeb1527678705ddb62", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6f9c2ba72f4295d7ce6cf9f79dbb18036291d335", + "reference": "6f9c2ba72f4295d7ce6cf9f79dbb18036291d335", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/mime": "^4.3|^5.0", + "php": "^7.2.5", + "symfony/mime": "^4.4|^5.0", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { "predis/predis": "~1.0", - "symfony/expression-language": "^3.4|^4.0|^5.0" + "symfony/expression-language": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1860,72 +2011,76 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-12-19T15:57:49+00:00" + "time": "2020-02-14T07:43:07+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52" + "reference": "021d7d54e080405678f2d8c54cb31d0bb03b4520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5e0fc71be03d52cd00c423061cfd300bd6f92a52", - "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/021d7d54e080405678f2d8c54cb31d0bb03b4520", + "reference": "021d7d54e080405678f2d8c54cb31d0bb03b4520", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "psr/log": "~1.0", - "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "^4.3", - "symfony/http-foundation": "^4.1.1", - "symfony/polyfill-ctype": "~1.8", + "symfony/error-handler": "^4.4|^5.0", + "symfony/event-dispatcher": "^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9" }, "conflict": { - "symfony/browser-kit": "<4.3", - "symfony/config": "<3.4", - "symfony/dependency-injection": "<4.3", - "symfony/translation": "<4.2", - "symfony/var-dumper": "<4.1.1", - "twig/twig": "<1.34|<2.4,>=2" + "symfony/browser-kit": "<4.4", + "symfony/cache": "<5.0", + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/doctrine-bridge": "<5.0", + "symfony/form": "<5.0", + "symfony/http-client": "<5.0", + "symfony/mailer": "<5.0", + "symfony/messenger": "<5.0", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<5.0", + "symfony/validator": "<5.0", + "twig/twig": "<2.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "^4.3", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^4.3", - "symfony/dom-crawler": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~4.2", - "symfony/translation-contracts": "^1.1", - "symfony/var-dumper": "^4.1.1", - "twig/twig": "^1.34|^2.4" + "symfony/browser-kit": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/routing": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/translation": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "twig/twig": "^2.4|^3.0" }, "suggest": { "symfony/browser-kit": "", "symfony/config": "", "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/var-dumper": "" + "symfony/dependency-injection": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1952,24 +2107,24 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-08-26T16:47:42+00:00" + "time": "2020-02-29T10:41:30+00:00" }, { "name": "symfony/mime", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "010cc488e56cafe5f7494dea70aea93100c234df" + "reference": "9b3e5b5e58c56bbd76628c952d2b78556d305f3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/010cc488e56cafe5f7494dea70aea93100c234df", - "reference": "010cc488e56cafe5f7494dea70aea93100c234df", + "url": "https://api.github.com/repos/symfony/mime/zipball/9b3e5b5e58c56bbd76628c952d2b78556d305f3c", + "reference": "9b3e5b5e58c56bbd76628c952d2b78556d305f3c", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -1978,12 +2133,12 @@ }, "require-dev": { "egulias/email-validator": "^2.1.10", - "symfony/dependency-injection": "^3.4|^4.1|^5.0" + "symfony/dependency-injection": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2014,20 +2169,20 @@ "mime", "mime-type" ], - "time": "2019-11-30T08:27:26+00:00" + "time": "2020-02-04T09:41:09+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", "shasum": "" }, "require": { @@ -2039,7 +2194,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -2072,20 +2227,20 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.12.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "685968b11e61a347c18bf25db32effa478be610f" + "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/685968b11e61a347c18bf25db32effa478be610f", - "reference": "685968b11e61a347c18bf25db32effa478be610f", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", + "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", "shasum": "" }, "require": { @@ -2097,7 +2252,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -2131,26 +2286,26 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -2158,7 +2313,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -2193,20 +2348,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", "shasum": "" }, "require": { @@ -2218,7 +2373,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -2252,20 +2407,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "37b0976c78b94856543260ce09b460a7bc852747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", + "reference": "37b0976c78b94856543260ce09b460a7bc852747", "shasum": "" }, "require": { @@ -2274,7 +2429,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -2307,20 +2462,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.12.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", "shasum": "" }, "require": { @@ -2329,7 +2484,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -2365,29 +2520,29 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/process", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a" + "reference": "fd4a86dd7e36437f2fc080d8c42c7415d828a0a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e89969c00d762349f078db1128506f7f3dcc0d4a", - "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a", + "url": "https://api.github.com/repos/symfony/process/zipball/fd4a86dd7e36437f2fc080d8c42c7415d828a0a8", + "reference": "fd4a86dd7e36437f2fc080d8c42c7415d828a0a8", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2414,38 +2569,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-08-26T08:26:39+00:00" + "time": "2020-02-08T17:00:58+00:00" }, { "name": "symfony/routing", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f" + "reference": "d6ca39fd05c1902bf34d724ba06fb8044a0b46de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ff1049f6232dc5b6023b1ff1c6de56f82bcd264f", - "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f", + "url": "https://api.github.com/repos/symfony/routing/zipball/d6ca39fd05c1902bf34d724ba06fb8044a0b46de", + "reference": "d6ca39fd05c1902bf34d724ba06fb8044a0b46de", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "conflict": { - "symfony/config": "<4.2", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/yaml": "<4.4" }, "require-dev": { "doctrine/annotations": "~1.2", "psr/log": "~1.0", - "symfony/config": "~4.2", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" + "symfony/config": "^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -2457,7 +2612,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2490,24 +2645,24 @@ "uri", "url" ], - "time": "2019-08-26T08:26:39+00:00" + "time": "2020-02-25T14:24:11+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.6", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3" + "reference": "144c5e51266b281231e947b51223ba14acf1a749" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3", - "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", + "reference": "144c5e51266b281231e947b51223ba14acf1a749", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -2516,7 +2671,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2548,46 +2703,47 @@ "interoperability", "standards" ], - "time": "2019-08-20T14:44:19+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/translation", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "28498169dd334095fa981827992f3a24d50fed0f" + "reference": "e9b93f42a1fd6aec6a0872d59ee5c8219a7d584b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/28498169dd334095fa981827992f3a24d50fed0f", - "reference": "28498169dd334095fa981827992f3a24d50fed0f", + "url": "https://api.github.com/repos/symfony/translation/zipball/e9b93f42a1fd6aec6a0872d59ee5c8219a7d584b", + "reference": "e9b93f42a1fd6aec6a0872d59ee5c8219a7d584b", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.6" + "symfony/translation-contracts": "^2" }, "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" + "symfony/config": "<4.4", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" }, "provide": { - "symfony/translation-implementation": "1.0" + "symfony/translation-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/http-kernel": "~3.4|~4.0", - "symfony/intl": "~3.4|~4.0", - "symfony/service-contracts": "^1.1.2", - "symfony/var-dumper": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" + "symfony/config": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", + "symfony/intl": "^4.4|^5.0", + "symfony/service-contracts": "^1.1.2|^2", + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -2597,7 +2753,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2624,24 +2780,24 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-08-26T08:55:16+00:00" + "time": "2020-02-04T07:41:34+00:00" }, { "name": "symfony/translation-contracts", - "version": "v1.1.6", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a" + "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/325b17c24f3ee23cbecfa63ba809c6d89b5fa04a", - "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed", + "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "suggest": { "symfony/translation-implementation": "" @@ -2649,7 +2805,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2681,36 +2837,35 @@ "interoperability", "standards" ], - "time": "2019-08-02T12:15:04+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.3.4", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6" + "reference": "3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/641043e0f3e615990a0f29479f9c117e8a6698c6", - "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9", + "reference": "3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" + "php": "^7.2.5", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "twig/twig": "~1.34|~2.4" + "symfony/console": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^2.4|^3.0" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -2723,7 +2878,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2757,25 +2912,27 @@ "debug", "dump" ], - "time": "2019-08-26T08:26:39+00:00" + "time": "2020-02-26T22:30:10+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.1", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757" + "reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", - "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/dda2ee426acd6d801d5b7fd1001cde9b5f790e15", + "reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15", "shasum": "" }, "require": { + "ext-dom": "*", + "ext-libxml": "*", "php": "^5.5 || ^7.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0" + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" @@ -2804,34 +2961,39 @@ ], "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "time": "2017-11-27T11:13:29+00:00" + "time": "2019-10-24T08:53:34+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v3.6.0", + "version": "v4.1.2", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156" + "reference": "939dfda2d7267ac8fc53ac3d642b5de357554c39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1bdf24f065975594f6a117f0f1f6cabf1333b156", - "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/939dfda2d7267ac8fc53ac3d642b5de357554c39", + "reference": "939dfda2d7267ac8fc53ac3d642b5de357554c39", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", - "phpoption/phpoption": "^1.5", + "php": "^5.5.9 || ^7.0", + "phpoption/phpoption": "^1.7.2", "symfony/polyfill-ctype": "^1.9" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.3", + "ext-filter": "*", "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.6-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2861,22 +3023,71 @@ "env", "environment" ], - "time": "2019-09-10T21:37:39+00:00" + "time": "2020-03-12T13:44:15+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.4.10", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "240e93829a5f985fab0984a6e55ae5e26b78a334" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/240e93829a5f985fab0984a6e55ae5e26b78a334", + "reference": "240e93829a5f985fab0984a6e55ae5e26b78a334", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/", + "voku\\tests\\": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "time": "2020-03-13T01:23:26+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", "shasum": "" }, "require": { @@ -2919,20 +3130,20 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "time": "2019-10-21T16:45:58+00:00" }, { "name": "fzaninotto/faker", - "version": "v1.8.0", + "version": "v1.9.1", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" + "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", - "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", + "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", "shasum": "" }, "require": { @@ -2941,12 +3152,12 @@ "require-dev": { "ext-intl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^1.5" + "squizlabs/php_codesniffer": "^2.9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -2969,7 +3180,7 @@ "faker", "fixtures" ], - "time": "2018-07-12T10:23:15+00:00" + "time": "2019-12-12T13:22:17+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -3021,16 +3232,16 @@ }, { "name": "mockery/mockery", - "version": "1.2.3", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031" + "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/4eff936d83eb809bde2c57a3cea0ee9643769031", - "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031", + "url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", + "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", "shasum": "" }, "require": { @@ -3044,7 +3255,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -3082,20 +3293,20 @@ "test double", "testing" ], - "time": "2019-08-07T15:01:07+00:00" + "time": "2019-12-26T09:49:15+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -3130,33 +3341,33 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "orchestra/testbench", - "version": "v4.0.0", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "bde8b826bde3bd39a2a87e6cd328501e19c60cc9" + "reference": "e36bdb5fc599495f46a8b2fd3a5e6ffed044e095" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/bde8b826bde3bd39a2a87e6cd328501e19c60cc9", - "reference": "bde8b826bde3bd39a2a87e6cd328501e19c60cc9", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/e36bdb5fc599495f46a8b2fd3a5e6ffed044e095", + "reference": "e36bdb5fc599495f46a8b2fd3a5e6ffed044e095", "shasum": "" }, "require": { - "laravel/framework": "^6.0", - "mockery/mockery": "^1.0", - "orchestra/testbench-core": "^4.0", - "php": ">=7.2", - "phpunit/phpunit": "^8.0" + "laravel/framework": "^7.1", + "mockery/mockery": "^1.3.1", + "orchestra/testbench-core": "^5.1", + "php": ">=7.2.5", + "phpunit/phpunit": "^8.4 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "6.0-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -3180,43 +3391,44 @@ "orchestral", "testing" ], - "time": "2019-09-03T20:02:19+00:00" + "time": "2020-03-10T17:14:11+00:00" }, { "name": "orchestra/testbench-core", - "version": "v4.0.2", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "0091a0f1b6493fa445379c58c4d0b757ea4ee2ee" + "reference": "69ddd365c01bb90b89edd9c52e44d0dc5bbc0854" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/0091a0f1b6493fa445379c58c4d0b757ea4ee2ee", - "reference": "0091a0f1b6493fa445379c58c4d0b757ea4ee2ee", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/69ddd365c01bb90b89edd9c52e44d0dc5bbc0854", + "reference": "69ddd365c01bb90b89edd9c52e44d0dc5bbc0854", "shasum": "" }, "require": { - "fzaninotto/faker": "^1.4", - "php": ">=7.2" + "fzaninotto/faker": "^1.9.1", + "php": ">=7.2.5" }, "require-dev": { - "laravel/framework": "^6.0", + "laravel/framework": "^7.1", "laravel/laravel": "dev-master", - "mockery/mockery": "^1.2.3", - "phpunit/phpunit": "^8.3" + "mockery/mockery": "^1.3.1", + "orchestra/canvas": "^5.0", + "phpunit/phpunit": "^8.4 || ^9.0" }, "suggest": { - "laravel/framework": "Required for testing (^6.0).", - "mockery/mockery": "Allow to use Mockery for testing (^1.2.3).", - "orchestra/testbench-browser-kit": "Allow to use legacy Laravel BrowserKit for testing (^4.0).", - "orchestra/testbench-dusk": "Allow to use Laravel Dusk for testing (^4.0).", - "phpunit/phpunit": "Allow to use PHPUnit for testing (^8.3)." + "laravel/framework": "Required for testing (^7.1).", + "mockery/mockery": "Allow using Mockery for testing (^1.3.1).", + "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^5.0).", + "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^5.0).", + "phpunit/phpunit": "Allow using PHPUnit for testing (^8.4 || ^9.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3245,7 +3457,7 @@ "orchestral", "testing" ], - "time": "2019-09-15T08:17:06+00:00" + "time": "2020-03-16T04:35:18+00:00" }, { "name": "phar-io/manifest", @@ -3403,40 +3615,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3447,33 +3657,36 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { @@ -3497,37 +3710,37 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-02-18T18:59:58+00:00" }, { "name": "phpspec/prophecy", - "version": "1.8.1", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -3560,20 +3773,20 @@ "spy", "stub" ], - "time": "2019-06-13T12:50:23+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.8", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa0d179a13284c7420fc281fc32750e6cc7c9e2f", - "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { @@ -3623,7 +3836,7 @@ "testing", "xunit" ], - "time": "2019-09-17T06:24:36+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3816,16 +4029,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.3.5", + "version": "8.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "302faed7059fde575cf3403a78c730c5e3a62750" + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/302faed7059fde575cf3403a78c730c5e3a62750", - "reference": "302faed7059fde575cf3403a78c730c5e3a62750", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", "shasum": "" }, "require": { @@ -3869,7 +4082,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.3-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -3895,7 +4108,7 @@ "testing", "xunit" ], - "time": "2019-09-14T09:12:03+00:00" + "time": "2020-01-08T08:49:49+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4064,16 +4277,16 @@ }, { "name": "sebastian/environment", - "version": "4.2.2", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", "shasum": "" }, "require": { @@ -4113,7 +4326,7 @@ "environment", "hhvm" ], - "time": "2019-05-05T09:05:15+00:00" + "time": "2019-11-20T08:46:58+00:00" }, { "name": "sebastian/exporter", @@ -4554,31 +4767,29 @@ }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -4600,7 +4811,7 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "time": "2020-02-14T12:15:55+00:00" } ], "aliases": [], diff --git a/src/Auth/UKAuthGuard.php b/src/Auth/UKAuthGuard.php index 5284fef..3b08062 100644 --- a/src/Auth/UKAuthGuard.php +++ b/src/Auth/UKAuthGuard.php @@ -1,9 +1,7 @@ request = $request; $this->provider = $provider; - $this->user = NULL; + $this->user = null; $this->validate(); } @@ -89,6 +86,7 @@ public function validate(array $credentials = []) if ($this->user) { return true; } + return false; } diff --git a/src/Auth/UKAuthUserProvider.php b/src/Auth/UKAuthUserProvider.php index cd068ae..e8a7651 100644 --- a/src/Auth/UKAuthUserProvider.php +++ b/src/Auth/UKAuthUserProvider.php @@ -1,6 +1,5 @@ model::find($identifier); } - public function retrieveByToken($identifier, $token){ + public function retrieveByToken($identifier, $token) + { return $this->model::findWithAccessToken($token); } - public function updateRememberToken(Authenticatable $user, $token){} - public function retrieveByCredentials(array $credentials){} + public function updateRememberToken(Authenticatable $user, $token) + { + } + + public function retrieveByCredentials(array $credentials) + { + } /** * Validate a user against the given credentials. diff --git a/src/Controllers/AuthenticationController.php b/src/Controllers/AuthenticationController.php index 12190d6..2f71c14 100644 --- a/src/Controllers/AuthenticationController.php +++ b/src/Controllers/AuthenticationController.php @@ -3,10 +3,9 @@ namespace VATSIMUK\Support\Auth\Controllers; use Carbon\Carbon; -use GuzzleHttp\Client; -use GuzzleHttp\Exception\ClientException; use Illuminate\Http\Request; use Illuminate\Routing\Controller; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; @@ -15,7 +14,7 @@ class AuthenticationController extends Controller { - public function login(Request $request) + public function login() { $query = http_build_query([ 'client_id' => config('ukauth.client_id'), @@ -24,50 +23,47 @@ public function login(Request $request) 'scope' => '', ]); - return redirect(config('ukauth.root_url') . config('ukauth.oauth_path') . '/authorize?' . $query); + return redirect(config('ukauth.root_url').config('ukauth.oauth_path').'/authorize?'.$query); } public function verifyLogin(Request $request) { $validator = Validator::make($request->all(), [ - 'code' => 'required' + 'code' => 'required', ]); - if($validator->fails()){ + if ($validator->fails()) { return redirect(route('auth.login')); } - $http = new Client(); - try { - $response = $http->post(config('ukauth.root_url') . config('ukauth.oauth_path') . '/token', [ - 'form_params' => [ - 'grant_type' => 'authorization_code', - 'client_id' => config('ukauth.client_id'), - 'client_secret' => config('ukauth.client_secret'), - 'redirect_uri' => route('auth.login.verify'), - 'code' => $request->code, - ], - ]); - } catch (ClientException $e) { - if ($e->getCode() == 400 && Str::contains($e->getMessage(), 'invalid_request')) { - Log::info("User at {$request->ip()} tried to verify their Auth SSO login, however the details were invalid", ["exception" => $e]); + $response = Http::post(config('ukauth.root_url').config('ukauth.oauth_path').'/token', [ + 'grant_type' => 'authorization_code', + 'client_id' => config('ukauth.client_id'), + 'client_secret' => config('ukauth.client_secret'), + 'redirect_uri' => route('auth.login.verify'), + 'code' => $request->code, + ]); + + if ($response->clientError()) { + if ($response->status() == 400 && Str::contains($response->body(), 'invalid_request')) { + Log::info("User at {$request->ip()} tried to verify their Auth SSO login, however the details were invalid", ['exception' => $e]); + return redirect(route('auth.login')); } - throw $e; + $response->throw(); } - $response = json_decode((string)$response->getBody(), true); + $response = json_decode((string) $response->getBody(), true); // Create JWT for service auth $user = RemoteUser::findWithAccessToken($response['access_token'], ['name_first', 'name_last', 'has_password', 'roles' => [ - 'name' + 'name', ], 'all_permissions']); $expires = Carbon::now()->addSeconds($response['expires_in'])->getTimestamp(); $token = JWTService::createToken($user, $expires, $response['access_token']); - - return redirect(url('/auth/complete') . "?token=$token&expires_at=$expires") - ->withCookies([cookie('ukauth_sesh_id', encrypt($token->getClaim('iat') . $user->id))]); + return redirect(url('/auth/complete')."?token=$token&expires_at=$expires") + ->withCookies([cookie('ukauth_sesh_id', encrypt($token->getClaim('iat').$user->id))]); } } diff --git a/src/Exceptions/APITokenInvalidException.php b/src/Exceptions/APITokenInvalidException.php index 54fdb67..9b4fcf1 100644 --- a/src/Exceptions/APITokenInvalidException.php +++ b/src/Exceptions/APITokenInvalidException.php @@ -1,10 +1,8 @@ getAuthAccessToken(); if (! $token) { - return Response::newServerErrorResponse($this, "Unable to retrieve Auth access token"); + return Response::newServerErrorResponse($this, 'Unable to retrieve Auth access token'); } } - // Create HTTP Client with Bearer - $client = app()->make(Client::class); - // Execute the query $this->executedQuery = $this->getGraphQLQuery(); - try { - $response = json_decode( - $client->post(config('ukauth.root_url') . config('ukauth.graphql_path'), - [ - 'form_params' => [ - 'query' => $this->getGraphQLQuery() - ], - 'headers' => [ - 'Authorization' => "Bearer $token" - ] - ])->getBody()->getContents() - ); - } catch (RequestException $e) { + $response = Http::withToken($token)->post(config('ukauth.root_url').config('ukauth.graphql_path'), [ + 'query' => $this->getGraphQLQuery(), + ]); + + if ($response->clientError() || $response->serverError()) { // Exception is thrown in the event of a networking error (connection timeout, DNS errors, etc.). // Likely that the service is down, or not responding to requests return Response::newServerErrorResponse($this); } + $response = arrayToObject($response->json()); - if (! $response || ! $response instanceOf \stdClass) { - return Response::newServerErrorResponse($this, "Unable to parse API response", $response); + if (! $response || ! $response instanceof \stdClass) { + return Response::newServerErrorResponse($this, 'Unable to parse API response', $response); } $response = new Response($response, $this); @@ -97,21 +86,18 @@ public function execute(string $token = null): Response } /** - * Check the pulse of the Auth API + * Check the pulse of the Auth API. * * @return bool */ public static function checkAlive(): bool { - $client = resolve(Client::class); - try { - $response = json_decode($client->get(config('ukauth.root_url') . '/api/pulse')->getBody()->getContents()); + $response = arrayToObject(Http::get(config('ukauth.root_url').'/api/pulse')->throw()->json()); if ($response && $response->alive) { return true; } - } catch (RequestException $e) { //TODO: Log to Bugsnag } @@ -120,7 +106,7 @@ public static function checkAlive(): bool } /** - * Generates or fetches Auth service token + * Generates or fetches Auth service token. * * @return string|null */ @@ -129,38 +115,36 @@ private function getAuthAccessToken(): ?string $token = Cache::get('AUTH_API_TOKEN'); if (! $token) { - $client = resolve(Client::class); - try { - $response = $client->post(config('ukauth.root_url') . config('ukauth.oauth_path') . '/token', [ - 'form_params' => [ - 'grant_type' => 'client_credentials', - 'client_id' => config('ukauth.machine_client_id'), - 'client_secret' => config('ukauth.machine_client_secret'), - 'scope' => '*' - ] - ]); - $token = json_decode((string)$response->getBody(), true)['access_token']; - Cache::put('AUTH_API_TOKEN', $token, \DateInterval::createFromDateString("1 day")); + $response = Http::post(config('ukauth.root_url').config('ukauth.oauth_path').'/token', [ + 'grant_type' => 'client_credentials', + 'client_id' => config('ukauth.machine_client_id'), + 'client_secret' => config('ukauth.machine_client_secret'), + 'scope' => '*', + ])->throw(); + $token = $response->json()['access_token']; + Cache::put('AUTH_API_TOKEN', $token, \DateInterval::createFromDateString('1 day')); } catch (RequestException $e) { // TODO: Log Exception. Likely either connection issue or output issue return null; } } + return $token; } /** - * Generate the complete GraphQL query + * Generate the complete GraphQL query. * * @return string */ public function getGraphQLQuery(): string { - $query = $this->action . " {\n"; - $query .= $this->method . ($this->arguments ? " ($this->arguments){\n" : " {\n"); + $query = $this->action." {\n"; + $query .= $this->method.($this->arguments ? " ($this->arguments){\n" : " {\n"); $query .= $this->getColumns(); $query .= "}\n}"; + return $query; } @@ -175,7 +159,7 @@ public function getColumns(): string } /** - * Iterates through array of columns supplied, and converts into GraphQL query format + * Iterates through array of columns supplied, and converts into GraphQL query format. * * @param array $rawColumns * @return string @@ -185,15 +169,15 @@ private function buildColumns(array $rawColumns): string $columnString = ''; foreach ($rawColumns as $key => $column) { - if(is_string($column)){ - if (Str::contains($column, ".")) { + if (is_string($column)) { + if (Str::contains($column, '.')) { data_fill($rawColumns, $column, Arr::last(explode('.', $column))); unset($rawColumns[$key]); - }else{ + } else { // Look for duplicates strings in the 1st Dimension of the columns array. Other duplicates caught later. - if(count(array_keys(array_filter($rawColumns, function($value){ - return !is_array($value); - }), $column)) > 1){ + if (count(array_keys(array_filter($rawColumns, function ($value) { + return ! is_array($value); + }), $column)) > 1) { unset($rawColumns[$key]); } } @@ -209,11 +193,12 @@ private function buildColumns(array $rawColumns): string $columnString .= "$column\n"; } } + return $columnString; } /** - * Gets the GraphQL method + * Gets the GraphQL method. * * @return string */ diff --git a/src/GraphQL/Response.php b/src/GraphQL/Response.php index 50ef9b7..117ab41 100644 --- a/src/GraphQL/Response.php +++ b/src/GraphQL/Response.php @@ -1,9 +1,7 @@ hasErrors()) { return null; } + return $this->jsonResponse->errors; } - /** * @return bool */ @@ -56,16 +54,17 @@ public function hasUnauthenticatedError(): bool foreach ($this->getErrors() as $error) { $error = (object) $error; - if (isset($error->debugMessage) && $error->debugMessage == "Unauthenticated.") { + if (isset($error->debugMessage) && $error->debugMessage == 'Unauthenticated.') { return true; } } + return false; } /** * Returns whether the body of the data response is empty - * (Doesn't have errors, but method returned null (or empty array)) + * (Doesn't have errors, but method returned null (or empty array)). * * @return bool */ @@ -83,7 +82,7 @@ public function isEmpty(): bool } /** - * Returns true if the data object has been returned with no errors, and has parsed ok + * Returns true if the data object has been returned with no errors, and has parsed ok. * * @return bool */ @@ -93,40 +92,41 @@ public function isOk(): bool } /** - * Gets the results from the query + * Gets the results from the query. * @return stdClass|null */ public function getResults() { - if (!$this->isOk() || $this->isEmpty()) { - return null; + if (! $this->isOk() || $this->isEmpty()) { + return; } + return $this->jsonResponse->data->{$this->query->getMethod()}; } /** - * Gets the results from the query hydrated as the given model + * Gets the results from the query hydrated as the given model. * @param RemoteModel|string $modelClass * @return RemoteModel|Collection|null */ public function getHydratedResults($modelClass) { if (! $this->getResults()) { - return null; + return; } if (! is_object($modelClass)) { $modelClass = resolve($modelClass); } - return ! Arr::isAssoc((array)$this->getResults()) ? + return ! Arr::isAssoc((array) $this->getResults()) ? $modelClass->newQueryWithoutScopes()->hydrate((array) $this->getResults()) : $modelClass->newQueryWithoutScopes()->make((array) $this->getResults()); } /** - * Returns the response from the API + * Returns the response from the API. * * @return stdClass */ @@ -135,26 +135,25 @@ public function getRawResponse(): stdClass return $this->jsonResponse; } - /** - * Generates a error response class + * Generates a error response class. * * @param $query * @param string $message * @param null $data * @return Response */ - public static function newServerErrorResponse($query, $message = "There was a server error trying to run this query", $data = null) + public static function newServerErrorResponse($query, $message = 'There was a server error trying to run this query', $data = null) { Log::error("[AUTH API] Server Error Trying To Query ($message)", ['query' => $query, 'server_response' => $data]); //TODO: Log error to BugSnag - return new self((object)[ + return new self((object) [ 'errors' => [ [ - 'message' => $message - ] - ] + 'message' => $message, + ], + ], ], $query); } } diff --git a/src/Models/Concerns/HasCustomInstanceCreation.php b/src/Models/Concerns/HasCustomInstanceCreation.php index 77563f0..722a9b1 100644 --- a/src/Models/Concerns/HasCustomInstanceCreation.php +++ b/src/Models/Concerns/HasCustomInstanceCreation.php @@ -1,9 +1,7 @@ setRelationshipBuilder(true); } + return $class; } @@ -25,7 +24,7 @@ protected function newRelatedInstance($class) if (! $instance->getConnectionName()) { $instance->setConnection($this->connection); } - if(method_exists($instance, 'setRelationshipBuilder')){ + if (method_exists($instance, 'setRelationshipBuilder')) { $instance->setRelationshipBuilder(true); } }); diff --git a/src/Models/Concerns/HasPermissions.php b/src/Models/Concerns/HasPermissions.php index 01f72f7..47cf905 100644 --- a/src/Models/Concerns/HasPermissions.php +++ b/src/Models/Concerns/HasPermissions.php @@ -1,6 +1,5 @@ hasPermissionTo($permission)) { + if (! $this->hasPermissionTo($permission)) { return false; } } @@ -69,4 +68,4 @@ public function getAllPermissions(): Collection { return is_array($this->attribute('all_permissions')) ? collect($this->attribute('all_permissions')) : $this->attribute('all_permissions'); } -} \ No newline at end of file +} diff --git a/src/Models/Concerns/HasRatings.php b/src/Models/Concerns/HasRatings.php index 5b5e472..c91a2ee 100644 --- a/src/Models/Concerns/HasRatings.php +++ b/src/Models/Concerns/HasRatings.php @@ -14,21 +14,21 @@ trait HasRatings * @uses VATSIM-UK/auth/graphql/schema.graphql - type Rating * @var array */ - static $RATINGS_SCHEMA = [ + public static $RATINGS_SCHEMA = [ 'id', 'type', 'code', 'code_long', 'name', 'name_long', - 'vatsim_id' + 'vatsim_id', ]; public function scopeWithRatings(RemoteBuilder $query) { return $query->withColumns([ ['atcRating' => self::$RATINGS_SCHEMA], - ['pilotRatings' => self::$RATINGS_SCHEMA] + ['pilotRatings' => self::$RATINGS_SCHEMA], ]); } @@ -51,8 +51,8 @@ public function getPilotRatingsAttribute() { $ratings = $this->loadMissingAttributes(['pilotRatings' => self::$RATINGS_SCHEMA], null, true)->attributes['pilotRatings']; - return $ratings ? collect($ratings)->map(function ($rating){ + return $ratings ? collect($ratings)->map(function ($rating) { return (object) $rating; }) : null; } -} \ No newline at end of file +} diff --git a/src/Models/Concerns/HasRemoteRelationships.php b/src/Models/Concerns/HasRemoteRelationships.php index bcb8a44..61871ba 100644 --- a/src/Models/Concerns/HasRemoteRelationships.php +++ b/src/Models/Concerns/HasRemoteRelationships.php @@ -1,9 +1,7 @@ findRelationshipDetails(); + + // If we get null back from a relationship we are pretty sure exists (i.e. is in database), we will just return + // the primary key + return parent::first($columns = []) ?? (! $checkAPI ? $this->model::initModelWithData([ + $this->model->getKeyName() => $details->parentKey, + ]) : null); + } + public function find($id, $columns = [], string $token = null, bool $checkAPI = false) { // If we get null back from a relationship we are pretty sure exists (i.e. is in database), we will just return // the primary key return parent::find($id, $columns, $token) ?? (! $checkAPI ? $this->model::initModelWithData([ - $this->model->getKeyName() => $id - ]) : null); + $this->model->getKeyName() => $id, + ]) : null); } /** - * Find's many of the related model + * Find's many of the related model. * * @param array|Arrayable $ids * @param array $columns @@ -56,7 +63,7 @@ public function findMany($ids, $columns = [], string $token = null): Collection // with just the primary key return $result->isNotEmpty() ? $result : collect($ids)->transform(function ($id) { return $this->model::initModelWithData([ - $this->model->getKeyName() => $id + $this->model->getKeyName() => $id, ]); }); } @@ -82,7 +89,6 @@ public function getModels($columns = ['*']) $builder = $this->model->newQueryWithoutScopes(); - try { $models = $builder->findMany($results->pluck($details->relatedPivotKey)->all(), $columns); } catch (APITokenInvalidException $e) { @@ -95,7 +101,7 @@ public function getModels($columns = ['*']) $models = collect(); foreach ($results->pluck($details->relatedPivotKey)->all() as $relatedID) { $models->push($this->related::initModelWithData([ - 'id' => $relatedID + 'id' => $relatedID, ])); } } @@ -103,7 +109,7 @@ public function getModels($columns = ['*']) //Post-humorously add in the pivot table attributes $models->transform(function ($model) use ($results, $details) { $pivotAttributes = collect($results->firstWhere($details->relatedPivotKey, $model->getKey()))->mapWithKeys(function ($value, $key) { - return ['pivot_' . $key => $value]; + return ['pivot_'.$key => $value]; }); return $model->setRawAttributes(array_merge($pivotAttributes->all(), $model->getAttributes())); @@ -113,7 +119,7 @@ public function getModels($columns = ['*']) } /** - * Determine, for a remote model, if the given remote model exists on the local model + * Determine, for a remote model, if the given remote model exists on the local model. * * @param bool $checkAPI If false, will check assert that the model's ID is assign to the local model via pivot, * etc. If true, will actually call the API and check the model also exists on that end. @@ -131,6 +137,7 @@ public function exists($checkAPI = false) if (($key = $this->query->wheres[0]['value']) == null) { return false; } + return $checkAPI ? $this->find($key, ['id'], null, true) != null : true; } @@ -140,7 +147,6 @@ public function exists($checkAPI = false) $existsInPivot = $this->query->count() > 0; - if (! $existsInPivot) { return false; } @@ -157,9 +163,8 @@ public function exists($checkAPI = false) return parent::exists(); } - /** - * Finds the database key for the model with the relationship, and loads table and foreignKeys + * Finds the database key for the model with the relationship, and loads table and foreignKeys. * * @return \stdClass|null */ @@ -170,11 +175,11 @@ private function findRelationshipDetails(): ?\stdClass } if (count($this->query->wheres) > 0) { - return (object)[ + return (object) [ 'table' => $this->determinePivotTable(), 'foreignPivotKey' => $this->determineForeignPivotKeyName(), 'parentKey' => $this->determineParentModelKey(), - 'relatedPivotKey' => $this->determineRelatedPivotKeyName() + 'relatedPivotKey' => $this->determineRelatedPivotKeyName(), ]; } @@ -182,7 +187,7 @@ private function findRelationshipDetails(): ?\stdClass } /** - * Removes the pivot table name from a column + * Removes the pivot table name from a column. * * @param $columnWithTable * @return string @@ -195,7 +200,7 @@ private function columnWithoutTable($columnWithTable): string unset($exploded[0]); } - return implode(".", $exploded); + return implode('.', $exploded); } private function getValueForWhereColumn($columnWithTable) @@ -204,7 +209,7 @@ private function getValueForWhereColumn($columnWithTable) } /** - * Deduce the pivot table for relationship + * Deduce the pivot table for relationship. * * @return string|null */ @@ -214,7 +219,7 @@ private function determinePivotTable(): ?string } /** - * Deduce the foreign pivot key name for the relationship + * Deduce the foreign pivot key name for the relationship. * * @return string|null */ @@ -224,7 +229,7 @@ private function determineForeignPivotKeyName(): ?string } /** - * Deduce the related pivot key name for the relationship + * Deduce the related pivot key name for the relationship. * * @return string|null */ @@ -238,7 +243,7 @@ private function determineRelatedPivotKeyName(): ?string } /** - * Deduce the parent model's key for the relationship + * Deduce the parent model's key for the relationship. * * @return string|null */ diff --git a/src/Models/RemoteBuilder.php b/src/Models/RemoteBuilder.php index c6ca306..66db50f 100644 --- a/src/Models/RemoteBuilder.php +++ b/src/Models/RemoteBuilder.php @@ -1,9 +1,7 @@ find(1) + * Can be chained, e.g. RemoteModel::returnResponse->find(1). * * @return RemoteBuilder */ public function returnResponse(): self { $this->returnResponse = true; + return $this; } /** * Adds in columns to be retrieved in the API call in addition to manually specified ones. * Mostly used for scoping on the model. - * Can be chained, e.g. RemoteModel::withColumns(["atcRating.code"])->find(1) + * Can be chained, e.g. RemoteModel::withColumns(["atcRating.code"])->find(1). * * @param array $columns * @return RemoteBuilder @@ -83,11 +82,12 @@ public function returnResponse(): self public function withColumns(array $columns): self { $this->queryColumns = array_merge($this->queryColumns, $columns); + return $this; } /** - * Parses built query, and performs query + * Parses built query, and performs query. * * @param array $columns * @return Collection @@ -99,7 +99,7 @@ public function get($columns = ['*']): Collection // Only support IDs for now $ids = []; foreach ($this->query->wheres as $where) { - if ($this->getColumnNameWithoutTable($where['column']) != "id") { + if ($this->getColumnNameWithoutTable($where['column']) != 'id') { continue; } @@ -121,9 +121,8 @@ public function get($columns = ['*']): Collection return $this->findMany($ids, $columns, $this->token); } - /** - * Find the remote model with the given ID + * Find the remote model with the given ID. * * @param mixed $id * @param array|null $columns @@ -146,16 +145,15 @@ public function find($id, $columns = [], string $token = null) $response = $query->execute($token ?? $this->token); - if($this->returnResponse){ + if ($this->returnResponse) { return $response; } return $response->getHydratedResults($this->model); } - /** - * Finds multiple remote model's for the given IDs + * Finds multiple remote model's for the given IDs. * * @param Arrayable|array $ids * @param array $columns @@ -166,7 +164,7 @@ public function find($id, $columns = [], string $token = null) */ public function findMany($ids, $columns = [], string $token = null) { - $argument = "ids:" . json_encode($ids); + $argument = 'ids:'.json_encode($ids); $query = new GraphQLBuilder( $this->model->getMultipleAPIMethod(), @@ -176,7 +174,7 @@ public function findMany($ids, $columns = [], string $token = null) $response = $query->execute($token ?? $this->token); - if($this->returnResponse){ + if ($this->returnResponse) { return $response; } @@ -194,15 +192,15 @@ public function findMany($ids, $columns = [], string $token = null) public function first($columns = []) { // Only support IDs for now - if ($this->getColumnNameWithoutTable($this->query->wheres[0]['column']) != "id") { - return null; + if ($this->getColumnNameWithoutTable($this->query->wheres[0]['column']) != 'id') { + return; } + return $this->find($this->query->wheres[0]['value'], $columns, $this->token); } - /** - * Generates a list of fields to get for the user model, using defaults or supplied list of fields + * Generates a list of fields to get for the user model, using defaults or supplied list of fields. * * @param array $columns * @return array @@ -213,7 +211,7 @@ public function generateParams($columns = []): array $columns = null; } - if(count($this->queryColumns) > 0){ + if (count($this->queryColumns) > 0) { $columns = $columns ? array_merge($columns, $this->queryColumns) : $this->queryColumns; } @@ -229,9 +227,8 @@ public function generateParams($columns = []): array ), SORT_REGULAR); } - /** - * Removes the table name from an SQL column + * Removes the table name from an SQL column. * * @param string column * @return string diff --git a/src/Models/RemoteModel.php b/src/Models/RemoteModel.php index 44744ec..d53bede 100644 --- a/src/Models/RemoteModel.php +++ b/src/Models/RemoteModel.php @@ -1,9 +1,7 @@ map(function ($attribute, $key) { if (is_array($attribute)) { return array_to_dot([$key => $attribute]); } + return $attribute; })->flatten(); @@ -59,11 +56,13 @@ public function loadMissingAttributes(array $attributes, string $token = null, $ if (data_has($this->attributes, $attribute)) { return true; } + return false; })->each(function ($attribute) use ($nullAsArray) { // Preset the value to ensure no infinite loop if API unavailable - if($nullAsArray){ + if ($nullAsArray) { data_set($this->attributes, explode('.', $attribute)[0], null); + return; } data_set($this->attributes, $attribute, null); @@ -76,11 +75,12 @@ public function loadMissingAttributes(array $attributes, string $token = null, $ } $this->attributes = array_merge($this->attributes, $fetchedModel->attributes); + return $this; } /** - * Returns, or fetches if not set, the attribute for the model + * Returns, or fetches if not set, the attribute for the model. * * @param string $attribute * @param string|null $token Optional API token, otherwise machine-machine will be used @@ -93,11 +93,12 @@ public function attribute(string $attribute, string $token = null) if (! data_get($this, $attribute)) { $this->loadMissingAttributes([$attribute], $token); } + return data_get($this, $attribute); } /** - * Retrieve an updated model instance from the Auth API + * Retrieve an updated model instance from the Auth API. * * @param array|null $columns * @param string|null $token Optional Auth API token for the request @@ -120,7 +121,7 @@ public function newQueryWithoutScopes() } /** - * Sets the Builder class to use + * Sets the Builder class to use. * * @param Builder $query * @return RemoteBuilder @@ -131,7 +132,7 @@ public function newEloquentBuilder($query): RemoteBuilder } /** - * Creates an instance of the model with the given data filled + * Creates an instance of the model with the given data filled. * * @param $data * @return self @@ -142,7 +143,7 @@ public static function initModelWithData($data) } /** - * Get the API method for fetching a single model + * Get the API method for fetching a single model. * * @return string */ @@ -152,7 +153,7 @@ public function getSingleAPIMethod(): string } /** - * Get the API method for fetching multiple of the model + * Get the API method for fetching multiple of the model. * * @return string */ @@ -162,7 +163,7 @@ public function getMultipleAPIMethod(): string } /** - * Get the default fields array + * Get the default fields array. * * @return array */ @@ -172,7 +173,7 @@ public function getDefaultFields(): array } /** - * Sets the Relationship Builder boolean + * Sets the Relationship Builder boolean. * * @param bool $bool */ diff --git a/src/Models/RemoteUser.php b/src/Models/RemoteUser.php index ece7d6a..981cdcc 100644 --- a/src/Models/RemoteUser.php +++ b/src/Models/RemoteUser.php @@ -1,6 +1,5 @@ name_first && ! $this->name_last) { return $this->id; } + return "{$this->name_first} {$this->name_last}"; } } diff --git a/src/Services/JWTService.php b/src/Services/JWTService.php index 463ca20..4a9f2be 100644 --- a/src/Services/JWTService.php +++ b/src/Services/JWTService.php @@ -1,9 +1,7 @@ parse($token); - if (!$token->verify(new Sha256(), new Key(config('app.secret')))) { + if (! $token->verify(new Sha256(), new Key(config('app.secret')))) { return false; } @@ -66,10 +64,10 @@ public static function validateTokenAndGetUser(string $token) ]; // If has session id, check is same session. If not, force authentication - if ($userBaseInfo['has_password'] && (!Cookie::get('ukauth_sesh_id') || decrypt(Cookie::get('ukauth_sesh_id')) != $issuedAt.$userBaseInfo['id'])) { + if ($userBaseInfo['has_password'] && (! Cookie::get('ukauth_sesh_id') || decrypt(Cookie::get('ukauth_sesh_id')) != $issuedAt.$userBaseInfo['id'])) { return false; } return resolve(config('ukauth.auth_user_model'))::initModelWithData($userBaseInfo); } -} \ No newline at end of file +} diff --git a/src/Services/PermissionValidityService.php b/src/Services/PermissionValidityService.php index 7ee2cd6..15e67b0 100644 --- a/src/Services/PermissionValidityService.php +++ b/src/Services/PermissionValidityService.php @@ -1,6 +1,5 @@ search(function ($value) use ($permission) { - return fnmatch($value, $permission) || fnmatch(str_replace('.*', '*', $value), $permission); - }) !== false; + return fnmatch($value, $permission) || fnmatch(str_replace('.*', '*', $value), $permission); + }) !== false; } /** @@ -89,9 +88,10 @@ public function permissionSatisfiedByPermissions(string $permission, $permission */ public function loadJsonPermissions(): array { - if(!file_exists(resource_path('permissions/permissions.json'))){ + if (! file_exists(resource_path('permissions/permissions.json'))) { return []; } + return $this->jsonPermissions ? $this->jsonPermissions : $this->jsonPermissions = json_decode(file_get_contents(resource_path('permissions/permissions.json')), true); } -} \ No newline at end of file +} diff --git a/src/UKAuthServiceProvider.php b/src/UKAuthServiceProvider.php index 868fc0e..3165677 100644 --- a/src/UKAuthServiceProvider.php +++ b/src/UKAuthServiceProvider.php @@ -5,10 +5,10 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasMany; -use Illuminate\Support\Facades\Gate; -use VATSIMUK\Support\Auth\Auth\UKAuthGuard; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Gate; use Illuminate\Support\ServiceProvider; +use VATSIMUK\Support\Auth\Auth\UKAuthGuard; use VATSIMUK\Support\Auth\Auth\UKAuthUserProvider; use VATSIMUK\Support\Auth\Services\PermissionValidityService; @@ -22,7 +22,7 @@ class UKAuthServiceProvider extends ServiceProvider public function register() { $this->mergeConfigFrom( - __DIR__ . '/../config/ukauth.php', + __DIR__.'/../config/ukauth.php', 'ukauth' ); @@ -34,7 +34,6 @@ public function register() return new UKAuthGuard(Auth::createUserProvider($config['provider']), $app->make('request')); }); - $this->registerRelationshipMacros(); $this->registerPermissionsLogic(); @@ -49,14 +48,14 @@ public function register() */ public function boot() { - $this->loadRoutesFrom(__DIR__ . '/routes.php'); + $this->loadRoutesFrom(__DIR__.'/routes.php'); /* * Note: It is preferred that the config is not published. If changed are required to the default, * publish the config and then delete any value you are not overriding. */ $this->publishes([ - __DIR__ . '/../config/ukauth.php' => config_path('ukauth.php'), + __DIR__.'/../config/ukauth.php' => config_path('ukauth.php'), ], 'vatsimuk-auth-package'); } diff --git a/src/helpers.php b/src/helpers.php index 1b4836a..04fca1c 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -3,7 +3,6 @@ use Illuminate\Support\Arr; use Illuminate\Support\Collection; - if (! function_exists('data_has')) { /** * Get an item from an array or object using "dot" notation. @@ -50,10 +49,9 @@ function data_has($target, $key) } } - if (! function_exists('array_to_dot')) { /** - * Extends the Laravel Arr::dot() function to allow for schema arrays rather than arrays with associated values + * Extends the Laravel Arr::dot() function to allow for schema arrays rather than arrays with associated values. * * @param $array * @return Collection @@ -66,10 +64,26 @@ function array_to_dot($array): Collection $exploded = explode('.', $key); array_pop($exploded); $exploded[] = $value; - $newValue = implode(".", $exploded); + $newValue = implode('.', $exploded); return $newValue; })->sort()->values(); + } +} + +if (! function_exists('arrayToObject')) { + /** + * @param ?array $array + * @return stdClass + */ + function arrayToObject($array) + { + // First we convert the array to a json string + $json = json_encode($array); + // The we convert the json string to a stdClass() + $object = json_decode($json); + + return $object; } -} \ No newline at end of file +} diff --git a/src/routes.php b/src/routes.php index 43f68c1..256f4df 100644 --- a/src/routes.php +++ b/src/routes.php @@ -5,6 +5,6 @@ ->prefix('auth') ->name('auth.') ->group(function () { - Route::get('login', 'AuthenticationController@login')->name('login'); - Route::get('login/verify', 'AuthenticationController@verifyLogin')->name('login.verify'); -}); + Route::get('login', 'AuthenticationController@login')->name('login'); + Route::get('login/verify', 'AuthenticationController@verifyLogin')->name('login.verify'); + }); diff --git a/tests/Fixtures/MockJsonResponse.php b/tests/Fixtures/MockJsonResponse.php index 5e07a24..ee2bda5 100644 --- a/tests/Fixtures/MockJsonResponse.php +++ b/tests/Fixtures/MockJsonResponse.php @@ -11,7 +11,7 @@ class MockJsonResponse */ public static function successfulAuthUserResponse() { - return json_decode('{"data":{"authUser":{"id":"1300005","name_first":"5th","name_last":"Test","email":"joe.bloggs@example.org"}}}'); + return json_decode('{"data":{"authUser":{"id":"1300005","name_first":"5th","name_last":"Test","email":"joe.bloggs@example.org"}}}', true); } /** @@ -20,9 +20,9 @@ public static function successfulAuthUserResponse() * @param string $method * @return mixed */ - public static function successfulResponse($method = "user") + public static function successfulResponse($method = 'user') { - return json_decode('{"data":{"'.$method.'":{"id":"1300005","name_first":"5th","name_last":"Test","email":"joe.bloggs@example.org"}}}'); + return json_decode('{"data":{"'.$method.'":{"id":"1300005","name_first":"5th","name_last":"Test","email":"joe.bloggs@example.org"}}}', true); } /** @@ -30,9 +30,9 @@ public static function successfulResponse($method = "user") * * @return mixed */ - public static function successfulMultipleResponse($method = "users") + public static function successfulMultipleResponse($method = 'users') { - return json_decode('{"data":{"'.$method.'":[{"id":"1300001","name_first":"1st","name_last":"Test"}, {"id":"1300005","name_first":"5th","name_last":"Test"}]}}'); + return json_decode('{"data":{"'.$method.'":[{"id":"1300001","name_first":"1st","name_last":"Test"}, {"id":"1300005","name_first":"5th","name_last":"Test"}]}}', true); } /** @@ -42,22 +42,20 @@ public static function successfulMultipleResponse($method = "users") */ public static function emptyResponse() { - return json_decode('{"data":{"user":null}}'); + return json_decode('{"data":{"user":null}}', true); } public static function erroredResponse() { - return json_decode('{"errors": [ { "message": "There was an error" } ]}'); + return json_decode('{"errors": [ { "message": "There was an error" } ]}', true); } - - public static function unauthenticatedResponse() { - return (object) [ - "errors" => [ - ["debugMessage" => "Unauthenticated."] - ] + return [ + 'errors' => [ + ['debugMessage' => 'Unauthenticated.'], + ], ]; } } diff --git a/tests/Fixtures/TestModel.php b/tests/Fixtures/TestModel.php index 9ab6b34..9357721 100644 --- a/tests/Fixtures/TestModel.php +++ b/tests/Fixtures/TestModel.php @@ -1,12 +1,28 @@ belongsTo(TestRemoteModel::class, 'foreign_key', 'owner_key'); + } + + public function remoteModelHasOne() + { + return $this->hasOne(TestRemoteModel::class, 'foreign_key', 'local_key'); + } -} \ No newline at end of file + public function remoteModelHasMany() + { + return $this->hasMany(TestRemoteModel::class, 'foreign_key', 'local_key'); + } +} diff --git a/tests/Fixtures/TestRemoteModel.php b/tests/Fixtures/TestRemoteModel.php index d9ba276..a2c6cfe 100644 --- a/tests/Fixtures/TestRemoteModel.php +++ b/tests/Fixtures/TestRemoteModel.php @@ -1,9 +1,7 @@ newRelatedInstance($model); } - -} \ No newline at end of file +} diff --git a/tests/GraphQL/BuilderTest.php b/tests/GraphQL/BuilderTest.php index 7873899..798a913 100644 --- a/tests/GraphQL/BuilderTest.php +++ b/tests/GraphQL/BuilderTest.php @@ -1,9 +1,8 @@ builder = new Builder("user", ['id', 'id', 'name_first', 'ratings' => ['id', 'name'], 'bans.body']); + $this->builder = new Builder('user', ['id', 'id', 'name_first', 'ratings' => ['id', 'name'], 'bans.body']); } public function testItCanBeExecuted() { - // Test token retrieving - $this->mockGuzzleClientThrowRequestException(); + Http::fakeSequence() + ->pushResponse(Http::response(null, 500)) + ->pushResponse(Http::response(MockJsonResponse::successfulResponse(), 200)) + ->pushResponse(Http::response(null, 500)); + // Test token retrieving $this->assertFalse($this->builder->execute()->isOk()); - $responses = [ - new Response(200, [], json_encode([ - 'type' => 'Bearer', - 'access_token' => 'eyTokenHere' - ])), - new Response(200, [], json_encode(MockJsonResponse::successfulResponse())) - ]; - - $this->mockGuzzleClientResponse($responses); - - $this->assertInstanceOf(\VATSIMUK\Support\Auth\GraphQL\Response::class, $response = $this->builder->execute()); + $this->assertInstanceOf(\VATSIMUK\Support\Auth\GraphQL\Response::class, $response = $this->builder->execute('eyTokenHere')); $this->assertFalse($response->hasErrors()); $this->assertEquals($response->getResults()->name_first, '5th'); - $this->mockGuzzleClientThrowRequestException(); - // With Failed Token Retrieval $this->assertTrue(($response = $this->builder->execute())->hasErrors()); $this->assertFalse($response->isOk()); @@ -51,14 +41,13 @@ public function testItCanBeExecuted() public function testItHandlesIncorrectAPIResponse() { - $responses = [ - new Response(200, [], json_encode([ + Http::response([ 'type' => 'Bearer', - 'access_token' => 'eyTokenHere' - ])), - new Response(200, [], 'justa string, not json'), - new Response(200, [], json_encode(MockJsonResponse::unauthenticatedResponse())), + 'access_token' => 'eyTokenHere', + ], 200), + Http::response('just a string, not json', 200), + Http::response(MockJsonResponse::unauthenticatedResponse(), 200), ]; $this->mockGuzzleClientResponse($responses); @@ -72,25 +61,20 @@ public function testItHandlesIncorrectAPIResponse() public function testItCanCheckAPIPulse() { $responses = [ - new Response(200, [], '{"alive":true}'), - new Response(500, []) + Http::response('{"alive":true}', 200), + Http::response(null, 500), ]; $this->mockGuzzleClientResponse($responses); $this->assertTrue($this->builder::checkAlive()); $this->assertFalse($this->builder::checkAlive()); - - - $this->mockGuzzleClientThrowRequestException(); - $this->builder::checkAlive(); - } public function testItCanComposeAGraphQLQuery() { $this->assertEquals(trim(preg_replace('/ {4}|\r/', '', - "query { + 'query { user { id name_first @@ -102,11 +86,11 @@ public function testItCanComposeAGraphQLQuery() body } } - }")), $this->builder->getGraphQLQuery()); + }')), $this->builder->getGraphQLQuery()); } public function testItReturnsTheMethod() { - $this->assertEquals("user", $this->builder->getMethod()); + $this->assertEquals('user', $this->builder->getMethod()); } } diff --git a/tests/GraphQL/ResponseTest.php b/tests/GraphQL/ResponseTest.php index c173fef..1218c0e 100644 --- a/tests/GraphQL/ResponseTest.php +++ b/tests/GraphQL/ResponseTest.php @@ -23,13 +23,13 @@ protected function setUp(): void { parent::setUp(); - $this->builder = new PackageBuilder('user', ["name_first", "name_last",]); - $this->multiBuilder = new PackageBuilder('users', ["name_first", "name_last",]); - $this->erroredResponse = new PackageResponse(MockJsonResponse::erroredResponse(), $this->builder); - $this->normalResponse = new PackageResponse(MockJsonResponse::successfulResponse(), $this->builder); - $this->normalMultipleResponse = new PackageResponse(MockJsonResponse::successfulMultipleResponse(), $this->multiBuilder); - $this->emptyDataResponse = new PackageResponse(MockJsonResponse::emptyResponse(), $this->builder); - $this->unauthenticatedResponse = new PackageResponse(MockJsonResponse::unauthenticatedResponse(), $this->builder); + $this->builder = new PackageBuilder('user', ['name_first', 'name_last']); + $this->multiBuilder = new PackageBuilder('users', ['name_first', 'name_last']); + $this->erroredResponse = new PackageResponse(arrayToObject(MockJsonResponse::erroredResponse()), $this->builder); + $this->normalResponse = new PackageResponse(arrayToObject(MockJsonResponse::successfulResponse()), $this->builder); + $this->normalMultipleResponse = new PackageResponse(arrayToObject(MockJsonResponse::successfulMultipleResponse()), $this->multiBuilder); + $this->emptyDataResponse = new PackageResponse(arrayToObject(MockJsonResponse::emptyResponse()), $this->builder); + $this->unauthenticatedResponse = new PackageResponse(arrayToObject(MockJsonResponse::unauthenticatedResponse()), $this->builder); } /** @test */ @@ -61,20 +61,20 @@ public function itRetrievesFieldsCorrectlyFromNormalResponse() 'id' => 1300005, 'name_first' => '5th', 'name_last' => 'Test', - 'email' => 'joe.bloggs@example.org' + 'email' => 'joe.bloggs@example.org', ]; $this->assertInstanceOf(\stdClass::class, $this->normalResponse->getResults()); - $this->assertEquals((array)$this->normalResponse->getResults(), $expected); + $this->assertEquals((array) $this->normalResponse->getResults(), $expected); } /** @test */ public function itExtractsTheErrorsFromBadResponse() { $firstErrorIndex = 0; - $expected = ['message' => "There was an error"]; + $expected = ['message' => 'There was an error']; - $this->assertEquals((array)$this->erroredResponse->getErrors()[$firstErrorIndex], $expected); + $this->assertEquals((array) $this->erroredResponse->getErrors()[$firstErrorIndex], $expected); $this->assertNull($this->normalResponse->getErrors()); } diff --git a/tests/HelpersTest.php b/tests/HelpersTest.php index ff37118..fa181f1 100644 --- a/tests/HelpersTest.php +++ b/tests/HelpersTest.php @@ -1,12 +1,9 @@ data = [ - 'tree1' => [ - 'subtree1' => 'a subtree 1 value' + 'tree3' => [ + 'subtree1' => 'a subtree 1 value', ], 'tree2' => 'tree 2 value', 'tree1' => [ 'subtree1' => [ - 'subsubtree1' => 'a subsubtree 1 value' + 'subsubtree1' => 'a subsubtree 1 value', ], ], ]; @@ -28,10 +25,14 @@ protected function setUp(): void public function testDataHas() { - $this->assertTrue(data_has($this->data, 'tree1.subtree1')); + $this->assertTrue(data_has($this->data, null)); $this->assertFalse(data_has($this->data, 'tree1.subtree1.0')); + $this->assertFalse(data_has(null, 'tree3.*')); + $this->assertTrue(data_has(collect($this->data), 'tree3.*')); + $this->assertTrue(data_has(arrayToObject($this->data), 'tree3.subtree1')); + $this->assertTrue(data_has($this->data, 'tree2')); $this->assertTrue(data_has($this->data, '*')); $this->assertTrue(data_has($this->data, 'tree1.subtree1.subsubtree1')); @@ -42,15 +43,15 @@ public function testArrayToDot() $this->assertEquals([ 'user.bans.body', 'user.bans.reason', - 'user.name' + 'user.name', ], array_to_dot([ 'user' => [ 'name', 'bans' => [ 'body', - 'reason' - ] - ] + 'reason', + ], + ], ])->all()); } -} \ No newline at end of file +} diff --git a/tests/Models/HasRemoteRelationshipsTest.php b/tests/Models/HasRemoteRelationshipsTest.php index cf9d1ae..8f6fbc5 100644 --- a/tests/Models/HasRemoteRelationshipsTest.php +++ b/tests/Models/HasRemoteRelationshipsTest.php @@ -1,9 +1,7 @@ assertInstanceOf(RemoteUser::class, $this->model->createNewRelatedInstance(RemoteUser::class)); - $mockedUser = $this->spy(RemoteUser::class, function (MockInterface $mock){ + $mockedUser = $this->spy(RemoteUser::class, function (MockInterface $mock) { $mock->shouldReceive('setRelationshipBuilder')->once(); }); $this->assertInstanceOf(RemoteUser::class, $this->model->createNewRelatedInstance($mockedUser)); - $mockedNormalModel = $this->spy(TestModel::class, function (MockInterface $mock){ + $mockedNormalModel = $this->spy(TestModel::class, function (MockInterface $mock) { $mock->shouldNotReceive('setRelationshipBuilder'); }); $this->model->createNewRelatedInstance($mockedNormalModel); } - - -} \ No newline at end of file +} diff --git a/tests/Models/RemoteBuilderTest.php b/tests/Models/RemoteBuilderTest.php index 1c1db4c..8a1e618 100644 --- a/tests/Models/RemoteBuilderTest.php +++ b/tests/Models/RemoteBuilderTest.php @@ -1,10 +1,9 @@ mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulResponse('single')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulResponse('single'), 200)); $response = $this->builder->returnResponse()->find(1300005, [], 'eyFakeToken'); $this->assertInstanceOf(Response::class, $response); - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulMultipleResponse('many')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulMultipleResponse('many'), 200)); $response = $this->builder->returnResponse()->findMany(1300005, [], 'eyFakeToken'); $this->assertInstanceOf(Response::class, $response); @@ -42,7 +41,7 @@ public function testItCanReturnResponse() public function testItCanReturnHydratedModel() { - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulResponse('single')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulResponse('single'), 200)); $response = $this->builder->find(1300005, [], 'eyFakeToken'); $this->assertInstanceOf(TestRemoteModel::class, $response); @@ -50,7 +49,7 @@ public function testItCanReturnHydratedModel() public function testItCanReturnHydratedModels() { - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulMultipleResponse('many')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulMultipleResponse('many'), 200)); $response = $this->builder->findMany([1300001, 1300005], [], 'eyFakeToken'); @@ -66,17 +65,17 @@ public function testItCanAddInColumnsToQuery() public function testItCanGetManyByID() { - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulMultipleResponse('many')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulMultipleResponse('many'), 200)); $this->builder->setToken('eyFakeToken'); $response = (clone $this->builder)->whereIn('id', [1300001, 1300005])->get(); $this->assertEquals(2, count($response)); - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulMultipleResponse('many')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulMultipleResponse('many'), 200)); $response = (clone $this->builder)->where('id', 1300001)->get(); $this->assertInstanceOf(\Illuminate\Support\Collection::class, $response); $this->assertFalse($response->isEmpty()); - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulMultipleResponse('many')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulMultipleResponse('many'), 200)); $response = (clone $this->builder)->whereIn('name', ['Joe', 'Jeff'])->get(); $this->assertInstanceOf(\Illuminate\Support\Collection::class, $response); $this->assertTrue($response->isEmpty()); @@ -84,7 +83,7 @@ public function testItCanGetManyByID() public function testItReturnsFindManyIfArrayGiven() { - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulMultipleResponse('many')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulMultipleResponse('many'), 200)); $this->builder->setToken('eyFakeToken'); $response = $this->builder->find([1300001, 1300005]); $this->assertEquals(2, count($response)); @@ -92,7 +91,7 @@ public function testItReturnsFindManyIfArrayGiven() public function testItCanFindFirstById() { - $this->mockGuzzleClientResponse(new \GuzzleHttp\Psr7\Response(200, [], json_encode(MockJsonResponse::successfulResponse('single')))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulResponse('single'), 200)); $this->builder->setToken('eyFakeToken'); $response = (clone $this->builder)->where('id', 1300001)->first(); $this->assertInstanceOf(TestRemoteModel::class, $response); @@ -100,4 +99,4 @@ public function testItCanFindFirstById() $response = $this->builder->where('name', 'Bob')->first(); $this->assertNull($response); } -} \ No newline at end of file +} diff --git a/tests/Models/RemoteRelationshipBuilderTest.php b/tests/Models/RemoteRelationshipBuilderTest.php new file mode 100644 index 0000000..f0ad4c4 --- /dev/null +++ b/tests/Models/RemoteRelationshipBuilderTest.php @@ -0,0 +1,42 @@ +class = new TestModel([ + 'id' => 123, + 'foreign_key' => 456, + 'local_key' => 789, + ]); + + $this->builder = $this->class->remoteModel(); + $this->mockGuzzleClientThrowRequestException(); + } + + public function testItCanFindTheMatchingModelByResolvingRelationship() + { + $this->assertInstanceOf(TestRemoteModel::class, $this->class->remoteModel); + $this->assertInstanceOf(TestRemoteModel::class, $this->class->remoteModelHasOne); + $this->assertEquals($this->class->remoteModel->id, 456); + $this->assertEquals($this->class->remoteModelHasOne->id, 789); + } +} diff --git a/tests/Models/RemoteUserTest.php b/tests/Models/RemoteUserTest.php index c4f250f..e2bc8bd 100644 --- a/tests/Models/RemoteUserTest.php +++ b/tests/Models/RemoteUserTest.php @@ -1,9 +1,8 @@ mockGuzzleClientResponse(new Response(200, [], json_encode(MockJsonResponse::successfulAuthUserResponse()))); + $this->mockGuzzleClientResponse(Http::response(MockJsonResponse::successfulAuthUserResponse(), 200)); $user = RemoteUser::findWithAccessToken('eyMyAuthAccessToken'); - $this->assertEquals("5th", $user->name_first); + $this->assertEquals('5th', $user->name_first); } public function testItCanLoadMissingAttributes() { $model = new RemoteUser([ - 'id' => 123 + 'id' => 123, ]); $this->assertNull($model->name_first); - $this->mockGuzzleClientResponse(new Response(200, [], json_encode([ - "data" => [ - "user" => [ + $this->mockGuzzleClientResponse(Http::response([ + 'data' => [ + 'user' => [ 'atcRating' => [ - 'code' => "C1" + 'code' => 'C1', ], 'id' => 123, - 'name_first' => "Joe" - ] - ] - ]))); + 'name_first' => 'Joe', + ], + ], + ], 200)); $response = $model->loadMissingAttributes([ 'atcRating' => ['code'], 'id', - 'name_first' + 'name_first', ], 'eyFakeToken'); $this->assertInstanceOf(RemoteUser::class, $response); - $this->assertEquals("Joe", $response->name_first); + $this->assertEquals('Joe', $response->name_first); } public function testItCanLoadMissingAttributesHandlesDownAPI() { $model = new RemoteUser([ - 'id' => 123 + 'id' => 123, ]); $this->mockGuzzleClientThrowRequestException(); @@ -83,7 +82,7 @@ public function testItCanLoadMissingAttributesHandlesDownAPI() $response = $model->loadMissingAttributes([ 'atcRating' => ['code'], 'id', - 'email' + 'email', ]); $this->assertInstanceOf(RemoteUser::class, $response); @@ -99,8 +98,8 @@ public function testItCanReturnOrFetchAttribute() 'id' => 123, 'name_first' => 'Joe', 'activeBan' => [ - 'body' => 'Was Naughty' - ] + 'body' => 'Was Naughty', + ], ]); $this->assertEquals('Joe', $model->attribute('name_first')); @@ -117,11 +116,15 @@ public function testItCanRetrieveFreshInstance() 'name_first' => 'Joe', ]); - $this->mockGuzzleClientThrowRequestException(); + $responses = [ + Http::response(null, 500), + Http::response(MockJsonResponse::successfulResponse(), 200), + ]; + + $this->mockGuzzleClientResponse($responses); $newModel = $model->fresh(['name_first', 'name_last', 'email'], 'eyFakeToken'); $this->assertEquals($model, $newModel); - $this->mockGuzzleClientResponse(new Response(200, [], json_encode(MockJsonResponse::successfulResponse()))); $model = $model->fresh(['name_first', 'name_last', 'email'], 'eyFakeToken'); $this->assertEquals('5th Test', $model->name); @@ -165,13 +168,13 @@ public function testWithRatingsScope() public function testItCanRetrieveRatingsLazyLoaded() { + $this->mockGuzzleClientThrowRequestException(); $user = new RemoteUser(); $this->assertEmpty($user->attributesToArray()); $this->assertNull($user->pilotRatings); $this->assertNotEmpty($user->attributesToArray()); - $user = new RemoteUser(); $this->assertNull($user->atcRating->code); $this->assertNotEmpty($user->attributesToArray()); @@ -182,13 +185,12 @@ public function testItCanHavePermissions() $user = RemoteUser::initModelWithData([ 'all_permissions' => [ 'auth.user.create', - 'auth.bans.*' - ] + 'auth.bans.*', + ], ]); $this->assertTrue($user->can('auth.user.create')); $this->assertTrue($user->can('auth.bans.modify.repeal')); $this->assertFalse($user->can('auth.permissions.add')); - } } diff --git a/tests/Services/JwtServiceTest.php b/tests/Services/JwtServiceTest.php index fa0a09c..e870292 100644 --- a/tests/Services/JwtServiceTest.php +++ b/tests/Services/JwtServiceTest.php @@ -1,11 +1,10 @@ 'Last', 'has_password' => false, 'roles' => [ - ['name' => 'Role 1'] + ['name' => 'Role 1'], ], 'all_permissions' => [ - 'ukts.test.permission' - ] - ]), Carbon::now()->addDay()->timestamp, "eyAccessToken"); + 'ukts.test.permission', + ], + ]), Carbon::now()->addDay()->timestamp, 'eyAccessToken'); $this->assertNotNull($token); $this->assertEquals('Last', $token->getClaim('name_last')); @@ -38,12 +37,12 @@ public function testItCanGenerateAndReadTokenWithSecondaryPassword() 'name_last' => 'Last', 'has_password' => true, 'roles' => [ - ['name' => 'Role 1'] + ['name' => 'Role 1'], ], 'all_permissions' => [ - 'ukts.test.permission' - ] - ]), Carbon::now()->addDay()->timestamp, "eyAccessToken"); + 'ukts.test.permission', + ], + ]), Carbon::now()->addDay()->timestamp, 'eyAccessToken'); $this->assertNotNull($token); $this->assertEquals('Last', $token->getClaim('name_last')); diff --git a/tests/Services/PermissionValidityServiceTest.php b/tests/Services/PermissionValidityServiceTest.php index ff18a12..21691ee 100644 --- a/tests/Services/PermissionValidityServiceTest.php +++ b/tests/Services/PermissionValidityServiceTest.php @@ -8,7 +8,6 @@ class PermissionValidityServiceTest extends TestCase { - protected function setUp(): void { parent::setUp(); @@ -35,7 +34,6 @@ protected function setUp(): void })->makePartial(); } - /** @test */ public function itIdentifiesIfPermissionIsValid() { @@ -50,7 +48,6 @@ public function itIdentifiesIfPermissionIsValid() $this->assertFalse(PermissionValidity::isValidPermission('example.doesnt.exist')); } - /** @test */ public function itReportsIfPermissionIsGrantedFromListOfHeldPermissions() { diff --git a/tests/TestCase.php b/tests/TestCase.php index 093a1fc..6f54e08 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,13 +1,8 @@ $value){ + foreach ($defaultConfig as $key => $value) { $app['config']->set('ukauth.'.$key, $value); } @@ -36,27 +31,28 @@ protected function resolveApplicationConfiguration($app) public function mockGuzzleClientResponse($responses) { - $this->mock(Client::class, function ($mock) use ($responses) { - if(!is_array($responses)){ - $mock->shouldReceive('request') - ->andReturn($responses); - }else{ - $mock->shouldReceive('request') - ->andReturnValues($responses); + if (! is_array($responses)) { + Http::fakeSequence() + ->whenEmpty($responses); + } else { + $sequence = Http::fakeSequence(); + foreach ($responses as $response) { + $sequence->pushResponse($response); } - })->makePartial(); + + return $sequence; + } } public function mockGuzzleClientThrowRequestException() { - $this->mock(Client::class, function ($mock) { - $mock->shouldReceive('request') - ->andThrow(new RequestException(null, new Request('post', 'a/call'))); - })->makePartial(); + Http::fake(function ($request) { + return Http::response(null, 500); + }); } public function assertCollectionSubset($subset, $collection) { $this->assertEquals($subset, $subset->intersect($collection)); } -} \ No newline at end of file +}