From bc2c838855c62da0e408bfd1a2104f3d32bfed65 Mon Sep 17 00:00:00 2001 From: Diana Scharf Date: Tue, 20 Sep 2022 14:39:00 +0200 Subject: [PATCH 01/10] Moved existing FilterTest to PEST tests --- tests/FilterTest.php | 86 +++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 50 deletions(-) diff --git a/tests/FilterTest.php b/tests/FilterTest.php index f4e2a9a..0f12c0e 100644 --- a/tests/FilterTest.php +++ b/tests/FilterTest.php @@ -1,57 +1,43 @@ assertInstanceOf(Filter::class, $filter); - $this->assertArrayHasKey('property', $filter->toQuery()); - $this->assertEquals('Name', $filter->toQuery()['property']); - $this->assertArrayHasKey('text', $filter->toQuery()); - $this->assertArrayHasKey('equals', $filter->toQuery()['text']); - $this->assertEquals('Ada Lovelace', $filter->toQuery()['text']['equals']); - } - - /** @test */ - public function it_creates_a_number_filter_with_the_given_data() - { - $filter = Filter::numberFilter('Awesomeness Level', Operators::GREATER_THAN_OR_EQUAL_TO, 9000); - - $this->assertInstanceOf(Filter::class, $filter); - $this->assertArrayHasKey('property', $filter->toQuery()); - $this->assertEquals('Awesomeness Level', $filter->toQuery()['property']); - $this->assertArrayHasKey('number', $filter->toQuery()); - $this->assertArrayHasKey('greater_than_or_equal_to', $filter->toQuery()['number']); - $this->assertEquals('9000', $filter->toQuery()['number']['greater_than_or_equal_to']); - } - - /** @test */ - public function it_throws_an_exception_for_an_invalid_comparison_operator() - { - $this->expectException(HandlingException::class); - $this->expectExceptionMessage('Invalid comparison operator'); - $filter = Filter::numberFilter('Awesomeness Level', 'non_existing_operator', 9000); - } - - /** @test */ - public function it_throws_an_exception_for_an_invalid_filter_definition() - { - $filter = new Filter('Test'); - - $this->expectException(HandlingException::class); - $this->expectExceptionMessage('Invalid filter definition.'); - $filter->toArray(); - } -} +it('creates a text filter with the given data', function () { + $filter = Filter::textFilter('Name', Operators::EQUALS, 'Ada Lovelace'); + + $this->assertInstanceOf(Filter::class, $filter); + $this->assertArrayHasKey('property', $filter->toQuery()); + $this->assertEquals('Name', $filter->toQuery()['property']); + $this->assertArrayHasKey('text', $filter->toQuery()); + $this->assertArrayHasKey('equals', $filter->toQuery()['text']); + $this->assertEquals('Ada Lovelace', $filter->toQuery()['text']['equals']);# +}); + + +it('creates a number filter with the given data', function () { + $filter = Filter::numberFilter('Awesomeness Level', Operators::GREATER_THAN_OR_EQUAL_TO, 9000); + + $this->assertInstanceOf(Filter::class, $filter); + $this->assertArrayHasKey('property', $filter->toQuery()); + $this->assertEquals('Awesomeness Level', $filter->toQuery()['property']); + $this->assertArrayHasKey('number', $filter->toQuery()); + $this->assertArrayHasKey('greater_than_or_equal_to', $filter->toQuery()['number']); + $this->assertEquals('9000', $filter->toQuery()['number']['greater_than_or_equal_to']); +}); + +it('throws an HandlingException for an invalid comparison operator', function () { + $this->expectException(HandlingException::class); + $this->expectExceptionMessage('Invalid comparison operator'); + $filter = Filter::numberFilter('Awesomeness Level', 'non_existing_operator', 9000); +}); + +it('throws an exception for an invalid filter definition', function () { + $filter = new Filter('Test'); + + $this->expectException(HandlingException::class); + $this->expectExceptionMessage('Invalid filter definition.'); + $filter->toArray(); +}); \ No newline at end of file From 1ddb0ddc4f34dae50cac637489d194f6cfc7fe03 Mon Sep 17 00:00:00 2001 From: Diana Scharf Date: Sun, 25 Sep 2022 13:43:46 +0200 Subject: [PATCH 02/10] WIP --- composer.lock | 2367 +++++++++++++++++++------------ src/Endpoints/Database.php | 70 +- src/Query/Filters/Filter.php | 2 +- src/Query/Filters/FilterBag.php | 116 ++ tests/EndpointDatabaseTest.php | 386 +++-- tests/FilterBagTest.php | 69 + tests/Pest.php | 5 + tests/TestCase.php | 16 + 8 files changed, 1934 insertions(+), 1097 deletions(-) create mode 100644 src/Query/Filters/FilterBag.php create mode 100644 tests/FilterBagTest.php create mode 100644 tests/Pest.php create mode 100644 tests/TestCase.php diff --git a/composer.lock b/composer.lock index 6d60e3b..7925d58 100644 --- a/composer.lock +++ b/composer.lock @@ -8,26 +8,26 @@ "packages": [ { "name": "brick/math", - "version": "0.9.2", + "version": "0.10.2", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0" + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", - "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.3.2" + "phpunit/phpunit": "^9.0", + "vimeo/psalm": "4.25.0" }, "type": "library", "autoload": { @@ -52,46 +52,117 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.2" + "source": "https://github.com/brick/math/tree/0.10.2" }, "funding": [ { - "url": "https://tidelift.com/funding/github/packagist/brick/math", - "type": "tidelift" + "url": "https://github.com/BenMorel", + "type": "github" } ], - "time": "2021-01-20T22:51:39+00:00" + "time": "2022-08-10T22:54:19+00:00" }, { - "name": "doctrine/inflector", - "version": "2.0.3", + "name": "dflydev/dot-access-data", + "version": "v3.0.1", "source": { "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "0992cc19268b259a39e86f296da5f0677841f42c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/0992cc19268b259a39e86f296da5f0677841f42c", + "reference": "0992cc19268b259a39e86f296da5f0677841f42c", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^7.0", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^3.14" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "3.x-dev" } }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.1" + }, + "time": "2021-08-13T13:06:58+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", + "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25" + }, + "type": "library", "autoload": { "psr-4": { "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" @@ -139,7 +210,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.x" + "source": "https://github.com/doctrine/inflector/tree/2.0.5" }, "funding": [ { @@ -155,36 +226,32 @@ "type": "tidelift" } ], - "time": "2020-05-29T15:13:26+00:00" + "time": "2022-09-07T09:01:28+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" @@ -219,7 +286,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.1" + "source": "https://github.com/doctrine/lexer/tree/1.2.3" }, "funding": [ { @@ -235,33 +302,33 @@ "type": "tidelift" } ], - "time": "2020-05-25T17:44:05+00:00" + "time": "2022-02-28T11:07:21+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v3.1.0", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c" + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c", - "reference": "7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "webmozart/assert": "^1.7.0" + "webmozart/assert": "^1.0" }, "replace": { "mtdowling/cron-expression": "^1.0" }, "require-dev": { "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-webmozart-assert": "^0.12.7", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", @@ -288,7 +355,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.1.0" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" }, "funding": [ { @@ -296,7 +363,7 @@ "type": "github" } ], - "time": "2020-11-24T19:55:57+00:00" + "time": "2022-09-10T18:51:20+00:00" }, { "name": "egulias/email-validator", @@ -368,31 +435,26 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.1", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb" + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", "shasum": "" }, "require": { - "php": "^7.0|^8.0", - "phpoption/phpoption": "^1.7.3" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0" + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { "GrahamCampbell\\ResultType\\": "src/" @@ -405,7 +467,8 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "An Implementation Of The Result Type", @@ -418,7 +481,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" }, "funding": [ { @@ -430,38 +493,39 @@ "type": "tidelift" } ], - "time": "2020-04-13T13:17:36+00:00" + "time": "2022-07-30T15:56:11+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.3.0", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "7008573787b430c1c1f650e3722d9bba59967628" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", - "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7 || ^2.0", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" }, "provide": { "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { "ext-curl": "Required for CURL handler support", @@ -470,36 +534,64 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.5-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", @@ -513,7 +605,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -525,28 +617,24 @@ "type": "github" }, { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" } ], - "time": "2021-03-23T11:33:13+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.4.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -558,26 +646,41 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", @@ -586,66 +689,110 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, - "time": "2021-03-07T09:25:29+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.8.2", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91" + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "2.4-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -661,22 +808,36 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.2" + "source": "https://github.com/guzzle/psr7/tree/2.4.1" }, - "time": "2021-04-26T09:17:50+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-08-28T14:45:39+00:00" }, { "name": "laravel/framework", - "version": "v8.42.1", + "version": "v8.83.24", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "41ec4897a70eb8729cf0ff34a8354413c54e42a6" + "reference": "a684da6197ae77eee090637ae4411b2f321adfc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/41ec4897a70eb8729cf0ff34a8354413c54e42a6", - "reference": "41ec4897a70eb8729cf0ff34a8354413c54e42a6", + "url": "https://api.github.com/repos/laravel/framework/zipball/a684da6197ae77eee090637ae4411b2f321adfc7", + "reference": "a684da6197ae77eee090637ae4411b2f321adfc7", "shasum": "" }, "require": { @@ -686,34 +847,37 @@ "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/commonmark": "^1.3", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^1.3|^2.0.2", "league/flysystem": "^1.1", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.31", + "nesbot/carbon": "^2.53.1", "opis/closure": "^3.6", "php": "^7.3|^8.0", "psr/container": "^1.0", + "psr/log": "^1.0|^2.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^4.0", - "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^5.1.4", - "symfony/error-handler": "^5.1.4", - "symfony/finder": "^5.1.4", - "symfony/http-foundation": "^5.1.4", - "symfony/http-kernel": "^5.1.4", - "symfony/mime": "^5.1.4", - "symfony/process": "^5.1.4", - "symfony/routing": "^5.1.4", - "symfony/var-dumper": "^5.1.4", + "ramsey/uuid": "^4.2.2", + "swiftmailer/swiftmailer": "^6.3", + "symfony/console": "^5.4", + "symfony/error-handler": "^5.4", + "symfony/finder": "^5.4", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4", + "symfony/mime": "^5.4", + "symfony/process": "^5.4", + "symfony/routing": "^5.4", + "symfony/var-dumper": "^5.4", "tijsverkoyen/css-to-inline-styles": "^2.2.2", - "vlucas/phpdotenv": "^5.2", - "voku/portable-ascii": "^1.4.8" + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^1.6.1" }, "conflict": { "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "replace": { "illuminate/auth": "self.version", @@ -749,22 +913,24 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.155", - "doctrine/dbal": "^2.6|^3.0", - "filp/whoops": "^2.8", + "aws/aws-sdk-php": "^3.198.1", + "doctrine/dbal": "^2.13.3|^3.1.4", + "filp/whoops": "^2.14.3", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.4.2", - "orchestra/testbench-core": "^6.8", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^6.27", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.5.8|^9.3.3", - "predis/predis": "^1.1.1", - "symfony/cache": "^5.1.4" + "phpunit/phpunit": "^8.5.19|^9.5.8", + "predis/predis": "^1.1.9", + "symfony/cache": "^5.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).", + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", "brianium/paratest": "Required to run tests in parallel (^6.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6|^3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", + "ext-bcmath": "Required to use the multiple_of validation rule.", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", @@ -772,21 +938,21 @@ "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "filp/whoops": "Required for friendly error pages in development (^2.8).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", "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.4.2).", + "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.5.8|^9.3.3).", - "predis/predis": "Required to use the predis connector (^1.1.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9).", "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|^5.0|^6.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.1.4).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", "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)." }, @@ -831,46 +997,118 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-05-19T13:03:18+00:00" + "time": "2022-09-22T18:59:47+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2022-09-08T13:45:54+00:00" }, { "name": "league/commonmark", - "version": "1.6.2", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "7d70d2f19c84bcc16275ea47edabee24747352eb" + "reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/7d70d2f19c84bcc16275ea47edabee24747352eb", - "reference": "7d70d2f19c84bcc16275ea47edabee24747352eb", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/84d74485fdb7074f4f9dd6f02ab957b1de513257", + "reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "cebe/markdown": "~1.0", - "commonmark/commonmark.js": "0.29.2", - "erusev/parsedown": "~1.0", + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.0", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", - "michelf/php-markdown": "~1.4", - "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", - "scrutinizer/ocular": "^1.5", - "symfony/finder": "^4.2" + "michelf/php-markdown": "^1.4", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" }, - "bin": [ - "bin/commonmark" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + } + }, "autoload": { "psr-4": { "League\\CommonMark\\": "src" @@ -888,7 +1126,7 @@ "role": "Lead Developer" } ], - "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", "homepage": "https://commonmark.thephpleague.com", "keywords": [ "commonmark", @@ -902,15 +1140,12 @@ ], "support": { "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", "issues": "https://github.com/thephpleague/commonmark/issues", "rss": "https://github.com/thephpleague/commonmark/releases.atom", "source": "https://github.com/thephpleague/commonmark" }, "funding": [ - { - "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", - "type": "custom" - }, { "url": "https://www.colinodell.com/sponsor", "type": "custom" @@ -923,29 +1158,107 @@ "url": "https://github.com/colinodell", "type": "github" }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/league/commonmark", "type": "tidelift" } ], - "time": "2021-05-12T11:39:41+00:00" + "time": "2022-07-29T10:59:45+00:00" + }, + { + "name": "league/config", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", + "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.90", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "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": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2021-08-14T12:15:32+00:00" }, { "name": "league/flysystem", - "version": "1.1.3", + "version": "1.1.9", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" + "reference": "094defdb4a7001845300334e7c1ee2335925ef99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", - "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", + "reference": "094defdb4a7001845300334e7c1ee2335925ef99", "shasum": "" }, "require": { @@ -961,7 +1274,6 @@ "phpunit/phpunit": "^8.5.8" }, "suggest": { - "ext-fileinfo": "Required for MimeType", "ext-ftp": "Allows you to use FTP server storage", "ext-openssl": "Allows you to use FTPS server storage", "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", @@ -1019,7 +1331,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.x" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.9" }, "funding": [ { @@ -1027,20 +1339,20 @@ "type": "other" } ], - "time": "2020-08-23T07:39:11+00:00" + "time": "2021-12-09T09:40:50+00:00" }, { "name": "league/mime-type-detection", - "version": "1.7.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", - "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", "shasum": "" }, "require": { @@ -1048,7 +1360,7 @@ "php": "^7.2 || ^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", + "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", "phpunit/phpunit": "^8.5.8 || ^9.3" }, @@ -1071,7 +1383,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" }, "funding": [ { @@ -1083,56 +1395,62 @@ "type": "tidelift" } ], - "time": "2021-01-18T20:58:21+00:00" + "time": "2022-04-17T13:12:02+00:00" }, { "name": "monolog/monolog", - "version": "2.2.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", "shasum": "" }, "require": { "php": ">=7.2", - "psr/log": "^1.0.1" + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "provide": { - "psr/log-implementation": "1.0.0" + "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" }, "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", "graylog2/gelf-php": "^1.4.2", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", - "phpstan/phpstan": "^0.12.59", - "phpunit/phpunit": "^8.5", - "predis/predis": "^1.1", - "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90 <7.0.1", - "swiftmailer/swiftmailer": "^5.3|^6.0" + "php-amqplib/php-amqplib": "~2.4 || ^3", + "phpspec/prophecy": "^1.15", + "phpstan/phpstan": "^0.12.91", + "phpunit/phpunit": "^8.5.14", + "predis/predis": "^1.1 || ^2.0", + "rollbar/rollbar": "^1.3 || ^2 || ^3", + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", "doctrine/couchdb": "Allow sending log messages to a CouchDB server", "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", "ext-mbstring": "Allow to work properly with unicode symbols", "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -1167,7 +1485,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.2.0" + "source": "https://github.com/Seldaek/monolog/tree/2.8.0" }, "funding": [ { @@ -1179,113 +1497,269 @@ "type": "tidelift" } ], - "time": "2020-12-14T13:15:25+00:00" + "time": "2022-07-24T11:55:47+00:00" }, { "name": "nesbot/carbon", - "version": "2.48.0", + "version": "2.62.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d3c447f21072766cddec3522f9468a5849a76147" + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3c447f21072766cddec3522f9468a5849a76147", - "reference": "d3c447f21072766cddec3522f9468a5849a76147", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", "symfony/polyfill-mbstring": "^1.0", - "symfony/translation": "^3.4 || ^4.0 || ^5.0" + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { + "doctrine/dbal": "^2.0 || ^3.0", "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, - "bin": [ - "bin/carbon" - ], + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2022-09-02T07:48:13+00:00" + }, + { + "name": "nette/schema", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/9a39cef03a5b34c7de64f551538cbba05c2be5df", + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": ">=7.1 <8.2" + }, + "require-dev": { + "nette/tester": "^2.3 || ^2.4", + "phpstan/phpstan-nette": "^0.12", + "tracy/tracy": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.2.2" + }, + "time": "2021-10-15T11:40:02+00:00" + }, + { + "name": "nette/utils", + "version": "v3.2.8", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "shasum": "" + }, + "require": { + "php": ">=7.2 <8.3" + }, + "conflict": { + "nette/di": "<3.0.6" + }, + "require-dev": { + "nette/tester": "~2.0", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev", - "dev-3.x": "3.x-dev" - }, - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - }, - "phpstan": { - "includes": [ - "extension.neon" - ] + "dev-master": "3.2-dev" } }, "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" ], "authors": [ { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "name": "David Grudl", + "homepage": "https://davidgrudl.com" }, { - "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "name": "Nette Community", + "homepage": "https://nette.org/contributors" } ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", "keywords": [ - "date", + "array", + "core", "datetime", - "time" + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" ], "support": { - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon" + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.8" }, - "funding": [ - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2021-05-07T10:08:30+00:00" + "time": "2022-09-12T23:36:20+00:00" }, { "name": "opis/closure", - "version": "3.6.2", + "version": "3.6.3", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6" + "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/06e2ebd25f2869e54a306dda991f7db58066f7f6", - "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6", + "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad", + "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad", "shasum": "" }, "require": { @@ -1302,12 +1776,12 @@ } }, "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, "files": [ "functions.php" - ] + ], + "psr-4": { + "Opis\\Closure\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1335,35 +1809,39 @@ ], "support": { "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.2" + "source": "https://github.com/opis/closure/tree/3.6.3" }, - "time": "2021-04-09T13:42:10+00:00" + "time": "2022-01-27T09:35:39+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.5", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + "bamarni/composer-bin-plugin": "^1.8", + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1378,11 +1856,13 @@ "authors": [ { "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" }, { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "Option Type for PHP", @@ -1394,7 +1874,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.7.5" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" }, "funding": [ { @@ -1406,7 +1886,7 @@ "type": "tidelift" } ], - "time": "2020-07-20T17:29:33+00:00" + "time": "2022-07-30T15:51:26+00:00" }, { "name": "psr/container", @@ -1558,6 +2038,61 @@ }, "time": "2020-06-29T06:28:15+00:00" }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -1613,30 +2148,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1657,9 +2192,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:41:46+00:00" }, { "name": "psr/simple-cache", @@ -1758,20 +2293,21 @@ }, { "name": "ramsey/collection", - "version": "1.1.3", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1" + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", - "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", "shasum": "" }, "require": { - "php": "^7.2 || ^8" + "php": "^7.3 || ^8", + "symfony/polyfill-php81": "^1.23" }, "require-dev": { "captainhook/captainhook": "^5.3", @@ -1781,6 +2317,7 @@ "hamcrest/hamcrest-php": "^2", "jangregor/phpstan-prophecy": "^0.8", "mockery/mockery": "^1.3", + "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^0.12.32", "phpstan/phpstan-mockery": "^0.12.5", @@ -1808,7 +2345,7 @@ "homepage": "https://benramsey.com" } ], - "description": "A PHP 7.2+ library for representing and manipulating collections.", + "description": "A PHP library for representing and manipulating collections.", "keywords": [ "array", "collection", @@ -1819,7 +2356,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.1.3" + "source": "https://github.com/ramsey/collection/tree/1.2.2" }, "funding": [ { @@ -1831,53 +2368,53 @@ "type": "tidelift" } ], - "time": "2021-01-21T17:40:04+00:00" + "time": "2021-10-10T03:01:02+00:00" }, { "name": "ramsey/uuid", - "version": "4.1.1", + "version": "4.5.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "cd4032040a750077205918c86049aa0f43d22947" + "reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/cd4032040a750077205918c86049aa0f43d22947", - "reference": "cd4032040a750077205918c86049aa0f43d22947", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/a161a26d917604dc6d3aa25100fddf2556e9f35d", + "reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9", + "brick/math": "^0.8.8 || ^0.9 || ^0.10", + "ext-ctype": "*", "ext-json": "*", - "php": "^7.2 || ^8", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8" + "php": "^8.0", + "ramsey/collection": "^1.0" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.8", - "goaop/framework": "^2", + "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "moontoast/math": "^1.1", "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", - "php-mock/php-mock-phpunit": "^2.5", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpbench/phpbench": "^0.17.1", - "phpstan/extension-installer": "^1.0", - "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", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "3.9.4" + "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", @@ -1889,24 +2426,23 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "4.x-dev" + "captainhook": { + "force-install": true } }, "autoload": { - "psr-4": { - "Ramsey\\Uuid\\": "src/" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", "identifier", @@ -1914,29 +2450,32 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "rss": "https://github.com/ramsey/uuid/releases.atom", - "source": "https://github.com/ramsey/uuid" + "source": "https://github.com/ramsey/uuid/tree/4.5.1" }, "funding": [ { "url": "https://github.com/ramsey", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" } ], - "time": "2020-08-18T17:17:46+00:00" + "time": "2022-09-16T03:22:46+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.7", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "15f7faf8508e04471f666633addacf54c0ab5933" + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", - "reference": "15f7faf8508e04471f666633addacf54c0ab5933", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", "shasum": "" }, "require": { @@ -1948,7 +2487,7 @@ }, "require-dev": { "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.0" + "symfony/phpunit-bridge": "^4.4|^5.4" }, "suggest": { "ext-intl": "Needed to support internationalized email addresses" @@ -1986,7 +2525,7 @@ ], "support": { "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" }, "funding": [ { @@ -1998,7 +2537,8 @@ "type": "tidelift" } ], - "time": "2021-03-09T12:30:35+00:00" + "abandoned": "symfony/mailer", + "time": "2021-10-18T15:26:12+00:00" }, { "name": "symfony/console", @@ -2101,20 +2641,20 @@ }, { "name": "symfony/css-selector", - "version": "v5.2.9", + "version": "v6.0.11", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "5d5f97809015102116208b976eb2edb44b689560" + "reference": "ab2746acddc4f03a7234c8441822ac5d5c63efe9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/5d5f97809015102116208b976eb2edb44b689560", - "reference": "5d5f97809015102116208b976eb2edb44b689560", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/ab2746acddc4f03a7234c8441822ac5d5c63efe9", + "reference": "ab2746acddc4f03a7234c8441822ac5d5c63efe9", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -2146,7 +2686,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.2.9" + "source": "https://github.com/symfony/css-selector/tree/v6.0.11" }, "funding": [ { @@ -2162,29 +2702,29 @@ "type": "tidelift" } ], - "time": "2021-05-16T13:07:46+00:00" + "time": "2022-06-27T17:10:44+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -2213,7 +2753,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -2229,33 +2769,35 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/error-handler", - "version": "v5.2.8", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "1416bc16317a8188aabde251afef7618bf4687ac" + "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/1416bc16317a8188aabde251afef7618bf4687ac", - "reference": "1416bc16317a8188aabde251afef7618bf4687ac", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/f75d17cb4769eb38cd5fccbda95cd80a054d35c8", + "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/log": "^1.0", - "symfony/polyfill-php80": "^1.15", - "symfony/var-dumper": "^4.4|^5.0" + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "require-dev": { - "symfony/deprecation-contracts": "^2.1", - "symfony/http-kernel": "^4.4|^5.0", - "symfony/serializer": "^4.4|^5.0" + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/http-kernel": "^4.4|^5.0|^6.0", + "symfony/serializer": "^4.4|^5.0|^6.0" }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], "type": "library", "autoload": { "psr-4": { @@ -2282,7 +2824,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.2.8" + "source": "https://github.com/symfony/error-handler/tree/v5.4.11" }, "funding": [ { @@ -2298,44 +2840,42 @@ "type": "tidelift" } ], - "time": "2021-05-07T13:42:21+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.2.4", + "version": "v6.0.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d08d6ec121a425897951900ab692b612a61d6240" + "reference": "5c85b58422865d42c6eb46f7693339056db098a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", - "reference": "d08d6ec121a425897951900ab692b612a61d6240", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5c85b58422865d42c6eb46f7693339056db098a8", + "reference": "5c85b58422865d42c6eb46f7693339056db098a8", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/event-dispatcher-contracts": "^2", - "symfony/polyfill-php80": "^1.15" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/error-handler": "^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" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^5.4|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -2367,147 +2907,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-18T17:12:37+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/69fee1ad2332a7cbab3aca13591953da9cdb7a11", - "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-03-23T23:28:01+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.2.9", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "ccccb9d48ca42757dd12f2ca4bf857a4e217d90d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ccccb9d48ca42757dd12f2ca4bf857a4e217d90d", - "reference": "ccccb9d48ca42757dd12f2ca4bf857a4e217d90d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.9" }, "funding": [ { @@ -2523,32 +2923,33 @@ "type": "tidelift" } ], - "time": "2021-05-16T13:07:46+00:00" + "time": "2022-05-05T16:45:52+00:00" }, { - "name": "symfony/http-client-contracts", - "version": "v2.4.0", + "name": "symfony/event-dispatcher-contracts", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/7e82f6084d7cae521a75ef2cb5c9457bbda785f4", - "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=8.0.2", + "psr/event-dispatcher": "^1" }, "suggest": { - "symfony/http-client-implementation": "" + "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -2557,7 +2958,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" + "Symfony\\Contracts\\EventDispatcher\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2574,7 +2975,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to HTTP clients", + "description": "Generic abstractions related to dispatching event", "homepage": "https://symfony.com", "keywords": [ "abstractions", @@ -2585,7 +2986,70 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:55:41+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.4.11" }, "funding": [ { @@ -2601,33 +3065,36 @@ "type": "tidelift" } ], - "time": "2021-04-11T23:07:08+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.2.8", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e8fbbab7c4a71592985019477532629cb2e142dc" + "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e8fbbab7c4a71592985019477532629cb2e142dc", - "reference": "e8fbbab7c4a71592985019477532629cb2e142dc", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f4bfe9611b113b15d98a43da68ec9b5a00d56791", + "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "require-dev": { "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/mime": "^4.4|^5.0" + "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -2658,7 +3125,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.2.8" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.12" }, "funding": [ { @@ -2674,40 +3141,39 @@ "type": "tidelift" } ], - "time": "2021-05-07T13:41:16+00:00" + "time": "2022-08-19T07:33:17+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.2.9", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "eb540ef6870dbf33c92e372cfb869ebf9649e6cb" + "reference": "37f660fa3bcd78fe4893ce23ebe934618ec099be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/eb540ef6870dbf33c92e372cfb869ebf9649e6cb", - "reference": "eb540ef6870dbf33c92e372cfb869ebf9649e6cb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/37f660fa3bcd78fe4893ce23ebe934618ec099be", + "reference": "37f660fa3bcd78fe4893ce23ebe934618ec099be", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/log": "~1.0", - "symfony/deprecation-contracts": "^2.1", - "symfony/error-handler": "^4.4|^5.0", - "symfony/event-dispatcher": "^5.0", - "symfony/http-client-contracts": "^1.1|^2", - "symfony/http-foundation": "^4.4|^5.0", + "psr/log": "^1|^2", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^5.0|^6.0", + "symfony/http-foundation": "^5.3.7|^6.0", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/browser-kit": "<4.4", + "symfony/browser-kit": "<5.4", "symfony/cache": "<5.0", "symfony/config": "<5.0", "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.1.8", + "symfony/dependency-injection": "<5.3", "symfony/doctrine-bridge": "<5.0", "symfony/form": "<5.0", "symfony/http-client": "<5.0", @@ -2719,23 +3185,24 @@ "twig/twig": "<2.13" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "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": "^5.1.8", - "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", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/config": "^5.0|^6.0", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/css-selector": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.3|^6.0", + "symfony/dom-crawler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/routing": "^4.4|^5.0|^6.0", + "symfony/stopwatch": "^4.4|^5.0|^6.0", + "symfony/translation": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2|^3", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -2770,7 +3237,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.2.9" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.12" }, "funding": [ { @@ -2786,28 +3253,28 @@ "type": "tidelift" } ], - "time": "2021-05-19T12:23:45+00:00" + "time": "2022-08-26T14:40:40+00:00" }, { "name": "symfony/mime", - "version": "v5.2.9", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "64258e870f8cc75c3dae986201ea2df58c210b52" + "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/64258e870f8cc75c3dae986201ea2df58c210b52", - "reference": "64258e870f8cc75c3dae986201ea2df58c210b52", + "url": "https://api.github.com/repos/symfony/mime/zipball/03876e9c5a36f5b45e7d9a381edda5421eff8a90", + "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "egulias/email-validator": "~3.0.0", @@ -2818,10 +3285,10 @@ "require-dev": { "egulias/email-validator": "^2.1.10|^3.1", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/property-access": "^4.4|^5.1", - "symfony/property-info": "^4.4|^5.1", - "symfony/serializer": "^5.2" + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/property-access": "^4.4|^5.1|^6.0", + "symfony/property-info": "^4.4|^5.1|^6.0", + "symfony/serializer": "^5.2|^6.0" }, "type": "library", "autoload": { @@ -2853,7 +3320,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.2.9" + "source": "https://github.com/symfony/mime/tree/v5.4.12" }, "funding": [ { @@ -2869,7 +3336,7 @@ "type": "tidelift" } ], - "time": "2021-05-16T13:07:46+00:00" + "time": "2022-08-19T14:24:03+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2955,28 +3422,31 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.22.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342" + "reference": "143f1881e655bebca1312722af8068de235ae5dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/06fb361659649bcfd6a208a0f1fcaf4e827ad342", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/143f1881e655bebca1312722af8068de235ae5dc", + "reference": "143f1881e655bebca1312722af8068de235ae5dc", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-iconv": "*" + }, "suggest": { "ext-iconv": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2984,12 +3454,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Iconv\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3015,7 +3485,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.26.0" }, "funding": [ { @@ -3031,7 +3501,7 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -3116,16 +3586,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.22.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -3139,7 +3609,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3147,12 +3617,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3183,7 +3653,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -3199,7 +3669,7 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -3370,16 +3840,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.22.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", "shasum": "" }, "require": { @@ -3388,7 +3858,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3396,12 +3866,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3426,7 +3896,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" }, "funding": [ { @@ -3442,7 +3912,7 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php73", @@ -3606,23 +4076,102 @@ ], "time": "2022-05-10T07:21:04+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, { "name": "symfony/process", - "version": "v5.2.7", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e" + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -3650,7 +4199,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.0-BETA1" + "source": "https://github.com/symfony/process/tree/v5.4.11" }, "funding": [ { @@ -3666,40 +4215,41 @@ "type": "tidelift" } ], - "time": "2021-04-08T10:27:02+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/routing", - "version": "v5.2.9", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "4a7b2bf5e1221be1902b6853743a9bb317f6925e" + "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/4a7b2bf5e1221be1902b6853743a9bb317f6925e", - "reference": "4a7b2bf5e1221be1902b6853743a9bb317f6925e", + "url": "https://api.github.com/repos/symfony/routing/zipball/3e01ccd9b2a3a4167ba2b3c53612762300300226", + "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php80": "^1.15" + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/config": "<5.0", + "doctrine/annotations": "<1.12", + "symfony/config": "<5.3", "symfony/dependency-injection": "<4.4", "symfony/yaml": "<4.4" }, "require-dev": { - "doctrine/annotations": "^1.10.4", - "psr/log": "~1.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" + "doctrine/annotations": "^1.12", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.3|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/config": "For using the all-in-one router or any loader", @@ -3739,7 +4289,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.2.9" + "source": "https://github.com/symfony/routing/tree/v5.4.11" }, "funding": [ { @@ -3755,7 +4305,7 @@ "type": "tidelift" } ], - "time": "2021-05-16T13:07:46+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/service-contracts", @@ -3927,44 +4477,46 @@ }, { "name": "symfony/translation", - "version": "v5.2.9", + "version": "v6.0.12", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "61af68dba333e2d376a325a29c2a3f2a605b4876" + "reference": "5e71973b4991e141271465dacf4bf9e719941424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/61af68dba333e2d376a325a29c2a3f2a605b4876", - "reference": "61af68dba333e2d376a325a29c2a3f2a605b4876", + "url": "https://api.github.com/repos/symfony/translation/zipball/5e71973b4991e141271465dacf4bf9e719941424", + "reference": "5e71973b4991e141271465dacf4bf9e719941424", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15", - "symfony/translation-contracts": "^2.3" + "symfony/translation-contracts": "^2.3|^3.0" }, "conflict": { - "symfony/config": "<4.4", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { - "symfony/translation-implementation": "2.3" + "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { - "psr/log": "~1.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" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -4000,7 +4552,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.9" + "source": "https://github.com/symfony/translation/tree/v6.0.12" }, "funding": [ { @@ -4016,24 +4568,24 @@ "type": "tidelift" } ], - "time": "2021-05-16T13:07:46+00:00" + "time": "2022-08-02T16:01:06+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.4.0", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95" + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/acbfbb274e730e5a0236f619b6168d9dedb3e282", + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=8.0.2" }, "suggest": { "symfony/translation-implementation": "" @@ -4041,7 +4593,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4078,7 +4630,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.2" }, "funding": [ { @@ -4094,26 +4646,26 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2022-06-27T17:10:44+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.2.8", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba" + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d693200a73fae179d27f8f1b16b4faf3e8569eba", - "reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "phpunit/phpunit": "<5.4.3", @@ -4121,8 +4673,9 @@ }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/uid": "^5.1|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -4166,7 +4719,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.2.8" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" }, "funding": [ { @@ -4182,30 +4735,30 @@ "type": "tidelift" } ], - "time": "2021-05-07T13:42:21+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.3", + "version": "2.2.5", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5" + "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5", - "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/4348a3a06651827a27d989ad1d13efec6bb49b19", + "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" }, "type": "library", "extra": { @@ -4233,37 +4786,37 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.3" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.5" }, - "time": "2020-07-13T06:12:54+00:00" + "time": "2022-09-12T13:28:28+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.3.0", + "version": "v5.4.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56" + "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/264dce589e7ce37a7ba99cb901eed8249fbec92f", + "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.1", + "graham-campbell/result-type": "^1.0.2", "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.7.4", - "symfony/polyfill-ctype": "^1.17", - "symfony/polyfill-mbstring": "^1.17", - "symfony/polyfill-php80": "^1.17" + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1" + "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -4271,7 +4824,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.4-dev" } }, "autoload": { @@ -4286,13 +4839,13 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" }, { "name": "Vance Lucas", "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "homepage": "https://github.com/vlucas" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -4303,7 +4856,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.1" }, "funding": [ { @@ -4315,20 +4868,20 @@ "type": "tidelift" } ], - "time": "2021-01-20T15:23:13+00:00" + "time": "2021-12-12T23:22:04+00:00" }, { "name": "voku/portable-ascii", - "version": "1.5.6", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "80953678b19901e5165c56752d087fc11526017c" + "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/80953678b19901e5165c56752d087fc11526017c", - "reference": "80953678b19901e5165c56752d087fc11526017c", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/87337c91b9dfacee02452244ee14ab3c43bc485a", + "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a", "shasum": "" }, "require": { @@ -4365,7 +4918,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/1.5.6" + "source": "https://github.com/voku/portable-ascii/tree/1.6.1" }, "funding": [ { @@ -4389,7 +4942,7 @@ "type": "tidelift" } ], - "time": "2020-11-12T00:07:28+00:00" + "time": "2022-01-24T18:55:24+00:00" }, { "name": "webmozart/assert", @@ -4576,32 +5129,34 @@ }, { "name": "fakerphp/faker", - "version": "v1.14.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1" + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", - "psr/container": "^1.0", - "symfony/deprecation-contracts": "^2.2" + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" }, "conflict": { "fzaninotto/faker": "*" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", "symfony/phpunit-bridge": "^4.4 || ^5.2" }, "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", "ext-curl": "Required by Faker\\Provider\\Image to download images.", "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", @@ -4610,7 +5165,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.15-dev" + "dev-main": "v1.20-dev" } }, "autoload": { @@ -4635,9 +5190,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1" + "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" }, - "time": "2021-03-30T06:27:33+00:00" + "time": "2022-07-20T13:12:54+00:00" }, { "name": "filp/whoops", @@ -4763,16 +5318,16 @@ }, { "name": "mockery/mockery", - "version": "1.4.3", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea" + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", "shasum": "" }, "require": { @@ -4829,9 +5384,9 @@ ], "support": { "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.4.3" + "source": "https://github.com/mockery/mockery/tree/1.5.1" }, - "time": "2021-02-24T09:51:49+00:00" + "time": "2022-09-07T15:32:08+00:00" }, { "name": "myclabs/deep-copy", @@ -5037,25 +5592,25 @@ }, { "name": "orchestra/testbench", - "version": "v6.17.1", + "version": "v6.25.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "d6df638c569899443a1e4dc14a33490837201784" + "reference": "a65b90b78caed1fdface168ca02af34f3422e513" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/d6df638c569899443a1e4dc14a33490837201784", - "reference": "d6df638c569899443a1e4dc14a33490837201784", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/a65b90b78caed1fdface168ca02af34f3422e513", + "reference": "a65b90b78caed1fdface168ca02af34f3422e513", "shasum": "" }, "require": { - "laravel/framework": "^8.25", - "mockery/mockery": "^1.4.2", - "orchestra/testbench-core": "^6.21.3", + "laravel/framework": "^8.75", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^6.29", "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^8.4 || ^9.3.3", - "spatie/laravel-ray": "^1.17.1" + "phpunit/phpunit": "^8.5.21 || ^9.5.10", + "spatie/laravel-ray": "^1.26.2" }, "type": "library", "extra": { @@ -5086,7 +5641,7 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v6.17.1" + "source": "https://github.com/orchestral/testbench/tree/v6.25.0" }, "funding": [ { @@ -5098,20 +5653,20 @@ "type": "liberapay" } ], - "time": "2021-05-18T23:14:29+00:00" + "time": "2022-08-24T01:41:23+00:00" }, { "name": "orchestra/testbench-core", - "version": "v6.21.3", + "version": "v6.29.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "e20e4ed5586993940679119c4eeaed3b21037ac5" + "reference": "8eeace7d979a7905e6fab77a30a3b05da99459c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/e20e4ed5586993940679119c4eeaed3b21037ac5", - "reference": "e20e4ed5586993940679119c4eeaed3b21037ac5", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/8eeace7d979a7905e6fab77a30a3b05da99459c4", + "reference": "8eeace7d979a7905e6fab77a30a3b05da99459c4", "shasum": "" }, "require": { @@ -5121,20 +5676,20 @@ "vlucas/phpdotenv": "^5.1" }, "require-dev": { - "laravel/framework": "^8.26", + "laravel/framework": "^8.75", "laravel/laravel": "8.x-dev", - "mockery/mockery": "^1.4.2", + "mockery/mockery": "^1.4.4", "orchestra/canvas": "^6.1", - "phpunit/phpunit": "^8.4 || ^9.3.3 || ^10.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10", "spatie/laravel-ray": "^1.7.1", "symfony/process": "^5.0" }, "suggest": { - "laravel/framework": "Required for testing (^8.26).", - "mockery/mockery": "Allow using Mockery for testing (^1.4.2).", + "laravel/framework": "Required for testing (^8.75).", + "mockery/mockery": "Allow using Mockery for testing (^1.4.4).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^6.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^6.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^8.4|^9.3.3)." + "phpunit/phpunit": "Allow using PHPUnit for testing (^8.5.21|^9.5.10|^10.0)." }, "bin": [ "testbench" @@ -5146,6 +5701,9 @@ } }, "autoload": { + "files": [ + "src/helpers.php" + ], "psr-4": { "Orchestra\\Testbench\\": "src/" } @@ -5185,7 +5743,7 @@ "type": "liberapay" } ], - "time": "2021-05-18T09:19:25+00:00" + "time": "2022-08-24T00:15:20+00:00" }, { "name": "pestphp/pest", @@ -5302,29 +5860,29 @@ }, { "name": "pestphp/pest-plugin", - "version": "v1.0.0", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin.git", - "reference": "fc8519de148699fe612d9c669be60554cd2db4fa" + "reference": "606c5f79c6a339b49838ffbee0151ca519efe378" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/fc8519de148699fe612d9c669be60554cd2db4fa", - "reference": "fc8519de148699fe612d9c669be60554cd2db4fa", + "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/606c5f79c6a339b49838ffbee0151ca519efe378", + "reference": "606c5f79c6a339b49838ffbee0151ca519efe378", "shasum": "" }, "require": { - "composer-plugin-api": "^1.1 || ^2.0", + "composer-plugin-api": "^1.1.0 || ^2.0.0", "php": "^7.3 || ^8.0" }, "conflict": { "pestphp/pest": "<1.0" }, "require-dev": { - "composer/composer": "^1.10.19", - "pestphp/pest": "^1.0", - "pestphp/pest-dev-tools": "dev-master" + "composer/composer": "^2.4.2", + "pestphp/pest": "^1.22.1", + "pestphp/pest-dev-tools": "^1.0.0" }, "type": "composer-plugin", "extra": { @@ -5354,7 +5912,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin/tree/v1.0.0" + "source": "https://github.com/pestphp/pest-plugin/tree/v1.1.0" }, "funding": [ { @@ -5370,7 +5928,7 @@ "type": "patreon" } ], - "time": "2021-01-03T15:53:42+00:00" + "time": "2022-09-18T13:18:17+00:00" }, { "name": "phar-io/manifest", @@ -5899,6 +6457,59 @@ ], "time": "2022-08-30T07:42:16+00:00" }, + { + "name": "pimple/pimple", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed", + "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1 || ^2.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^5.4@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "https://pimple.symfony.com", + "keywords": [ + "container", + "dependency injection" + ], + "support": { + "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" + }, + "time": "2021-10-28T11:13:42+00:00" + }, { "name": "sebastian/cli-parser", "version": "1.0.1", @@ -6068,16 +6679,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -6130,7 +6741,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -6138,7 +6749,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -6328,16 +6939,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -6393,7 +7004,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -6401,7 +7012,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -6756,16 +7367,16 @@ }, { "name": "sebastian/type", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb44e1cc6e557418387ad815780360057e40753e" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e", - "reference": "fb44e1cc6e557418387ad815780360057e40753e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -6777,7 +7388,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -6800,7 +7411,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.1.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -6808,7 +7419,7 @@ "type": "github" } ], - "time": "2022-08-29T06:55:37+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -6865,16 +7476,16 @@ }, { "name": "spatie/backtrace", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "9b4df807fb65aaa8006dcd7a7ccdef8fb4bb002e" + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/9b4df807fb65aaa8006dcd7a7ccdef8fb4bb002e", - "reference": "9b4df807fb65aaa8006dcd7a7ccdef8fb4bb002e", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", "shasum": "" }, "require": { @@ -6911,7 +7522,7 @@ ], "support": { "issues": "https://github.com/spatie/backtrace/issues", - "source": "https://github.com/spatie/backtrace/tree/1.2.0" + "source": "https://github.com/spatie/backtrace/tree/1.2.1" }, "funding": [ { @@ -6923,43 +7534,47 @@ "type": "other" } ], - "time": "2021-05-19T12:49:10+00:00" + "time": "2021-11-09T10:57:15+00:00" }, { "name": "spatie/laravel-ray", - "version": "1.17.4", + "version": "1.31.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "e48be16da1952ffca868c77f509a767d3fc632bc" + "reference": "7394694afd89d05879e7a69c54abab73c1199acd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/e48be16da1952ffca868c77f509a767d3fc632bc", - "reference": "e48be16da1952ffca868c77f509a767d3fc632bc", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/7394694afd89d05879e7a69c54abab73c1199acd", + "reference": "7394694afd89d05879e7a69c54abab73c1199acd", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/contracts": "^7.20|^8.0", - "illuminate/database": "^7.20|^8.13", - "illuminate/queue": "^7.20|^8.13", - "illuminate/support": "^7.20|^8.13", + "illuminate/contracts": "^7.20|^8.19|^9.0", + "illuminate/database": "^7.20|^8.19|^9.0", + "illuminate/queue": "^7.20|^8.19|^9.0", + "illuminate/support": "^7.20|^8.19|^9.0", "php": "^7.3|^8.0", "spatie/backtrace": "^1.0", - "spatie/ray": "^1.21.2", - "symfony/stopwatch": "4.2|^5.1", - "zbateson/mail-mime-parser": "^1.3.1" + "spatie/ray": "^1.33", + "symfony/stopwatch": "4.2|^5.1|^6.0", + "zbateson/mail-mime-parser": "^1.3.1|^2.0" }, "require-dev": { - "facade/ignition": "^2.5", - "laravel/framework": "^7.20|^8.19", - "orchestra/testbench-core": "^5.0|^6.0", + "guzzlehttp/guzzle": "^7.3", + "laravel/framework": "^7.20|^8.19|^9.0", + "orchestra/testbench-core": "^5.0|^6.0|^7.0", + "phpstan/phpstan": "^0.12.93", "phpunit/phpunit": "^9.3", "spatie/phpunit-snapshot-assertions": "^4.2" }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "1.29.x-dev" + }, "laravel": { "providers": [ "Spatie\\LaravelRay\\RayServiceProvider" @@ -6991,7 +7606,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.17.4" + "source": "https://github.com/spatie/laravel-ray/tree/1.31.0" }, "funding": [ { @@ -7003,24 +7618,24 @@ "type": "other" } ], - "time": "2021-04-30T08:20:24+00:00" + "time": "2022-09-20T13:13:22+00:00" }, { "name": "spatie/macroable", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/spatie/macroable.git", - "reference": "7a99549fc001c925714b329220dea680c04bfa48" + "reference": "ec2c320f932e730607aff8052c44183cf3ecb072" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/macroable/zipball/7a99549fc001c925714b329220dea680c04bfa48", - "reference": "7a99549fc001c925714b329220dea680c04bfa48", + "url": "https://api.github.com/repos/spatie/macroable/zipball/ec2c320f932e730607aff8052c44183cf3ecb072", + "reference": "ec2c320f932e730607aff8052c44183cf3ecb072", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^8.0" }, "require-dev": { "phpunit/phpunit": "^8.0|^9.3" @@ -7051,22 +7666,22 @@ ], "support": { "issues": "https://github.com/spatie/macroable/issues", - "source": "https://github.com/spatie/macroable/tree/1.0.1" + "source": "https://github.com/spatie/macroable/tree/2.0.0" }, - "time": "2020-11-03T10:15:05+00:00" + "time": "2021-03-26T22:39:02+00:00" }, { "name": "spatie/ray", - "version": "1.22.1", + "version": "1.36.0", "source": { "type": "git", "url": "https://github.com/spatie/ray.git", - "reference": "e82408b78b1391eaee6c962b13c37e80080dc15a" + "reference": "4a4def8cda4806218341b8204c98375aa8c34323" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ray/zipball/e82408b78b1391eaee6c962b13c37e80080dc15a", - "reference": "e82408b78b1391eaee6c962b13c37e80080dc15a", + "url": "https://api.github.com/repos/spatie/ray/zipball/4a4def8cda4806218341b8204c98375aa8c34323", + "reference": "4a4def8cda4806218341b8204c98375aa8c34323", "shasum": "" }, "require": { @@ -7076,25 +7691,25 @@ "ramsey/uuid": "^3.0|^4.1", "spatie/backtrace": "^1.1", "spatie/macroable": "^1.0|^2.0", - "symfony/stopwatch": "^4.0|^5.1", - "symfony/var-dumper": "^4.2|^5.1" + "symfony/stopwatch": "^4.0|^5.1|^6.0", + "symfony/var-dumper": "^4.2|^5.1|^6.0" }, "require-dev": { - "illuminate/support": "6.x|^8.18", + "illuminate/support": "6.x|^8.18|^9.0", "nesbot/carbon": "^2.43", + "phpstan/phpstan": "^0.12.92", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.9.16", "spatie/phpunit-snapshot-assertions": "^4.2", "spatie/test-time": "^1.2" }, "type": "library", "autoload": { - "psr-4": { - "Spatie\\Ray\\": "src" - }, "files": [ "src/helpers.php" - ] + ], + "psr-4": { + "Spatie\\Ray\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7116,7 +7731,7 @@ ], "support": { "issues": "https://github.com/spatie/ray/issues", - "source": "https://github.com/spatie/ray/tree/1.22.1" + "source": "https://github.com/spatie/ray/tree/1.36.0" }, "funding": [ { @@ -7128,25 +7743,25 @@ "type": "other" } ], - "time": "2021-04-28T09:47:47+00:00" + "time": "2022-08-11T14:04:18+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.2.7", + "version": "v6.0.5", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "d99310c33e833def36419c284f60e8027d359678" + "reference": "f2c1780607ec6502f2121d9729fd8150a655d337" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/d99310c33e833def36419c284f60e8027d359678", - "reference": "d99310c33e833def36419c284f60e8027d359678", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f2c1780607ec6502f2121d9729fd8150a655d337", + "reference": "f2c1780607ec6502f2121d9729fd8150a655d337", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1.0|^2" + "php": ">=8.0.2", + "symfony/service-contracts": "^1|^2|^3" }, "type": "library", "autoload": { @@ -7174,7 +7789,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.3.0-BETA1" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.5" }, "funding": [ { @@ -7190,32 +7805,32 @@ "type": "tidelift" } ], - "time": "2021-03-29T15:28:41+00:00" + "time": "2022-02-21T17:15:17+00:00" }, { "name": "symfony/yaml", - "version": "v5.2.9", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "d23115e4a3d50520abddccdbec9514baab1084c8" + "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/d23115e4a3d50520abddccdbec9514baab1084c8", - "reference": "d23115e4a3d50520abddccdbec9514baab1084c8", + "url": "https://api.github.com/repos/symfony/yaml/zipball/7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", + "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-ctype": "~1.8" + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<4.4" + "symfony/console": "<5.3" }, "require-dev": { - "symfony/console": "^4.4|^5.0" + "symfony/console": "^5.3|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -7249,7 +7864,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.2.9" + "source": "https://github.com/symfony/yaml/tree/v5.4.12" }, "funding": [ { @@ -7265,7 +7880,7 @@ "type": "tidelift" } ], - "time": "2021-05-16T13:07:46+00:00" + "time": "2022-08-02T15:52:22+00:00" }, { "name": "theseer/tokenizer", @@ -7319,30 +7934,28 @@ }, { "name": "zbateson/mail-mime-parser", - "version": "1.3.1", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/zbateson/mail-mime-parser.git", - "reference": "706964d904798b8c22d63f62f0ec5f5bc84e30d9" + "reference": "318cd809afebe48e8fb41625b05b25470fb3fa86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/706964d904798b8c22d63f62f0ec5f5bc84e30d9", - "reference": "706964d904798b8c22d63f62f0ec5f5bc84e30d9", + "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/318cd809afebe48e8fb41625b05b25470fb3fa86", + "reference": "318cd809afebe48e8fb41625b05b25470fb3fa86", "shasum": "" }, "require": { - "guzzlehttp/psr7": "^1.0", + "guzzlehttp/psr7": "^1.7.0|^2.0", "php": ">=5.4", + "pimple/pimple": "^3.0", "zbateson/mb-wrapper": "^1.0.1", - "zbateson/stream-decorators": "^1.0.4" + "zbateson/stream-decorators": "^1.0.6" }, "require-dev": { - "jms/serializer": "^1.1", "mikey179/vfsstream": "^1.6.0", - "phing/phing": "^2.15.0", - "phpdocumentor/phpdocumentor": "^2.9.0", - "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5" + "sanmai/phpunit-legacy-adapter": "^6.3 || ^8.2" }, "suggest": { "ext-iconv": "For best support/performance", @@ -7390,20 +8003,20 @@ "type": "github" } ], - "time": "2020-12-02T21:55:45+00:00" + "time": "2022-09-01T15:59:13+00:00" }, { "name": "zbateson/mb-wrapper", - "version": "1.0.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/zbateson/mb-wrapper.git", - "reference": "721b3dfbf7ab75fee5ac60a542d7923ffe59ef6d" + "reference": "5d9d190ef18ce6d424e3ac6f5ebe13901f92b74a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/721b3dfbf7ab75fee5ac60a542d7923ffe59ef6d", - "reference": "721b3dfbf7ab75fee5ac60a542d7923ffe59ef6d", + "url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/5d9d190ef18ce6d424e3ac6f5ebe13901f92b74a", + "reference": "5d9d190ef18ce6d424e3ac6f5ebe13901f92b74a", "shasum": "" }, "require": { @@ -7412,7 +8025,7 @@ "symfony/polyfill-mbstring": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5" + "sanmai/phpunit-legacy-adapter": "^6.3 || ^8" }, "suggest": { "ext-iconv": "For best support/performance", @@ -7449,7 +8062,7 @@ ], "support": { "issues": "https://github.com/zbateson/mb-wrapper/issues", - "source": "https://github.com/zbateson/mb-wrapper/tree/1.0.1" + "source": "https://github.com/zbateson/mb-wrapper/tree/1.1.2" }, "funding": [ { @@ -7457,29 +8070,29 @@ "type": "github" } ], - "time": "2020-10-21T22:14:27+00:00" + "time": "2022-05-26T15:55:05+00:00" }, { "name": "zbateson/stream-decorators", - "version": "1.0.4", + "version": "1.0.7", "source": { "type": "git", "url": "https://github.com/zbateson/stream-decorators.git", - "reference": "6f54738dfecc65e1d5bfb855035836748083a6dd" + "reference": "8f8ca208572963258b7e6d91106181706deacd10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/6f54738dfecc65e1d5bfb855035836748083a6dd", - "reference": "6f54738dfecc65e1d5bfb855035836748083a6dd", + "url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/8f8ca208572963258b7e6d91106181706deacd10", + "reference": "8f8ca208572963258b7e6d91106181706deacd10", "shasum": "" }, "require": { - "guzzlehttp/psr7": "^1.0.0", + "guzzlehttp/psr7": "^1.7.0|^2.0", "php": ">=5.4", "zbateson/mb-wrapper": "^1.0.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5" + "sanmai/phpunit-legacy-adapter": "^6.3 || ^8" }, "type": "library", "autoload": { @@ -7510,7 +8123,7 @@ ], "support": { "issues": "https://github.com/zbateson/stream-decorators/issues", - "source": "https://github.com/zbateson/stream-decorators/tree/master" + "source": "https://github.com/zbateson/stream-decorators/tree/1.0.7" }, "funding": [ { @@ -7518,7 +8131,7 @@ "type": "github" } ], - "time": "2020-08-10T18:59:43+00:00" + "time": "2022-09-08T15:44:55+00:00" } ], "aliases": [], diff --git a/src/Endpoints/Database.php b/src/Endpoints/Database.php index 90a1c90..ffe3b60 100644 --- a/src/Endpoints/Database.php +++ b/src/Endpoints/Database.php @@ -4,8 +4,10 @@ use FiveamCode\LaravelNotionApi\Entities\Collections\EntityCollection; use FiveamCode\LaravelNotionApi\Entities\Collections\PageCollection; +use FiveamCode\LaravelNotionApi\Exceptions\HandlingException; use FiveamCode\LaravelNotionApi\Notion; use FiveamCode\LaravelNotionApi\Query\Filters\Filter; +use FiveamCode\LaravelNotionApi\Query\Filters\FilterBag; use FiveamCode\LaravelNotionApi\Query\Sorting; use Illuminate\Support\Collection; @@ -20,9 +22,13 @@ class Database extends Endpoint private string $databaseId; /** - * @var Collection + * @var Filter|null */ - private Collection $filter; + private ?Filter $filter = null; // TODO breaking change as well + + private $filterBag; + + private array $filterData = []; /** * @var Collection @@ -32,8 +38,8 @@ class Database extends Endpoint /** * Database constructor. * - * @param string $databaseId - * @param Notion $notion + * @param string $databaseId + * @param Notion $notion * * @throws \FiveamCode\LaravelNotionApi\Exceptions\HandlingException * @throws \FiveamCode\LaravelNotionApi\Exceptions\LaravelNotionAPIException @@ -43,7 +49,6 @@ public function __construct(string $databaseId, Notion $notion) $this->databaseId = $databaseId; $this->sorts = new Collection(); - $this->filter = new Collection(); parent::__construct($notion); } @@ -62,9 +67,12 @@ public function query(): PageCollection $postData['sorts'] = Sorting::sortQuery($this->sorts); } - if ($this->filter->isNotEmpty()) { - $postData['filter']['or'] = Filter::filterQuery($this->filter); - } // TODO Compound filters! + if($this->filter !== null && !is_null($this->filterBag)) { + throw new HandlingException("Please provide either a filter bag or a single filter."); + } + elseif ($this->filter !== null || !is_null($this->filterBag)) { + $postData['filter'] = $this->filterData; + } if ($this->startCursor !== null) { $postData['start_cursor'] = $this->startCursor->__toString(); @@ -76,7 +84,7 @@ public function query(): PageCollection $response = $this ->post( - $this->url(Endpoint::DATABASES."/{$this->databaseId}/query"), + $this->url(Endpoint::DATABASES . "/{$this->databaseId}/query"), $postData ) ->json(); @@ -85,18 +93,47 @@ public function query(): PageCollection } /** - * @param Collection $filter - * @return $this + * @param $filter + * @return Database $this + * @throws HandlingException + * @todo As soon as this package drops PHP 7.4 support, we can use union types here (FilterBag and Filter) */ - public function filterBy(Collection $filter): Database + public function filterBy($filter): Database // TODO that's a breaking change + { + $this->checkFilterType($filter); + + if($filter instanceof FilterBag) { + return $this->filterByBag($filter); + } + if($filter instanceof Filter) { + return $this->filterBySingleFilter($filter); + } + + return $this; + } + + public function filterBySingleFilter(Filter $filter): Database { $this->filter = $filter; + $this->filterData = ["or" => [$filter->toQuery()]]; return $this; } /** - * @param Collection $sorts + * @param FilterBag $filterBag + * @return $this + */ + public function filterByBag(FilterBag $filterBag): Database + { + $this->filterBag = $filterBag; + $this->filterData = $filterBag->toQuery(); + + return $this; + } + + /** + * @param Collection $sorts * @return $this */ public function sortBy(Collection $sorts): Database @@ -116,4 +153,11 @@ public function offsetByResponse(EntityCollection $entityCollection): Database return $this; } + + private function checkFilterType($filter): void + { + if (!($filter instanceof Filter || $filter instanceof FilterBag)) { + throw new HandlingException("Please provide either a filter bag or a single filter."); + } + } } diff --git a/src/Query/Filters/Filter.php b/src/Query/Filters/Filter.php index e5805ab..def06c8 100644 --- a/src/Query/Filters/Filter.php +++ b/src/Query/Filters/Filter.php @@ -150,7 +150,7 @@ public static function filterQuery(Collection $filter): array { $queryFilter = new Collection(); - $filter->each(function (Filter $filter) use ($queryFilter) { + $filter->each(function ($filter) use ($queryFilter) { $queryFilter->add($filter->toQuery()); }); diff --git a/src/Query/Filters/FilterBag.php b/src/Query/Filters/FilterBag.php new file mode 100644 index 0000000..9e7c0a4 --- /dev/null +++ b/src/Query/Filters/FilterBag.php @@ -0,0 +1,116 @@ +isValidOperator($operator); + + $this->content = new Collection; + $this->operator = $operator; + } + + + /** + * @param Filter $filter + * @return $this + */ + public function addFilter(Filter $filter): self { + $this->content->add($filter); + + return $this; + } + + /** + * @throws HandlingException|Throwable + */ + public function addFilterBag(FilterBag $filterBag): self { + // A filter bag can only be added to another filter bag if it does not have a parent yet and does not + // contain any other filter bags. + throw_if($this->parentFilterBag !== null, new HandlingException("The maximum nesting level of compound filters must not exceed 2.")); + + $filterBag->content->each(function ($bag) { + throw_if($bag instanceof FilterBag, new HandlingException("The maximum nesting level of compound filters must not exceed 2.")); + }); + + $filterBag->parentFilterBag = $this; + $this->content->add($filterBag); + + return $this; + } + + /** + * @return array + */ + public function toQuery() { + + $filters = $this->content->map(function($set) { + return $set->toQuery(); + })->toArray(); + + return [ + $this->operator => $filters + ]; + } + + private function isValidOperator($operator) { + $validOperators = ["and", "or"]; + + throw_if( + !in_array($operator, $validOperators), + new HandlingException("Invalid operator for FilterBag: " . $operator) + ); + } + + +} \ No newline at end of file diff --git a/tests/EndpointDatabaseTest.php b/tests/EndpointDatabaseTest.php index f7e9364..ebd3b73 100644 --- a/tests/EndpointDatabaseTest.php +++ b/tests/EndpointDatabaseTest.php @@ -1,7 +1,5 @@ assertInstanceOf(Database::class, $endpoint); - } - - /** - * @dataProvider limitProvider - */ - public function limitProvider(): array - { - return [ - [1], - [2], - ]; - } - - /** - * @test - * @dataProvider limitProvider - * - * @param $limit - */ - public function it_queries_a_database_with_filter_and_sorting_and_processes_result($limit) - { - // success /v1/databases/DATABASE_DOES_EXIST/query - Http::fake([ - 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response( - json_decode(file_get_contents("tests/stubs/endpoints/databases/response_query_limit{$limit}_200.json"), true), - 200, - ['Headers'] - ), - ]); - // Let's search for women developing the UNIVAC I computer - // and sort them by birth year descending - $sortings = new Collection(); - $filters = new Collection(); +it('returns a database endpoint instance', function () { +// TODO make tests work again, update for new Filter behaviour + $endpoint = \FiveamCode\LaravelNotionApi\Notion::database('897e5a76ae524b489fdfe71f5945d1af'); + + $this->assertInstanceOf(Database::class, $endpoint); +}); + +it('queries a database with filter and sorting and processes result', function () { + // success /v1/databases/DATABASE_DOES_EXIST/query + Http::fake([ + 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response( + json_decode(file_get_contents("tests/stubs/endpoints/databases/response_query_limit{$limit}_200.json"), true), + 200, + ['Headers'] + ), + ]); + + // Let's search for women developing the UNIVAC I computer + // and sort them by birth year descending + $sortings = new Collection(); + $filters = new Collection(); + + $sortings->add( + Sorting::propertySort('Birth year', 'descending') + ); + + $filters + ->add( + Filter::rawFilter( + 'Known for', + [ + 'multi_select' => ['contains' => 'UNIVAC'], + ] + ) + ); - $sortings->add( - Sorting::propertySort('Birth year', 'descending') + $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') + ->filterBy($filters) + ->sortBy($sortings) + ->limit($limit) + ->query(); + + $this->assertInstanceOf(PageCollection::class, $result); + + $resultCollection = $result->asCollection(); + + $this->assertIsIterable($resultCollection); + $this->assertCount($limit, $resultCollection); + $this->assertContainsOnly(Page::class, $resultCollection); + + // check page object + $page = $resultCollection->first(); + $this->assertEquals('Betty Holberton', $page->getTitle()); +}) + ->with([ + [1], + [2], + ]); + +it('queries a database with filter and sorting and has empty result', function () { + // success /v1/databases/DATABASE_DOES_EXIST/query + Http::fake([ + 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response( + json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_no_result_200.json'), true), + 200, + ['Headers'] + ), + ]); + + // Let's search for something that doesn't exists + $filters = new Collection(); + + $filters + ->add( + Filter::rawFilter( + 'Known for', + [ + 'multi_select' => ['contains' => "something that doesn't exists"], + ] + ) ); - $filters - ->add( - Filter::rawFilter( - 'Known for', - [ - 'multi_select' => ['contains' => 'UNIVAC'], - ] - ) - ); - - $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') - ->filterBy($filters) - ->sortBy($sortings) - ->limit($limit) - ->query(); - - $this->assertInstanceOf(PageCollection::class, $result); - - $resultCollection = $result->asCollection(); - - $this->assertIsIterable($resultCollection); - $this->assertCount($limit, $resultCollection); - $this->assertContainsOnly(Page::class, $resultCollection); - - // check page object - $page = $resultCollection->first(); - $this->assertEquals('Betty Holberton', $page->getTitle()); - } - - /** @test */ - public function it_queries_a_database_with_filter_and_sorting_and_has_empty_result() - { - // success /v1/databases/DATABASE_DOES_EXIST/query - Http::fake([ - 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response( - json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_no_result_200.json'), true), + $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') + ->filterBy($filters) + ->query(); + + $this->assertInstanceOf(PageCollection::class, $result); + + $resultCollection = $result->asCollection(); + + $this->assertIsIterable($resultCollection); + $this->assertCount(0, $resultCollection); +}); + + +it('throws a notion exception for a bad request', function () { + + // failing /v1/databases + Http::fake([ + 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response( + json_decode('{}', true), + 400, + ['Headers'] + ), + ]); + + $this->expectException(NotionException::class); + $this->expectExceptionMessage('Bad Request'); + + Notion::database('8284f3ff77e24d4a939d19459e4d6bdc')->query(); +}); + + +it('queries a database with and without offset and processes result', function () { +// success /v1/databases/DATABASE_DOES_EXIST/query + Http::fake([ + 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::sequence() + ->push( + json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_offset_start_200.json'), true), 200, ['Headers'] - ), - ]); - - // Let's search for something that doesn't exists - $filters = new Collection(); - - $filters - ->add( - Filter::rawFilter( - 'Known for', - [ - 'multi_select' => ['contains' => "something that doesn't exists"], - ] - ) - ); - - $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') - ->filterBy($filters) - ->query(); - - $this->assertInstanceOf(PageCollection::class, $result); - - $resultCollection = $result->asCollection(); - - $this->assertIsIterable($resultCollection); - $this->assertCount(0, $resultCollection); - } - - /** @test */ - public function it_throws_a_notion_exception_bad_request() - { - // failing /v1/databases - Http::fake([ - 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response( - json_decode('{}', true), - 400, - ['Headers'] - ), - ]); - - $this->expectException(NotionException::class); - $this->expectExceptionMessage('Bad Request'); - - Notion::database('8284f3ff77e24d4a939d19459e4d6bdc')->query(); - } - - /** @test */ - public function it_queries_a_database_with_and_without_offset_and_processes_result() - { - // success /v1/databases/DATABASE_DOES_EXIST/query - Http::fake([ - 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::sequence() - ->push( - json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_offset_start_200.json'), true), - 200, - ['Headers'] - ) - ->push( - json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_offset_end_200.json'), true), - 200, - ['Headers'] - ), - ]); - - $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') - ->query(); - - //check instance and offset - $this->assertInstanceOf(PageCollection::class, $result); - $this->assertEquals(true, $result->hasMoreEntries()); - $this->assertInstanceOf(StartCursor::class, $result->nextCursor()); - $this->assertEquals('1500b7c7-329f-4854-8912-4c6972a8743e', $result->nextCursor()); - $this->assertEquals('1500b7c7-329f-4854-8912-4c6972a8743e', $result->getRawNextCursor()); - - $resultCollection = $result->asCollection(); - - $this->assertIsIterable($resultCollection); - $this->assertContainsOnly(Page::class, $resultCollection); - - // check page object - $page = $resultCollection->first(); - $this->assertEquals('Betty Holberton', $page->getTitle()); - - $resultWithOffset = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') - ->offsetByResponse($result) - ->query(); - - // check instance and offset - $this->assertInstanceOf(PageCollection::class, $resultWithOffset); - $this->assertEquals(false, $resultWithOffset->hasMoreEntries()); - $this->assertEquals(null, $resultWithOffset->nextCursor()); - $this->assertEquals(null, $resultWithOffset->getRawNextCursor()); - - $resultWithOffsetCollection = $resultWithOffset->asCollection(); - - $this->assertIsIterable($resultWithOffsetCollection); - $this->assertContainsOnly(Page::class, $resultWithOffsetCollection); - - // check page object - $page = $resultWithOffsetCollection->first(); - $this->assertEquals('Betty Holberton', $page->getTitle()); - } - - /** - * @test - * ! edge-case - */ - public function it_queries_a_database_with_a_rollup_property_with_empty_selects() - { - // success /v1/databases/DATABASE_DOES_EXIST/query - Http::fake([ - 'https://api.notion.com/v1/databases/11971214ce574df7a58389c1deda61d7/query*' => Http::response( - json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_rollup_empty_select_200.json'), true), + ) + ->push( + json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_offset_end_200.json'), true), 200, ['Headers'] ), - ]); + ]); + + $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') + ->query(); + + //check instance and offset + $this->assertInstanceOf(PageCollection::class, $result); + $this->assertEquals(true, $result->hasMoreEntries()); + $this->assertInstanceOf(StartCursor::class, $result->nextCursor()); + $this->assertEquals('1500b7c7-329f-4854-8912-4c6972a8743e', $result->nextCursor()); + $this->assertEquals('1500b7c7-329f-4854-8912-4c6972a8743e', $result->getRawNextCursor()); + + $resultCollection = $result->asCollection(); + + $this->assertIsIterable($resultCollection); + $this->assertContainsOnly(Page::class, $resultCollection); + + // check page object + $page = $resultCollection->first(); + $this->assertEquals('Betty Holberton', $page->getTitle()); + + $resultWithOffset = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') + ->offsetByResponse($result) + ->query(); + + // check instance and offset + $this->assertInstanceOf(PageCollection::class, $resultWithOffset); + $this->assertEquals(false, $resultWithOffset->hasMoreEntries()); + $this->assertEquals(null, $resultWithOffset->nextCursor()); + $this->assertEquals(null, $resultWithOffset->getRawNextCursor()); + + $resultWithOffsetCollection = $resultWithOffset->asCollection(); + + $this->assertIsIterable($resultWithOffsetCollection); + $this->assertContainsOnly(Page::class, $resultWithOffsetCollection); + + // check page object + $page = $resultWithOffsetCollection->first(); + $this->assertEquals('Betty Holberton', $page->getTitle()); +}); + +it('queries a database with a rollup property with empty selects', function () { + // success /v1/databases/DATABASE_DOES_EXIST/query + Http::fake([ + 'https://api.notion.com/v1/databases/11971214ce574df7a58389c1deda61d7/query*' => Http::response( + json_decode(file_get_contents('tests/stubs/endpoints/databases/response_query_rollup_empty_select_200.json'), true), + 200, + ['Headers'] + ), + ]); + + $result = Notion::database('11971214ce574df7a58389c1deda61d7')->query(); - $result = Notion::database('11971214ce574df7a58389c1deda61d7')->query(); + $this->assertInstanceOf(PageCollection::class, $result); - $this->assertInstanceOf(PageCollection::class, $result); + $resultCollection = $result->asCollection(); - $resultCollection = $result->asCollection(); + $this->assertIsIterable($resultCollection); + $this->assertContainsOnly(Page::class, $resultCollection); - $this->assertIsIterable($resultCollection); - $this->assertContainsOnly(Page::class, $resultCollection); + // check page object + $page = $resultCollection->first(); + $this->assertEquals(0, $page->getProperty('Rollup')->getContent()->count()); +}); - // check page object - $page = $resultCollection->first(); - $this->assertEquals(0, $page->getProperty('Rollup')->getContent()->count()); - } -} diff --git a/tests/FilterBagTest.php b/tests/FilterBagTest.php new file mode 100644 index 0000000..9fe037f --- /dev/null +++ b/tests/FilterBagTest.php @@ -0,0 +1,69 @@ +assertInstanceOf(FilterBag::class, $filterBag); + + $queryFilter = $filterBag->toQuery(); + + $this->assertArrayHasKey('or', $queryFilter); +}); + +it('creates a FilterBag with an "and" operator with the instance method', function () { + $filterBag = FilterBag::and(); + + $this->assertInstanceOf(FilterBag::class, $filterBag); + + $queryFilter = $filterBag->toQuery(); + + $this->assertArrayHasKey('and', $queryFilter); +}); + +it('throws an exception when providing an invalid operator', function() { + $this->expectException(HandlingException::class); + $this->expectExceptionMessage('Invalid operator for FilterBag: invalid'); + + new FilterBag('invalid'); +}); + +it('only allows the nesting of FilterBags up to two levels', function() { + + $this->expectException(HandlingException::class); + $this->expectExceptionMessage('The maximum nesting level of compound filters must not exceed 2.'); + + $filterBag = new FilterBag("and"); + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "UNIVAC"], + ]) + ); + + $nameFilterBag = new FilterBag("or"); + $nameFilterBag + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + + $anotherBag = new FilterBag(); + $nameFilterBag->addFilterBag($anotherBag); + + $filterBag->addFilterBag($nameFilterBag); +}); + +it('allows the nesting of multiple FilterBags inside one FilterBag', function() { + // TODO +}); + +it('creates the correct query structure for a nested FilterBag', function() { + // TODO +}); + +it('creates the correct query structure for a FilterBag with one level', function() { + // TODO +}); diff --git a/tests/Pest.php b/tests/Pest.php new file mode 100644 index 0000000..3948371 --- /dev/null +++ b/tests/Pest.php @@ -0,0 +1,5 @@ +in(__DIR__); \ No newline at end of file diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..18e2050 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,16 @@ + Date: Sun, 25 Sep 2022 13:44:15 +0200 Subject: [PATCH 03/10] Apply fixes from StyleCI (#83) --- src/Endpoints/Database.php | 29 ++++++++++---------- src/Query/Filters/FilterBag.php | 48 ++++++++++++++++----------------- tests/EndpointDatabaseTest.php | 9 ++----- tests/FilterBagTest.php | 25 +++++++++-------- tests/FilterTest.php | 6 ++--- tests/Pest.php | 2 +- tests/TestCase.php | 4 +-- 7 files changed, 57 insertions(+), 66 deletions(-) diff --git a/src/Endpoints/Database.php b/src/Endpoints/Database.php index ffe3b60..463e111 100644 --- a/src/Endpoints/Database.php +++ b/src/Endpoints/Database.php @@ -38,8 +38,8 @@ class Database extends Endpoint /** * Database constructor. * - * @param string $databaseId - * @param Notion $notion + * @param string $databaseId + * @param Notion $notion * * @throws \FiveamCode\LaravelNotionApi\Exceptions\HandlingException * @throws \FiveamCode\LaravelNotionApi\Exceptions\LaravelNotionAPIException @@ -67,10 +67,9 @@ public function query(): PageCollection $postData['sorts'] = Sorting::sortQuery($this->sorts); } - if($this->filter !== null && !is_null($this->filterBag)) { - throw new HandlingException("Please provide either a filter bag or a single filter."); - } - elseif ($this->filter !== null || !is_null($this->filterBag)) { + if ($this->filter !== null && ! is_null($this->filterBag)) { + throw new HandlingException('Please provide either a filter bag or a single filter.'); + } elseif ($this->filter !== null || ! is_null($this->filterBag)) { $postData['filter'] = $this->filterData; } @@ -84,7 +83,7 @@ public function query(): PageCollection $response = $this ->post( - $this->url(Endpoint::DATABASES . "/{$this->databaseId}/query"), + $this->url(Endpoint::DATABASES."/{$this->databaseId}/query"), $postData ) ->json(); @@ -95,17 +94,19 @@ public function query(): PageCollection /** * @param $filter * @return Database $this + * * @throws HandlingException + * * @todo As soon as this package drops PHP 7.4 support, we can use union types here (FilterBag and Filter) */ public function filterBy($filter): Database // TODO that's a breaking change { $this->checkFilterType($filter); - if($filter instanceof FilterBag) { + if ($filter instanceof FilterBag) { return $this->filterByBag($filter); } - if($filter instanceof Filter) { + if ($filter instanceof Filter) { return $this->filterBySingleFilter($filter); } @@ -115,13 +116,13 @@ public function filterBy($filter): Database // TODO that's a breaking change public function filterBySingleFilter(Filter $filter): Database { $this->filter = $filter; - $this->filterData = ["or" => [$filter->toQuery()]]; + $this->filterData = ['or' => [$filter->toQuery()]]; return $this; } /** - * @param FilterBag $filterBag + * @param FilterBag $filterBag * @return $this */ public function filterByBag(FilterBag $filterBag): Database @@ -133,7 +134,7 @@ public function filterByBag(FilterBag $filterBag): Database } /** - * @param Collection $sorts + * @param Collection $sorts * @return $this */ public function sortBy(Collection $sorts): Database @@ -156,8 +157,8 @@ public function offsetByResponse(EntityCollection $entityCollection): Database private function checkFilterType($filter): void { - if (!($filter instanceof Filter || $filter instanceof FilterBag)) { - throw new HandlingException("Please provide either a filter bag or a single filter."); + if (! ($filter instanceof Filter || $filter instanceof FilterBag)) { + throw new HandlingException('Please provide either a filter bag or a single filter.'); } } } diff --git a/src/Query/Filters/FilterBag.php b/src/Query/Filters/FilterBag.php index 9e7c0a4..aab4da3 100644 --- a/src/Query/Filters/FilterBag.php +++ b/src/Query/Filters/FilterBag.php @@ -8,15 +8,14 @@ use Throwable; /** - * Class FilterBag + * Class FilterBag. */ class FilterBag extends QueryHelper { - /** * @var string|mixed */ - protected string $operator = "and"; // TODO shortcut instances + type checking + pretty operators + protected string $operator = 'and'; // TODO shortcut instances + type checking + pretty operators /** * @var Collection @@ -28,7 +27,6 @@ class FilterBag extends QueryHelper */ public ?FilterBag $parentFilterBag = null; - /** * Creates a FilterBag instance with an "or" operator. * @@ -36,7 +34,7 @@ class FilterBag extends QueryHelper */ public static function or(): FilterBag { - return new FilterBag("or"); + return new FilterBag('or'); } /** @@ -46,13 +44,13 @@ public static function or(): FilterBag */ public static function and(): FilterBag { - return new FilterBag("and"); + return new FilterBag('and'); } /** - * @param string $operator + * @param string $operator */ - public function __construct(string $operator = "and") + public function __construct(string $operator = 'and') { $this->isValidOperator($operator); @@ -60,12 +58,12 @@ public function __construct(string $operator = "and") $this->operator = $operator; } - /** - * @param Filter $filter + * @param Filter $filter * @return $this */ - public function addFilter(Filter $filter): self { + public function addFilter(Filter $filter): self + { $this->content->add($filter); return $this; @@ -74,13 +72,14 @@ public function addFilter(Filter $filter): self { /** * @throws HandlingException|Throwable */ - public function addFilterBag(FilterBag $filterBag): self { + public function addFilterBag(FilterBag $filterBag): self + { // A filter bag can only be added to another filter bag if it does not have a parent yet and does not // contain any other filter bags. - throw_if($this->parentFilterBag !== null, new HandlingException("The maximum nesting level of compound filters must not exceed 2.")); + throw_if($this->parentFilterBag !== null, new HandlingException('The maximum nesting level of compound filters must not exceed 2.')); $filterBag->content->each(function ($bag) { - throw_if($bag instanceof FilterBag, new HandlingException("The maximum nesting level of compound filters must not exceed 2.")); + throw_if($bag instanceof FilterBag, new HandlingException('The maximum nesting level of compound filters must not exceed 2.')); }); $filterBag->parentFilterBag = $this; @@ -92,25 +91,24 @@ public function addFilterBag(FilterBag $filterBag): self { /** * @return array */ - public function toQuery() { - - $filters = $this->content->map(function($set) { + public function toQuery() + { + $filters = $this->content->map(function ($set) { return $set->toQuery(); })->toArray(); return [ - $this->operator => $filters + $this->operator => $filters, ]; } - private function isValidOperator($operator) { - $validOperators = ["and", "or"]; + private function isValidOperator($operator) + { + $validOperators = ['and', 'or']; throw_if( - !in_array($operator, $validOperators), - new HandlingException("Invalid operator for FilterBag: " . $operator) + ! in_array($operator, $validOperators), + new HandlingException('Invalid operator for FilterBag: '.$operator) ); } - - -} \ No newline at end of file +} diff --git a/tests/EndpointDatabaseTest.php b/tests/EndpointDatabaseTest.php index ebd3b73..299325d 100644 --- a/tests/EndpointDatabaseTest.php +++ b/tests/EndpointDatabaseTest.php @@ -10,7 +10,6 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\Http; - /** * Class EndpointDatabaseTest. * @@ -26,9 +25,8 @@ * @see https://www.notion.so/8284f3ff77e24d4a939d19459e4d6bdc?v=bc3a9ce8cdb84d3faefc9ae490136ac2 * @see https://developers.notion.com/reference/post-database-query */ - it('returns a database endpoint instance', function () { -// TODO make tests work again, update for new Filter behaviour + // TODO make tests work again, update for new Filter behaviour $endpoint = \FiveamCode\LaravelNotionApi\Notion::database('897e5a76ae524b489fdfe71f5945d1af'); $this->assertInstanceOf(Database::class, $endpoint); @@ -121,7 +119,6 @@ $this->assertCount(0, $resultCollection); }); - it('throws a notion exception for a bad request', function () { // failing /v1/databases @@ -139,9 +136,8 @@ Notion::database('8284f3ff77e24d4a939d19459e4d6bdc')->query(); }); - it('queries a database with and without offset and processes result', function () { -// success /v1/databases/DATABASE_DOES_EXIST/query + // success /v1/databases/DATABASE_DOES_EXIST/query Http::fake([ 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::sequence() ->push( @@ -218,4 +214,3 @@ $page = $resultCollection->first(); $this->assertEquals(0, $page->getProperty('Rollup')->getContent()->count()); }); - diff --git a/tests/FilterBagTest.php b/tests/FilterBagTest.php index 9fe037f..4a92c84 100644 --- a/tests/FilterBagTest.php +++ b/tests/FilterBagTest.php @@ -1,8 +1,8 @@ assertArrayHasKey('and', $queryFilter); }); -it('throws an exception when providing an invalid operator', function() { +it('throws an exception when providing an invalid operator', function () { $this->expectException(HandlingException::class); $this->expectExceptionMessage('Invalid operator for FilterBag: invalid'); new FilterBag('invalid'); }); -it('only allows the nesting of FilterBags up to two levels', function() { - +it('only allows the nesting of FilterBags up to two levels', function () { $this->expectException(HandlingException::class); $this->expectExceptionMessage('The maximum nesting level of compound filters must not exceed 2.'); - $filterBag = new FilterBag("and"); + $filterBag = new FilterBag('and'); $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "UNIVAC"], + Filter::rawFilter('Known for', [ + 'multi_select' => ['contains' => 'UNIVAC'], ]) ); - $nameFilterBag = new FilterBag("or"); + $nameFilterBag = new FilterBag('or'); $nameFilterBag - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Grace')) + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Jean')); $anotherBag = new FilterBag(); $nameFilterBag->addFilterBag($anotherBag); @@ -56,14 +55,14 @@ $filterBag->addFilterBag($nameFilterBag); }); -it('allows the nesting of multiple FilterBags inside one FilterBag', function() { +it('allows the nesting of multiple FilterBags inside one FilterBag', function () { // TODO }); -it('creates the correct query structure for a nested FilterBag', function() { +it('creates the correct query structure for a nested FilterBag', function () { // TODO }); -it('creates the correct query structure for a FilterBag with one level', function() { +it('creates the correct query structure for a FilterBag with one level', function () { // TODO }); diff --git a/tests/FilterTest.php b/tests/FilterTest.php index 0f12c0e..f040114 100644 --- a/tests/FilterTest.php +++ b/tests/FilterTest.php @@ -1,6 +1,5 @@ assertEquals('Name', $filter->toQuery()['property']); $this->assertArrayHasKey('text', $filter->toQuery()); $this->assertArrayHasKey('equals', $filter->toQuery()['text']); - $this->assertEquals('Ada Lovelace', $filter->toQuery()['text']['equals']);# + $this->assertEquals('Ada Lovelace', $filter->toQuery()['text']['equals']); // }); - it('creates a number filter with the given data', function () { $filter = Filter::numberFilter('Awesomeness Level', Operators::GREATER_THAN_OR_EQUAL_TO, 9000); @@ -40,4 +38,4 @@ $this->expectException(HandlingException::class); $this->expectExceptionMessage('Invalid filter definition.'); $filter->toArray(); -}); \ No newline at end of file +}); diff --git a/tests/Pest.php b/tests/Pest.php index 3948371..613c039 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -2,4 +2,4 @@ use FiveamCode\LaravelNotionApi\Tests\TestCase; -uses(TestCase::class)->in(__DIR__); \ No newline at end of file +uses(TestCase::class)->in(__DIR__); diff --git a/tests/TestCase.php b/tests/TestCase.php index 18e2050..8776b5f 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,8 +2,8 @@ namespace FiveamCode\LaravelNotionApi\Tests; -use Orchestra\Testbench\TestCase as Orchestra; use FiveamCode\LaravelNotionApi\LaravelNotionApiServiceProvider; +use Orchestra\Testbench\TestCase as Orchestra; class TestCase extends Orchestra { @@ -13,4 +13,4 @@ protected function getPackageProviders($app) LaravelNotionApiServiceProvider::class, ]; } -} \ No newline at end of file +} From 4802f81c5ef7f79c8da5d6fa1a51d2eb69d164aa Mon Sep 17 00:00:00 2001 From: Diana Scharf Date: Mon, 26 Sep 2022 15:39:10 +0200 Subject: [PATCH 04/10] WIP --- composer.json | 6 +-- composer.lock | 72 +++++++++++++++++++++++++++++++++- tests/EndpointDatabaseTest.php | 4 +- tests/TestCase.php | 19 +++++++++ 4 files changed, 95 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 5623aeb..deb8929 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,7 @@ "require-dev": { "orchestra/testbench": "^6.0", "pestphp/pest": "^1.22", + "pestphp/pest-plugin-laravel": "^1.3", "phpunit/phpunit": "^9.0" }, "autoload": { @@ -47,9 +48,8 @@ } }, "scripts": { - "test": "vendor/bin/phpunit", - "test-coverage": "vendor/bin/phpunit --coverage-html coverage" - + "test": "vendor/bin/pest", + "test-coverage": "vendor/bin/pest --coverage-html coverage" }, "config": { "sort-packages": true diff --git a/composer.lock b/composer.lock index 7925d58..be3cf19 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f4cacbe7621312719a0ba568e9d88b24", + "content-hash": "3d4583cf47507562d5a0a26237aea3d0", "packages": [ { "name": "brick/math", @@ -5930,6 +5930,76 @@ ], "time": "2022-09-18T13:18:17+00:00" }, + { + "name": "pestphp/pest-plugin-laravel", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-laravel.git", + "reference": "561930875e0336441f93fbd120fd53a2a890a8f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/561930875e0336441f93fbd120fd53a2a890a8f5", + "reference": "561930875e0336441f93fbd120fd53a2a890a8f5", + "shasum": "" + }, + "require": { + "laravel/framework": "^7.30.6 || ^8.83.23 || ^9.30.1", + "pestphp/pest": "^1.22.1", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "orchestra/testbench": "^5.20.0 || ^6.25.0 || ^7.7.0", + "pestphp/pest-dev-tools": "dev-master" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "src/Autoload.php" + ], + "psr-4": { + "Pest\\Laravel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Pest Laravel Plugin", + "keywords": [ + "framework", + "laravel", + "pest", + "php", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-laravel/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2022-09-18T13:04:53+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.3", diff --git a/tests/EndpointDatabaseTest.php b/tests/EndpointDatabaseTest.php index ebd3b73..4b080c4 100644 --- a/tests/EndpointDatabaseTest.php +++ b/tests/EndpointDatabaseTest.php @@ -10,7 +10,6 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\Http; - /** * Class EndpointDatabaseTest. * @@ -28,8 +27,9 @@ */ it('returns a database endpoint instance', function () { + // TODO make tests work again, update for new Filter behaviour - $endpoint = \FiveamCode\LaravelNotionApi\Notion::database('897e5a76ae524b489fdfe71f5945d1af'); + $endpoint = \Notion::database('897e5a76ae524b489fdfe71f5945d1af'); $this->assertInstanceOf(Database::class, $endpoint); }); diff --git a/tests/TestCase.php b/tests/TestCase.php index 18e2050..bf4db7b 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,15 +2,34 @@ namespace FiveamCode\LaravelNotionApi\Tests; +use Illuminate\Database\Eloquent\Factories\Factory; use Orchestra\Testbench\TestCase as Orchestra; use FiveamCode\LaravelNotionApi\LaravelNotionApiServiceProvider; class TestCase extends Orchestra { + protected function setUp(): void + { + parent::setUp(); + + Factory::guessFactoryNamesUsing( + fn (string $modelName) => 'VendorName\\Skeleton\\Database\\Factories\\'.class_basename($modelName).'Factory' + ); + } + protected function getPackageProviders($app) { return [ LaravelNotionApiServiceProvider::class, ]; } + public function getEnvironmentSetUp($app) + { + config()->set('database.default', 'testing'); + + /* + $migration = include __DIR__.'/../database/migrations/create_skeleton_table.php.stub'; + $migration->up(); + */ + } } \ No newline at end of file From fd73d83c9f4019392049beee9183ba1f3a01a7b2 Mon Sep 17 00:00:00 2001 From: Di Date: Mon, 26 Sep 2022 15:40:32 +0200 Subject: [PATCH 05/10] Apply fixes from StyleCI (#84) --- tests/EndpointDatabaseTest.php | 6 +----- tests/TestCase.php | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/EndpointDatabaseTest.php b/tests/EndpointDatabaseTest.php index 4b080c4..b6d74d1 100644 --- a/tests/EndpointDatabaseTest.php +++ b/tests/EndpointDatabaseTest.php @@ -25,7 +25,6 @@ * @see https://www.notion.so/8284f3ff77e24d4a939d19459e4d6bdc?v=bc3a9ce8cdb84d3faefc9ae490136ac2 * @see https://developers.notion.com/reference/post-database-query */ - it('returns a database endpoint instance', function () { // TODO make tests work again, update for new Filter behaviour @@ -121,7 +120,6 @@ $this->assertCount(0, $resultCollection); }); - it('throws a notion exception for a bad request', function () { // failing /v1/databases @@ -139,9 +137,8 @@ Notion::database('8284f3ff77e24d4a939d19459e4d6bdc')->query(); }); - it('queries a database with and without offset and processes result', function () { -// success /v1/databases/DATABASE_DOES_EXIST/query + // success /v1/databases/DATABASE_DOES_EXIST/query Http::fake([ 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::sequence() ->push( @@ -218,4 +215,3 @@ $page = $resultCollection->first(); $this->assertEquals(0, $page->getProperty('Rollup')->getContent()->count()); }); - diff --git a/tests/TestCase.php b/tests/TestCase.php index bf4db7b..69331a5 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,9 +2,9 @@ namespace FiveamCode\LaravelNotionApi\Tests; +use FiveamCode\LaravelNotionApi\LaravelNotionApiServiceProvider; use Illuminate\Database\Eloquent\Factories\Factory; use Orchestra\Testbench\TestCase as Orchestra; -use FiveamCode\LaravelNotionApi\LaravelNotionApiServiceProvider; class TestCase extends Orchestra { @@ -23,6 +23,7 @@ protected function getPackageProviders($app) LaravelNotionApiServiceProvider::class, ]; } + public function getEnvironmentSetUp($app) { config()->set('database.default', 'testing'); @@ -32,4 +33,4 @@ public function getEnvironmentSetUp($app) $migration->up(); */ } -} \ No newline at end of file +} From 578b36c4e403c86351b4e111817589da95a69db8 Mon Sep 17 00:00:00 2001 From: Diana Scharf Date: Mon, 26 Sep 2022 16:19:43 +0200 Subject: [PATCH 06/10] Pest tests work now properly, thanks to @mpociot --- tests/EndpointDatabaseTest.php | 6 +++--- tests/NotionApiTest.php | 13 ++----------- tests/Pest.php | 4 ++-- tests/TestCase.php | 35 ---------------------------------- 4 files changed, 7 insertions(+), 51 deletions(-) delete mode 100644 tests/TestCase.php diff --git a/tests/EndpointDatabaseTest.php b/tests/EndpointDatabaseTest.php index 4b080c4..0ab5fc7 100644 --- a/tests/EndpointDatabaseTest.php +++ b/tests/EndpointDatabaseTest.php @@ -28,13 +28,13 @@ it('returns a database endpoint instance', function () { -// TODO make tests work again, update for new Filter behaviour - $endpoint = \Notion::database('897e5a76ae524b489fdfe71f5945d1af'); +// TODO update for new Filter behaviour + $endpoint = Notion::database('897e5a76ae524b489fdfe71f5945d1af'); $this->assertInstanceOf(Database::class, $endpoint); }); -it('queries a database with filter and sorting and processes result', function () { +it('queries a database with filter and sorting and processes result', function ($limit) { // success /v1/databases/DATABASE_DOES_EXIST/query Http::fake([ 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response( diff --git a/tests/NotionApiTest.php b/tests/NotionApiTest.php index 7e0b738..6e736c2 100644 --- a/tests/NotionApiTest.php +++ b/tests/NotionApiTest.php @@ -5,16 +5,12 @@ use FiveamCode\LaravelNotionApi\Notion; use FiveamCode\LaravelNotionApi\NotionFacade; use Illuminate\Support\Collection; -use Orchestra\Testbench\TestCase; +use Orchestra\Testbench\TestCase as Orchestra; /** - * Class EndpointPageTest. * - * The fake API responses are based on our test environment (since the current Notion examples do not match with the actual calls). - * - * @see https://developers.notion.com/reference/get-page */ -class NotionApiTest extends TestCase +class NotionApiTest extends Orchestra { /** * @param \Illuminate\Foundation\Application $app @@ -51,9 +47,4 @@ protected function assertContainsInstanceOf(string $class, $haystack): bool return false; } - /** @test */ - public function it_asserts_true() - { - $this->assertTrue(true); - } } diff --git a/tests/Pest.php b/tests/Pest.php index 613c039..047ff43 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,5 +1,5 @@ in(__DIR__); +uses(NotionApiTest::class)->in(__DIR__); diff --git a/tests/TestCase.php b/tests/TestCase.php deleted file mode 100644 index bf4db7b..0000000 --- a/tests/TestCase.php +++ /dev/null @@ -1,35 +0,0 @@ - 'VendorName\\Skeleton\\Database\\Factories\\'.class_basename($modelName).'Factory' - ); - } - - protected function getPackageProviders($app) - { - return [ - LaravelNotionApiServiceProvider::class, - ]; - } - public function getEnvironmentSetUp($app) - { - config()->set('database.default', 'testing'); - - /* - $migration = include __DIR__.'/../database/migrations/create_skeleton_table.php.stub'; - $migration->up(); - */ - } -} \ No newline at end of file From 377ae88eebad0deaa3f78c2daeeb5b5ba6b620cd Mon Sep 17 00:00:00 2001 From: Di Date: Mon, 26 Sep 2022 16:20:27 +0200 Subject: [PATCH 07/10] Apply fixes from StyleCI (#85) --- tests/NotionApiTest.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/NotionApiTest.php b/tests/NotionApiTest.php index 6e736c2..f98c39c 100644 --- a/tests/NotionApiTest.php +++ b/tests/NotionApiTest.php @@ -2,14 +2,10 @@ namespace FiveamCode\LaravelNotionApi\Tests; -use FiveamCode\LaravelNotionApi\Notion; use FiveamCode\LaravelNotionApi\NotionFacade; use Illuminate\Support\Collection; use Orchestra\Testbench\TestCase as Orchestra; -/** - * - */ class NotionApiTest extends Orchestra { /** @@ -46,5 +42,4 @@ protected function assertContainsInstanceOf(string $class, $haystack): bool return false; } - } From 456186ee31d3bc60c7bed9bb8075b0323ca1884b Mon Sep 17 00:00:00 2001 From: Diana Scharf Date: Mon, 30 Jan 2023 17:44:07 +0100 Subject: [PATCH 08/10] tests for compound filters --- src/Query/Filters/Operators.php | 3 + tests/FilterTest.php | 160 ++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) diff --git a/src/Query/Filters/Operators.php b/src/Query/Filters/Operators.php index 5531095..cfc728c 100644 --- a/src/Query/Filters/Operators.php +++ b/src/Query/Filters/Operators.php @@ -30,6 +30,9 @@ class Operators const NEXT_MONTH = 'next_month'; const NEXT_YEAR = 'next_year'; + CONST AND = 'and'; + CONST OR = 'or'; + // TODO: Formula filter condition public static function getValidComparisonOperators($filterType) diff --git a/tests/FilterTest.php b/tests/FilterTest.php index f040114..9a2c57c 100644 --- a/tests/FilterTest.php +++ b/tests/FilterTest.php @@ -2,6 +2,7 @@ use FiveamCode\LaravelNotionApi\Exceptions\HandlingException; use FiveamCode\LaravelNotionApi\Query\Filters\Filter; +use FiveamCode\LaravelNotionApi\Query\Filters\FilterBag; use FiveamCode\LaravelNotionApi\Query\Filters\Operators; it('creates a text filter with the given data', function () { @@ -26,6 +27,140 @@ $this->assertEquals('9000', $filter->toQuery()['number']['greater_than_or_equal_to']); }); +it('creates a filter bag with the AND operator and two conditions', function () { + $filterBag = new FilterBag(Operators::AND); + + # Filter for all entries that are + # (Known for == UNIVAC && Known for == ENIAC) + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "UNIVAC"], + ]) + ); + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "ENIAC"], + ]) + ); + + $filterBagQuery = $filterBag->toQuery(); + $this->assertArrayHasKey(Operators::AND, $filterBagQuery); + $this->assertCount(2, $filterBagQuery[Operators::AND]); + + // check structure of first filter compound + $filterQuery = $filterBagQuery[Operators::AND][0]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Known for', $filterQuery['property']); + $this->assertArrayHasKey('multi_select', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['multi_select']); + $this->assertEquals('UNIVAC', $filterQuery['multi_select']['contains']); + + // check structure of second filter compound + $filterQuery = $filterBagQuery[Operators::AND][1]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Known for', $filterQuery['property']); + $this->assertArrayHasKey('multi_select', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['multi_select']); + $this->assertEquals('COBOL', $filterQuery['multi_select']['contains']); +}); + +it('creates a filter bag with the OR operator and three conditions', function () { + $filterBag = new FilterBag(Operators::OR); + + + # Filter for all entries that have + # (Name == Grace || Name == Jean || Name == Ada) + + $filterBag + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Ada")); + + + $filterBagQuery = $filterBag->toQuery(); + + $this->assertArrayHasKey(Operators::OR, $filterBagQuery); + $this->assertCount(3, $filterBagQuery[Operators::OR]); + + // check structure of first filter compound + $filterQuery = $filterBagQuery[Operators::OR][0]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Name', $filterQuery['property']); + $this->assertArrayHasKey('text', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['text']); + $this->assertEquals('Grace', $filterQuery['text']['contains']); + + + // check value of second filter compound + $filterQuery = $filterBagQuery[Operators::OR][1]; + $this->assertEquals('Jean', $filterQuery['text']['contains']); + + // check value of third filter compound + $filterQuery = $filterBagQuery[Operators::OR][2]; + $this->assertEquals('Ada', $filterQuery['text']['contains']); + +}); + +it('creates a filter bag with with the AND operator and a nested OR condition', function() { + + # Filter for all entries that are + # (KnownFor == Univac && (Name == Grace || Name == Jean)) + + $filterBag = new FilterBag(Operators::AND); + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "UNIVAC"], + ]) + ); + + $nameFilterBag = new FilterBag(Operators::OR); + $nameFilterBag + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + + $filterBag->addFilterBag($nameFilterBag); + + $this->assertInstanceOf(FilterBag::class, $filterBag); + $this->assertInstanceOf(FilterBag::class, $nameFilterBag); + + $filterBagQuery = $filterBag->toQuery(); + + $this->assertArrayHasKey(Operators::AND, $filterBagQuery); + + // check structure of first AND filter component + $multiSelectFilterQuery = $filterBagQuery[Operators::AND][0]; + $this->assertArrayHasKey('property', $multiSelectFilterQuery); + $this->assertEquals('Known for', $multiSelectFilterQuery['property']); + $this->assertArrayHasKey('multi_select', $multiSelectFilterQuery); + $this->assertArrayHasKey('contains', $multiSelectFilterQuery['multi_select']); + $this->assertEquals('UNIVAC', $multiSelectFilterQuery['multi_select']['contains']); + + // check structure of second AND filter component, which is another filter bag + // with an OR operator + $nameFilterBagQuery = $filterBagQuery[Operators::AND][1]; + $this->assertArrayHasKey(Operators::OR, $nameFilterBagQuery); + $this->assertCount(2, $nameFilterBagQuery[Operators::OR]); + + // check structure of the first filter inside the OR filter bag + $filterQuery = $nameFilterBagQuery[Operators::OR][0]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Name', $filterQuery['property']); + $this->assertArrayHasKey('text', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['text']); + $this->assertEquals('Grace', $filterQuery['text']['contains']); + + // check structure of the second filter inside the OR filter bag + $filterQuery = $nameFilterBagQuery[Operators::OR][1]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Name', $filterQuery['property']); + $this->assertArrayHasKey('text', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['text']); + $this->assertEquals('Jean', $filterQuery['text']['contains']); +}); + it('throws an HandlingException for an invalid comparison operator', function () { $this->expectException(HandlingException::class); $this->expectExceptionMessage('Invalid comparison operator'); @@ -39,3 +174,28 @@ $this->expectExceptionMessage('Invalid filter definition.'); $filter->toArray(); }); + +it('throws an exception for nesting too many filter bags', function() { + + $this->expectException(HandlingException::class); + $this->expectExceptionMessage('The maximum nesting level of compound filters must not exceed 2.'); + + $filterBag = new FilterBag(Operators::AND); + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "UNIVAC"], + ]) + ); + + $nameFilterBag = new FilterBag(Operators::OR); + $nameFilterBag + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + + $anotherBag = new FilterBag(); + $nameFilterBag->addFilterBag($anotherBag); + + // that's one nested bag too much + $filterBag->addFilterBag($nameFilterBag); +}); From 21d3e1ae61beb78c94ae36f2c1c114a034d71634 Mon Sep 17 00:00:00 2001 From: Diana Scharf Date: Mon, 30 Jan 2023 17:50:43 +0100 Subject: [PATCH 09/10] fixed / resorted tests --- src/Query/Filters/FilterBag.php | 2 +- tests/EndpointDatabaseTest.php | 34 +++---- tests/FilterBagTest.php | 160 +++++++++++++++++++++++++++++-- tests/FilterTest.php | 161 +------------------------------- 4 files changed, 170 insertions(+), 187 deletions(-) diff --git a/src/Query/Filters/FilterBag.php b/src/Query/Filters/FilterBag.php index aab4da3..3a7f37c 100644 --- a/src/Query/Filters/FilterBag.php +++ b/src/Query/Filters/FilterBag.php @@ -108,7 +108,7 @@ private function isValidOperator($operator) throw_if( ! in_array($operator, $validOperators), - new HandlingException('Invalid operator for FilterBag: '.$operator) + new HandlingException('Invalid operator for FilterBag: '.$operator) ); } } diff --git a/tests/EndpointDatabaseTest.php b/tests/EndpointDatabaseTest.php index ce367bb..b4a93b4 100644 --- a/tests/EndpointDatabaseTest.php +++ b/tests/EndpointDatabaseTest.php @@ -52,18 +52,15 @@ Sorting::propertySort('Birth year', 'descending') ); - $filters - ->add( - Filter::rawFilter( - 'Known for', - [ - 'multi_select' => ['contains' => 'UNIVAC'], - ] - ) - ); + $filter = Filter::rawFilter( + 'Known for', + [ + 'multi_select' => ['contains' => 'UNIVAC'], + ] + ); $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') - ->filterBy($filters) + ->filterBy($filter) ->sortBy($sortings) ->limit($limit) ->query(); @@ -98,18 +95,15 @@ // Let's search for something that doesn't exists $filters = new Collection(); - $filters - ->add( - Filter::rawFilter( - 'Known for', - [ - 'multi_select' => ['contains' => "something that doesn't exists"], - ] - ) - ); + $filter = Filter::rawFilter( + 'Known for', + [ + 'multi_select' => ['contains' => "something that doesn't exists"], + ] + ); $result = Notion::database('8284f3ff77e24d4a939d19459e4d6bdc') - ->filterBy($filters) + ->filterBy($filter) ->query(); $this->assertInstanceOf(PageCollection::class, $result); diff --git a/tests/FilterBagTest.php b/tests/FilterBagTest.php index 4a92c84..ed3d54a 100644 --- a/tests/FilterBagTest.php +++ b/tests/FilterBagTest.php @@ -55,14 +55,162 @@ $filterBag->addFilterBag($nameFilterBag); }); -it('allows the nesting of multiple FilterBags inside one FilterBag', function () { - // TODO + +it('creates a filter bag with the AND operator and two conditions', function () { + $filterBag = new FilterBag(Operators::AND); + + # Filter for all entries that are + # (Known for == UNIVAC && Known for == ENIAC) + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "UNIVAC"], + ]) + ); + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "ENIAC"], + ]) + ); + + $filterBagQuery = $filterBag->toQuery(); + $this->assertArrayHasKey(Operators::AND, $filterBagQuery); + $this->assertCount(2, $filterBagQuery[Operators::AND]); + + // check structure of first filter compound + $filterQuery = $filterBagQuery[Operators::AND][0]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Known for', $filterQuery['property']); + $this->assertArrayHasKey('multi_select', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['multi_select']); + $this->assertEquals('UNIVAC', $filterQuery['multi_select']['contains']); + + // check structure of second filter compound + $filterQuery = $filterBagQuery[Operators::AND][1]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Known for', $filterQuery['property']); + $this->assertArrayHasKey('multi_select', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['multi_select']); + $this->assertEquals('ENIAC', $filterQuery['multi_select']['contains']); }); -it('creates the correct query structure for a nested FilterBag', function () { - // TODO +it('creates a filter bag with the OR operator and three conditions', function () { + $filterBag = new FilterBag(Operators::OR); + + + # Filter for all entries that have + # (Name == Grace || Name == Jean || Name == Ada) + + $filterBag + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Ada")); + + + $filterBagQuery = $filterBag->toQuery(); + + $this->assertArrayHasKey(Operators::OR, $filterBagQuery); + $this->assertCount(3, $filterBagQuery[Operators::OR]); + + // check structure of first filter compound + $filterQuery = $filterBagQuery[Operators::OR][0]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Name', $filterQuery['property']); + $this->assertArrayHasKey('text', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['text']); + $this->assertEquals('Grace', $filterQuery['text']['contains']); + + + // check value of second filter compound + $filterQuery = $filterBagQuery[Operators::OR][1]; + $this->assertEquals('Jean', $filterQuery['text']['contains']); + + // check value of third filter compound + $filterQuery = $filterBagQuery[Operators::OR][2]; + $this->assertEquals('Ada', $filterQuery['text']['contains']); + }); -it('creates the correct query structure for a FilterBag with one level', function () { - // TODO +it('creates a filter bag with with the AND operator and a nested OR condition', function() { + + # Filter for all entries that are + # (KnownFor == Univac && (Name == Grace || Name == Jean)) + + $filterBag = new FilterBag(Operators::AND); + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "UNIVAC"], + ]) + ); + + $nameFilterBag = new FilterBag(Operators::OR); + $nameFilterBag + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + + $filterBag->addFilterBag($nameFilterBag); + + $this->assertInstanceOf(FilterBag::class, $filterBag); + $this->assertInstanceOf(FilterBag::class, $nameFilterBag); + + $filterBagQuery = $filterBag->toQuery(); + + $this->assertArrayHasKey(Operators::AND, $filterBagQuery); + + // check structure of first AND filter component + $multiSelectFilterQuery = $filterBagQuery[Operators::AND][0]; + $this->assertArrayHasKey('property', $multiSelectFilterQuery); + $this->assertEquals('Known for', $multiSelectFilterQuery['property']); + $this->assertArrayHasKey('multi_select', $multiSelectFilterQuery); + $this->assertArrayHasKey('contains', $multiSelectFilterQuery['multi_select']); + $this->assertEquals('UNIVAC', $multiSelectFilterQuery['multi_select']['contains']); + + // check structure of second AND filter component, which is another filter bag + // with an OR operator + $nameFilterBagQuery = $filterBagQuery[Operators::AND][1]; + $this->assertArrayHasKey(Operators::OR, $nameFilterBagQuery); + $this->assertCount(2, $nameFilterBagQuery[Operators::OR]); + + // check structure of the first filter inside the OR filter bag + $filterQuery = $nameFilterBagQuery[Operators::OR][0]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Name', $filterQuery['property']); + $this->assertArrayHasKey('text', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['text']); + $this->assertEquals('Grace', $filterQuery['text']['contains']); + + // check structure of the second filter inside the OR filter bag + $filterQuery = $nameFilterBagQuery[Operators::OR][1]; + $this->assertArrayHasKey('property', $filterQuery); + $this->assertEquals('Name', $filterQuery['property']); + $this->assertArrayHasKey('text', $filterQuery); + $this->assertArrayHasKey('contains', $filterQuery['text']); + $this->assertEquals('Jean', $filterQuery['text']['contains']); +}); + +it('throws an exception for nesting too many filter bags', function() { + + $this->expectException(HandlingException::class); + $this->expectExceptionMessage('The maximum nesting level of compound filters must not exceed 2.'); + + $filterBag = new FilterBag(Operators::AND); + + $filterBag->addFilter( + Filter::rawFilter("Known for", [ + "multi_select" => ["contains" => "UNIVAC"], + ]) + ); + + $nameFilterBag = new FilterBag(Operators::OR); + $nameFilterBag + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) + ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + + $anotherBag = new FilterBag(); + $nameFilterBag->addFilterBag($anotherBag); + + // that's one nested bag too much + $filterBag->addFilterBag($nameFilterBag); }); diff --git a/tests/FilterTest.php b/tests/FilterTest.php index 9a2c57c..bd47f5c 100644 --- a/tests/FilterTest.php +++ b/tests/FilterTest.php @@ -27,140 +27,6 @@ $this->assertEquals('9000', $filter->toQuery()['number']['greater_than_or_equal_to']); }); -it('creates a filter bag with the AND operator and two conditions', function () { - $filterBag = new FilterBag(Operators::AND); - - # Filter for all entries that are - # (Known for == UNIVAC && Known for == ENIAC) - - $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "UNIVAC"], - ]) - ); - - $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "ENIAC"], - ]) - ); - - $filterBagQuery = $filterBag->toQuery(); - $this->assertArrayHasKey(Operators::AND, $filterBagQuery); - $this->assertCount(2, $filterBagQuery[Operators::AND]); - - // check structure of first filter compound - $filterQuery = $filterBagQuery[Operators::AND][0]; - $this->assertArrayHasKey('property', $filterQuery); - $this->assertEquals('Known for', $filterQuery['property']); - $this->assertArrayHasKey('multi_select', $filterQuery); - $this->assertArrayHasKey('contains', $filterQuery['multi_select']); - $this->assertEquals('UNIVAC', $filterQuery['multi_select']['contains']); - - // check structure of second filter compound - $filterQuery = $filterBagQuery[Operators::AND][1]; - $this->assertArrayHasKey('property', $filterQuery); - $this->assertEquals('Known for', $filterQuery['property']); - $this->assertArrayHasKey('multi_select', $filterQuery); - $this->assertArrayHasKey('contains', $filterQuery['multi_select']); - $this->assertEquals('COBOL', $filterQuery['multi_select']['contains']); -}); - -it('creates a filter bag with the OR operator and three conditions', function () { - $filterBag = new FilterBag(Operators::OR); - - - # Filter for all entries that have - # (Name == Grace || Name == Jean || Name == Ada) - - $filterBag - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Ada")); - - - $filterBagQuery = $filterBag->toQuery(); - - $this->assertArrayHasKey(Operators::OR, $filterBagQuery); - $this->assertCount(3, $filterBagQuery[Operators::OR]); - - // check structure of first filter compound - $filterQuery = $filterBagQuery[Operators::OR][0]; - $this->assertArrayHasKey('property', $filterQuery); - $this->assertEquals('Name', $filterQuery['property']); - $this->assertArrayHasKey('text', $filterQuery); - $this->assertArrayHasKey('contains', $filterQuery['text']); - $this->assertEquals('Grace', $filterQuery['text']['contains']); - - - // check value of second filter compound - $filterQuery = $filterBagQuery[Operators::OR][1]; - $this->assertEquals('Jean', $filterQuery['text']['contains']); - - // check value of third filter compound - $filterQuery = $filterBagQuery[Operators::OR][2]; - $this->assertEquals('Ada', $filterQuery['text']['contains']); - -}); - -it('creates a filter bag with with the AND operator and a nested OR condition', function() { - - # Filter for all entries that are - # (KnownFor == Univac && (Name == Grace || Name == Jean)) - - $filterBag = new FilterBag(Operators::AND); - - $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "UNIVAC"], - ]) - ); - - $nameFilterBag = new FilterBag(Operators::OR); - $nameFilterBag - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); - - $filterBag->addFilterBag($nameFilterBag); - - $this->assertInstanceOf(FilterBag::class, $filterBag); - $this->assertInstanceOf(FilterBag::class, $nameFilterBag); - - $filterBagQuery = $filterBag->toQuery(); - - $this->assertArrayHasKey(Operators::AND, $filterBagQuery); - - // check structure of first AND filter component - $multiSelectFilterQuery = $filterBagQuery[Operators::AND][0]; - $this->assertArrayHasKey('property', $multiSelectFilterQuery); - $this->assertEquals('Known for', $multiSelectFilterQuery['property']); - $this->assertArrayHasKey('multi_select', $multiSelectFilterQuery); - $this->assertArrayHasKey('contains', $multiSelectFilterQuery['multi_select']); - $this->assertEquals('UNIVAC', $multiSelectFilterQuery['multi_select']['contains']); - - // check structure of second AND filter component, which is another filter bag - // with an OR operator - $nameFilterBagQuery = $filterBagQuery[Operators::AND][1]; - $this->assertArrayHasKey(Operators::OR, $nameFilterBagQuery); - $this->assertCount(2, $nameFilterBagQuery[Operators::OR]); - - // check structure of the first filter inside the OR filter bag - $filterQuery = $nameFilterBagQuery[Operators::OR][0]; - $this->assertArrayHasKey('property', $filterQuery); - $this->assertEquals('Name', $filterQuery['property']); - $this->assertArrayHasKey('text', $filterQuery); - $this->assertArrayHasKey('contains', $filterQuery['text']); - $this->assertEquals('Grace', $filterQuery['text']['contains']); - - // check structure of the second filter inside the OR filter bag - $filterQuery = $nameFilterBagQuery[Operators::OR][1]; - $this->assertArrayHasKey('property', $filterQuery); - $this->assertEquals('Name', $filterQuery['property']); - $this->assertArrayHasKey('text', $filterQuery); - $this->assertArrayHasKey('contains', $filterQuery['text']); - $this->assertEquals('Jean', $filterQuery['text']['contains']); -}); - it('throws an HandlingException for an invalid comparison operator', function () { $this->expectException(HandlingException::class); $this->expectExceptionMessage('Invalid comparison operator'); @@ -173,29 +39,4 @@ $this->expectException(HandlingException::class); $this->expectExceptionMessage('Invalid filter definition.'); $filter->toArray(); -}); - -it('throws an exception for nesting too many filter bags', function() { - - $this->expectException(HandlingException::class); - $this->expectExceptionMessage('The maximum nesting level of compound filters must not exceed 2.'); - - $filterBag = new FilterBag(Operators::AND); - - $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "UNIVAC"], - ]) - ); - - $nameFilterBag = new FilterBag(Operators::OR); - $nameFilterBag - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); - - $anotherBag = new FilterBag(); - $nameFilterBag->addFilterBag($anotherBag); - - // that's one nested bag too much - $filterBag->addFilterBag($nameFilterBag); -}); +}); \ No newline at end of file From 72ba50139b662982c3374aa042fdf1f6a3f24264 Mon Sep 17 00:00:00 2001 From: Di Date: Mon, 30 Jan 2023 17:51:05 +0100 Subject: [PATCH 10/10] Apply fixes from StyleCI (#98) --- src/Query/Filters/Operators.php | 4 +-- tests/FilterBagTest.php | 52 +++++++++++++++------------------ tests/FilterTest.php | 3 +- 3 files changed, 26 insertions(+), 33 deletions(-) diff --git a/src/Query/Filters/Operators.php b/src/Query/Filters/Operators.php index cfc728c..77e9401 100644 --- a/src/Query/Filters/Operators.php +++ b/src/Query/Filters/Operators.php @@ -30,8 +30,8 @@ class Operators const NEXT_MONTH = 'next_month'; const NEXT_YEAR = 'next_year'; - CONST AND = 'and'; - CONST OR = 'or'; + const AND = 'and'; + const OR = 'or'; // TODO: Formula filter condition diff --git a/tests/FilterBagTest.php b/tests/FilterBagTest.php index ed3d54a..7fc6d57 100644 --- a/tests/FilterBagTest.php +++ b/tests/FilterBagTest.php @@ -55,22 +55,21 @@ $filterBag->addFilterBag($nameFilterBag); }); - it('creates a filter bag with the AND operator and two conditions', function () { $filterBag = new FilterBag(Operators::AND); - # Filter for all entries that are - # (Known for == UNIVAC && Known for == ENIAC) + // Filter for all entries that are + // (Known for == UNIVAC && Known for == ENIAC) $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "UNIVAC"], + Filter::rawFilter('Known for', [ + 'multi_select' => ['contains' => 'UNIVAC'], ]) ); $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "ENIAC"], + Filter::rawFilter('Known for', [ + 'multi_select' => ['contains' => 'ENIAC'], ]) ); @@ -98,15 +97,13 @@ it('creates a filter bag with the OR operator and three conditions', function () { $filterBag = new FilterBag(Operators::OR); - - # Filter for all entries that have - # (Name == Grace || Name == Jean || Name == Ada) + // Filter for all entries that have + // (Name == Grace || Name == Jean || Name == Ada) $filterBag - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Ada")); - + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Grace')) + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Jean')) + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Ada')); $filterBagQuery = $filterBag->toQuery(); @@ -121,7 +118,6 @@ $this->assertArrayHasKey('contains', $filterQuery['text']); $this->assertEquals('Grace', $filterQuery['text']['contains']); - // check value of second filter compound $filterQuery = $filterBagQuery[Operators::OR][1]; $this->assertEquals('Jean', $filterQuery['text']['contains']); @@ -129,26 +125,25 @@ // check value of third filter compound $filterQuery = $filterBagQuery[Operators::OR][2]; $this->assertEquals('Ada', $filterQuery['text']['contains']); - }); -it('creates a filter bag with with the AND operator and a nested OR condition', function() { +it('creates a filter bag with with the AND operator and a nested OR condition', function () { - # Filter for all entries that are - # (KnownFor == Univac && (Name == Grace || Name == Jean)) + // Filter for all entries that are + // (KnownFor == Univac && (Name == Grace || Name == Jean)) $filterBag = new FilterBag(Operators::AND); $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "UNIVAC"], + Filter::rawFilter('Known for', [ + 'multi_select' => ['contains' => 'UNIVAC'], ]) ); $nameFilterBag = new FilterBag(Operators::OR); $nameFilterBag - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Grace')) + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Jean')); $filterBag->addFilterBag($nameFilterBag); @@ -190,23 +185,22 @@ $this->assertEquals('Jean', $filterQuery['text']['contains']); }); -it('throws an exception for nesting too many filter bags', function() { - +it('throws an exception for nesting too many filter bags', function () { $this->expectException(HandlingException::class); $this->expectExceptionMessage('The maximum nesting level of compound filters must not exceed 2.'); $filterBag = new FilterBag(Operators::AND); $filterBag->addFilter( - Filter::rawFilter("Known for", [ - "multi_select" => ["contains" => "UNIVAC"], + Filter::rawFilter('Known for', [ + 'multi_select' => ['contains' => 'UNIVAC'], ]) ); $nameFilterBag = new FilterBag(Operators::OR); $nameFilterBag - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Grace")) - ->addFilter(Filter::textFilter("Name", Operators::CONTAINS, "Jean")); + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Grace')) + ->addFilter(Filter::textFilter('Name', Operators::CONTAINS, 'Jean')); $anotherBag = new FilterBag(); $nameFilterBag->addFilterBag($anotherBag); diff --git a/tests/FilterTest.php b/tests/FilterTest.php index bd47f5c..f040114 100644 --- a/tests/FilterTest.php +++ b/tests/FilterTest.php @@ -2,7 +2,6 @@ use FiveamCode\LaravelNotionApi\Exceptions\HandlingException; use FiveamCode\LaravelNotionApi\Query\Filters\Filter; -use FiveamCode\LaravelNotionApi\Query\Filters\FilterBag; use FiveamCode\LaravelNotionApi\Query\Filters\Operators; it('creates a text filter with the given data', function () { @@ -39,4 +38,4 @@ $this->expectException(HandlingException::class); $this->expectExceptionMessage('Invalid filter definition.'); $filter->toArray(); -}); \ No newline at end of file +});