From f330c1349a8d225471986c90989e5b1467441321 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 30 Jul 2018 15:56:08 +0100 Subject: [PATCH 001/110] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..12b514c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © PHP.Gt contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 814aa69bbc120ee5073115c019fcefee24eb95d4 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 14 Aug 2018 13:48:46 +0100 Subject: [PATCH 002/110] Get store and create if it doesn't already exist --- src/Session.php | 10 ++++++++-- src/SessionStore.php | 17 +++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/Session.php b/src/Session.php index 57d8145..2d7b622 100644 --- a/src/Session.php +++ b/src/Session.php @@ -68,8 +68,14 @@ public function kill():void { ); } - public function getStore(string $namespace) { - return $this->store->getStore($namespace); + public function getStore( + string $namespace, + bool $createIfNotExists = false + ):?SessionStore { + return $this->store->getStore( + $namespace, + $createIfNotExists + ); } public function get(string $key) { diff --git a/src/SessionStore.php b/src/SessionStore.php index caedb1a..c06d642 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -53,17 +53,26 @@ public function write():void { $this->session->write(); } - public function getStore(string $namespace):?SessionStore { + public function getStore( + string $namespace, + bool $createIfNotExists = false + ):?SessionStore { $namespaceParts = explode(".", $namespace); $topLevelStoreName = array_shift($namespaceParts); /** @var SessionStore $store */ $store = $this->stores[$topLevelStoreName] ?? null; - if (is_null($store)) { - return null; + if(is_null($store)) { + if($createIfNotExists) { + $store = $this->createStore($namespace); + return $store; + } + else { + return null; + } } - if (empty($namespaceParts)) { + if(empty($namespaceParts)) { return $store; } From 51a24175d1829c4cc757863804d3a011e7a5574e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 23 Aug 2018 08:49:27 +0000 Subject: [PATCH 003/110] Bump phpunit/phpunit from 6.5.9 to 7.3.2 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 6.5.9 to 7.3.2. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/6.5.9...7.3.2) Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 251 ++++++++++++++++++++------------------------------ 2 files changed, 99 insertions(+), 154 deletions(-) diff --git a/composer.json b/composer.json index 9a99749..f4fa496 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.3" }, "autoload": { diff --git a/composer.lock b/composer.lock index 3e7f3eb..27b331e 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "33f9b4c65d86828b3aad9a1485ae0c08", + "content-hash": "8a80b67d6df1493b6546ea18ba08bb1d", "packages": [], "packages-dev": [ { @@ -111,22 +111,22 @@ }, { "name": "phar-io/manifest", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", + "phar-io/version": "^2.0", "php": "^5.6 || ^7.0" }, "type": "library", @@ -162,20 +162,20 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" + "time": "2018-07-08T19:23:20+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", "shasum": "" }, "require": { @@ -209,7 +209,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "time": "2018-07-08T19:19:57+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -365,16 +365,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.6", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { @@ -386,12 +386,12 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -424,44 +424,44 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.3.2", + "version": "6.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac" + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", + "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -487,29 +487,29 @@ "testing", "xunit" ], - "time": "2018-04-06T15:36:58+00:00" + "time": "2018-06-01T07:51:50+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c", + "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -524,7 +524,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -534,7 +534,7 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "time": "2018-06-11T11:44:00+00:00" }, { "name": "phpunit/php-text-template", @@ -579,28 +579,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -615,7 +615,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -624,33 +624,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -673,40 +673,40 @@ "keywords": [ "tokenizer" ], - "time": "2017-11-27T05:48:46+00:00" + "time": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", - "version": "6.5.9", + "version": "7.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "093ca5508174cd8ab8efe44fd1dde447adfdec8f" + "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/093ca5508174cd8ab8efe44fd1dde447adfdec8f", - "reference": "093ca5508174cd8ab8efe44fd1dde447adfdec8f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34705f81bddc3f505b9599a2ef96e2b4315ba9b8", + "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.5", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", + "phpunit/php-timer": "^2.0", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", @@ -715,15 +715,15 @@ "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" + "phpunit/phpunit-mock-objects": "*" }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -731,7 +731,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "7.3-dev" } }, "autoload": { @@ -757,66 +757,7 @@ "testing", "xunit" ], - "time": "2018-07-03T06:40:40+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "6f9a3c8bf34188a2b53ce2ae7a126089c53e0a9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/6f9a3c8bf34188a2b53ce2ae7a126089c53e0a9f", - "reference": "6f9a3c8bf34188a2b53ce2ae7a126089c53e0a9f", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2018-07-13T03:27:23+00:00" + "time": "2018-08-22T06:39:21+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -865,30 +806,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -925,32 +866,33 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2018-07-12T15:12:46+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "366541b989927187c4ca70490a35615d3fef2dce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", + "reference": "366541b989927187c4ca70490a35615d3fef2dce", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -975,9 +917,12 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-08-03T08:09:46+00:00" + "time": "2018-06-10T07:54:39+00:00" }, { "name": "sebastian/environment", From 0ec4044514aca60c74dfc9357066778cb0040833 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 3 Sep 2018 05:20:47 +0000 Subject: [PATCH 004/110] Bump phpunit/phpunit from 7.3.2 to 7.3.3 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.3.2 to 7.3.3. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.3.2...7.3.3) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 27b331e..a37deb3 100644 --- a/composer.lock +++ b/composer.lock @@ -677,16 +677,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.3.2", + "version": "7.3.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8" + "reference": "1bd5629cccfb2c0a9ef5474b4ff772349e1ec898" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34705f81bddc3f505b9599a2ef96e2b4315ba9b8", - "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1bd5629cccfb2c0a9ef5474b4ff772349e1ec898", + "reference": "1bd5629cccfb2c0a9ef5474b4ff772349e1ec898", "shasum": "" }, "require": { @@ -757,7 +757,7 @@ "testing", "xunit" ], - "time": "2018-08-22T06:39:21+00:00" + "time": "2018-09-01T15:49:55+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From f9a4a5b2a9ecb899cb192b384f07f4ccc599ed8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 6 Sep 2018 05:28:25 +0000 Subject: [PATCH 005/110] Bump phpunit/phpunit from 7.3.3 to 7.3.4 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.3.3 to 7.3.4. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.3.3...7.3.4) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index a37deb3..89b60b4 100644 --- a/composer.lock +++ b/composer.lock @@ -677,16 +677,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.3.3", + "version": "7.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1bd5629cccfb2c0a9ef5474b4ff772349e1ec898" + "reference": "0356331bf62896dc56e3a15030b23b73f38b2935" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1bd5629cccfb2c0a9ef5474b4ff772349e1ec898", - "reference": "1bd5629cccfb2c0a9ef5474b4ff772349e1ec898", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0356331bf62896dc56e3a15030b23b73f38b2935", + "reference": "0356331bf62896dc56e3a15030b23b73f38b2935", "shasum": "" }, "require": { @@ -757,7 +757,7 @@ "testing", "xunit" ], - "time": "2018-09-01T15:49:55+00:00" + "time": "2018-09-05T09:58:53+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 846356ae8b5bc6da3325d2b23dc50b6a31d3cff1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 10 Sep 2018 06:22:25 +0000 Subject: [PATCH 006/110] Bump phpunit/phpunit from 7.3.4 to 7.3.5 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.3.4 to 7.3.5. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.3.4...7.3.5) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 89b60b4..f6ca472 100644 --- a/composer.lock +++ b/composer.lock @@ -677,16 +677,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.3.4", + "version": "7.3.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0356331bf62896dc56e3a15030b23b73f38b2935" + "reference": "7b331efabbb628c518c408fdfcaf571156775de2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0356331bf62896dc56e3a15030b23b73f38b2935", - "reference": "0356331bf62896dc56e3a15030b23b73f38b2935", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b331efabbb628c518c408fdfcaf571156775de2", + "reference": "7b331efabbb628c518c408fdfcaf571156775de2", "shasum": "" }, "require": { @@ -757,7 +757,7 @@ "testing", "xunit" ], - "time": "2018-09-05T09:58:53+00:00" + "time": "2018-09-08T15:14:29+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From e1f6f58eb978d8fba811e0e8f65b1aae86b84948 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 5 Oct 2018 05:15:16 +0000 Subject: [PATCH 007/110] Bump phpunit/phpunit from 7.3.5 to 7.4.0 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.3.5 to 7.4.0. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.4.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.3.5...7.4.0) Signed-off-by: dependabot[bot] --- composer.lock | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/composer.lock b/composer.lock index f6ca472..6717f34 100644 --- a/composer.lock +++ b/composer.lock @@ -428,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.0.7", + "version": "6.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" + "reference": "848f78b3309780fef7ec8c4666b7ab4e6b09b22f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/848f78b3309780fef7ec8c4666b7ab4e6b09b22f", + "reference": "848f78b3309780fef7ec8c4666b7ab4e6b09b22f", "shasum": "" }, "require": { @@ -487,25 +487,28 @@ "testing", "xunit" ], - "time": "2018-06-01T07:51:50+00:00" + "time": "2018-10-04T03:41:23+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c" + "reference": "050bedf145a257b1ff02746c31894800e5122946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", "shasum": "" }, "require": { "php": "^7.1" }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, "type": "library", "extra": { "branch-alias": { @@ -534,7 +537,7 @@ "filesystem", "iterator" ], - "time": "2018-06-11T11:44:00+00:00" + "time": "2018-09-13T20:33:42+00:00" }, { "name": "phpunit/php-text-template", @@ -677,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.3.5", + "version": "7.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7b331efabbb628c518c408fdfcaf571156775de2" + "reference": "f3837fa1e07758057ae06e8ddec6d06ba183f126" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b331efabbb628c518c408fdfcaf571156775de2", - "reference": "7b331efabbb628c518c408fdfcaf571156775de2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3837fa1e07758057ae06e8ddec6d06ba183f126", + "reference": "f3837fa1e07758057ae06e8ddec6d06ba183f126", "shasum": "" }, "require": { @@ -711,7 +714,7 @@ "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, "conflict": { @@ -731,7 +734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.4-dev" } }, "autoload": { @@ -757,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-09-08T15:14:29+00:00" + "time": "2018-10-05T04:05:24+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1239,25 +1242,25 @@ }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1277,7 +1280,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2018-10-04T04:07:39+00:00" }, { "name": "sebastian/version", From 210dacd93e0703a3c3fcf5fe03d84280254e6054 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 8 Oct 2018 10:59:36 +0100 Subject: [PATCH 008/110] Update to match API --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ad3aee4..e8c2961 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Sessions are addressed using dot notation, allowing for handling categories of s ## Example usage: Welcome a user by their first name or log out the user ```php -if($session->has("auth")) { +if($session->contains("auth")) { // Remove the *whole* auth section of the session on logout. if($action === "logout") { $session->delete("auth"); @@ -40,4 +40,4 @@ else { // can't read/write to other session variables: AuthenticationSystem::beginLogin($session->getStore("auth")); } -``` \ No newline at end of file +``` From 688d613fdab42b351452bf0c56b5d7d8cdb664c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 19 Oct 2018 05:15:57 +0000 Subject: [PATCH 009/110] Bump phpunit/phpunit from 7.4.0 to 7.4.1 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.4.0 to 7.4.1. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.4.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.4.0...7.4.1) Signed-off-by: dependabot[bot] --- composer.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 6717f34..da87105 100644 --- a/composer.lock +++ b/composer.lock @@ -428,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.0.8", + "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "848f78b3309780fef7ec8c4666b7ab4e6b09b22f" + "reference": "b097681a19a48e52706f57e47a09594bac4f7cab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/848f78b3309780fef7ec8c4666b7ab4e6b09b22f", - "reference": "848f78b3309780fef7ec8c4666b7ab4e6b09b22f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b097681a19a48e52706f57e47a09594bac4f7cab", + "reference": "b097681a19a48e52706f57e47a09594bac4f7cab", "shasum": "" }, "require": { @@ -448,7 +448,7 @@ "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, @@ -461,7 +461,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2018-10-04T03:41:23+00:00" + "time": "2018-10-18T09:01:38+00:00" }, { "name": "phpunit/php-file-iterator", @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.4.0", + "version": "7.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3837fa1e07758057ae06e8ddec6d06ba183f126" + "reference": "c5a120ade60992bd671a912188ee9ee9f8083bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3837fa1e07758057ae06e8ddec6d06ba183f126", - "reference": "f3837fa1e07758057ae06e8ddec6d06ba183f126", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c5a120ade60992bd671a912188ee9ee9f8083bbd", + "reference": "c5a120ade60992bd671a912188ee9ee9f8083bbd", "shasum": "" }, "require": { @@ -710,7 +710,7 @@ "phpunit/php-timer": "^2.0", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-10-05T04:05:24+00:00" + "time": "2018-10-18T09:02:52+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 847138fbce6ddd1e16fd0020791b6578d51e09c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 24 Oct 2018 05:15:19 +0000 Subject: [PATCH 010/110] Bump phpunit/phpunit from 7.4.1 to 7.4.3 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.4.1 to 7.4.3. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.4.1...7.4.3) Signed-off-by: dependabot[bot] --- composer.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index da87105..c3206a9 100644 --- a/composer.lock +++ b/composer.lock @@ -428,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.1", + "version": "6.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b097681a19a48e52706f57e47a09594bac4f7cab" + "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b097681a19a48e52706f57e47a09594bac4f7cab", - "reference": "b097681a19a48e52706f57e47a09594bac4f7cab", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4d3ae9b21a7d7e440bd0cf65565533117976859f", + "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f", "shasum": "" }, "require": { @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2018-10-18T09:01:38+00:00" + "time": "2018-10-23T05:59:32+00:00" }, { "name": "phpunit/php-file-iterator", @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.4.1", + "version": "7.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c5a120ade60992bd671a912188ee9ee9f8083bbd" + "reference": "c151651fb6ed264038d486ea262e243af72e5e64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c5a120ade60992bd671a912188ee9ee9f8083bbd", - "reference": "c5a120ade60992bd671a912188ee9ee9f8083bbd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c151651fb6ed264038d486ea262e243af72e5e64", + "reference": "c151651fb6ed264038d486ea262e243af72e5e64", "shasum": "" }, "require": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-10-18T09:02:52+00:00" + "time": "2018-10-23T05:57:41+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 4da4aa47a878915c403f3efc635e17eb6741f608 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 15 Nov 2018 05:37:25 +0000 Subject: [PATCH 011/110] Bump phpunit/phpunit from 7.4.3 to 7.4.4 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.4.3 to 7.4.4. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.4.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.4.3...7.4.4) Signed-off-by: dependabot[bot] --- composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index c3206a9..4874333 100644 --- a/composer.lock +++ b/composer.lock @@ -428,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.3", + "version": "6.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f" + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4d3ae9b21a7d7e440bd0cf65565533117976859f", - "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", "shasum": "" }, "require": { @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2018-10-23T05:59:32+00:00" + "time": "2018-10-31T16:06:48+00:00" }, { "name": "phpunit/php-file-iterator", @@ -631,16 +631,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", "shasum": "" }, "require": { @@ -676,20 +676,20 @@ "keywords": [ "tokenizer" ], - "time": "2018-02-01T13:16:43+00:00" + "time": "2018-10-30T05:52:18+00:00" }, { "name": "phpunit/phpunit", - "version": "7.4.3", + "version": "7.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c151651fb6ed264038d486ea262e243af72e5e64" + "reference": "b1be2c8530c4c29c3519a052c9fb6cee55053bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c151651fb6ed264038d486ea262e243af72e5e64", - "reference": "c151651fb6ed264038d486ea262e243af72e5e64", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b1be2c8530c4c29c3519a052c9fb6cee55053bbd", + "reference": "b1be2c8530c4c29c3519a052c9fb6cee55053bbd", "shasum": "" }, "require": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-10-23T05:57:41+00:00" + "time": "2018-11-14T16:52:02+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From b218c779be4606eabcf7e25ffa2db183421c8ea3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 3 Dec 2018 05:50:35 +0000 Subject: [PATCH 012/110] Bump phpunit/phpunit from 7.4.4 to 7.4.5 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.4.4 to 7.4.5. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/7.4.5/ChangeLog-7.4.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.4.4...7.4.5) Signed-off-by: dependabot[bot] --- composer.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.lock b/composer.lock index 4874333..efaaa02 100644 --- a/composer.lock +++ b/composer.lock @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.4.4", + "version": "7.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b1be2c8530c4c29c3519a052c9fb6cee55053bbd" + "reference": "61d34e8dd6eb3555900f0f2a2fa9e7e570730102" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b1be2c8530c4c29c3519a052c9fb6cee55053bbd", - "reference": "b1be2c8530c4c29c3519a052c9fb6cee55053bbd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/61d34e8dd6eb3555900f0f2a2fa9e7e570730102", + "reference": "61d34e8dd6eb3555900f0f2a2fa9e7e570730102", "shasum": "" }, "require": { @@ -710,7 +710,7 @@ "phpunit/php-timer": "^2.0", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.0", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-11-14T16:52:02+00:00" + "time": "2018-12-03T05:01:24+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -929,28 +929,28 @@ }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/febd209a219cea7b56ad799b30ebbea34b71eb8f", + "reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^7.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -975,7 +975,7 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "time": "2018-11-25T09:31:21+00:00" }, { "name": "sebastian/exporter", From 75bc6cc6de944d42373ddcff0f22564066e761b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 10 Dec 2018 06:05:37 +0000 Subject: [PATCH 013/110] Bump phpunit/phpunit from 7.4.5 to 7.5.0 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.4.5 to 7.5.0. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.4.5...7.5.0) Signed-off-by: dependabot[bot] --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index efaaa02..c3089f8 100644 --- a/composer.lock +++ b/composer.lock @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.4.5", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "61d34e8dd6eb3555900f0f2a2fa9e7e570730102" + "reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/61d34e8dd6eb3555900f0f2a2fa9e7e570730102", - "reference": "61d34e8dd6eb3555900f0f2a2fa9e7e570730102", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/520723129e2b3fc1dc4c0953e43c9d40e1ecb352", + "reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352", "shasum": "" }, "require": { @@ -734,7 +734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-12-03T05:01:24+00:00" + "time": "2018-12-07T07:08:12+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 7369d21d4ccfbfe1eb00808e8bab8a31e2ebde04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 13 Dec 2018 05:51:46 +0000 Subject: [PATCH 014/110] Bump phpunit/phpunit from 7.5.0 to 7.5.1 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.5.0 to 7.5.1. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.5.0...7.5.1) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index c3089f8..67d099c 100644 --- a/composer.lock +++ b/composer.lock @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.0", + "version": "7.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352" + "reference": "c23d78776ad415d5506e0679723cb461d71f488f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/520723129e2b3fc1dc4c0953e43c9d40e1ecb352", - "reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c23d78776ad415d5506e0679723cb461d71f488f", + "reference": "c23d78776ad415d5506e0679723cb461d71f488f", "shasum": "" }, "require": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-12-07T07:08:12+00:00" + "time": "2018-12-12T07:20:32+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 207150465df8d06466e80fe3959fd0a0a3e5dc40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 16 Jan 2019 05:57:11 +0000 Subject: [PATCH 015/110] Bump phpunit/phpunit from 7.5.1 to 7.5.2 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.5.1 to 7.5.2. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.5.1...7.5.2) Signed-off-by: dependabot[bot] --- composer.lock | 81 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 70 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 67d099c..0fd193a 100644 --- a/composer.lock +++ b/composer.lock @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.1", + "version": "7.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c23d78776ad415d5506e0679723cb461d71f488f" + "reference": "7c89093bd00f7d5ddf0ab81dee04f801416b4944" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c23d78776ad415d5506e0679723cb461d71f488f", - "reference": "c23d78776ad415d5506e0679723cb461d71f488f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7c89093bd00f7d5ddf0ab81dee04f801416b4944", + "reference": "7c89093bd00f7d5ddf0ab81dee04f801416b4944", "shasum": "" }, "require": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2018-12-12T07:20:32+00:00" + "time": "2019-01-15T08:19:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1325,6 +1325,64 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, { "name": "theseer/tokenizer", "version": "1.1.0", @@ -1367,20 +1425,21 @@ }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -1413,7 +1472,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], From b2622ffb3d1c4ff6d684b486c76c1c749ed22730 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 4 Feb 2019 05:54:20 +0000 Subject: [PATCH 016/110] Bump phpunit/phpunit from 7.5.2 to 8.0.1 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 7.5.2 to 8.0.1. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.0.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/7.5.2...8.0.1) Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 88 +++++++++++++++++++++++++++------------------------ 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/composer.json b/composer.json index f4fa496..c4b6b15 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^7.3" + "phpunit/phpunit": "^8.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 0fd193a..0f313b6 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": "8a80b67d6df1493b6546ea18ba08bb1d", + "content-hash": "29c7e25a17d15ac24ea43ef2c331c4f8", "packages": [], "packages-dev": [ { @@ -428,40 +428,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "4832739a02c418397e404da6c3e4fe680b7a4de7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4832739a02c418397e404da6c3e4fe680b7a4de7", + "reference": "4832739a02c418397e404da6c3e4fe680b7a4de7", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.0.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.0" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-02-01T07:29:14+00:00" }, { "name": "phpunit/php-file-iterator", @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.2", + "version": "8.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7c89093bd00f7d5ddf0ab81dee04f801416b4944" + "reference": "753a192050133fc649234de34d1993d87785b134" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7c89093bd00f7d5ddf0ab81dee04f801416b4944", - "reference": "7c89093bd00f7d5ddf0ab81dee04f801416b4944", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/753a192050133fc649234de34d1993d87785b134", + "reference": "753a192050133fc649234de34d1993d87785b134", "shasum": "" }, "require": { @@ -699,27 +699,25 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", + "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.7", "phar-io/manifest": "^1.0.2", "phar-io/version": "^2.0", - "php": "^7.1", + "php": "^7.2", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-code-coverage": "^7.0", "phpunit/php-file-iterator": "^2.0.1", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", + "sebastian/environment": "^4.1", "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "sebastian/global-state": "^3.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, "require-dev": { "ext-pdo": "*" }, @@ -734,7 +732,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.0-dev" } }, "autoload": { @@ -760,7 +758,7 @@ "testing", "xunit" ], - "time": "2019-01-15T08:19:08+00:00" + "time": "2019-02-03T17:34:56+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -929,28 +927,31 @@ }, { "name": "sebastian/environment", - "version": "4.0.1", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f" + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/febd209a219cea7b56ad799b30ebbea34b71eb8f", - "reference": "febd209a219cea7b56ad799b30ebbea34b71eb8f", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^7.4" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -975,7 +976,7 @@ "environment", "hhvm" ], - "time": "2018-11-25T09:31:21+00:00" + "time": "2019-02-01T05:27:49+00:00" }, { "name": "sebastian/exporter", @@ -1046,23 +1047,26 @@ }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -1070,7 +1074,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1093,7 +1097,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -1370,7 +1374,7 @@ }, { "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "email": "backendtea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", From 6ee1bec1a8657ab0611d2c7979a6166248dc4556 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 8 Feb 2019 06:23:59 +0000 Subject: [PATCH 017/110] Bump phpunit/phpunit from 8.0.1 to 8.0.2 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.0.1 to 8.0.2. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.0.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.0.1...8.0.2) Signed-off-by: dependabot[bot] --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 0f313b6..34bbb71 100644 --- a/composer.lock +++ b/composer.lock @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.0.1", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "753a192050133fc649234de34d1993d87785b134" + "reference": "d64e502503bcfab5d46c0b74ffd41f4986831dc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/753a192050133fc649234de34d1993d87785b134", - "reference": "753a192050133fc649234de34d1993d87785b134", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d64e502503bcfab5d46c0b74ffd41f4986831dc7", + "reference": "d64e502503bcfab5d46c0b74ffd41f4986831dc7", "shasum": "" }, "require": { @@ -758,7 +758,7 @@ "testing", "xunit" ], - "time": "2019-02-03T17:34:56+00:00" + "time": "2019-02-07T14:17:09+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -871,23 +871,23 @@ }, { "name": "sebastian/diff", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "366541b989927187c4ca70490a35615d3fef2dce" + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", - "reference": "366541b989927187c4ca70490a35615d3fef2dce", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0", + "phpunit/phpunit": "^7.5 || ^8.0", "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", @@ -923,7 +923,7 @@ "unidiff", "unified diff" ], - "time": "2018-06-10T07:54:39+00:00" + "time": "2019-02-04T06:01:07+00:00" }, { "name": "sebastian/environment", @@ -1374,7 +1374,7 @@ }, { "name": "Gert de Pagter", - "email": "backendtea@gmail.com" + "email": "BackEndTea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", From b3a0a8d88b46992ff41f5a711d7e06e49bb6842d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 18 Feb 2019 08:04:37 +0000 Subject: [PATCH 018/110] Bump phpunit/phpunit from 8.0.2 to 8.0.3 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.0.2 to 8.0.3. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.0.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.0.2...8.0.3) Signed-off-by: dependabot[bot] --- composer.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index 34bbb71..bf5f560 100644 --- a/composer.lock +++ b/composer.lock @@ -428,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.1", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4832739a02c418397e404da6c3e4fe680b7a4de7" + "reference": "cfca9c5f7f2694ca0c7749ffb142927d9f05250f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4832739a02c418397e404da6c3e4fe680b7a4de7", - "reference": "4832739a02c418397e404da6c3e4fe680b7a4de7", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cfca9c5f7f2694ca0c7749ffb142927d9f05250f", + "reference": "cfca9c5f7f2694ca0c7749ffb142927d9f05250f", "shasum": "" }, "require": { @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2019-02-01T07:29:14+00:00" + "time": "2019-02-15T13:40:27+00:00" }, { "name": "phpunit/php-file-iterator", @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.0.2", + "version": "8.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d64e502503bcfab5d46c0b74ffd41f4986831dc7" + "reference": "651e95a71ff705faae24d18ef5e4c7c8c5050f9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d64e502503bcfab5d46c0b74ffd41f4986831dc7", - "reference": "d64e502503bcfab5d46c0b74ffd41f4986831dc7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/651e95a71ff705faae24d18ef5e4c7c8c5050f9a", + "reference": "651e95a71ff705faae24d18ef5e4c7c8c5050f9a", "shasum": "" }, "require": { @@ -758,7 +758,7 @@ "testing", "xunit" ], - "time": "2019-02-07T14:17:09+00:00" + "time": "2019-02-15T14:06:48+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From c14acb8d5fe4c4d0a944edfee48b1d31c6d2ef20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 19 Feb 2019 05:59:16 +0000 Subject: [PATCH 019/110] Bump phpunit/phpunit from 8.0.3 to 8.0.4 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.0.3 to 8.0.4. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.0.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.0.3...8.0.4) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index bf5f560..2775d0c 100644 --- a/composer.lock +++ b/composer.lock @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.0.3", + "version": "8.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "651e95a71ff705faae24d18ef5e4c7c8c5050f9a" + "reference": "a7af0201285445c9c73c4bdf869c486e36b41604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/651e95a71ff705faae24d18ef5e4c7c8c5050f9a", - "reference": "651e95a71ff705faae24d18ef5e4c7c8c5050f9a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a7af0201285445c9c73c4bdf869c486e36b41604", + "reference": "a7af0201285445c9c73c4bdf869c486e36b41604", "shasum": "" }, "require": { @@ -758,7 +758,7 @@ "testing", "xunit" ], - "time": "2019-02-15T14:06:48+00:00" + "time": "2019-02-18T09:23:05+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 14378ca8ce86f28f0d1a924442dcc7c4c7831a4f Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 20 Feb 2019 16:26:29 +0000 Subject: [PATCH 020/110] syncing file with /CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 40e7a11..2bd1221 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ What do you need to know before you get started? Code within the PHP.Gt organisation is split over different repositories. The first thing to know is how the respositories are broken up and where your issue/idea/bug/feature/question is for. -[WebEngine](https://php.gt/webengine) is the main project that is used to build web applications, and depends on all other PHP.Gt repositories. Core responsibilities of this project include the `gt` commands, web routing, the request/response lifecycle, Page Logic classes and the "go" functions. +[WebEngine](https://php.gt/webengine) is the main project that is used to build web applications, and depends on all other PHP.Gt repositories. Core responsibilities of this project include web routing, the request/response lifecycle, Page Logic classes and the "go" functions. You may want to contribute on the components that make up the WebEngine. The main components include: @@ -101,7 +101,7 @@ As with all wikis, the wiki is open to edit by any registered Github user. Chang ### Financial contributions -PHP.Gt is open source and free, and always will be. If you feel like supporting the development of PHP.Gt financially, [please pledge a monthly donation via Patreon](https://www.patreon.com/phpgt). +PHP.Gt is open source and free, and always will be. If you are interested in sponsoring the development of PHP.Gt, [please send an email to sponsors@php.gt](mailto:sponsors@php.gt) for more information. Coding style guide ------------------ @@ -115,7 +115,7 @@ TDD is a programming methodology where the developer writes the tests for their All repositories within PHP.Gt aim to maintain tests that cover 100% of the codebase. Again, this should not be seen as a method of writing perfect code, but it too is useful practice. -When contributing to PHP.Gt, please be conscious of the tests coverage you are affecting, and aim to write tests that cover any functionality you contribute to. Feel free to ask for help writing tests in the issue tracker and a contributor will do their best in assisting you. +When contributing to PHP.Gt, please be conscious of the test coverage you are affecting, and aim to write tests that cover any functionality you contribute to. Feel free to ask for help writing tests in the issue tracker and a contributor will do their best in assisting you. [good-first-issues]: https://github.com/search?l=&q=org%3Aphpgt+type%3Aissue+is%3Aopen+label%3A%22good+first+issue%22&ref=advsearch&type=Issues&utf8=%E2%9C%93 [help-wanted-issues]: https://github.com/search?l=&q=org%3Aphpgt+type%3Aissue+is%3Aopen+label%3A%22help-wanted%22&ref=advsearch&type=Issues&utf8=%E2%9C%93 From 50f24576410af5f4f29a63730e477ee72282693e Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 22 Feb 2019 14:31:24 +0000 Subject: [PATCH 021/110] Add tests for #30 --- .../Helper/FunctionOverride/session_id.php | 6 ++++ test/unit/SessionStoreTest.php | 29 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/unit/Helper/FunctionOverride/session_id.php diff --git a/test/unit/Helper/FunctionOverride/session_id.php b/test/unit/Helper/FunctionOverride/session_id.php new file mode 100644 index 0000000..a2c22a9 --- /dev/null +++ b/test/unit/Helper/FunctionOverride/session_id.php @@ -0,0 +1,6 @@ +getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -34,4 +39,28 @@ public function testGetSetDotNotation(array $keyValuePairs):void { self::assertEquals($value, $session->get($fullKey)); } } + + public function testRemoveSelf():void { + /** @var MockObject|SessionHandler $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $session = new Session($handler); + + $leafStore = $session->getStore( + "gt.test.session.trunk.leaf", + true + ); + $trunkStore = $session->getStore( + "gt.test.session.trunk" + ); + + $trunkStore->remove(); + + self::assertNull($session->getStore("gt.test.session.trunk")); + self::assertNull($session->getStore("gt.test.session.trunk.leaf")); + self::assertInstanceOf( + SessionStore::class, + $session->getStore("gt.test.session") + ); + } } \ No newline at end of file From d23a59095fb201709640ac6efd9f651ab9c50ff9 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 22 Feb 2019 14:31:44 +0000 Subject: [PATCH 022/110] Implement SessionStore self-removal, closes #30 --- src/SessionStore.php | 25 +++++++++++++++++++++---- src/SessionStoreFactory.php | 7 +++++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/SessionStore.php b/src/SessionStore.php index c06d642..02d5039 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -10,10 +10,17 @@ class SessionStore { protected $stores; /** @var string[] */ protected $data; - - public function __construct(string $name, Session $session) { + /** @var SessionStore */ + protected $parentStore; + + public function __construct( + string $name, + Session $session, + self $parentStore = null + ) { $this->name = $name; $this->session = $session; + $this->parentStore = $parentStore; } public function setData(string $key, $value):void { @@ -96,7 +103,8 @@ public function setStore( if (is_null($nextStore)) { $nextStore = new SessionStore( $storeName, - $this->session + $this->session, + $store ); $store->stores[$storeName] = $nextStore; } @@ -169,7 +177,16 @@ public function contains(string $key):bool { return $store->containsData($key); } - public function remove(string $key):void { + public function remove(string $key = null):void { + if(is_null($key)) { + foreach($this->stores as $i => $childStore) { + unset($this->stores[$i]); + } + + $this->parentStore->remove($this->name); + return; + } + $store = $this; $lastDotPosition = strrpos($key, "."); diff --git a/src/SessionStoreFactory.php b/src/SessionStoreFactory.php index 8fbc183..10bdae1 100644 --- a/src/SessionStoreFactory.php +++ b/src/SessionStoreFactory.php @@ -4,10 +4,13 @@ class SessionStoreFactory { public static function create(string $namespace, Session $session):SessionStore { $namespaceParts = explode(".", $namespace); - $store = new SessionStore(array_shift($namespaceParts), $session); + $store = new SessionStore( + array_shift($namespaceParts), + $session + ); foreach($namespaceParts as $part) { - $innerStore = $store->createStore($part, $session); + $innerStore = $store->createStore($part); $store = $innerStore; } From 244064063b33139c8c9c6fd67e1b8a9961d7f497 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 22 Feb 2019 14:33:28 +0000 Subject: [PATCH 023/110] Tidy code style --- src/Session.php | 1 - src/SessionStore.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Session.php b/src/Session.php index 2d7b622..5a47b47 100644 --- a/src/Session.php +++ b/src/Session.php @@ -1,7 +1,6 @@ Date: Fri, 22 Feb 2019 14:37:39 +0000 Subject: [PATCH 024/110] Fix dependencies --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index c4b6b15..5f37b3b 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "license": "MIT", "require": { - "php": "^7.1" + "php": ">=7.2" }, "require-dev": { "phpunit/phpunit": "^8.0" diff --git a/composer.lock b/composer.lock index 2775d0c..a13f63a 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": "29c7e25a17d15ac24ea43ef2c331c4f8", + "content-hash": "39b657e48de8b924fed3a9a11ac33f16", "packages": [], "packages-dev": [ { @@ -582,16 +582,16 @@ }, { "name": "phpunit/php-timer", - "version": "2.0.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" + "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b389aebe1b8b0578430bda0c7c95a829608e059", + "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059", "shasum": "" }, "require": { @@ -603,7 +603,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -627,7 +627,7 @@ "keywords": [ "timer" ], - "time": "2018-02-01T13:07:23+00:00" + "time": "2019-02-20T10:12:59+00:00" }, { "name": "phpunit/php-token-stream", @@ -1485,7 +1485,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1" + "php": ">=7.2" }, "platform-dev": [] } From ef11de085e9f734e3afd475c08c18b2afde43843 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 22 Feb 2019 14:38:16 +0000 Subject: [PATCH 025/110] Update CI to match version requirement --- .circleci/config.yml | 4 ++-- test/unit/phpunit.xml | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 180b379..2ce927e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: build: docker: - - image: circleci/php:7.1-cli + - image: circleci/php:7.2-cli working_directory: ~/repo @@ -23,7 +23,7 @@ jobs: key: v1-dependencies-{{ checksum "composer.json" }} - run: mkdir test/unit/_junit - - run: vendor/bin/phpunit -c test/unit/phpunit.xml --log-junit test/unit/_junit/junit.xml -d memory_limit=512M + - run: vendor/bin/phpunit -c test/unit/phpunit.xml --log-junit test/unit/_junit/junit.xml --coverage-html ./_coverage -d memory_limit=512M - store_test_results: path: test/unit/_junit diff --git a/test/unit/phpunit.xml b/test/unit/phpunit.xml index 2aceb67..bb2e951 100644 --- a/test/unit/phpunit.xml +++ b/test/unit/phpunit.xml @@ -6,11 +6,6 @@ - - - - - ../../src From c5266edd65eb6a77bf4e1d0996e20efd4aea8586 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 22 Feb 2019 14:39:31 +0000 Subject: [PATCH 026/110] PHPUnit 8 tweaks --- test/unit/SessionStoreTest.php | 2 +- test/unit/SessionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/SessionStoreTest.php b/test/unit/SessionStoreTest.php index 333df72..6be18ad 100644 --- a/test/unit/SessionStoreTest.php +++ b/test/unit/SessionStoreTest.php @@ -13,7 +13,7 @@ class SessionStoreTest extends TestCase { use KeyValuePairProvider; - public function setUp() { + public function setUp():void { FunctionMocker::mock("session_start"); FunctionMocker::mock("session_id"); } diff --git a/test/unit/SessionTest.php b/test/unit/SessionTest.php index 46d0282..1d4fc1d 100644 --- a/test/unit/SessionTest.php +++ b/test/unit/SessionTest.php @@ -14,7 +14,7 @@ class SessionTest extends TestCase { use StringProvider; use ConfigProvider; - public function setUp() { + public function setUp():void { FunctionMocker::mock("session_start"); } From c63cea48b2d90d95694d31bcc34e33aa7bc53f24 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 22 Feb 2019 14:41:31 +0000 Subject: [PATCH 027/110] Store Unit Test coverage within unit directory --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ce927e..68a7c5c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: key: v1-dependencies-{{ checksum "composer.json" }} - run: mkdir test/unit/_junit - - run: vendor/bin/phpunit -c test/unit/phpunit.xml --log-junit test/unit/_junit/junit.xml --coverage-html ./_coverage -d memory_limit=512M + - run: vendor/bin/phpunit -c test/unit/phpunit.xml --log-junit test/unit/_junit/junit.xml --coverage-html ./test/unit/_coverage -d memory_limit=512M - store_test_results: path: test/unit/_junit From 2c02880b51a57e1cd9874778e00693b3742c78bf Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 22 Feb 2019 15:13:46 +0000 Subject: [PATCH 028/110] Fix bug when store is removed that contains no children --- src/SessionStore.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SessionStore.php b/src/SessionStore.php index d0a760f..75fd7c4 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -21,6 +21,7 @@ public function __construct( $this->name = $name; $this->session = $session; $this->parentStore = $parentStore; + $this->stores = []; } public function setData(string $key, $value):void { From 1cc83186334bc453afe9e0b41b4420ce53f32def Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 18 Mar 2019 05:35:05 +0000 Subject: [PATCH 029/110] Bump phpunit/phpunit from 8.0.4 to 8.0.5 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.0.4 to 8.0.5. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.0.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.0.4...8.0.5) Signed-off-by: dependabot[bot] --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index a13f63a..0d0a8dc 100644 --- a/composer.lock +++ b/composer.lock @@ -428,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.2", + "version": "7.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cfca9c5f7f2694ca0c7749ffb142927d9f05250f" + "reference": "0317a769a81845c390e19684d9ba25d7f6aa4707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cfca9c5f7f2694ca0c7749ffb142927d9f05250f", - "reference": "cfca9c5f7f2694ca0c7749ffb142927d9f05250f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0317a769a81845c390e19684d9ba25d7f6aa4707", + "reference": "0317a769a81845c390e19684d9ba25d7f6aa4707", "shasum": "" }, "require": { @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2019-02-15T13:40:27+00:00" + "time": "2019-02-26T07:38:26+00:00" }, { "name": "phpunit/php-file-iterator", @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.0.4", + "version": "8.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a7af0201285445c9c73c4bdf869c486e36b41604" + "reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a7af0201285445c9c73c4bdf869c486e36b41604", - "reference": "a7af0201285445c9c73c4bdf869c486e36b41604", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/19cbed2120839772c4a00e8b28456b0c77d1a7b4", + "reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4", "shasum": "" }, "require": { @@ -708,7 +708,7 @@ "phpunit/php-code-coverage": "^7.0", "phpunit/php-file-iterator": "^2.0.1", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.0", + "phpunit/php-timer": "^2.1", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^4.1", @@ -758,7 +758,7 @@ "testing", "xunit" ], - "time": "2019-02-18T09:23:05+00:00" + "time": "2019-03-16T07:33:46+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1374,7 +1374,7 @@ }, { "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "email": "backendtea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", From 39d6e7db8140766044cf3e0ec729ecbd3e3e3599 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 27 Mar 2019 05:51:35 +0000 Subject: [PATCH 030/110] Bump phpunit/phpunit from 8.0.5 to 8.0.6 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.0.5 to 8.0.6. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.0.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.0.5...8.0.6) Signed-off-by: dependabot[bot] --- composer.lock | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/composer.lock b/composer.lock index 0d0a8dc..8c5cd96 100644 --- a/composer.lock +++ b/composer.lock @@ -9,27 +9,29 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^6.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { @@ -54,12 +56,12 @@ } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2017-07-22T11:58:36+00:00" + "time": "2019-03-17T17:37:11+00:00" }, { "name": "myclabs/deep-copy", @@ -680,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.0.5", + "version": "8.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4" + "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/19cbed2120839772c4a00e8b28456b0c77d1a7b4", - "reference": "19cbed2120839772c4a00e8b28456b0c77d1a7b4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/925109f8bbe6dae28fbc7bb07446a53abd3b1c25", + "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25", "shasum": "" }, "require": { @@ -758,7 +760,7 @@ "testing", "xunit" ], - "time": "2019-03-16T07:33:46+00:00" + "time": "2019-03-26T14:00:24+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1331,16 +1333,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.10.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "reference": "82ebae02209c21113908c229e9883c419720738a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", "shasum": "" }, "require": { @@ -1352,7 +1354,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -1385,7 +1387,7 @@ "polyfill", "portable" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "theseer/tokenizer", From dfbb5277a0e417f313022c6914e3b06e548715a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 8 Apr 2019 05:46:16 +0000 Subject: [PATCH 031/110] Bump phpunit/phpunit from 8.0.6 to 8.1.1 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.0.6 to 8.1.1. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.1.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.0.6...8.1.1) Signed-off-by: dependabot[bot] --- composer.lock | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 8c5cd96..526e862 100644 --- a/composer.lock +++ b/composer.lock @@ -65,20 +65,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.8.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + "reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/78af75148f9fdd34ea727c8b529a9b4a8f7b740c", + "reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2" }, "replace": { "myclabs/deep-copy": "self.version" @@ -86,6 +86,8 @@ "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", + "phpstan/phpstan": "^0.9.2", + "phpstan/phpstan-phpunit": "^0.9.4", "phpunit/phpunit": "^7.1" }, "type": "library", @@ -109,7 +111,7 @@ "object", "object graph" ], - "time": "2018-06-11T23:09:50+00:00" + "time": "2018-10-30T00:14:44+00:00" }, { "name": "phar-io/manifest", @@ -682,16 +684,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.0.6", + "version": "8.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25" + "reference": "b258457b6259f1e8130a91d3065c993961721f47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/925109f8bbe6dae28fbc7bb07446a53abd3b1c25", - "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b258457b6259f1e8130a91d3065c993961721f47", + "reference": "b258457b6259f1e8130a91d3065c993961721f47", "shasum": "" }, "require": { @@ -734,7 +736,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.0-dev" + "dev-master": "8.1-dev" } }, "autoload": { @@ -760,7 +762,7 @@ "testing", "xunit" ], - "time": "2019-03-26T14:00:24+00:00" + "time": "2019-04-08T05:40:17+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1391,16 +1393,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.1.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8", + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8", "shasum": "" }, "require": { @@ -1427,7 +1429,7 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" + "time": "2019-04-04T09:56:43+00:00" }, { "name": "webmozart/assert", From 668c00f77f5e0282602b3f5f7359200f3eedafb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 9 Apr 2019 05:38:38 +0000 Subject: [PATCH 032/110] Bump phpunit/phpunit from 8.1.1 to 8.1.2 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.1.1 to 8.1.2. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.1.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.1.1...8.1.2) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 526e862..6709696 100644 --- a/composer.lock +++ b/composer.lock @@ -684,16 +684,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.1.1", + "version": "8.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b258457b6259f1e8130a91d3065c993961721f47" + "reference": "e7450b51b6f5d29edcd645ff72b355ab0633ca35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b258457b6259f1e8130a91d3065c993961721f47", - "reference": "b258457b6259f1e8130a91d3065c993961721f47", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7450b51b6f5d29edcd645ff72b355ab0633ca35", + "reference": "e7450b51b6f5d29edcd645ff72b355ab0633ca35", "shasum": "" }, "require": { @@ -762,7 +762,7 @@ "testing", "xunit" ], - "time": "2019-04-08T05:40:17+00:00" + "time": "2019-04-08T16:03:02+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 2a65095a9d795f8987df3dad34a2febbd9868609 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Apr 2019 05:48:22 +0000 Subject: [PATCH 033/110] Bump phpunit/phpunit from 8.1.2 to 8.1.3 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.1.2 to 8.1.3. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.1.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.1.2...8.1.3) Signed-off-by: dependabot[bot] --- composer.lock | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 6709696..62eabfb 100644 --- a/composer.lock +++ b/composer.lock @@ -65,20 +65,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c" + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/78af75148f9fdd34ea727c8b529a9b4a8f7b740c", - "reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.1" }, "replace": { "myclabs/deep-copy": "self.version" @@ -86,8 +86,6 @@ "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", - "phpstan/phpstan": "^0.9.2", - "phpstan/phpstan-phpunit": "^0.9.4", "phpunit/phpunit": "^7.1" }, "type": "library", @@ -111,7 +109,7 @@ "object", "object graph" ], - "time": "2018-10-30T00:14:44+00:00" + "time": "2019-04-07T13:18:21+00:00" }, { "name": "phar-io/manifest", @@ -684,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.1.2", + "version": "8.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e7450b51b6f5d29edcd645ff72b355ab0633ca35" + "reference": "2a676677982b484ee36b54961f570c02eabbe7e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7450b51b6f5d29edcd645ff72b355ab0633ca35", - "reference": "e7450b51b6f5d29edcd645ff72b355ab0633ca35", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2a676677982b484ee36b54961f570c02eabbe7e1", + "reference": "2a676677982b484ee36b54961f570c02eabbe7e1", "shasum": "" }, "require": { @@ -762,7 +760,7 @@ "testing", "xunit" ], - "time": "2019-04-08T16:03:02+00:00" + "time": "2019-04-19T15:52:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 9ebd53107ece260b3849ad3088957a0158493c90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 9 May 2019 05:28:52 +0000 Subject: [PATCH 034/110] Bump phpunit/phpunit from 8.1.3 to 8.1.4 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.1.3 to 8.1.4. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.1.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.1.3...8.1.4) Signed-off-by: dependabot[bot] --- composer.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 62eabfb..fcdf9fa 100644 --- a/composer.lock +++ b/composer.lock @@ -269,16 +269,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { @@ -316,7 +316,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" + "time": "2019-04-30T17:48:53+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -682,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.1.3", + "version": "8.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2a676677982b484ee36b54961f570c02eabbe7e1" + "reference": "b534b017daaef2d7f60c6ee61e6aa2e13fdc6910" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2a676677982b484ee36b54961f570c02eabbe7e1", - "reference": "2a676677982b484ee36b54961f570c02eabbe7e1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b534b017daaef2d7f60c6ee61e6aa2e13fdc6910", + "reference": "b534b017daaef2d7f60c6ee61e6aa2e13fdc6910", "shasum": "" }, "require": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2019-04-19T15:52:00+00:00" + "time": "2019-05-09T05:13:39+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -929,16 +929,16 @@ }, { "name": "sebastian/environment", - "version": "4.1.0", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", "shasum": "" }, "require": { @@ -953,7 +953,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -978,7 +978,7 @@ "environment", "hhvm" ], - "time": "2019-02-01T05:27:49+00:00" + "time": "2019-05-05T09:05:15+00:00" }, { "name": "sebastian/exporter", @@ -1376,7 +1376,7 @@ }, { "name": "Gert de Pagter", - "email": "backendtea@gmail.com" + "email": "BackEndTea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", From a0dd66b7a94ce1a9c411c6b24931faadce10994f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 14 May 2019 05:28:40 +0000 Subject: [PATCH 035/110] Bump phpunit/phpunit from 8.1.4 to 8.1.5 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.1.4 to 8.1.5. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.1.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.1.4...8.1.5) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index fcdf9fa..d6fba62 100644 --- a/composer.lock +++ b/composer.lock @@ -682,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.1.4", + "version": "8.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b534b017daaef2d7f60c6ee61e6aa2e13fdc6910" + "reference": "01392d4b5878aa617e8d9bc7a529e5febc8fe956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b534b017daaef2d7f60c6ee61e6aa2e13fdc6910", - "reference": "b534b017daaef2d7f60c6ee61e6aa2e13fdc6910", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/01392d4b5878aa617e8d9bc7a529e5febc8fe956", + "reference": "01392d4b5878aa617e8d9bc7a529e5febc8fe956", "shasum": "" }, "require": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2019-05-09T05:13:39+00:00" + "time": "2019-05-14T04:57:31+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 4c29b794adb093f1cfe708d0f89bf48c38ff9d8b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Wed, 29 May 2019 06:36:46 +0000 Subject: [PATCH 036/110] Bump phpunit/phpunit from 8.1.5 to 8.1.6 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.1.5 to 8.1.6. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.1.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.1.5...8.1.6) --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index d6fba62..6e87232 100644 --- a/composer.lock +++ b/composer.lock @@ -682,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.1.5", + "version": "8.1.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "01392d4b5878aa617e8d9bc7a529e5febc8fe956" + "reference": "e3c9da6e645492c461e0a11eca117f83f4f4c840" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/01392d4b5878aa617e8d9bc7a529e5febc8fe956", - "reference": "01392d4b5878aa617e8d9bc7a529e5febc8fe956", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e3c9da6e645492c461e0a11eca117f83f4f4c840", + "reference": "e3c9da6e645492c461e0a11eca117f83f4f4c840", "shasum": "" }, "require": { @@ -760,7 +760,7 @@ "testing", "xunit" ], - "time": "2019-05-14T04:57:31+00:00" + "time": "2019-05-28T11:53:42+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From fc6da40282c584ba1d05706d02054da7f6c73f10 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Fri, 7 Jun 2019 06:32:11 +0000 Subject: [PATCH 037/110] Bump phpunit/phpunit from 8.1.6 to 8.2.0 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.1.6 to 8.2.0. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.2.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.1.6...8.2.0) Signed-off-by: dependabot-preview[bot] --- composer.lock | 109 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 78 insertions(+), 31 deletions(-) diff --git a/composer.lock b/composer.lock index 6e87232..430cf0f 100644 --- a/composer.lock +++ b/composer.lock @@ -430,16 +430,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.3", + "version": "7.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "0317a769a81845c390e19684d9ba25d7f6aa4707" + "reference": "aed67b57d459dcab93e84a5c9703d3deb5025dff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0317a769a81845c390e19684d9ba25d7f6aa4707", - "reference": "0317a769a81845c390e19684d9ba25d7f6aa4707", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aed67b57d459dcab93e84a5c9703d3deb5025dff", + "reference": "aed67b57d459dcab93e84a5c9703d3deb5025dff", "shasum": "" }, "require": { @@ -489,7 +489,7 @@ "testing", "xunit" ], - "time": "2019-02-26T07:38:26+00:00" + "time": "2019-06-06T12:28:18+00:00" }, { "name": "phpunit/php-file-iterator", @@ -584,16 +584,16 @@ }, { "name": "phpunit/php-timer", - "version": "2.1.1", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059" + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b389aebe1b8b0578430bda0c7c95a829608e059", - "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", "shasum": "" }, "require": { @@ -629,7 +629,7 @@ "keywords": [ "timer" ], - "time": "2019-02-20T10:12:59+00:00" + "time": "2019-06-07T04:22:29+00:00" }, { "name": "phpunit/php-token-stream", @@ -682,42 +682,43 @@ }, { "name": "phpunit/phpunit", - "version": "8.1.6", + "version": "8.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e3c9da6e645492c461e0a11eca117f83f4f4c840" + "reference": "b20b6db4bd6aceda2809ca00cb740149d726d8fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e3c9da6e645492c461e0a11eca117f83f4f4c840", - "reference": "e3c9da6e645492c461e0a11eca117f83f4f4c840", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b20b6db4bd6aceda2809ca00cb740149d726d8fb", + "reference": "b20b6db4bd6aceda2809ca00cb740149d726d8fb", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.2.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", "php": "^7.2", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^7.0", - "phpunit/php-file-iterator": "^2.0.1", + "phpspec/prophecy": "^1.8.0", + "phpunit/php-code-coverage": "^7.0.5", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^3.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.2", + "sebastian/exporter": "^3.1.0", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.0.0", "sebastian/version": "^2.0.1" }, "require-dev": { @@ -726,7 +727,7 @@ "suggest": { "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -734,7 +735,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.1-dev" + "dev-master": "8.2-dev" } }, "autoload": { @@ -760,7 +761,7 @@ "testing", "xunit" ], - "time": "2019-05-28T11:53:42+00:00" + "time": "2019-06-07T04:47:30+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1288,6 +1289,52 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2018-10-04T04:07:39+00:00" }, + { + "name": "sebastian/type", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "c2362deb2d0b708abe0c4a6d35633c19ae40cd4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/c2362deb2d0b708abe0c4a6d35633c19ae40cd4a", + "reference": "c2362deb2d0b708abe0c4a6d35633c19ae40cd4a", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2019-06-06T11:58:04+00:00" + }, { "name": "sebastian/version", "version": "2.0.1", From d9a3bc6dfaa45035c9db0b5bbbf179e45b8632cd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Mon, 10 Jun 2019 06:49:36 +0000 Subject: [PATCH 038/110] Bump phpunit/phpunit from 8.2.0 to 8.2.1 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.2.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.2.0...8.2.1) Signed-off-by: dependabot-preview[bot] --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 430cf0f..24aa2c5 100644 --- a/composer.lock +++ b/composer.lock @@ -682,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.2.0", + "version": "8.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b20b6db4bd6aceda2809ca00cb740149d726d8fb" + "reference": "047f771e34dccacb6c432a1a70e9980e087eac92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b20b6db4bd6aceda2809ca00cb740149d726d8fb", - "reference": "b20b6db4bd6aceda2809ca00cb740149d726d8fb", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/047f771e34dccacb6c432a1a70e9980e087eac92", + "reference": "047f771e34dccacb6c432a1a70e9980e087eac92", "shasum": "" }, "require": { @@ -718,7 +718,7 @@ "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.0.0", + "sebastian/type": "^1.1.0", "sebastian/version": "^2.0.1" }, "require-dev": { @@ -761,7 +761,7 @@ "testing", "xunit" ], - "time": "2019-06-07T04:47:30+00:00" + "time": "2019-06-07T14:04:13+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1291,16 +1291,16 @@ }, { "name": "sebastian/type", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "c2362deb2d0b708abe0c4a6d35633c19ae40cd4a" + "reference": "b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/c2362deb2d0b708abe0c4a6d35633c19ae40cd4a", - "reference": "c2362deb2d0b708abe0c4a6d35633c19ae40cd4a", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741", + "reference": "b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741", "shasum": "" }, "require": { @@ -1312,7 +1312,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -1333,7 +1333,7 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-06-06T11:58:04+00:00" + "time": "2019-06-08T04:53:27+00:00" }, { "name": "sebastian/version", From 0c17839c6a73f84f698565f7390ba110bb958701 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Mon, 17 Jun 2019 06:54:30 +0000 Subject: [PATCH 039/110] Bump phpunit/phpunit from 8.2.1 to 8.2.2 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.2.1 to 8.2.2. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.2.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.2.1...8.2.2) Signed-off-by: dependabot-preview[bot] --- composer.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/composer.lock b/composer.lock index 24aa2c5..0ab35b7 100644 --- a/composer.lock +++ b/composer.lock @@ -367,16 +367,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", "shasum": "" }, "require": { @@ -397,8 +397,8 @@ } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -426,7 +426,7 @@ "spy", "stub" ], - "time": "2018-08-05T17:53:17+00:00" + "time": "2019-06-13T12:50:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -682,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.2.1", + "version": "8.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "047f771e34dccacb6c432a1a70e9980e087eac92" + "reference": "24b6cfcec34c1167ee1d90b7cb22bee324af319f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/047f771e34dccacb6c432a1a70e9980e087eac92", - "reference": "047f771e34dccacb6c432a1a70e9980e087eac92", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/24b6cfcec34c1167ee1d90b7cb22bee324af319f", + "reference": "24b6cfcec34c1167ee1d90b7cb22bee324af319f", "shasum": "" }, "require": { @@ -706,7 +706,7 @@ "phar-io/manifest": "^1.0.3", "phar-io/version": "^2.0.1", "php": "^7.2", - "phpspec/prophecy": "^1.8.0", + "phpspec/prophecy": "^1.8.1", "phpunit/php-code-coverage": "^7.0.5", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", @@ -761,7 +761,7 @@ "testing", "xunit" ], - "time": "2019-06-07T14:04:13+00:00" + "time": "2019-06-15T07:25:54+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1438,16 +1438,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8" + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8", - "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", "shasum": "" }, "require": { @@ -1474,7 +1474,7 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-04-04T09:56:43+00:00" + "time": "2019-06-13T22:48:21+00:00" }, { "name": "webmozart/assert", From 995368dbf2b0ca207b32a26b990baa034450ce90 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Thu, 20 Jun 2019 05:39:15 +0000 Subject: [PATCH 040/110] Bump phpunit/phpunit from 8.2.2 to 8.2.3 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.2.2 to 8.2.3. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.2.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.2.2...8.2.3) Signed-off-by: dependabot-preview[bot] --- composer.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index 0ab35b7..cea3e2d 100644 --- a/composer.lock +++ b/composer.lock @@ -682,16 +682,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.2.2", + "version": "8.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "24b6cfcec34c1167ee1d90b7cb22bee324af319f" + "reference": "f67ca36860ebca7224d4573f107f79bd8ed0ba03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/24b6cfcec34c1167ee1d90b7cb22bee324af319f", - "reference": "24b6cfcec34c1167ee1d90b7cb22bee324af319f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f67ca36860ebca7224d4573f107f79bd8ed0ba03", + "reference": "f67ca36860ebca7224d4573f107f79bd8ed0ba03", "shasum": "" }, "require": { @@ -761,7 +761,7 @@ "testing", "xunit" ], - "time": "2019-06-15T07:25:54+00:00" + "time": "2019-06-19T12:03:56+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1291,16 +1291,16 @@ }, { "name": "sebastian/type", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741" + "reference": "251ca774d58181fe1d3eda68843264eaae7e07ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741", - "reference": "b2a7f9aac51ce18cd7ac8b31e37c8ce5646fc741", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/251ca774d58181fe1d3eda68843264eaae7e07ef", + "reference": "251ca774d58181fe1d3eda68843264eaae7e07ef", "shasum": "" }, "require": { @@ -1333,7 +1333,7 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-06-08T04:53:27+00:00" + "time": "2019-06-19T06:39:12+00:00" }, { "name": "sebastian/version", From 2f56fa592c8ab7cca6522b93ba5c524362bf2fe4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2019 05:20:21 +0000 Subject: [PATCH 041/110] Bump phpunit/phpunit from 8.2.3 to 8.2.5 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.2.3 to 8.2.5. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.2.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.2.3...8.2.5) Signed-off-by: dependabot-preview[bot] --- composer.lock | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/composer.lock b/composer.lock index cea3e2d..730f572 100644 --- a/composer.lock +++ b/composer.lock @@ -430,16 +430,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.5", + "version": "7.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aed67b57d459dcab93e84a5c9703d3deb5025dff" + "reference": "d471d0d2b529a67c6a722dd446c4ec90881ac315" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aed67b57d459dcab93e84a5c9703d3deb5025dff", - "reference": "aed67b57d459dcab93e84a5c9703d3deb5025dff", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d471d0d2b529a67c6a722dd446c4ec90881ac315", + "reference": "d471d0d2b529a67c6a722dd446c4ec90881ac315", "shasum": "" }, "require": { @@ -448,17 +448,17 @@ "php": "^7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0.1", + "phpunit/php-token-stream": "^3.0.2", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.1", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.6.1" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { @@ -489,7 +489,7 @@ "testing", "xunit" ], - "time": "2019-06-06T12:28:18+00:00" + "time": "2019-07-08T05:29:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -633,16 +633,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" + "reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", - "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c", + "reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c", "shasum": "" }, "require": { @@ -678,20 +678,20 @@ "keywords": [ "tokenizer" ], - "time": "2018-10-30T05:52:18+00:00" + "time": "2019-07-08T05:24:54+00:00" }, { "name": "phpunit/phpunit", - "version": "8.2.3", + "version": "8.2.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f67ca36860ebca7224d4573f107f79bd8ed0ba03" + "reference": "c1b8534b3730f20f58600124129197bf1183dc92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f67ca36860ebca7224d4573f107f79bd8ed0ba03", - "reference": "f67ca36860ebca7224d4573f107f79bd8ed0ba03", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c1b8534b3730f20f58600124129197bf1183dc92", + "reference": "c1b8534b3730f20f58600124129197bf1183dc92", "shasum": "" }, "require": { @@ -718,7 +718,7 @@ "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.0", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, "require-dev": { @@ -761,7 +761,7 @@ "testing", "xunit" ], - "time": "2019-06-19T12:03:56+00:00" + "time": "2019-07-15T06:26:24+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1291,16 +1291,16 @@ }, { "name": "sebastian/type", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "251ca774d58181fe1d3eda68843264eaae7e07ef" + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/251ca774d58181fe1d3eda68843264eaae7e07ef", - "reference": "251ca774d58181fe1d3eda68843264eaae7e07ef", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", "shasum": "" }, "require": { @@ -1333,7 +1333,7 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-06-19T06:39:12+00:00" + "time": "2019-07-02T08:10:15+00:00" }, { "name": "sebastian/version", From 8519238a3f6012551a387488ddfeb3fd74fb291f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2019 10:59:18 +0100 Subject: [PATCH 042/110] Bump phpunit/phpunit from 8.2.5 to 8.3.5 (#50) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.2.5 to 8.3.5. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.3.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.2.5...8.3.5) Signed-off-by: dependabot-preview[bot] --- composer.lock | 171 +++++++++++++++++++++++++------------------------- 1 file changed, 84 insertions(+), 87 deletions(-) diff --git a/composer.lock b/composer.lock index 730f572..d616c88 100644 --- a/composer.lock +++ b/composer.lock @@ -65,16 +65,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.1", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", "shasum": "" }, "require": { @@ -109,7 +109,7 @@ "object", "object graph" ], - "time": "2019-04-07T13:18:21+00:00" + "time": "2019-08-09T12:45:53+00:00" }, { "name": "phar-io/manifest", @@ -215,35 +215,33 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "~6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -265,30 +263,30 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "time": "2018-08-07T13:53:10+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.1", + "version": "4.3.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", "shasum": "" }, "require": { "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", "webmozart/assert": "^1.0" }, "require-dev": { - "doctrine/instantiator": "~1.0.5", + "doctrine/instantiator": "^1.0.5", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.4" }, @@ -316,41 +314,40 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-04-30T17:48:53+00:00" + "time": "2019-09-12T14:27:41+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.4.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -363,7 +360,8 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-07-14T14:27:02+00:00" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2019-08-22T18:11:29+00:00" }, { "name": "phpspec/prophecy", @@ -430,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.6", + "version": "7.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d471d0d2b529a67c6a722dd446c4ec90881ac315" + "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d471d0d2b529a67c6a722dd446c4ec90881ac315", - "reference": "d471d0d2b529a67c6a722dd446c4ec90881ac315", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", + "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", "shasum": "" }, "require": { @@ -448,7 +446,7 @@ "php": "^7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0.2", + "phpunit/php-token-stream": "^3.1.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", @@ -489,7 +487,7 @@ "testing", "xunit" ], - "time": "2019-07-08T05:29:42+00:00" + "time": "2019-07-25T05:31:54+00:00" }, { "name": "phpunit/php-file-iterator", @@ -633,16 +631,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c" + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c", - "reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", "shasum": "" }, "require": { @@ -655,7 +653,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -678,20 +676,20 @@ "keywords": [ "tokenizer" ], - "time": "2019-07-08T05:24:54+00:00" + "time": "2019-07-25T05:29:42+00:00" }, { "name": "phpunit/phpunit", - "version": "8.2.5", + "version": "8.3.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c1b8534b3730f20f58600124129197bf1183dc92" + "reference": "302faed7059fde575cf3403a78c730c5e3a62750" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c1b8534b3730f20f58600124129197bf1183dc92", - "reference": "c1b8534b3730f20f58600124129197bf1183dc92", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/302faed7059fde575cf3403a78c730c5e3a62750", + "reference": "302faed7059fde575cf3403a78c730c5e3a62750", "shasum": "" }, "require": { @@ -707,14 +705,14 @@ "phar-io/version": "^2.0.1", "php": "^7.2", "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.5", + "phpunit/php-code-coverage": "^7.0.7", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", "sebastian/comparator": "^3.0.2", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.0", + "sebastian/exporter": "^3.1.1", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", @@ -735,7 +733,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.2-dev" + "dev-master": "8.3-dev" } }, "autoload": { @@ -761,7 +759,7 @@ "testing", "xunit" ], - "time": "2019-07-15T06:26:24+00:00" + "time": "2019-09-14T09:12:03+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -983,16 +981,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.0", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", "shasum": "" }, "require": { @@ -1019,6 +1017,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1027,17 +1029,13 @@ "name": "Volker Dusch", "email": "github@wallbash.com" }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, { "name": "Adam Harvey", "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], "description": "Provides the functionality to export PHP variables for visualization", @@ -1046,7 +1044,7 @@ "export", "exporter" ], - "time": "2017-04-03T13:19:02+00:00" + "time": "2019-09-14T09:02:43+00:00" }, { "name": "sebastian/global-state", @@ -1380,16 +1378,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.11.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "82ebae02209c21113908c229e9883c419720738a" + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", - "reference": "82ebae02209c21113908c229e9883c419720738a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", "shasum": "" }, "require": { @@ -1401,7 +1399,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -1417,13 +1415,13 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, { "name": "Gert de Pagter", "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for ctype functions", @@ -1434,7 +1432,7 @@ "polyfill", "portable" ], - "time": "2019-02-06T07:57:58+00:00" + "time": "2019-08-06T08:03:45+00:00" }, { "name": "theseer/tokenizer", @@ -1478,16 +1476,16 @@ }, { "name": "webmozart/assert", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", "shasum": "" }, "require": { @@ -1495,8 +1493,7 @@ "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", "extra": { @@ -1525,7 +1522,7 @@ "check", "validate" ], - "time": "2018-12-25T11:19:39+00:00" + "time": "2019-08-24T08:43:50+00:00" } ], "aliases": [], From 739db643f55c963fc9b233cb440a9114db3909c1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2019 10:41:14 +0000 Subject: [PATCH 043/110] Bump phpunit/phpunit from 8.3.5 to 8.4.2 (#53) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.3.5 to 8.4.2. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.4.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.3.5...8.4.2) Signed-off-by: dependabot-preview[bot] --- composer.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/composer.lock b/composer.lock index d616c88..1e8ba70 100644 --- a/composer.lock +++ b/composer.lock @@ -365,22 +365,22 @@ }, { "name": "phpspec/prophecy", - "version": "1.8.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", + "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, @@ -424,20 +424,20 @@ "spy", "stub" ], - "time": "2019-06-13T12:50:23+00:00" + "time": "2019-10-03T11:07:50+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.7", + "version": "7.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800" + "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", - "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa0d179a13284c7420fc281fc32750e6cc7c9e2f", + "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f", "shasum": "" }, "require": { @@ -446,7 +446,7 @@ "php": "^7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.0", + "phpunit/php-token-stream": "^3.1.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2019-07-25T05:31:54+00:00" + "time": "2019-09-17T06:24:36+00:00" }, { "name": "phpunit/php-file-iterator", @@ -631,16 +631,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", "shasum": "" }, "require": { @@ -676,20 +676,20 @@ "keywords": [ "tokenizer" ], - "time": "2019-07-25T05:29:42+00:00" + "time": "2019-09-17T06:23:10+00:00" }, { "name": "phpunit/phpunit", - "version": "8.3.5", + "version": "8.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "302faed7059fde575cf3403a78c730c5e3a62750" + "reference": "a142a7e66c0ea7b5b6c04ee27f08d10d1137cd9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/302faed7059fde575cf3403a78c730c5e3a62750", - "reference": "302faed7059fde575cf3403a78c730c5e3a62750", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a142a7e66c0ea7b5b6c04ee27f08d10d1137cd9b", + "reference": "a142a7e66c0ea7b5b6c04ee27f08d10d1137cd9b", "shasum": "" }, "require": { @@ -733,7 +733,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.3-dev" + "dev-master": "8.4-dev" } }, "autoload": { @@ -759,7 +759,7 @@ "testing", "xunit" ], - "time": "2019-09-14T09:12:03+00:00" + "time": "2019-10-28T10:39:51+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", From 3e42dcda4aa053c999dc8bb0a83d32cc8c3854d5 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 26 Nov 2019 21:32:47 +0000 Subject: [PATCH 044/110] Correct typehint, closes #45 (#55) --- src/SessionStore.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SessionStore.php b/src/SessionStore.php index 75fd7c4..77c0299 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -8,7 +8,7 @@ class SessionStore { protected $session; /** @var SessionStore[] */ protected $stores; - /** @var string[] */ + /** @var array */ protected $data; /** @var SessionStore */ protected $parentStore; @@ -22,6 +22,7 @@ public function __construct( $this->session = $session; $this->parentStore = $parentStore; $this->stores = []; + $this->data = []; } public function setData(string $key, $value):void { From d283c985327280d5704dfb7e36d15eb9d5202e1a Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 11 Dec 2019 10:50:34 +0000 Subject: [PATCH 045/110] Create stores that are nested in namespaces (#58) * Update dependencies * Isolate bug #57 * Fix bug #57 * Update dependencies --- composer.lock | 72 +++++++++++++++++----------------- src/SessionStore.php | 2 +- test/unit/SessionStoreTest.php | 18 +++++++++ 3 files changed, 54 insertions(+), 38 deletions(-) diff --git a/composer.lock b/composer.lock index 1e8ba70..0dd8075 100644 --- a/composer.lock +++ b/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", "shasum": "" }, "require": { @@ -61,7 +61,7 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "time": "2019-10-21T16:45:58+00:00" }, { "name": "myclabs/deep-copy", @@ -428,16 +428,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.8", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa0d179a13284c7420fc281fc32750e6cc7c9e2f", - "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { @@ -487,7 +487,7 @@ "testing", "xunit" ], - "time": "2019-09-17T06:24:36+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -680,16 +680,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.4.2", + "version": "8.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a142a7e66c0ea7b5b6c04ee27f08d10d1137cd9b" + "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a142a7e66c0ea7b5b6c04ee27f08d10d1137cd9b", - "reference": "a142a7e66c0ea7b5b6c04ee27f08d10d1137cd9b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab", + "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab", "shasum": "" }, "require": { @@ -733,7 +733,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.4-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -759,7 +759,7 @@ "testing", "xunit" ], - "time": "2019-10-28T10:39:51+00:00" + "time": "2019-12-06T05:41:38+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -928,16 +928,16 @@ }, { "name": "sebastian/environment", - "version": "4.2.2", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", "shasum": "" }, "require": { @@ -977,7 +977,7 @@ "environment", "hhvm" ], - "time": "2019-05-05T09:05:15+00:00" + "time": "2019-11-20T08:46:58+00:00" }, { "name": "sebastian/exporter", @@ -1378,16 +1378,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", "shasum": "" }, "require": { @@ -1399,7 +1399,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.13-dev" } }, "autoload": { @@ -1432,7 +1432,7 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2019-11-27T13:56:44+00:00" }, { "name": "theseer/tokenizer", @@ -1476,31 +1476,29 @@ }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -1522,7 +1520,7 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "time": "2019-11-24T13:36:37+00:00" } ], "aliases": [], diff --git a/src/SessionStore.php b/src/SessionStore.php index 77c0299..1c5a6e8 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -86,7 +86,7 @@ public function getStore( } $namespace = implode(".", $namespaceParts); - return $store->getStore($namespace); + return $store->getStore($namespace, $createIfNotExists); } public function setStore( diff --git a/test/unit/SessionStoreTest.php b/test/unit/SessionStoreTest.php index 6be18ad..9ed95b7 100644 --- a/test/unit/SessionStoreTest.php +++ b/test/unit/SessionStoreTest.php @@ -63,4 +63,22 @@ public function testRemoveSelf():void { $session->getStore("gt.test.session") ); } + + public function testGetCreatesNonExistantStore() { + /** @var MockObject|SessionHandler $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $session = new Session($handler); + + $trunkStore = $session->getStore( + "gt.test.session", + true + ); + $leafStore = $session->getStore( + "gt.test.session.leaf", + true + ); + + self::assertNotNull($leafStore); + } } \ No newline at end of file From ed157bfd8af70e3e2b2c339a61bd11d78ca0f5fb Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 13 Dec 2019 12:05:09 +0000 Subject: [PATCH 046/110] Add type-safe function to example (#59) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8c2961..9bbd220 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ if($session->contains("auth")) { } else { // Output a variable within the auth namespace: - $message = "Welcome back, " . $session->get("auth.user.name"); + $message = "Welcome back, " . $session->getString("auth.user.name"); } } else { From 97b793244a6cde7858f5bf07ecfad67ce4d6002b Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 27 Feb 2020 16:06:07 +0000 Subject: [PATCH 047/110] SessionArrayWrapper and SessionContainer (#64) * Correct typehint, closes #45 * Implement SessionContainer and SessionArrayWrapper Closes #63 --- src/Session.php | 2 +- src/SessionArrayWrapper.php | 30 ++++++++++++++++ src/SessionContainer.php | 9 +++++ src/SessionStore.php | 2 +- test/unit/SessionArrayWrapperTest.php | 50 +++++++++++++++++++++++++++ 5 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 src/SessionArrayWrapper.php create mode 100644 src/SessionContainer.php create mode 100644 test/unit/SessionArrayWrapperTest.php diff --git a/src/Session.php b/src/Session.php index 5a47b47..354a766 100644 --- a/src/Session.php +++ b/src/Session.php @@ -3,7 +3,7 @@ use SessionHandlerInterface; -class Session { +class Session implements SessionContainer { const DEFAULT_SESSION_NAME = "PHPSESSID"; const DEFAULT_SESSION_LIFETIME = 0; const DEFAULT_SESSION_PATH = "/tmp"; diff --git a/src/SessionArrayWrapper.php b/src/SessionArrayWrapper.php new file mode 100644 index 0000000..7d808fc --- /dev/null +++ b/src/SessionArrayWrapper.php @@ -0,0 +1,30 @@ +sourceArray = &$sourceArray; + } + + public function get(string $key) { + return $this->sourceArray[$key] ?? null; + } + + public function set(string $key, $value) { + $this->sourceArray[$key] = $value; + } + + public function contains(string $key):bool { + return isset($this->sourceArray[$key]); + } + + public function remove(string $key):void { + if(!$this->contains($key)) { + return; + } + + unset($this->sourceArray[$key]); + } +} \ No newline at end of file diff --git a/src/SessionContainer.php b/src/SessionContainer.php new file mode 100644 index 0000000..6b4e385 --- /dev/null +++ b/src/SessionContainer.php @@ -0,0 +1,9 @@ +contains($key)); + $sut->set($key, "test-value"); + self::assertTrue($sut->contains($key)); + } + + public function testSet() { + $sessionArray = []; + $key = uniqid(); + $value = uniqid(); + $sut = new SessionArrayWrapper($sessionArray); + $sut->set($key, $value); + self::assertEquals($value, $sessionArray[$key]); + } + + public function testGet() { + $sessionArray = []; + $key = uniqid(); + $value = uniqid(); + $sut = new SessionArrayWrapper($sessionArray); + self::assertNull($sut->get($key)); + self::assertArrayNotHasKey($key, $sessionArray); + $sut->set($key, $value); + self::assertEquals($value, $sut->get($key)); + self::assertEquals($value, $sessionArray[$key]); + } + + public function testRemove() { + $key = uniqid(); + $value = uniqid(); + $sessionArray = [ + $key => $value, + ]; + $sut = new SessionArrayWrapper($sessionArray); + self::assertTrue($sut->contains($key)); + $sut->remove($key); + self::assertFalse($sut->contains($key)); + self::assertArrayNotHasKey($key, $sessionArray); + } +} \ No newline at end of file From 69b9da961cb47bd2f98fb336ea4616b7dc07948c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2020 13:19:55 +0100 Subject: [PATCH 048/110] Bump phpunit/phpunit from 8.5.0 to 8.5.3 (#65) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.5.0 to 8.5.3. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.5.0...8.5.3) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 111 +++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/composer.lock b/composer.lock index 0dd8075..23d7173 100644 --- a/composer.lock +++ b/composer.lock @@ -65,16 +65,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -109,7 +109,7 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "phar-io/manifest", @@ -267,40 +267,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -311,33 +309,36 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { @@ -361,37 +362,37 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-02-18T18:59:58+00:00" }, { "name": "phpspec/prophecy", - "version": "1.9.0", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -424,7 +425,7 @@ "spy", "stub" ], - "time": "2019-10-03T11:07:50+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/php-code-coverage", @@ -680,16 +681,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.0", + "version": "8.5.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab" + "reference": "67750516bc02f300e2742fed2f50177f8f37bedf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/67750516bc02f300e2742fed2f50177f8f37bedf", + "reference": "67750516bc02f300e2742fed2f50177f8f37bedf", "shasum": "" }, "require": { @@ -759,7 +760,7 @@ "testing", "xunit" ], - "time": "2019-12-06T05:41:38+00:00" + "time": "2020-03-31T08:52:04+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1378,16 +1379,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", "shasum": "" }, "require": { @@ -1399,7 +1400,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1432,7 +1433,7 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { "name": "theseer/tokenizer", @@ -1476,16 +1477,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -1520,7 +1521,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" } ], "aliases": [], From 512f10d8cc6447c9d5248bac40e211d0975dfb79 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 10 Apr 2020 20:24:45 +0100 Subject: [PATCH 049/110] If session can not be opened, destroy first (#67) * Correct typehint, closes #45 * Implement session destruction when failure to start Closes #66 --- src/Session.php | 26 ++++++---- test/unit/Helper/FunctionMocker.php | 1 + .../FunctionOverride/session_destroy.php | 13 +++++ .../Helper/FunctionOverride/session_start.php | 11 ++++- test/unit/SessionTest.php | 47 +++++++++++++++---- test/unit/phpunit.xml | 2 +- 6 files changed, 80 insertions(+), 20 deletions(-) create mode 100644 test/unit/Helper/FunctionOverride/session_destroy.php diff --git a/src/Session.php b/src/Session.php index 354a766..f8ceea0 100644 --- a/src/Session.php +++ b/src/Session.php @@ -36,15 +36,23 @@ public function __construct( $config["save_path"] ?? self::DEFAULT_SESSION_PATH ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; - session_start([ - "save_path" => $sessionPath, - "name" => $sessionName, - "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, - "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, - "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, - "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, - "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, - ]); + + do { + $success = @session_start([ + "save_path" => $sessionPath, + "name" => $sessionName, + "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, + "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, + "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, + "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, + "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, + ]); + + if(!$success) { + session_destroy(); + } + } + while(!$success); $this->sessionHandler->open($sessionPath, $sessionName); $this->store = $this->readSessionData() ?: null; diff --git a/test/unit/Helper/FunctionMocker.php b/test/unit/Helper/FunctionMocker.php index 89a7725..89040cf 100644 --- a/test/unit/Helper/FunctionMocker.php +++ b/test/unit/Helper/FunctionMocker.php @@ -3,6 +3,7 @@ class FunctionMocker { public static $mockCalls = []; + public static $callState = []; public static function mock(string $functionName) { self::$mockCalls[$functionName] = []; diff --git a/test/unit/Helper/FunctionOverride/session_destroy.php b/test/unit/Helper/FunctionOverride/session_destroy.php new file mode 100644 index 0000000..51667fe --- /dev/null +++ b/test/unit/Helper/FunctionOverride/session_destroy.php @@ -0,0 +1,13 @@ +getMockBuilder(Handler::class) ->getMock(); self::assertEmpty(FunctionMocker::$mockCalls["session_start"]); - $session = new Session($handler); + new Session($handler); self::assertCount( 1, FunctionMocker::$mockCalls["session_start"] @@ -34,10 +38,11 @@ public function testSessionStarts():void { * @dataProvider data_randomConfig */ public function testSessionStartsWithConfig(array $config):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); - $session = new Session($handler ,$config); + new Session($handler ,$config); $sessionStartParameter = FunctionMocker::$mockCalls["session_start"][0][0]; foreach($config as $key => $value) { @@ -49,7 +54,19 @@ public function testSessionStartsWithConfig(array $config):void { } } + /** @dataProvider data_randomConfig */ + public function testSessionStartDestroysFailedSession(array $config):void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + + FunctionMocker::$callState["session_start__fail"] = true; + new Session($handler, $config); + self::assertCount(1, FunctionMocker::$mockCalls["session_destroy"]); + } + public function testWriteSessionDataCalled() { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $handler->expects($this->exactly(2)) @@ -64,6 +81,7 @@ public function testWriteSessionDataCalled() { * @dataProvider data_randomString */ public function testGetReturnsNull(string $randomString):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -74,6 +92,7 @@ public function testGetReturnsNull(string $randomString):void { * @@dataProvider data_randomKeyValuePairs */ public function testSetGet(array $keyValuePairs):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -91,6 +110,7 @@ public function testSetGet(array $keyValuePairs):void { * @dataProvider data_randomKeyValuePairs */ public function testSetGetNamespaced(array $keyValuePairs):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -118,14 +138,15 @@ public function testSetGetNamespaced(array $keyValuePairs):void { * @dataProvider data_randomKeyValuePairs */ public function testSetGetNamespacedSameParentNamespace(array $keyValuePairs):void { - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $session = new Session($handler); + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $session = new Session($handler); - $parentNamespace = implode(".", [ - uniqid("namespace1-"), - uniqid("namespace2-"), - ]); + $parentNamespace = implode(".", [ + uniqid("namespace1-"), + uniqid("namespace2-"), + ]); foreach($keyValuePairs as $key => $value) { $newKey = implode(".", [ @@ -149,6 +170,7 @@ public function testSetGetNamespacedSameParentNamespace(array $keyValuePairs):vo * @@dataProvider data_randomKeyValuePairs */ public function testSetGetNotExistsOtherKey(array $keyValuePairs):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -179,6 +201,7 @@ public function testSetGetNotExistsOtherKey(array $keyValuePairs):void { * @dataProvider data_randomKeyValuePairs */ public function testContains(array $keyValuePairs):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -196,6 +219,7 @@ public function testContains(array $keyValuePairs):void { * @dataProvider data_randomKeyValuePairs */ public function testNotContains(array $keyValuePairs):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -213,6 +237,7 @@ public function testNotContains(array $keyValuePairs):void { * @dataProvider data_randomKeyValuePairs */ public function testRemove(array $keyValuePairs):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -236,6 +261,7 @@ public function testRemove(array $keyValuePairs):void { * @dataProvider data_randomKeyValuePairs */ public function testNamespaceKeyIsRemovedFromSession(array $keyValuePairs):void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -279,6 +305,7 @@ public function testNamespaceKeyIsRemovedFromSession(array $keyValuePairs):void * @dataProvider data_randomKeyValuePairs */ public function testNamespaceKeyIsRemovedFromStore(array $keyValuePairs): void { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -313,6 +340,7 @@ public function testNamespaceKeyIsRemovedFromStore(array $keyValuePairs): void { * @dataProvider data_randomKeyValuePairs */ public function testRemoveNamespace(array $keyValuePairs) { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); @@ -355,6 +383,7 @@ public function testRemoveNamespace(array $keyValuePairs) { * @dataProvider data_randomKeyValuePairs */ public function testRemoveSiblingNamespace(array $keyValuePairs) { + /** @var Handler|MockObject $handler */ $handler = $this->getMockBuilder(Handler::class) ->getMock(); $session = new Session($handler); diff --git a/test/unit/phpunit.xml b/test/unit/phpunit.xml index bb2e951..a085eb9 100644 --- a/test/unit/phpunit.xml +++ b/test/unit/phpunit.xml @@ -1,7 +1,7 @@ - + . From 1a7335c3886a84f2dfb046aa7a02945b9b2978c6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2020 14:16:35 +0100 Subject: [PATCH 050/110] Bump phpunit/phpunit from 8.5.3 to 8.5.6 (#70) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.5.3 to 8.5.6. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.5.3...8.5.6) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/composer.lock b/composer.lock index 23d7173..16145f7 100644 --- a/composer.lock +++ b/composer.lock @@ -9,20 +9,20 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -61,7 +61,7 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "time": "2020-05-29T17:27:14+00:00" }, { "name": "myclabs/deep-copy", @@ -215,24 +215,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -263,7 +260,7 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -681,16 +678,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.3", + "version": "8.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "67750516bc02f300e2742fed2f50177f8f37bedf" + "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/67750516bc02f300e2742fed2f50177f8f37bedf", - "reference": "67750516bc02f300e2742fed2f50177f8f37bedf", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", + "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", "shasum": "" }, "require": { @@ -760,7 +757,7 @@ "testing", "xunit" ], - "time": "2020-03-31T08:52:04+00:00" + "time": "2020-06-15T10:45:47+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1379,16 +1376,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", "shasum": "" }, "require": { @@ -1400,7 +1397,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -1433,7 +1430,7 @@ "polyfill", "portable" ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:14:59+00:00" }, { "name": "theseer/tokenizer", @@ -1477,16 +1474,16 @@ }, { "name": "webmozart/assert", - "version": "1.7.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + "reference": "9dc4f203e36f2b486149058bade43c851dd97451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", + "reference": "9dc4f203e36f2b486149058bade43c851dd97451", "shasum": "" }, "require": { @@ -1494,7 +1491,8 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -1521,7 +1519,7 @@ "check", "validate" ], - "time": "2020-02-14T12:15:55+00:00" + "time": "2020-06-16T10:16:42+00:00" } ], "aliases": [], From 62a9d3a76bfbda71d1459643569b585bdc7f1af4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 11 Jul 2020 17:34:22 +0100 Subject: [PATCH 051/110] Bump phpunit/phpunit from 8.5.6 to 8.5.8 (#72) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.5.6 to 8.5.8. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.5.6...8.5.8) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 77 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 16145f7..63480f4 100644 --- a/composer.lock +++ b/composer.lock @@ -61,6 +61,20 @@ "constructor", "instantiate" ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], "time": "2020-05-29T17:27:14+00:00" }, { @@ -317,16 +331,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" + "reference": "30441f2752e493c639526b215ed81d54f369d693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30441f2752e493c639526b215ed81d54f369d693", + "reference": "30441f2752e493c639526b215ed81d54f369d693", "shasum": "" }, "require": { @@ -340,7 +354,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -359,7 +373,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-02-18T18:59:58+00:00" + "time": "2020-06-19T20:22:09+00:00" }, { "name": "phpspec/prophecy", @@ -678,16 +692,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.6", + "version": "8.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348" + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", - "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", "shasum": "" }, "require": { @@ -757,7 +771,17 @@ "testing", "xunit" ], - "time": "2020-06-15T10:45:47+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-22T07:06:58+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1376,16 +1400,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "shasum": "" }, "require": { @@ -1398,6 +1422,10 @@ "extra": { "branch-alias": { "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1430,7 +1458,21 @@ "polyfill", "portable" ], - "time": "2020-05-12T16:14:59+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-06T08:46:27+00:00" }, { "name": "theseer/tokenizer", @@ -1530,5 +1572,6 @@ "platform": { "php": ">=7.2" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } From ffd186bbf7e2dd8feb427b27ce2e0d74cc9b58ec Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 28 Dec 2020 18:39:17 +0000 Subject: [PATCH 052/110] Upgrade CI (#77) --- .circleci/config.yml | 33 - .github/FUNDING.yml | 2 + .github/workflows/ci.yml | 66 ++ .scrutinizer.yml | 29 +- README.md | 2 +- composer.json | 5 +- composer.lock | 1053 ++++++++++++----- .../Helper/DataProvider/ConfigProvider.php | 0 .../DataProvider/KeyValuePairProvider.php | 0 .../Helper/DataProvider/StringProvider.php | 0 .../Helper/FunctionMocker.php | 0 .../FunctionOverride/session_destroy.php | 0 .../Helper/FunctionOverride/session_id.php | 0 .../Helper/FunctionOverride/session_start.php | 0 .../SessionArrayWrapperTest.php | 0 test/{unit => phpunit}/SessionStoreTest.php | 0 test/{unit => phpunit}/SessionTest.php | 0 test/phpunit/phpunit.xml | 18 + test/unit/phpunit.xml | 14 - 19 files changed, 862 insertions(+), 360 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/ci.yml rename test/{unit => phpunit}/Helper/DataProvider/ConfigProvider.php (100%) rename test/{unit => phpunit}/Helper/DataProvider/KeyValuePairProvider.php (100%) rename test/{unit => phpunit}/Helper/DataProvider/StringProvider.php (100%) rename test/{unit => phpunit}/Helper/FunctionMocker.php (100%) rename test/{unit => phpunit}/Helper/FunctionOverride/session_destroy.php (100%) rename test/{unit => phpunit}/Helper/FunctionOverride/session_id.php (100%) rename test/{unit => phpunit}/Helper/FunctionOverride/session_start.php (100%) rename test/{unit => phpunit}/SessionArrayWrapperTest.php (100%) rename test/{unit => phpunit}/SessionStoreTest.php (100%) rename test/{unit => phpunit}/SessionTest.php (100%) create mode 100644 test/phpunit/phpunit.xml delete mode 100644 test/unit/phpunit.xml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 68a7c5c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: 2 - -jobs: - build: - docker: - - image: circleci/php:7.2-cli - - working_directory: ~/repo - - steps: - - checkout - - - restore_cache: - keys: - - v1-dependencies-{{ checksum "composer.json" }} - - v1-dependencies- - - - run: composer install -n --prefer-dist - - - save_cache: - paths: - - ./vendor - key: v1-dependencies-{{ checksum "composer.json" }} - - - run: mkdir test/unit/_junit - - run: vendor/bin/phpunit -c test/unit/phpunit.xml --log-junit test/unit/_junit/junit.xml --coverage-html ./test/unit/_coverage -d memory_limit=512M - - - store_test_results: - path: test/unit/_junit - - - store_artifacts: - path: test/unit/_coverage - destination: TestCoverage \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..8ca7d16 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +# These are supported funding model platforms +github: [phpgt] \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..27cc5d8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +name: CI + +on: [push] + +jobs: + composer: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Composer dependencies + uses: actions/cache@v2 + with: + path: /tmp/composer-cache + key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + + - uses: php-actions/composer@v5 + + - name: Archive build + run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./ + + - name: Upload build archive for test runners + uses: actions/upload-artifact@v2 + with: + name: build-artifact + path: /tmp/github-actions + + phpunit: + runs-on: ubuntu-latest + needs: [composer] + + steps: + - uses: actions/download-artifact@v2 + with: + name: build-artifact + path: /tmp/github-actions + + - name: Extract build archive + run: tar -xvf /tmp/github-actions/build.tar ./ + + - name: PHP Unit tests + uses: php-actions/phpunit@v2 + with: + php_version: 8.0 + php_extensions: xdebug + configuration: test/phpunit/phpunit.xml + bootstrap: vendor/autoload.php + + phpstan: + runs-on: ubuntu-latest + needs: [composer] + + steps: + - uses: actions/download-artifact@v2 + with: + name: build-artifact + path: /tmp/github-actions + + - name: Extract build archive + run: tar -xvf /tmp/github-actions/build.tar ./ + + - name: PHP Static Analysis + uses: php-actions/phpstan@v2 + with: + path: src/ \ No newline at end of file diff --git a/.scrutinizer.yml b/.scrutinizer.yml index dbbd1cb..0e7d790 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,14 +1,25 @@ build: environment: - php: - version: 7.1.0 - tests: - override: - - - command: 'vendor/bin/phpunit test/unit --coverage-clover coverage --whitelist src' - coverage: - file: 'coverage' - format: 'php-clover' + php: 8.0.0 + + nodes: + analysis: + tests: + override: + - php-scrutinizer-run + + tests-and-coverage: + environment: + php: + ini: + "xdebug.mode": coverage + tests: + override: + - phpcs-run ./src + - command: "vendor/bin/phpunit test/phpunit --coverage-clover test/phpunit/_coverage --whitelist src" + coverage: + file: "test/phpunit/_coverage" + format: "php-clover" checks: php: diff --git a/README.md b/README.md index 9bbd220..c2f5e6a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Sessions are addressed using dot notation, allowing for handling categories of s *** - + Build status diff --git a/composer.json b/composer.json index 5f37b3b..f78bd5a 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,8 @@ "php": ">=7.2" }, "require-dev": { - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "9.*", + "phpstan/phpstan": ">=0.12.64" }, "autoload": { @@ -17,7 +18,7 @@ }, "autoload-dev": { "psr-4": { - "Gt\\Session\\Test\\": "./test/unit" + "Gt\\Session\\Test\\": "./test/phpunit" } } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 63480f4..3249ec0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,41 +4,36 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "39b657e48de8b924fed3a9a11ac33f16", + "content-hash": "bb32584e49fdaeea326c284a7294f289", "packages": [], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^8.0", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -52,7 +47,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -75,24 +70,24 @@ "type": "tidelift" } ], - "time": "2020-05-29T17:27:14+00:00" + "time": "2020-11-10T18:47:58+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.5", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -123,32 +118,91 @@ "object", "object graph" ], - "time": "2020-01-17T21:11:47+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2020-12-20T10:01:03+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -178,24 +232,24 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "time": "2020-06-27T14:33:11+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -225,29 +279,29 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "time": "2020-12-13T23:18:30+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "2.1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -274,32 +328,31 @@ "reflection", "static analysis" ], - "time": "2020-04-27T09:25:28+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.1.0", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { @@ -327,29 +380,28 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-02-22T12:28:44+00:00" + "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.2.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "30441f2752e493c639526b215ed81d54f369d693" + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30441f2752e493c639526b215ed81d54f369d693", - "reference": "30441f2752e493c639526b215ed81d54f369d693", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" + "ext-tokenizer": "*" }, "type": "library", "extra": { @@ -373,37 +425,37 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-19T20:22:09+00:00" + "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.10.3", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "reference": "245710e971a030f42e08f4912863805570f23d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -436,44 +488,104 @@ "spy", "stub" ], - "time": "2020-03-05T15:02:03+00:00" + "time": "2020-12-19T10:15:11+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "0.12.64", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa", + "reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2020-12-21T11:59:02+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.10", + "version": "9.2.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" + "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1", + "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -499,32 +611,38 @@ "testing", "xunit" ], - "time": "2019-11-20T13:55:58+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:44:49+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -549,26 +667,44 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -585,37 +721,43 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" ], - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.2", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -634,38 +776,43 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" ], - "time": "2019-06-07T04:22:29+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.1.1", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -680,64 +827,74 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" + ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.8", + "version": "9.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" + "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", + "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2.0", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3", + "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -745,12 +902,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -781,32 +941,136 @@ "type": "github" } ], - "time": "2020-06-22T07:06:58+00:00" + "time": "2020-12-04T05:05:53+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", + "name": "sebastian/cli-parser", "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -826,34 +1090,40 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -866,6 +1136,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -877,10 +1151,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -890,33 +1160,92 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -929,13 +1258,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -946,27 +1275,33 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -974,7 +1309,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -999,34 +1334,40 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1066,30 +1407,36 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", "shasum": "" }, "require": { - "php": "^7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -1097,7 +1444,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1120,34 +1467,93 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:55:19+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1167,32 +1573,38 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1212,32 +1624,38 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1250,14 +1668,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -1265,29 +1683,38 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1307,32 +1734,38 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" }, { "name": "sebastian/type", - "version": "1.1.3", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -1353,29 +1786,35 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:18:59+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1396,24 +1835,30 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1421,7 +1866,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1472,27 +1917,27 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "75a63c33a8577608444246075ea0af0d052e452a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1512,24 +1957,30 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" }, { "name": "webmozart/assert", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "9dc4f203e36f2b486149058bade43c851dd97451" + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", - "reference": "9dc4f203e36f2b486149058bade43c851dd97451", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", + "php": "^5.3.3 || ^7.0 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -1561,7 +2012,7 @@ "check", "validate" ], - "time": "2020-06-16T10:16:42+00:00" + "time": "2020-07-08T17:02:28+00:00" } ], "aliases": [], diff --git a/test/unit/Helper/DataProvider/ConfigProvider.php b/test/phpunit/Helper/DataProvider/ConfigProvider.php similarity index 100% rename from test/unit/Helper/DataProvider/ConfigProvider.php rename to test/phpunit/Helper/DataProvider/ConfigProvider.php diff --git a/test/unit/Helper/DataProvider/KeyValuePairProvider.php b/test/phpunit/Helper/DataProvider/KeyValuePairProvider.php similarity index 100% rename from test/unit/Helper/DataProvider/KeyValuePairProvider.php rename to test/phpunit/Helper/DataProvider/KeyValuePairProvider.php diff --git a/test/unit/Helper/DataProvider/StringProvider.php b/test/phpunit/Helper/DataProvider/StringProvider.php similarity index 100% rename from test/unit/Helper/DataProvider/StringProvider.php rename to test/phpunit/Helper/DataProvider/StringProvider.php diff --git a/test/unit/Helper/FunctionMocker.php b/test/phpunit/Helper/FunctionMocker.php similarity index 100% rename from test/unit/Helper/FunctionMocker.php rename to test/phpunit/Helper/FunctionMocker.php diff --git a/test/unit/Helper/FunctionOverride/session_destroy.php b/test/phpunit/Helper/FunctionOverride/session_destroy.php similarity index 100% rename from test/unit/Helper/FunctionOverride/session_destroy.php rename to test/phpunit/Helper/FunctionOverride/session_destroy.php diff --git a/test/unit/Helper/FunctionOverride/session_id.php b/test/phpunit/Helper/FunctionOverride/session_id.php similarity index 100% rename from test/unit/Helper/FunctionOverride/session_id.php rename to test/phpunit/Helper/FunctionOverride/session_id.php diff --git a/test/unit/Helper/FunctionOverride/session_start.php b/test/phpunit/Helper/FunctionOverride/session_start.php similarity index 100% rename from test/unit/Helper/FunctionOverride/session_start.php rename to test/phpunit/Helper/FunctionOverride/session_start.php diff --git a/test/unit/SessionArrayWrapperTest.php b/test/phpunit/SessionArrayWrapperTest.php similarity index 100% rename from test/unit/SessionArrayWrapperTest.php rename to test/phpunit/SessionArrayWrapperTest.php diff --git a/test/unit/SessionStoreTest.php b/test/phpunit/SessionStoreTest.php similarity index 100% rename from test/unit/SessionStoreTest.php rename to test/phpunit/SessionStoreTest.php diff --git a/test/unit/SessionTest.php b/test/phpunit/SessionTest.php similarity index 100% rename from test/unit/SessionTest.php rename to test/phpunit/SessionTest.php diff --git a/test/phpunit/phpunit.xml b/test/phpunit/phpunit.xml new file mode 100644 index 0000000..cf95bea --- /dev/null +++ b/test/phpunit/phpunit.xml @@ -0,0 +1,18 @@ + + + + + ../../src + + + + + + + + + . + + + + \ No newline at end of file diff --git a/test/unit/phpunit.xml b/test/unit/phpunit.xml deleted file mode 100644 index a085eb9..0000000 --- a/test/unit/phpunit.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - . - - - - - - ../../src - - - \ No newline at end of file From a890bade65489c9e3fc92cc3dfb44efc54985a9a Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 12 Jan 2021 10:15:28 +0000 Subject: [PATCH 053/110] Silently fail to avoid sending headers early (#80) * Silently fail to avoid sending headers early * Update dependencies --- composer.lock | 22 +++++++++++----------- src/Session.php | 6 ++++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 3249ec0..88edac2 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.64", + "version": "0.12.66", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa" + "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa", - "reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4110a2425c6bd53acbdfcda07885e87b66e9ba3e", + "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2020-12-21T11:59:02+00:00" + "time": "2021-01-11T16:43:15+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1845,16 +1845,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -1866,7 +1866,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1917,7 +1917,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "theseer/tokenizer", diff --git a/src/Session.php b/src/Session.php index f8ceea0..5289b05 100644 --- a/src/Session.php +++ b/src/Session.php @@ -36,6 +36,7 @@ public function __construct( $config["save_path"] ?? self::DEFAULT_SESSION_PATH ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; + $sessionStartAttempts = 0; do { $success = @session_start([ @@ -49,10 +50,11 @@ public function __construct( ]); if(!$success) { - session_destroy(); + $sessionStartAttempts++; + @session_destroy(); } } - while(!$success); + while(!$success && $sessionStartAttempts <= 1); $this->sessionHandler->open($sessionPath, $sessionName); $this->store = $this->readSessionData() ?: null; From ea60bb15999444095b97a7beaaaafe360c498c51 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 2 Feb 2021 09:59:22 +0000 Subject: [PATCH 054/110] Bump phpstan/phpstan from 0.12.66 to 0.12.71 (#87) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.66 to 0.12.71. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.66...0.12.71) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 88edac2..fb902e6 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.66", + "version": "0.12.71", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e" + "reference": "d508fa3b0ecc5fc91ac70c6c7ac2862f968ba2b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4110a2425c6bd53acbdfcda07885e87b66e9ba3e", - "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d508fa3b0ecc5fc91ac70c6c7ac2862f968ba2b5", + "reference": "d508fa3b0ecc5fc91ac70c6c7ac2862f968ba2b5", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-01-11T16:43:15+00:00" + "time": "2021-02-01T18:24:00+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1970,12 +1970,12 @@ "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, From f6eb7977eda02668e90de50f5d8e55704cd7b206 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 2 Feb 2021 10:07:24 +0000 Subject: [PATCH 055/110] Bump phpunit/phpunit from 9.5.0 to 9.5.1 (#83) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.0 to 9.5.1. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.0...9.5.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index fb902e6..e9bb309 100644 --- a/composer.lock +++ b/composer.lock @@ -846,16 +846,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.0", + "version": "9.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe" + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", - "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360", + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360", "shasum": "" }, "require": { @@ -941,7 +941,7 @@ "type": "github" } ], - "time": "2020-12-04T05:05:53+00:00" + "time": "2021-01-17T07:42:25+00:00" }, { "name": "sebastian/cli-parser", From a19f8d6891c9d7e73977e9f5317af37fbbcc401d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 3 Feb 2021 09:51:43 +0000 Subject: [PATCH 056/110] Bump phpunit/phpunit from 9.5.1 to 9.5.2 (#88) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.1 to 9.5.2. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.1...9.5.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index e9bb309..c1415ec 100644 --- a/composer.lock +++ b/composer.lock @@ -846,16 +846,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.1", + "version": "9.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360" + "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360", - "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4", + "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4", "shasum": "" }, "require": { @@ -941,7 +941,7 @@ "type": "github" } ], - "time": "2021-01-17T07:42:25+00:00" + "time": "2021-02-02T14:45:58+00:00" }, { "name": "sebastian/cli-parser", From cd2d95abf65ff33e0d469adfd3f24c16f0cad3fd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:59:59 +0000 Subject: [PATCH 057/110] Bump phpstan/phpstan from 0.12.71 to 0.12.73 (#89) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.71 to 0.12.73. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.71...0.12.73) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index c1415ec..89a29c1 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.71", + "version": "0.12.73", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d508fa3b0ecc5fc91ac70c6c7ac2862f968ba2b5" + "reference": "a08c2759d132b4247b32e03066401c3232ad99b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d508fa3b0ecc5fc91ac70c6c7ac2862f968ba2b5", - "reference": "d508fa3b0ecc5fc91ac70c6c7ac2862f968ba2b5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a08c2759d132b4247b32e03066401c3232ad99b7", + "reference": "a08c2759d132b4247b32e03066401c3232ad99b7", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-01T18:24:00+00:00" + "time": "2021-02-07T16:26:54+00:00" }, { "name": "phpunit/php-code-coverage", From 483c50c31008c080e6b4d171d1f7205685426ec4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 9 Feb 2021 09:25:21 +0000 Subject: [PATCH 058/110] Bump phpstan/phpstan from 0.12.73 to 0.12.74 (#90) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.73 to 0.12.74. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.73...0.12.74) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 89a29c1..a7f5643 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.73", + "version": "0.12.74", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "a08c2759d132b4247b32e03066401c3232ad99b7" + "reference": "bc5f9483c8f461c86653dcbd040cf0d2778c91a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a08c2759d132b4247b32e03066401c3232ad99b7", - "reference": "a08c2759d132b4247b32e03066401c3232ad99b7", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bc5f9483c8f461c86653dcbd040cf0d2778c91a2", + "reference": "bc5f9483c8f461c86653dcbd040cf0d2778c91a2", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-07T16:26:54+00:00" + "time": "2021-02-08T15:00:25+00:00" }, { "name": "phpunit/php-code-coverage", From 78dada27f248b80bfd9cc447dd9f8f339bc68d34 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 12 Feb 2021 14:26:54 +0000 Subject: [PATCH 059/110] Bump phpstan/phpstan from 0.12.74 to 0.12.75 (#91) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.74 to 0.12.75. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.74...0.12.75) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index a7f5643..38e2bdb 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.74", + "version": "0.12.75", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "bc5f9483c8f461c86653dcbd040cf0d2778c91a2" + "reference": "2e4738cd67e0163861a065180eff7eb5c8417d6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bc5f9483c8f461c86653dcbd040cf0d2778c91a2", - "reference": "bc5f9483c8f461c86653dcbd040cf0d2778c91a2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2e4738cd67e0163861a065180eff7eb5c8417d6e", + "reference": "2e4738cd67e0163861a065180eff7eb5c8417d6e", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-08T15:00:25+00:00" + "time": "2021-02-11T13:58:47+00:00" }, { "name": "phpunit/php-code-coverage", From 688cc554dfff45b952dd85a1b093047df35a075b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 15 Feb 2021 09:40:27 +0000 Subject: [PATCH 060/110] Bump phpstan/phpstan from 0.12.75 to 0.12.76 (#92) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.75 to 0.12.76. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.75...0.12.76) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 38e2bdb..ff3c568 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.75", + "version": "0.12.76", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "2e4738cd67e0163861a065180eff7eb5c8417d6e" + "reference": "7aaaf9a759a29795e8f46d48041af1c1f1b23d38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2e4738cd67e0163861a065180eff7eb5c8417d6e", - "reference": "2e4738cd67e0163861a065180eff7eb5c8417d6e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7aaaf9a759a29795e8f46d48041af1c1f1b23d38", + "reference": "7aaaf9a759a29795e8f46d48041af1c1f1b23d38", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-11T13:58:47+00:00" + "time": "2021-02-13T11:47:44+00:00" }, { "name": "phpunit/php-code-coverage", From 1df9de3256d5ba8bd0d71f9637bee48937b71728 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 18 Feb 2021 10:27:41 +0000 Subject: [PATCH 061/110] Bump phpstan/phpstan from 0.12.76 to 0.12.77 (#93) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.76 to 0.12.77. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.76...0.12.77) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index ff3c568..b2e5fb3 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.76", + "version": "0.12.77", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "7aaaf9a759a29795e8f46d48041af1c1f1b23d38" + "reference": "1f10b8c8d118d01e7b492f9707999d456be5812c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7aaaf9a759a29795e8f46d48041af1c1f1b23d38", - "reference": "7aaaf9a759a29795e8f46d48041af1c1f1b23d38", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1f10b8c8d118d01e7b492f9707999d456be5812c", + "reference": "1f10b8c8d118d01e7b492f9707999d456be5812c", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-13T11:47:44+00:00" + "time": "2021-02-17T16:22:19+00:00" }, { "name": "phpunit/php-code-coverage", From 41a68ab27ccc6c115347d132eb1cc18143d5e7b3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 09:32:53 +0000 Subject: [PATCH 062/110] Bump phpstan/phpstan from 0.12.77 to 0.12.78 (#94) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.77 to 0.12.78. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.77...0.12.78) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index b2e5fb3..8a8bbc7 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.77", + "version": "0.12.78", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "1f10b8c8d118d01e7b492f9707999d456be5812c" + "reference": "eecce8d2ee3cac6769f37b4cb1998b2715f82984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1f10b8c8d118d01e7b492f9707999d456be5812c", - "reference": "1f10b8c8d118d01e7b492f9707999d456be5812c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/eecce8d2ee3cac6769f37b4cb1998b2715f82984", + "reference": "eecce8d2ee3cac6769f37b4cb1998b2715f82984", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-17T16:22:19+00:00" + "time": "2021-02-20T13:24:36+00:00" }, { "name": "phpunit/php-code-coverage", From 448eb4ac1ff8d857d4cfb3088e7d533a427e6fec Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 26 Feb 2021 13:54:01 +0000 Subject: [PATCH 063/110] Bump phpstan/phpstan from 0.12.78 to 0.12.79 (#95) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.78 to 0.12.79. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.78...0.12.79) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 8a8bbc7..1e406c1 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.78", + "version": "0.12.79", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "eecce8d2ee3cac6769f37b4cb1998b2715f82984" + "reference": "dd7769915648b704b9bd12925994457f1c2c8442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/eecce8d2ee3cac6769f37b4cb1998b2715f82984", - "reference": "eecce8d2ee3cac6769f37b4cb1998b2715f82984", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dd7769915648b704b9bd12925994457f1c2c8442", + "reference": "dd7769915648b704b9bd12925994457f1c2c8442", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-20T13:24:36+00:00" + "time": "2021-02-25T16:44:57+00:00" }, { "name": "phpunit/php-code-coverage", From 8cdc4c7c8b5a275c3ed6575b36e17f7ac541a196 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 12:41:37 +0000 Subject: [PATCH 064/110] Bump phpstan/phpstan from 0.12.79 to 0.12.80 (#96) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.79 to 0.12.80. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.79...0.12.80) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 1e406c1..6e364d2 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.79", + "version": "0.12.80", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "dd7769915648b704b9bd12925994457f1c2c8442" + "reference": "c6a1b17f22ecf708d434d6bee05092647ec7e686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dd7769915648b704b9bd12925994457f1c2c8442", - "reference": "dd7769915648b704b9bd12925994457f1c2c8442", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c6a1b17f22ecf708d434d6bee05092647ec7e686", + "reference": "c6a1b17f22ecf708d434d6bee05092647ec7e686", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-25T16:44:57+00:00" + "time": "2021-02-28T20:22:43+00:00" }, { "name": "phpunit/php-code-coverage", From bc066fc4ba2931377b826bb481965e740d80efb3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 12:02:42 +0000 Subject: [PATCH 065/110] Bump phpstan/phpstan from 0.12.80 to 0.12.81 (#97) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.80 to 0.12.81. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.80...0.12.81) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 6e364d2..10a7c6d 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.80", + "version": "0.12.81", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "c6a1b17f22ecf708d434d6bee05092647ec7e686" + "reference": "0dd5b0ebeff568f7000022ea5f04aa86ad3124b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c6a1b17f22ecf708d434d6bee05092647ec7e686", - "reference": "c6a1b17f22ecf708d434d6bee05092647ec7e686", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0dd5b0ebeff568f7000022ea5f04aa86ad3124b8", + "reference": "0dd5b0ebeff568f7000022ea5f04aa86ad3124b8", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-02-28T20:22:43+00:00" + "time": "2021-03-08T22:03:02+00:00" }, { "name": "phpunit/php-code-coverage", From 49df59b8585640be1c5a0abbc93918eb6cc3d9cd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 12:17:22 +0000 Subject: [PATCH 066/110] Bump phpstan/phpstan from 0.12.81 to 0.12.82 (#99) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.81 to 0.12.82. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.81...0.12.82) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 10a7c6d..a923bbf 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.81", + "version": "0.12.82", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0dd5b0ebeff568f7000022ea5f04aa86ad3124b8" + "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0dd5b0ebeff568f7000022ea5f04aa86ad3124b8", - "reference": "0dd5b0ebeff568f7000022ea5f04aa86ad3124b8", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3920f0fb0aff39263d3a4cb0bca120a67a1a6a11", + "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-03-08T22:03:02+00:00" + "time": "2021-03-19T06:08:17+00:00" }, { "name": "phpunit/php-code-coverage", From 2898f01fcbbf526bc130ae4db3a382ab1d73a6ba Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 15:17:08 +0000 Subject: [PATCH 067/110] Bump phpunit/phpunit from 9.5.2 to 9.5.3 (#98) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.2 to 9.5.3. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.2...9.5.3) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 53 ++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/composer.lock b/composer.lock index a923bbf..b50d733 100644 --- a/composer.lock +++ b/composer.lock @@ -236,16 +236,16 @@ }, { "name": "phar-io/version", - "version": "3.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { @@ -279,7 +279,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2020-12-13T23:18:30+00:00" + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -429,16 +429,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.12.2", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "245710e971a030f42e08f4912863805570f23d39" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", - "reference": "245710e971a030f42e08f4912863805570f23d39", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { @@ -488,7 +488,7 @@ "spy", "stub" ], - "time": "2020-12-19T10:15:11+00:00" + "time": "2021-03-17T13:42:18+00:00" }, { "name": "phpstan/phpstan", @@ -846,16 +846,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.2", + "version": "9.5.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4" + "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/27241ac75fc37ecf862b6e002bf713b6566cbe41", + "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41", "shasum": "" }, "require": { @@ -941,7 +941,7 @@ "type": "github" } ], - "time": "2021-02-02T14:45:58+00:00" + "time": "2021-03-17T07:30:34+00:00" }, { "name": "sebastian/cli-parser", @@ -1845,7 +1845,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -1967,30 +1967,35 @@ }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -2012,7 +2017,7 @@ "check", "validate" ], - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], From 5915b7208f7b7d1f26f9d4c1256473e64f6efed7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 24 Mar 2021 09:57:05 +0000 Subject: [PATCH 068/110] Bump phpunit/phpunit from 9.5.3 to 9.5.4 (#100) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.3 to 9.5.4. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.3...9.5.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index b50d733..339325e 100644 --- a/composer.lock +++ b/composer.lock @@ -846,16 +846,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.3", + "version": "9.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41" + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/27241ac75fc37ecf862b6e002bf713b6566cbe41", - "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", "shasum": "" }, "require": { @@ -941,7 +941,7 @@ "type": "github" } ], - "time": "2021-03-17T07:30:34+00:00" + "time": "2021-03-23T07:16:29+00:00" }, { "name": "sebastian/cli-parser", From d8d22c43124da450d8de2f10614b9f2a1b0f5d69 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:28:13 +0100 Subject: [PATCH 069/110] Bump phpstan/phpstan from 0.12.82 to 0.12.83 (#101) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.82 to 0.12.83. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.82...0.12.83) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 339325e..55346d9 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.82", + "version": "0.12.83", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11" + "reference": "4a967cec6efb46b500dd6d768657336a3ffe699f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3920f0fb0aff39263d3a4cb0bca120a67a1a6a11", - "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4a967cec6efb46b500dd6d768657336a3ffe699f", + "reference": "4a967cec6efb46b500dd6d768657336a3ffe699f", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-03-19T06:08:17+00:00" + "time": "2021-04-03T15:35:45+00:00" }, { "name": "phpunit/php-code-coverage", From 4919ebe2579808e40b967bc1fc95f7d3037bc6ab Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Apr 2021 10:03:40 +0100 Subject: [PATCH 070/110] Bump phpstan/phpstan from 0.12.83 to 0.12.84 (#102) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.83 to 0.12.84. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.83...0.12.84) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 55346d9..909dfba 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.83", + "version": "0.12.84", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "4a967cec6efb46b500dd6d768657336a3ffe699f" + "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4a967cec6efb46b500dd6d768657336a3ffe699f", - "reference": "4a967cec6efb46b500dd6d768657336a3ffe699f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9c43f15da8798c8f30a4b099e6a94530a558cfd5", + "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5", "shasum": "" }, "require": { @@ -544,7 +544,7 @@ "type": "tidelift" } ], - "time": "2021-04-03T15:35:45+00:00" + "time": "2021-04-19T17:10:54+00:00" }, { "name": "phpunit/php-code-coverage", From 1d1764803c6ed88f478b4c3b3a23ebef6e3459df Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 17:54:20 +0100 Subject: [PATCH 071/110] Upgrade to GitHub-native Dependabot (#104) Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b2aa2dd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + ignore: + - dependency-name: phpstan/phpstan + versions: + - 0.12.70 From 894e0a3aeeb2cecb00269a4bf61a4898c5a6da4f Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Sat, 8 May 2021 17:44:47 +0100 Subject: [PATCH 072/110] build: run workflow on pr (#106) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27cc5d8..cb9d96f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push] +on: [push, pull_request] jobs: composer: @@ -63,4 +63,4 @@ jobs: - name: PHP Static Analysis uses: php-actions/phpstan@v2 with: - path: src/ \ No newline at end of file + path: src/ From 0277f59c31e96d96fea132c72e479a049f161fd4 Mon Sep 17 00:00:00 2001 From: "Chun-Sheng, Li" Date: Sun, 9 May 2021 02:02:43 +0800 Subject: [PATCH 073/110] Improve PHPUnit fixtures (#105) Co-authored-by: Greg Bowler --- test/phpunit/SessionStoreTest.php | 2 +- test/phpunit/SessionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/SessionStoreTest.php b/test/phpunit/SessionStoreTest.php index 9ed95b7..6ee3aa5 100644 --- a/test/phpunit/SessionStoreTest.php +++ b/test/phpunit/SessionStoreTest.php @@ -13,7 +13,7 @@ class SessionStoreTest extends TestCase { use KeyValuePairProvider; - public function setUp():void { + protected function setUp():void { FunctionMocker::mock("session_start"); FunctionMocker::mock("session_id"); } diff --git a/test/phpunit/SessionTest.php b/test/phpunit/SessionTest.php index 59e5814..f9a19ed 100644 --- a/test/phpunit/SessionTest.php +++ b/test/phpunit/SessionTest.php @@ -15,7 +15,7 @@ class SessionTest extends TestCase { use StringProvider; use ConfigProvider; - public function setUp():void { + protected function setUp():void { FunctionMocker::mock("session_start"); FunctionMocker::mock("session_id"); FunctionMocker::mock("session_destroy"); From 6bc554f569ea749b7acdfc5f18e85c5ece61266c Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 15 Jun 2021 20:02:34 +0100 Subject: [PATCH 074/110] funding (#112) --- composer.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f78bd5a..affd1c6 100644 --- a/composer.json +++ b/composer.json @@ -20,5 +20,12 @@ "psr-4": { "Gt\\Session\\Test\\": "./test/phpunit" } - } -} \ No newline at end of file + }, + + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/PhpGt" + } + ] +} From 5da87957e5b82f76b8cf4461b276bb22fae7c82c Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 4 Nov 2021 14:38:29 +0000 Subject: [PATCH 075/110] improvement: session_start uses php's decoding (#132) --- composer.json | 4 +- composer.lock | 291 ++++++++++++++++++++++++++++++++----------- src/FileHandler.php | 9 +- src/Session.php | 37 +++--- src/SessionSetup.php | 2 +- 5 files changed, 245 insertions(+), 98 deletions(-) diff --git a/composer.json b/composer.json index affd1c6..889a99e 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }, "require-dev": { "phpunit/phpunit": "9.*", - "phpstan/phpstan": ">=0.12.64" + "phpstan/phpstan": "1.0.2" }, "autoload": { @@ -21,7 +21,7 @@ "Gt\\Session\\Test\\": "./test/phpunit" } }, - + "funding": [ { "type": "github", diff --git a/composer.lock b/composer.lock index 909dfba..c8bac1b 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": "bb32584e49fdaeea326c284a7294f289", + "content-hash": "2e4b232fb6d83b62e1c30a262a97fa21", "packages": [], "packages-dev": [ { @@ -56,6 +56,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -118,6 +122,10 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", @@ -128,16 +136,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.4", + "version": "v4.13.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", "shasum": "" }, "require": { @@ -176,20 +184,24 @@ "parser", "php" ], - "time": "2020-12-20T10:01:03+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + }, + "time": "2021-11-03T20:52:16+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { @@ -232,7 +244,11 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2020-06-27T14:33:11+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", @@ -279,6 +295,10 @@ } ], "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, "time": "2021-02-23T14:00:09+00:00" }, { @@ -328,20 +348,24 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -352,7 +376,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -380,20 +405,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-09-03T19:13:55+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -401,7 +430,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -425,37 +455,41 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-09-17T18:55:26+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + }, + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", - "version": "1.13.0", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", + "php": "^7.2 || ~8.0, <8.2", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", + "phpspec/phpspec": "^6.0 || ^7.0", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -488,20 +522,24 @@ "spy", "stub" ], - "time": "2021-03-17T13:42:18+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + }, + "time": "2021-09-10T09:02:12+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.84", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5" + "reference": "e9e2a501102ba0b126b2f63a7f0a3b151056fe91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9c43f15da8798c8f30a4b099e6a94530a558cfd5", - "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e9e2a501102ba0b126b2f63a7f0a3b151056fe91", + "reference": "e9e2a501102ba0b126b2f63a7f0a3b151056fe91", "shasum": "" }, "require": { @@ -517,7 +555,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.12-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -530,11 +568,19 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.0.2" + }, "funding": [ { "url": "https://github.com/ondrejmirtes", "type": "github" }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, { "url": "https://www.patreon.com/phpstan", "type": "patreon" @@ -544,27 +590,27 @@ "type": "tidelift" } ], - "time": "2021-04-19T17:10:54+00:00" + "time": "2021-11-03T16:09:51+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.5", + "version": "9.2.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1" + "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", + "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", + "nikic/php-parser": "^4.13.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -611,13 +657,17 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-11-28T06:44:49+00:00" + "time": "2021-10-30T08:01:38+00:00" }, { "name": "phpunit/php-file-iterator", @@ -667,6 +717,10 @@ "filesystem", "iterator" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -726,6 +780,10 @@ "keywords": [ "process" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -781,6 +839,10 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -836,6 +898,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -846,16 +912,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.4", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -867,11 +933,11 @@ "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.1", + "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-code-coverage": "^9.2.7", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -885,7 +951,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3", + "sebastian/type": "^2.3.4", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -931,6 +997,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + }, "funding": [ { "url": "https://phpunit.de/donate.html", @@ -941,7 +1011,7 @@ "type": "github" } ], - "time": "2021-03-23T07:16:29+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { "name": "sebastian/cli-parser", @@ -987,6 +1057,10 @@ ], "description": "Library for parsing CLI options", "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1039,6 +1113,10 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1090,6 +1168,10 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1160,6 +1242,10 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1213,6 +1299,10 @@ ], "description": "Library for calculating the complexity of PHP code units", "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1275,6 +1365,10 @@ "unidiff", "unified diff" ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1334,6 +1428,10 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1407,6 +1505,10 @@ "export", "exporter" ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1417,16 +1519,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.2", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { @@ -1467,13 +1569,17 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { "name": "sebastian/lines-of-code", @@ -1520,6 +1626,10 @@ ], "description": "Library for counting the lines of code in PHP source code", "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1573,6 +1683,10 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1624,6 +1738,10 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1683,6 +1801,10 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1734,6 +1856,10 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1744,16 +1870,16 @@ }, { "name": "sebastian/type", - "version": "2.3.1", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { @@ -1786,13 +1912,17 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", @@ -1835,6 +1965,10 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1845,16 +1979,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -1866,7 +2000,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1903,6 +2037,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1917,20 +2054,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -1957,13 +2094,17 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, "funding": [ { "url": "https://github.com/theseer", "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", @@ -2017,6 +2158,10 @@ "check", "validate" ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, "time": "2021-03-09T10:59:23+00:00" } ], @@ -2029,5 +2174,5 @@ "php": ">=7.2" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/src/FileHandler.php b/src/FileHandler.php index fce69be..838a404 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -4,6 +4,7 @@ use DirectoryIterator; class FileHandler extends Handler { + const EMPTY_PHP_ARRAY = "a:0:{}"; protected $path; protected $cache; @@ -65,8 +66,12 @@ public function read($session_id):string { * @param string $session_data */ public function write($session_id, $session_data):bool { + if($session_data === self::EMPTY_PHP_ARRAY) { + return true; + } $filePath = $this->getFilePath($session_id); - return file_put_contents($filePath, $session_data) > 0; + $bytesWritten = file_put_contents($filePath, $session_data); + return $bytesWritten !== false; } /** @@ -113,4 +118,4 @@ protected function getFilePath(string $id):string { $id, ]); } -} \ No newline at end of file +} diff --git a/src/Session.php b/src/Session.php index 5289b05..1f9b3eb 100644 --- a/src/Session.php +++ b/src/Session.php @@ -36,25 +36,22 @@ public function __construct( $config["save_path"] ?? self::DEFAULT_SESSION_PATH ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; - $sessionStartAttempts = 0; - - do { - $success = @session_start([ - "save_path" => $sessionPath, - "name" => $sessionName, - "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, - "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, - "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, - "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, - "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, - ]); - if(!$success) { - $sessionStartAttempts++; - @session_destroy(); - } + $success = session_start([ + "save_path" => $sessionPath, + "name" => $sessionName, + "serialize_handler" => "php_serialize", + "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, + "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, + "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, + "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, + "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, + ]); + + if(!$success) { +// TODO: Throw exception after #131 investigated. + var_dump($sessionPath, $sessionName, $this->id);die("Session starting failed"); } - while(!$success && $sessionStartAttempts <= 1); $this->sessionHandler->open($sessionPath, $sessionName); $this->store = $this->readSessionData() ?: null; @@ -137,10 +134,10 @@ protected function readSessionData() { return unserialize($this->sessionHandler->read($this->id)); } - public function write() { - $this->sessionHandler->write( + public function write():bool { + return $this->sessionHandler->write( $this->id, serialize($this->store) ); } -} \ No newline at end of file +} diff --git a/src/SessionSetup.php b/src/SessionSetup.php index 1c36a9b..065dbd5 100644 --- a/src/SessionSetup.php +++ b/src/SessionSetup.php @@ -23,4 +23,4 @@ public static function attachHandler( return $sessionHandler; } -} \ No newline at end of file +} From d14e7a27e800f8e10f7616229c24ef235b5d7158 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 21 Feb 2022 12:55:28 +0000 Subject: [PATCH 076/110] feature: type safe getters closes #81 --- composer.json | 7 +- composer.lock | 216 +++++++++++------- src/FileHandler.php | 12 +- src/Handler.php | 16 +- src/Session.php | 40 ++-- src/SessionStore.php | 15 +- .../Helper/FunctionOverride/session_start.php | 4 +- test/phpunit/SessionStoreTest.php | 55 ++++- test/phpunit/SessionTest.php | 65 +++++- 9 files changed, 305 insertions(+), 125 deletions(-) diff --git a/composer.json b/composer.json index 889a99e..d157df0 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,12 @@ "license": "MIT", "require": { - "php": ">=7.2" + "php": ">=8.0", + "phpgt/typesafegetter": "^v1.2" }, "require-dev": { - "phpunit/phpunit": "9.*", - "phpstan/phpstan": "1.0.2" + "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^v1.4" }, "autoload": { diff --git a/composer.lock b/composer.lock index c8bac1b..1b8982d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,58 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2e4b232fb6d83b62e1c30a262a97fa21", - "packages": [], + "content-hash": "f32a6d1ec518670b8c827c0fcd60c47f", + "packages": [ + { + "name": "phpgt/typesafegetter", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/PhpGt/TypeSafeGetter.git", + "reference": "ffeb5d847b3a4b36081a5cd180587fc4d83c6e31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/ffeb5d847b3a4b36081a5cd180587fc4d83c6e31", + "reference": "ffeb5d847b3a4b36081a5cd180587fc4d83c6e31", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpstan/phpstan": ">=0.12.42" + }, + "type": "library", + "autoload": { + "psr-4": { + "Gt\\TypeSafeGetter\\": "./src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Bowler", + "email": "greg.bowler@g105b.com" + } + ], + "description": "An interface for objects that expose type-safe getter methods.", + "support": { + "issues": "https://github.com/PhpGt/TypeSafeGetter/issues", + "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.2.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/PhpGt", + "type": "github" + } + ], + "time": "2021-01-30T12:18:23+00:00" + } + ], "packages-dev": [ { "name": "doctrine/instantiator", @@ -93,9 +143,6 @@ "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" - }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", @@ -103,12 +150,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -136,16 +183,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.1", + "version": "v4.13.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { @@ -186,9 +233,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2021-11-03T20:52:16+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { "name": "phar-io/manifest", @@ -252,16 +299,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -297,9 +344,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -413,16 +460,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", "shasum": "" }, "require": { @@ -457,22 +504,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" }, - "time": "2021-10-02T14:08:47+00:00" + "time": "2022-01-04T19:58:01+00:00" }, { "name": "phpspec/prophecy", - "version": "1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { @@ -524,22 +571,22 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2021-09-10T09:02:12+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpstan/phpstan", - "version": "1.0.2", + "version": "1.4.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e9e2a501102ba0b126b2f63a7f0a3b151056fe91" + "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e9e2a501102ba0b126b2f63a7f0a3b151056fe91", - "reference": "e9e2a501102ba0b126b2f63a7f0a3b151056fe91", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8a7761f1c520e0dad6e04d862fdc697445457cfe", + "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe", "shasum": "" }, "require": { @@ -555,7 +602,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -570,7 +617,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.0.2" + "source": "https://github.com/phpstan/phpstan/tree/1.4.6" }, "funding": [ { @@ -590,20 +637,20 @@ "type": "tidelift" } ], - "time": "2021-11-03T16:09:51+00:00" + "time": "2022-02-06T12:56:13+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.8", + "version": "9.2.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e" + "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f", + "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f", "shasum": "" }, "require": { @@ -659,7 +706,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11" }, "funding": [ { @@ -667,20 +714,20 @@ "type": "github" } ], - "time": "2021-10-30T08:01:38+00:00" + "time": "2022-02-18T12:46:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { @@ -719,7 +766,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -727,7 +774,7 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", @@ -912,16 +959,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.10", + "version": "9.5.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" + "reference": "1883687169c017d6ae37c58883ca3994cfc34189" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189", + "reference": "1883687169c017d6ae37c58883ca3994cfc34189", "shasum": "" }, "require": { @@ -972,11 +1019,11 @@ } }, "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -999,11 +1046,11 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { @@ -1011,7 +1058,7 @@ "type": "github" } ], - "time": "2021-09-25T07:38:51+00:00" + "time": "2022-02-18T12:54:07+00:00" }, { "name": "sebastian/cli-parser", @@ -1442,16 +1489,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { @@ -1500,14 +1547,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -1515,20 +1562,20 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.3", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", "shasum": "" }, "require": { @@ -1571,7 +1618,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" }, "funding": [ { @@ -1579,7 +1626,7 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2022-02-14T08:28:10+00:00" }, { "name": "sebastian/lines-of-code", @@ -1979,21 +2026,24 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, @@ -2038,7 +2088,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" }, "funding": [ { @@ -2054,7 +2104,7 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "theseer/tokenizer", @@ -2171,8 +2221,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.2" + "php": ">=8.0" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.2.0" } diff --git a/src/FileHandler.php b/src/FileHandler.php index 838a404..4c3a087 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -13,7 +13,7 @@ class FileHandler extends Handler { * @param string $save_path The path where to store/retrieve the session. * @param string $name The session name. */ - public function open($save_path, $name):bool { + public function open(string $save_path, string $name):bool { $success = true; $save_path = str_replace( @@ -45,7 +45,7 @@ public function close():bool { * @link http://php.net/manual/en/sessionhandlerinterface.read.php * @param string $session_id */ - public function read($session_id):string { + public function read(string $session_id):string { if(isset($this->cache[$session_id])) { return $this->cache[$session_id]; } @@ -65,7 +65,7 @@ public function read($session_id):string { * @param string $session_id * @param string $session_data */ - public function write($session_id, $session_data):bool { + public function write(string $session_id, string $session_data):bool { if($session_data === self::EMPTY_PHP_ARRAY) { return true; } @@ -76,10 +76,10 @@ public function write($session_id, $session_data):bool { /** * @link http://php.net/manual/en/sessionhandlerinterface.destroy.php - * @param string $session_id + * @param string $id */ - public function destroy($session_id):bool { - $filePath = $this->getFilePath($session_id); + public function destroy($id):bool { + $filePath = $this->getFilePath($id); if(file_exists($filePath)) { return unlink($filePath); diff --git a/src/Handler.php b/src/Handler.php index ffbe95a..a3f7a11 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -12,33 +12,33 @@ abstract public function close():bool; /** * @link http://php.net/manual/en/sessionhandlerinterface.destroy.php - * @param string $session_id + * @param string $id */ - abstract public function destroy($session_id); + abstract public function destroy(string $id = ""):bool; /** * @link http://php.net/manual/en/sessionhandlerinterface.gc.php - * @param int $maxlifetime + * @param int $max_lifetime */ - abstract public function gc($maxlifetime):bool; + abstract public function gc(int $max_lifetime):int|false; /** * @link http://php.net/manual/en/sessionhandlerinterface.open.php * @param string $save_path The path where to store/retrieve the session. * @param string $name The session name. */ - abstract public function open($save_path, $name):bool; + abstract public function open(string $save_path, string $name):bool; /** * @link http://php.net/manual/en/sessionhandlerinterface.read.php * @param string $session_id */ - abstract public function read($session_id):string; + abstract public function read(string $session_id):string; /** * @link http://php.net/manual/en/sessionhandlerinterface.write.php * @param string $session_id * @param string $session_data */ - abstract public function write($session_id, $session_data):bool; -} \ No newline at end of file + abstract public function write(string $session_id, string $session_data):bool; +} diff --git a/src/Session.php b/src/Session.php index 1f9b3eb..8b850a6 100644 --- a/src/Session.php +++ b/src/Session.php @@ -1,9 +1,14 @@ $sessionPath, - "name" => $sessionName, - "serialize_handler" => "php_serialize", - "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, - "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, - "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, - "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, - "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, - ]); - - if(!$success) { -// TODO: Throw exception after #131 investigated. - var_dump($sessionPath, $sessionName, $this->id);die("Session starting failed"); + do { + $success = session_start([ + "save_path" => $sessionPath, + "name" => $sessionName, + "serialize_handler" => "php_serialize", + "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, + "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, + "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, + "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, + "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, + ]); + + if(!$success) { + session_destroy(); + } } + while(!$success); $this->sessionHandler->open($sessionPath, $sessionName); $this->store = $this->readSessionData() ?: null; @@ -84,10 +91,9 @@ public function getStore( ); } - public function get(string $key) { + public function get(string $key):mixed { return $this->store->get($key); } - public function set(string $key, $value):void { $this->store->set($key, $value); } diff --git a/src/SessionStore.php b/src/SessionStore.php index b40ce8b..a21c4d3 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -1,7 +1,14 @@ data = []; } - public function setData(string $key, $value):void { + public function setData(string $key, mixed $value):void { $this->data[$key] = $value; } @@ -117,7 +124,7 @@ public function createStore(string $namespace):SessionStore { return $this->getStore($namespace); } - public function get(string $key) { + public function get(string $key):mixed { $store = $this; $lastDotPosition = strrpos($key, "."); @@ -220,4 +227,4 @@ protected function getNamespaceFromKey(string $key):?string { return substr($key, 0, $lastDotPostition); } -} \ No newline at end of file +} diff --git a/test/phpunit/Helper/FunctionOverride/session_start.php b/test/phpunit/Helper/FunctionOverride/session_start.php index 0765a79..1ac8361 100644 --- a/test/phpunit/Helper/FunctionOverride/session_start.php +++ b/test/phpunit/Helper/FunctionOverride/session_start.php @@ -6,9 +6,9 @@ function session_start() { FunctionMocker::$mockCalls["session_start"] []= func_get_args(); - if(FunctionMocker::$callState["session_start__fail"]) { + if(isset(FunctionMocker::$callState["session_start__fail"])) { return false; } return true; -} \ No newline at end of file +} diff --git a/test/phpunit/SessionStoreTest.php b/test/phpunit/SessionStoreTest.php index 6ee3aa5..cb1d74e 100644 --- a/test/phpunit/SessionStoreTest.php +++ b/test/phpunit/SessionStoreTest.php @@ -1,6 +1,7 @@ createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericValue = rand(1000, 9999); + $sut->set("test.value", $numericValue); + + self::assertSame((string)$numericValue, $sut->getString("test.value")); + } + + public function testGetInt():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericStringValue = (string)rand(1000, 9999); + $sut->set("test.value", $numericStringValue); + + self::assertSame((int)$numericStringValue, $sut->getInt("test.value")); + } + + public function testGetFloat():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericStringValue = (string)(rand(1000, 9999) - 0.105); + $sut->set("test.value", $numericStringValue); + + self::assertSame((float)$numericStringValue, $sut->getFloat("test.value")); + } + + public function testGetBool():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericValue = rand(0, 1); + $sut->set("test.value", $numericValue); + + self::assertSame((bool)$numericValue, $sut->getBool("test.value")); + } + + public function testGetDateTime():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericValue = time(); + $sut->set("test.value", $numericValue); + + $dateTime = new DateTime(); + $dateTime->setTimestamp($numericValue); + self::assertEquals($dateTime, $sut->getDateTime("test.value")); + } +} diff --git a/test/phpunit/SessionTest.php b/test/phpunit/SessionTest.php index f9a19ed..eee23f4 100644 --- a/test/phpunit/SessionTest.php +++ b/test/phpunit/SessionTest.php @@ -1,6 +1,7 @@ getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericValue = rand(1000, 9999); + $sut->set("test.value", $numericValue); + + self::assertSame((string)$numericValue, $sut->getString("test.value")); + } + + public function testGetInt():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericStringValue = (string)rand(1000, 9999); + $sut->set("test.value", $numericStringValue); + + self::assertSame((int)$numericStringValue, $sut->getInt("test.value")); + } + + public function testGetFloat():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericStringValue = (string)(rand(1000, 9999) - 0.105); + $sut->set("test.value", $numericStringValue); + + self::assertSame((float)$numericStringValue, $sut->getFloat("test.value")); + } + + public function testGetBool():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericValue = rand(0, 1); + $sut->set("test.value", $numericValue); + + self::assertSame((bool)$numericValue, $sut->getBool("test.value")); + } + + public function testGetDateTime():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericValue = time(); + $sut->set("test.value", $numericValue); + + $dateTime = new DateTime(); + $dateTime->setTimestamp($numericValue); + self::assertEquals($dateTime, $sut->getDateTime("test.value")); + } +} From 6ab24bdde1db185a2429bf109cf088fdf3400a94 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 2 Mar 2022 14:19:22 +0000 Subject: [PATCH 077/110] 153 deprecation notices (#154) * feature: type safe getters closes #81 * fix: remove deprecation notices, improve type safety closes #153 * fix: extra type safety changes --- .github/workflows/ci.yml | 7 +- composer.json | 7 +- composer.lock | 216 +++++++++++------- src/FileHandler.php | 46 ++-- src/Handler.php | 51 ++--- src/Session.php | 64 +++--- src/SessionArrayWrapper.php | 10 +- src/SessionContainer.php | 6 +- src/SessionSetup.php | 2 +- src/SessionStore.php | 81 ++++--- .../Helper/FunctionOverride/session_start.php | 4 +- test/phpunit/SessionStoreTest.php | 55 ++++- test/phpunit/SessionTest.php | 65 +++++- 13 files changed, 378 insertions(+), 236 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb9d96f..7d75366 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: path: /tmp/composer-cache key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} - - uses: php-actions/composer@v5 + - uses: php-actions/composer@v6 - name: Archive build run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./ @@ -40,7 +40,7 @@ jobs: run: tar -xvf /tmp/github-actions/build.tar ./ - name: PHP Unit tests - uses: php-actions/phpunit@v2 + uses: php-actions/phpunit@v3 with: php_version: 8.0 php_extensions: xdebug @@ -61,6 +61,7 @@ jobs: run: tar -xvf /tmp/github-actions/build.tar ./ - name: PHP Static Analysis - uses: php-actions/phpstan@v2 + uses: php-actions/phpstan@v3 with: path: src/ + level: 7 diff --git a/composer.json b/composer.json index 889a99e..d157df0 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,12 @@ "license": "MIT", "require": { - "php": ">=7.2" + "php": ">=8.0", + "phpgt/typesafegetter": "^v1.2" }, "require-dev": { - "phpunit/phpunit": "9.*", - "phpstan/phpstan": "1.0.2" + "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^v1.4" }, "autoload": { diff --git a/composer.lock b/composer.lock index c8bac1b..1b8982d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,58 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2e4b232fb6d83b62e1c30a262a97fa21", - "packages": [], + "content-hash": "f32a6d1ec518670b8c827c0fcd60c47f", + "packages": [ + { + "name": "phpgt/typesafegetter", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/PhpGt/TypeSafeGetter.git", + "reference": "ffeb5d847b3a4b36081a5cd180587fc4d83c6e31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/ffeb5d847b3a4b36081a5cd180587fc4d83c6e31", + "reference": "ffeb5d847b3a4b36081a5cd180587fc4d83c6e31", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpstan/phpstan": ">=0.12.42" + }, + "type": "library", + "autoload": { + "psr-4": { + "Gt\\TypeSafeGetter\\": "./src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Bowler", + "email": "greg.bowler@g105b.com" + } + ], + "description": "An interface for objects that expose type-safe getter methods.", + "support": { + "issues": "https://github.com/PhpGt/TypeSafeGetter/issues", + "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.2.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/PhpGt", + "type": "github" + } + ], + "time": "2021-01-30T12:18:23+00:00" + } + ], "packages-dev": [ { "name": "doctrine/instantiator", @@ -93,9 +143,6 @@ "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" - }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", @@ -103,12 +150,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -136,16 +183,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.1", + "version": "v4.13.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { @@ -186,9 +233,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2021-11-03T20:52:16+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { "name": "phar-io/manifest", @@ -252,16 +299,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -297,9 +344,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -413,16 +460,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", "shasum": "" }, "require": { @@ -457,22 +504,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" }, - "time": "2021-10-02T14:08:47+00:00" + "time": "2022-01-04T19:58:01+00:00" }, { "name": "phpspec/prophecy", - "version": "1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { @@ -524,22 +571,22 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2021-09-10T09:02:12+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpstan/phpstan", - "version": "1.0.2", + "version": "1.4.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e9e2a501102ba0b126b2f63a7f0a3b151056fe91" + "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e9e2a501102ba0b126b2f63a7f0a3b151056fe91", - "reference": "e9e2a501102ba0b126b2f63a7f0a3b151056fe91", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8a7761f1c520e0dad6e04d862fdc697445457cfe", + "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe", "shasum": "" }, "require": { @@ -555,7 +602,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -570,7 +617,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.0.2" + "source": "https://github.com/phpstan/phpstan/tree/1.4.6" }, "funding": [ { @@ -590,20 +637,20 @@ "type": "tidelift" } ], - "time": "2021-11-03T16:09:51+00:00" + "time": "2022-02-06T12:56:13+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.8", + "version": "9.2.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e" + "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f", + "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f", "shasum": "" }, "require": { @@ -659,7 +706,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11" }, "funding": [ { @@ -667,20 +714,20 @@ "type": "github" } ], - "time": "2021-10-30T08:01:38+00:00" + "time": "2022-02-18T12:46:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { @@ -719,7 +766,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -727,7 +774,7 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", @@ -912,16 +959,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.10", + "version": "9.5.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" + "reference": "1883687169c017d6ae37c58883ca3994cfc34189" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189", + "reference": "1883687169c017d6ae37c58883ca3994cfc34189", "shasum": "" }, "require": { @@ -972,11 +1019,11 @@ } }, "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -999,11 +1046,11 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { @@ -1011,7 +1058,7 @@ "type": "github" } ], - "time": "2021-09-25T07:38:51+00:00" + "time": "2022-02-18T12:54:07+00:00" }, { "name": "sebastian/cli-parser", @@ -1442,16 +1489,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { @@ -1500,14 +1547,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -1515,20 +1562,20 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.3", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", "shasum": "" }, "require": { @@ -1571,7 +1618,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" }, "funding": [ { @@ -1579,7 +1626,7 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2022-02-14T08:28:10+00:00" }, { "name": "sebastian/lines-of-code", @@ -1979,21 +2026,24 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, @@ -2038,7 +2088,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" }, "funding": [ { @@ -2054,7 +2104,7 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "theseer/tokenizer", @@ -2171,8 +2221,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.2" + "php": ">=8.0" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.2.0" } diff --git a/src/FileHandler.php b/src/FileHandler.php index 838a404..0e602a7 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -5,15 +5,16 @@ class FileHandler extends Handler { const EMPTY_PHP_ARRAY = "a:0:{}"; - protected $path; - protected $cache; + protected string $path; + /** @var array> */ + protected array $cache; /** * @link http://php.net/manual/en/sessionhandlerinterface.open.php * @param string $save_path The path where to store/retrieve the session. * @param string $name The session name. */ - public function open($save_path, $name):bool { + public function open(string $save_path, string $name):bool { $success = true; $save_path = str_replace( @@ -41,11 +42,8 @@ public function close():bool { return true; } - /** - * @link http://php.net/manual/en/sessionhandlerinterface.read.php - * @param string $session_id - */ - public function read($session_id):string { + /** @link http://php.net/manual/en/sessionhandlerinterface.read.php */ + public function read(string $session_id):string { if(isset($this->cache[$session_id])) { return $this->cache[$session_id]; } @@ -56,16 +54,12 @@ public function read($session_id):string { return ""; } - $this->cache[$session_id] = file_get_contents($filePath); + $this->cache[$session_id] = file_get_contents($filePath) ?: ""; return $this->cache[$session_id]; } - /** - * @link http://php.net/manual/en/sessionhandlerinterface.write.php - * @param string $session_id - * @param string $session_data - */ - public function write($session_id, $session_data):bool { + /** @link http://php.net/manual/en/sessionhandlerinterface.write.php */ + public function write(string $session_id, string $session_data):bool { if($session_data === self::EMPTY_PHP_ARRAY) { return true; } @@ -74,12 +68,9 @@ public function write($session_id, $session_data):bool { return $bytesWritten !== false; } - /** - * @link http://php.net/manual/en/sessionhandlerinterface.destroy.php - * @param string $session_id - */ - public function destroy($session_id):bool { - $filePath = $this->getFilePath($session_id); + /** @link http://php.net/manual/en/sessionhandlerinterface.destroy.php */ + public function destroy(string $id = ""):bool { + $filePath = $this->getFilePath($id); if(file_exists($filePath)) { return unlink($filePath); @@ -88,13 +79,11 @@ public function destroy($session_id):bool { return true; } - /** - * @link http://php.net/manual/en/sessionhandlerinterface.gc.php - * @param int $maxlifetime - */ - public function gc($maxlifetime):bool { + /** @link http://php.net/manual/en/sessionhandlerinterface.gc.php */ + public function gc(int $maxLifeTime):int|false { $now = time(); - $expired = $now - $maxlifetime; + $expired = $now - $maxLifeTime; + $num = 0; foreach(new DirectoryIterator($this->path) as $fileInfo) { if(!$fileInfo->isFile()) { @@ -106,10 +95,11 @@ public function gc($maxlifetime):bool { if(!unlink($fileInfo->getPathname())) { return false; } + $num++; } } - return true; + return $num; } protected function getFilePath(string $id):string { diff --git a/src/Handler.php b/src/Handler.php index ffbe95a..39891af 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -5,40 +5,21 @@ abstract class Handler implements SessionHandlerInterface { - /** - * @link http://php.net/manual/en/sessionhandlerinterface.close.php - */ + /** @link http://php.net/manual/en/sessionhandlerinterface.close.php */ abstract public function close():bool; - /** - * @link http://php.net/manual/en/sessionhandlerinterface.destroy.php - * @param string $session_id - */ - abstract public function destroy($session_id); - - /** - * @link http://php.net/manual/en/sessionhandlerinterface.gc.php - * @param int $maxlifetime - */ - abstract public function gc($maxlifetime):bool; - - /** - * @link http://php.net/manual/en/sessionhandlerinterface.open.php - * @param string $save_path The path where to store/retrieve the session. - * @param string $name The session name. - */ - abstract public function open($save_path, $name):bool; - - /** - * @link http://php.net/manual/en/sessionhandlerinterface.read.php - * @param string $session_id - */ - abstract public function read($session_id):string; - - /** - * @link http://php.net/manual/en/sessionhandlerinterface.write.php - * @param string $session_id - * @param string $session_data - */ - abstract public function write($session_id, $session_data):bool; -} \ No newline at end of file + /** @link http://php.net/manual/en/sessionhandlerinterface.destroy.php */ + abstract public function destroy(string $id = ""):bool; + + /** @link http://php.net/manual/en/sessionhandlerinterface.gc.php */ + abstract public function gc(int $maxLifeTime):int|false; + + /** @link http://php.net/manual/en/sessionhandlerinterface.open.php */ + abstract public function open(string $save_path, string $name):bool; + + /** @link http://php.net/manual/en/sessionhandlerinterface.read.php */ + abstract public function read(string $session_id):string; + + /** @link http://php.net/manual/en/sessionhandlerinterface.write.php */ + abstract public function write(string $session_id, string $session_data):bool; +} diff --git a/src/Session.php b/src/Session.php index 1f9b3eb..3abd1ea 100644 --- a/src/Session.php +++ b/src/Session.php @@ -1,9 +1,13 @@ $config */ public function __construct( SessionHandlerInterface $sessionHandler, - iterable $config = [], + array $config = [], string $id = null ) { $this->sessionHandler = $sessionHandler; @@ -37,24 +39,26 @@ public function __construct( ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; - $success = session_start([ - "save_path" => $sessionPath, - "name" => $sessionName, - "serialize_handler" => "php_serialize", - "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, - "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, - "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, - "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, - "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, - ]); - - if(!$success) { -// TODO: Throw exception after #131 investigated. - var_dump($sessionPath, $sessionName, $this->id);die("Session starting failed"); + do { + $success = session_start([ + "save_path" => $sessionPath, + "name" => $sessionName, + "serialize_handler" => "php_serialize", + "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, + "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, + "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, + "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, + "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, + ]); + + if(!$success) { + session_destroy(); + } } + while(!$success); $this->sessionHandler->open($sessionPath, $sessionName); - $this->store = $this->readSessionData() ?: null; + $this->store = $this->readSessionData(); if(is_null($this->store)) { $this->store = new SessionStore(__NAMESPACE__, $this); } @@ -64,7 +68,7 @@ public function kill():void { $this->sessionHandler->destroy($this->getId()); $params = session_get_cookie_params(); setcookie( - session_name(), + session_name() ?: "", "", -1, $params["path"], @@ -84,11 +88,11 @@ public function getStore( ); } - public function get(string $key) { + public function get(string $key):mixed { return $this->store->get($key); } - public function set(string $key, $value):void { + public function set(string $key, mixed $value):void { $this->store->set($key, $value); } @@ -106,7 +110,7 @@ public function getId():string { session_id($this->createNewId()); } - return session_id(); + return session_id() ?: ""; } protected function getAbsolutePath(string $path):string { @@ -127,11 +131,11 @@ protected function getAbsolutePath(string $path):string { } protected function createNewId():string { - return session_create_id(); + return session_create_id() ?: ""; } - protected function readSessionData() { - return unserialize($this->sessionHandler->read($this->id)); + protected function readSessionData():?SessionStore { + return unserialize($this->sessionHandler->read($this->id)) ?: null; } public function write():bool { diff --git a/src/SessionArrayWrapper.php b/src/SessionArrayWrapper.php index 7d808fc..a484668 100644 --- a/src/SessionArrayWrapper.php +++ b/src/SessionArrayWrapper.php @@ -2,17 +2,19 @@ namespace Gt\Session; class SessionArrayWrapper implements SessionContainer { - private $sourceArray; + /** @var array */ + private array $sourceArray; + /** @param array &$sourceArray */ public function __construct(array &$sourceArray) { $this->sourceArray = &$sourceArray; } - public function get(string $key) { + public function get(string $key):mixed { return $this->sourceArray[$key] ?? null; } - public function set(string $key, $value) { + public function set(string $key, mixed $value):void { $this->sourceArray[$key] = $value; } @@ -27,4 +29,4 @@ public function remove(string $key):void { unset($this->sourceArray[$key]); } -} \ No newline at end of file +} diff --git a/src/SessionContainer.php b/src/SessionContainer.php index 6b4e385..aab32f8 100644 --- a/src/SessionContainer.php +++ b/src/SessionContainer.php @@ -2,8 +2,8 @@ namespace Gt\Session; interface SessionContainer { - public function get(string $key); - public function set(string $key, $value); + public function get(string $key):mixed; + public function set(string $key, mixed $value):void; public function contains(string $key):bool; public function remove(string $key):void; -} \ No newline at end of file +} diff --git a/src/SessionSetup.php b/src/SessionSetup.php index 065dbd5..4228390 100644 --- a/src/SessionSetup.php +++ b/src/SessionSetup.php @@ -1,4 +1,4 @@ - */ + protected array $stores; + /** @var array */ + protected array $data; + protected ?SessionStore $parentStore; public function __construct( string $name, @@ -25,11 +27,11 @@ public function __construct( $this->data = []; } - public function setData(string $key, $value):void { + public function setData(string $key, mixed $value):void { $this->data[$key] = $value; } - public function getData(string $key) { + public function getData(string $key):mixed { return $this->data[$key] ?? null; } @@ -69,12 +71,10 @@ public function getStore( $namespaceParts = explode(".", $namespace); $topLevelStoreName = array_shift($namespaceParts); - /** @var SessionStore $store */ $store = $this->stores[$topLevelStoreName] ?? null; if(is_null($store)) { if($createIfNotExists) { - $store = $this->createStore($namespace); - return $store; + return $this->createStore($namespace); } else { return null; @@ -117,27 +117,13 @@ public function createStore(string $namespace):SessionStore { return $this->getStore($namespace); } - public function get(string $key) { - $store = $this; - $lastDotPosition = strrpos($key, "."); - - if ($lastDotPosition !== false) { - $namespace = $this->getNamespaceFromKey($key); - $store = $this->getStore($namespace); - } - - if (is_null($store)) { - return null; - } - - if ($lastDotPosition !== false) { - $key = substr($key, $lastDotPosition + 1); - } - - return $store->getData($key); + public function get(string $key):mixed { + $store = $this->getStoreFromKey($key); + $key = $this->normaliseKey($key); + return $store?->getData($key); } - public function set(string $key, $value):void { + public function set(string $key, mixed $value):void { $store = $this; $lastDotPosition = strrpos($key, "."); @@ -159,6 +145,12 @@ public function set(string $key, $value):void { } public function contains(string $key):bool { + $store = $this->getStoreFromKey($key); + $key = $this->normaliseKey($key); + return $store?->containsData($key) ?? false; + } + + private function getStoreFromKey(string $key):?SessionStore { $store = $this; $lastDotPosition = strrpos($key, "."); @@ -168,14 +160,19 @@ public function contains(string $key):bool { } if (is_null($store)) { - return false; + return null; } - if ($lastDotPosition !== false) { + return $store; + } + + private function normaliseKey(string $key):string { + $lastDotPosition = strrpos($key, "."); + if($lastDotPosition !== false) { $key = substr($key, $lastDotPosition + 1); } - return $store->containsData($key); + return $key; } public function remove(string $key = null):void { @@ -213,11 +210,11 @@ protected function getSession():Session { } protected function getNamespaceFromKey(string $key):?string { - $lastDotPostition = strrpos($key, "."); - if ($lastDotPostition === false) { + $lastDotPosition = strrpos($key, "."); + if ($lastDotPosition === false) { return null; } - return substr($key, 0, $lastDotPostition); + return substr($key, 0, $lastDotPosition); } -} \ No newline at end of file +} diff --git a/test/phpunit/Helper/FunctionOverride/session_start.php b/test/phpunit/Helper/FunctionOverride/session_start.php index 0765a79..1ac8361 100644 --- a/test/phpunit/Helper/FunctionOverride/session_start.php +++ b/test/phpunit/Helper/FunctionOverride/session_start.php @@ -6,9 +6,9 @@ function session_start() { FunctionMocker::$mockCalls["session_start"] []= func_get_args(); - if(FunctionMocker::$callState["session_start__fail"]) { + if(isset(FunctionMocker::$callState["session_start__fail"])) { return false; } return true; -} \ No newline at end of file +} diff --git a/test/phpunit/SessionStoreTest.php b/test/phpunit/SessionStoreTest.php index 6ee3aa5..cb1d74e 100644 --- a/test/phpunit/SessionStoreTest.php +++ b/test/phpunit/SessionStoreTest.php @@ -1,6 +1,7 @@ createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericValue = rand(1000, 9999); + $sut->set("test.value", $numericValue); + + self::assertSame((string)$numericValue, $sut->getString("test.value")); + } + + public function testGetInt():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericStringValue = (string)rand(1000, 9999); + $sut->set("test.value", $numericStringValue); + + self::assertSame((int)$numericStringValue, $sut->getInt("test.value")); + } + + public function testGetFloat():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericStringValue = (string)(rand(1000, 9999) - 0.105); + $sut->set("test.value", $numericStringValue); + + self::assertSame((float)$numericStringValue, $sut->getFloat("test.value")); + } + + public function testGetBool():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericValue = rand(0, 1); + $sut->set("test.value", $numericValue); + + self::assertSame((bool)$numericValue, $sut->getBool("test.value")); + } + + public function testGetDateTime():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $numericValue = time(); + $sut->set("test.value", $numericValue); + + $dateTime = new DateTime(); + $dateTime->setTimestamp($numericValue); + self::assertEquals($dateTime, $sut->getDateTime("test.value")); + } +} diff --git a/test/phpunit/SessionTest.php b/test/phpunit/SessionTest.php index f9a19ed..eee23f4 100644 --- a/test/phpunit/SessionTest.php +++ b/test/phpunit/SessionTest.php @@ -1,6 +1,7 @@ getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericValue = rand(1000, 9999); + $sut->set("test.value", $numericValue); + + self::assertSame((string)$numericValue, $sut->getString("test.value")); + } + + public function testGetInt():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericStringValue = (string)rand(1000, 9999); + $sut->set("test.value", $numericStringValue); + + self::assertSame((int)$numericStringValue, $sut->getInt("test.value")); + } + + public function testGetFloat():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericStringValue = (string)(rand(1000, 9999) - 0.105); + $sut->set("test.value", $numericStringValue); + + self::assertSame((float)$numericStringValue, $sut->getFloat("test.value")); + } + + public function testGetBool():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericValue = rand(0, 1); + $sut->set("test.value", $numericValue); + + self::assertSame((bool)$numericValue, $sut->getBool("test.value")); + } + + public function testGetDateTime():void { + /** @var Handler|MockObject $handler */ + $handler = $this->getMockBuilder(Handler::class) + ->getMock(); + $sut = new Session($handler); + + $numericValue = time(); + $sut->set("test.value", $numericValue); + + $dateTime = new DateTime(); + $dateTime->setTimestamp($numericValue); + self::assertEquals($dateTime, $sut->getDateTime("test.value")); + } +} From 9ae14755251f742ee6424691870a218ff235f79d Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 8 Mar 2022 15:35:59 +0000 Subject: [PATCH 078/110] loosen type (can be array access) --- composer.lock | 95 ++++++++++++++++++++++++++----------------------- src/Session.php | 4 +-- 2 files changed, 52 insertions(+), 47 deletions(-) diff --git a/composer.lock b/composer.lock index 1b8982d..77a3edd 100644 --- a/composer.lock +++ b/composer.lock @@ -59,29 +59,30 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -108,7 +109,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -124,29 +125,33 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { @@ -171,7 +176,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -179,7 +184,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "nikic/php-parser", @@ -577,16 +582,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.4.6", + "version": "1.4.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe" + "reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8a7761f1c520e0dad6e04d862fdc697445457cfe", - "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2a6d6704b17c4db6190cc3104056c0aad740cb15", + "reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15", "shasum": "" }, "require": { @@ -617,7 +622,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.4.6" + "source": "https://github.com/phpstan/phpstan/tree/1.4.8" }, "funding": [ { @@ -637,20 +642,20 @@ "type": "tidelift" } ], - "time": "2022-02-06T12:56:13+00:00" + "time": "2022-03-04T13:03:56+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.11", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { @@ -706,7 +711,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -714,7 +719,7 @@ "type": "github" } ], - "time": "2022-02-18T12:46:09+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -959,16 +964,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.14", + "version": "9.5.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189" + "reference": "1b5856028273bfd855e60a887278857d872ec67a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b5856028273bfd855e60a887278857d872ec67a", + "reference": "1b5856028273bfd855e60a887278857d872ec67a", "shasum": "" }, "require": { @@ -984,7 +989,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1046,7 +1051,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.18" }, "funding": [ { @@ -1058,7 +1063,7 @@ "type": "github" } ], - "time": "2022-02-18T12:54:07+00:00" + "time": "2022-03-08T06:52:28+00:00" }, { "name": "sebastian/cli-parser", @@ -2026,7 +2031,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -2058,12 +2063,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2088,7 +2093,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { diff --git a/src/Session.php b/src/Session.php index 3abd1ea..7c68915 100644 --- a/src/Session.php +++ b/src/Session.php @@ -20,10 +20,10 @@ class Session implements SessionContainer, TypeSafeGetter { protected SessionHandlerInterface $sessionHandler; protected ?SessionStore $store; - /** @param array $config */ + /** @param \ArrayAccess|array $config */ public function __construct( SessionHandlerInterface $sessionHandler, - array $config = [], + array|\ArrayAccess $config = [], string $id = null ) { $this->sessionHandler = $sessionHandler; From 4ec55d2e38117b095d525b3e8507bdb5efac5c8a Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 8 Mar 2022 15:40:23 +0000 Subject: [PATCH 079/110] Array access (#158) * feature: type safe getters closes #81 * loosen type (can be array access) --- composer.lock | 95 ++++++++++++++++++++++++++----------------------- src/Session.php | 4 +-- 2 files changed, 52 insertions(+), 47 deletions(-) diff --git a/composer.lock b/composer.lock index 1b8982d..77a3edd 100644 --- a/composer.lock +++ b/composer.lock @@ -59,29 +59,30 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -108,7 +109,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -124,29 +125,33 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { @@ -171,7 +176,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -179,7 +184,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "nikic/php-parser", @@ -577,16 +582,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.4.6", + "version": "1.4.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe" + "reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8a7761f1c520e0dad6e04d862fdc697445457cfe", - "reference": "8a7761f1c520e0dad6e04d862fdc697445457cfe", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2a6d6704b17c4db6190cc3104056c0aad740cb15", + "reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15", "shasum": "" }, "require": { @@ -617,7 +622,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.4.6" + "source": "https://github.com/phpstan/phpstan/tree/1.4.8" }, "funding": [ { @@ -637,20 +642,20 @@ "type": "tidelift" } ], - "time": "2022-02-06T12:56:13+00:00" + "time": "2022-03-04T13:03:56+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.11", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { @@ -706,7 +711,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -714,7 +719,7 @@ "type": "github" } ], - "time": "2022-02-18T12:46:09+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -959,16 +964,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.14", + "version": "9.5.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189" + "reference": "1b5856028273bfd855e60a887278857d872ec67a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b5856028273bfd855e60a887278857d872ec67a", + "reference": "1b5856028273bfd855e60a887278857d872ec67a", "shasum": "" }, "require": { @@ -984,7 +989,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1046,7 +1051,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.18" }, "funding": [ { @@ -1058,7 +1063,7 @@ "type": "github" } ], - "time": "2022-02-18T12:54:07+00:00" + "time": "2022-03-08T06:52:28+00:00" }, { "name": "sebastian/cli-parser", @@ -2026,7 +2031,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -2058,12 +2063,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2088,7 +2093,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { diff --git a/src/Session.php b/src/Session.php index 3abd1ea..7c68915 100644 --- a/src/Session.php +++ b/src/Session.php @@ -20,10 +20,10 @@ class Session implements SessionContainer, TypeSafeGetter { protected SessionHandlerInterface $sessionHandler; protected ?SessionStore $store; - /** @param array $config */ + /** @param \ArrayAccess|array $config */ public function __construct( SessionHandlerInterface $sessionHandler, - array $config = [], + array|\ArrayAccess $config = [], string $id = null ) { $this->sessionHandler = $sessionHandler; From 09b19e68826cbf11caf587a6c3fe48eccbe77c50 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 9 Jun 2022 14:39:40 +0100 Subject: [PATCH 080/110] feature: secure session by default (#187) closes PhpGt/WebEngine#493 --- src/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Session.php b/src/Session.php index 7c68915..5462810 100644 --- a/src/Session.php +++ b/src/Session.php @@ -12,7 +12,7 @@ class Session implements SessionContainer, TypeSafeGetter { const DEFAULT_SESSION_LIFETIME = 0; const DEFAULT_SESSION_PATH = "/tmp"; const DEFAULT_SESSION_DOMAIN = ""; - const DEFAULT_SESSION_SECURE = false; + const DEFAULT_SESSION_SECURE = true; const DEFAULT_SESSION_HTTPONLY = true; const DEFAULT_COOKIE_PATH = "/"; From ffe1e074d8f7fe75b04ff19ecc5fa4734e2e9553 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 1 Jul 2022 13:01:38 +0100 Subject: [PATCH 081/110] build: hard dependencies (#194) --- composer.json | 4 +- composer.lock | 186 +++++++++++++------------------------------------- 2 files changed, 51 insertions(+), 139 deletions(-) diff --git a/composer.json b/composer.json index d157df0..3d5921d 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,8 @@ "phpgt/typesafegetter": "^v1.2" }, "require-dev": { - "phpunit/phpunit": "^9.5", - "phpstan/phpstan": "^v1.4" + "phpstan/phpstan": "v1.8.0", + "phpunit/phpunit": "v9.5.21" }, "autoload": { diff --git a/composer.lock b/composer.lock index 77a3edd..01388e4 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": "f32a6d1ec518670b8c827c0fcd60c47f", + "content-hash": "300527109429cafbd82f97b122424c4a", "packages": [ { "name": "phpgt/typesafegetter", @@ -188,16 +188,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -238,9 +238,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "phar-io/manifest", @@ -465,16 +465,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -509,9 +509,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", @@ -582,20 +582,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.4.8", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15" + "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2a6d6704b17c4db6190cc3104056c0aad740cb15", - "reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b7648d4ee9321665acaf112e49da9fd93df8fbd5", + "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.2|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -605,11 +605,6 @@ "phpstan.phar" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -622,7 +617,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.4.8" + "source": "https://github.com/phpstan/phpstan/tree/1.8.0" }, "funding": [ { @@ -642,7 +637,7 @@ "type": "tidelift" } ], - "time": "2022-03-04T13:03:56+00:00" + "time": "2022-06-29T08:53:31+00:00" }, { "name": "phpunit/php-code-coverage", @@ -964,16 +959,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.18", + "version": "9.5.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1b5856028273bfd855e60a887278857d872ec67a" + "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b5856028273bfd855e60a887278857d872ec67a", - "reference": "1b5856028273bfd855e60a887278857d872ec67a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", + "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", "shasum": "" }, "require": { @@ -1003,11 +998,10 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", + "sebastian/type": "^3.0", "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*", "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { @@ -1051,7 +1045,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.18" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" }, "funding": [ { @@ -1063,7 +1057,7 @@ "type": "github" } ], - "time": "2022-03-08T06:52:28+00:00" + "time": "2022-06-19T12:14:25+00:00" }, { "name": "sebastian/cli-parser", @@ -1431,16 +1425,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { @@ -1482,7 +1476,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -1490,7 +1484,7 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", @@ -1922,28 +1916,28 @@ }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1966,7 +1960,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" }, "funding": [ { @@ -1974,7 +1968,7 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2022-03-15T09:54:48+00:00" }, { "name": "sebastian/version", @@ -2029,88 +2023,6 @@ ], "time": "2020-09-28T06:39:44+00:00" }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.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-10-20T20:35:02+00:00" - }, { "name": "theseer/tokenizer", "version": "1.2.1", @@ -2163,21 +2075,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -2215,9 +2127,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], From 29b3f77e42e9490e452ba1fa40cf0ebf94d152e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Jul 2022 09:48:03 +0100 Subject: [PATCH 082/110] Bump phpgt/typesafegetter from 1.2.2 to 1.2.3 (#195) Bumps [phpgt/typesafegetter](https://github.com/PhpGt/TypeSafeGetter) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/PhpGt/TypeSafeGetter/releases) - [Commits](https://github.com/PhpGt/TypeSafeGetter/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: phpgt/typesafegetter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 01388e4..ac17e58 100644 --- a/composer.lock +++ b/composer.lock @@ -8,23 +8,24 @@ "packages": [ { "name": "phpgt/typesafegetter", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/PhpGt/TypeSafeGetter.git", - "reference": "ffeb5d847b3a4b36081a5cd180587fc4d83c6e31" + "reference": "23d0093abb1b928917006e52065c14eecaeaaaa4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/ffeb5d847b3a4b36081a5cd180587fc4d83c6e31", - "reference": "ffeb5d847b3a4b36081a5cd180587fc4d83c6e31", + "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/23d0093abb1b928917006e52065c14eecaeaaaa4", + "reference": "23d0093abb1b928917006e52065c14eecaeaaaa4", "shasum": "" }, "require": { "php": ">=8.0" }, "require-dev": { - "phpstan/phpstan": ">=0.12.42" + "phpstan/phpstan": "v1.8.0", + "phpunit/phpunit": "v9.5.21" }, "type": "library", "autoload": { @@ -45,7 +46,7 @@ "description": "An interface for objects that expose type-safe getter methods.", "support": { "issues": "https://github.com/PhpGt/TypeSafeGetter/issues", - "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.2.2" + "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.2.3" }, "funding": [ { @@ -53,7 +54,7 @@ "type": "github" } ], - "time": "2021-01-30T12:18:23+00:00" + "time": "2022-07-07T09:55:32+00:00" } ], "packages-dev": [ @@ -2141,5 +2142,5 @@ "php": ">=8.0" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } From 798405508c2ae42d0fd69a48e1c8212b9b2101be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Jul 2022 09:43:05 +0100 Subject: [PATCH 083/110] Bump phpgt/typesafegetter from 1.2.3 to 1.2.4 (#196) Bumps [phpgt/typesafegetter](https://github.com/PhpGt/TypeSafeGetter) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/PhpGt/TypeSafeGetter/releases) - [Commits](https://github.com/PhpGt/TypeSafeGetter/compare/v1.2.3...v1.2.4) --- updated-dependencies: - dependency-name: phpgt/typesafegetter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index ac17e58..02d4b01 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "phpgt/typesafegetter", - "version": "v1.2.3", + "version": "v1.2.4", "source": { "type": "git", "url": "https://github.com/PhpGt/TypeSafeGetter.git", - "reference": "23d0093abb1b928917006e52065c14eecaeaaaa4" + "reference": "ebffd758e69b8a0eebcad30f3daf408915b9ddf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/23d0093abb1b928917006e52065c14eecaeaaaa4", - "reference": "23d0093abb1b928917006e52065c14eecaeaaaa4", + "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/ebffd758e69b8a0eebcad30f3daf408915b9ddf3", + "reference": "ebffd758e69b8a0eebcad30f3daf408915b9ddf3", "shasum": "" }, "require": { @@ -46,7 +46,7 @@ "description": "An interface for objects that expose type-safe getter methods.", "support": { "issues": "https://github.com/PhpGt/TypeSafeGetter/issues", - "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.2.3" + "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.2.4" }, "funding": [ { @@ -54,7 +54,7 @@ "type": "github" } ], - "time": "2022-07-07T09:55:32+00:00" + "time": "2022-07-08T17:17:42+00:00" } ], "packages-dev": [ From 17d024487187ced61d0d71c19d620ccc7f0a3c48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 11:01:17 +0100 Subject: [PATCH 084/110] Bump phpstan/phpstan from 1.8.0 to 1.8.1 (#197) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/1.8.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/1.8.0...1.8.1) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 3d5921d..b5425fa 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "phpgt/typesafegetter": "^v1.2" }, "require-dev": { - "phpstan/phpstan": "v1.8.0", + "phpstan/phpstan": "v1.8.1", "phpunit/phpunit": "v9.5.21" }, diff --git a/composer.lock b/composer.lock index 02d4b01..8a0fb87 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": "300527109429cafbd82f97b122424c4a", + "content-hash": "116f53e66aad1269ade3fafe6f5ae03a", "packages": [ { "name": "phpgt/typesafegetter", @@ -583,16 +583,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5" + "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b7648d4ee9321665acaf112e49da9fd93df8fbd5", - "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8dbba631fa32f4b289404469c2afd6122fd61d67", + "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67", "shasum": "" }, "require": { @@ -618,7 +618,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.0" + "source": "https://github.com/phpstan/phpstan/tree/1.8.1" }, "funding": [ { @@ -638,7 +638,7 @@ "type": "tidelift" } ], - "time": "2022-06-29T08:53:31+00:00" + "time": "2022-07-12T16:08:06+00:00" }, { "name": "phpunit/php-code-coverage", From bfe077680e837ab53e9b498aa9c680d83dab5e3f Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 14 Sep 2022 11:37:14 +0100 Subject: [PATCH 085/110] 203 dependabot (#206) * feature: type safe getters closes #81 * loosen type (can be array access) * maintenance: dependabot closes #203 --- .github/dependabot.yml | 19 +- composer.json | 4 +- composer.lock | 391 ++++++----------------------------------- 3 files changed, 63 insertions(+), 351 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b2aa2dd..307abf3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,12 @@ version: 2 updates: -- package-ecosystem: composer - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 - ignore: - - dependency-name: phpstan/phpstan - versions: - - 0.12.70 + - package-ecosystem: composer + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + ignore: + - dependency-name: phpunit/phpunit + update-types: ["version-update:semver-patch"] + - dependency-name: phpstan/phpstan + update-types: ["version-update:semver-patch"] diff --git a/composer.json b/composer.json index b5425fa..3b02ef2 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,8 @@ "phpgt/typesafegetter": "^v1.2" }, "require-dev": { - "phpstan/phpstan": "v1.8.1", - "phpunit/phpunit": "v9.5.21" + "phpstan/phpstan": "^v1.8", + "phpunit/phpunit": "^v9.5" }, "autoload": { diff --git a/composer.lock b/composer.lock index 8a0fb87..66652e9 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": "116f53e66aad1269ade3fafe6f5ae03a", + "content-hash": "a25ea95d124b2a3fa96037b62a43f07a", "packages": [ { "name": "phpgt/typesafegetter", @@ -189,16 +189,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -239,9 +239,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "phar-io/manifest", @@ -354,245 +354,18 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, { "name": "phpstan/phpstan", - "version": "1.8.1", + "version": "1.8.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67" + "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8dbba631fa32f4b289404469c2afd6122fd61d67", - "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f6598a5ff12ca4499a836815e08b4d77a2ddeb20", + "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20", "shasum": "" }, "require": { @@ -616,9 +389,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.1" + "source": "https://github.com/phpstan/phpstan/tree/1.8.5" }, "funding": [ { @@ -629,36 +406,32 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2022-07-12T16:08:06+00:00" + "time": "2022-09-07T16:05:32+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", + "version": "9.2.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -707,7 +480,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" }, "funding": [ { @@ -715,7 +488,7 @@ "type": "github" } ], - "time": "2022-03-07T09:28:20+00:00" + "time": "2022-08-30T12:24:04+00:00" }, { "name": "phpunit/php-file-iterator", @@ -960,16 +733,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.21", + "version": "9.5.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", "shasum": "" }, "require": { @@ -984,7 +757,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -999,12 +771,9 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.1", "sebastian/version": "^3.0.2" }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -1046,7 +815,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" }, "funding": [ { @@ -1058,7 +827,7 @@ "type": "github" } ], - "time": "2022-06-19T12:14:25+00:00" + "time": "2022-08-30T07:42:16+00:00" }, { "name": "sebastian/cli-parser", @@ -1229,16 +998,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "7fa545db548c90bdebeb9da0583001a252be5578" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7fa545db548c90bdebeb9da0583001a252be5578", + "reference": "7fa545db548c90bdebeb9da0583001a252be5578", "shasum": "" }, "require": { @@ -1291,7 +1060,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.7" }, "funding": [ { @@ -1299,7 +1068,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T06:33:43+00:00" }, { "name": "sebastian/complexity", @@ -1489,16 +1258,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": { @@ -1554,7 +1323,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": [ { @@ -1562,7 +1331,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -1917,16 +1686,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -1938,7 +1707,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1961,7 +1730,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -1969,7 +1738,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -2073,64 +1842,6 @@ } ], "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], @@ -2142,5 +1853,5 @@ "php": ">=8.0" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } From d720a1399a6de5e431f5b3c25f490965f1d497ce Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 18 Jan 2023 15:55:46 +0000 Subject: [PATCH 086/110] Enforce defaults to improve security baseline (#216) * feature: type safe getters closes #81 * loosen type (can be array access) * feature: enforce defaults for new sessions closes #200 * feature: remove unused hash function * feature: enhance default id length * tweak: suppress ini errors --- src/Session.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Session.php b/src/Session.php index 5462810..f055e1a 100644 --- a/src/Session.php +++ b/src/Session.php @@ -4,7 +4,6 @@ use Gt\TypeSafeGetter\NullableTypeSafeGetter; use Gt\TypeSafeGetter\TypeSafeGetter; use SessionHandlerInterface; - class Session implements SessionContainer, TypeSafeGetter { use NullableTypeSafeGetter; @@ -15,6 +14,10 @@ class Session implements SessionContainer, TypeSafeGetter { const DEFAULT_SESSION_SECURE = true; const DEFAULT_SESSION_HTTPONLY = true; const DEFAULT_COOKIE_PATH = "/"; + const DEFAULT_COOKIE_SAMESITE = "Strict"; + const DEFAULT_STRICT_MODE = true; + const DEFAULT_SESSION_ID_LENGTH = 64; + const DEFAULT_SESSION_ID_BITS_PER_CHARACTER = 5; protected string $id; protected SessionHandlerInterface $sessionHandler; @@ -28,6 +31,9 @@ public function __construct( ) { $this->sessionHandler = $sessionHandler; + @ini_set("session.sid_length", $config["sid_length"] ?? self::DEFAULT_SESSION_ID_LENGTH); + @ini_set("session.sid_bits_per_character", $config["sid_bits_per_character"] ?? (string)self::DEFAULT_SESSION_ID_BITS_PER_CHARACTER); + if(is_null($id)) { $id = $this->getId(); } @@ -49,6 +55,8 @@ public function __construct( "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, + "cookie_samesite" => $config["cookie_samesite"] ?? self::DEFAULT_COOKIE_SAMESITE, + "use_strict_mode" => $config["use_strict_mode"] ?? self::DEFAULT_STRICT_MODE, ]); if(!$success) { From 954cc13e0973089ab73d7739f43e3128c2be01b3 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 2 Feb 2023 14:02:44 +0000 Subject: [PATCH 087/110] Allow only one failed start_session attempt (#73) * Correct typehint, closes #45 * Implement session destruction when failure to start Closes #66 * Simplify destroying failed session * Allow only 1 failed start of session * fix: off by one error - caught by phpstan --- src/Session.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Session.php b/src/Session.php index f055e1a..482c954 100644 --- a/src/Session.php +++ b/src/Session.php @@ -45,6 +45,9 @@ public function __construct( ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; + // Allow a single failure to start session. If it fails to start, + // destroy the existing session. + $startAttempts = 0; do { $success = session_start([ "save_path" => $sessionPath, @@ -60,10 +63,11 @@ public function __construct( ]); if(!$success) { - session_destroy(); + @session_destroy(); } + $startAttempts++; } - while(!$success); + while(!$success && $startAttempts <= 1); $this->sessionHandler->open($sessionPath, $sessionName); $this->store = $this->readSessionData(); From e1e4df33c012385e6a76ebb4eeb732a5f79a18d5 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 28 Apr 2023 17:12:08 +0100 Subject: [PATCH 088/110] Upgrade CI, improve QA tools (#245) * feature: type safe getters closes #81 * loosen type (can be array access) * test: upgrade to phpunit 10 * ci: upgrade ci, pass all qa tests * docs: remove scrutinizer from badge --- .github/workflows/ci.yml | 129 +- .scrutinizer.yml | 32 - README.md | 4 +- composer.json | 8 +- composer.lock | 1594 +++++++++++++---- phpcs.xml | 61 + phpmd.xml | 41 + phpunit.xml | 28 + src/FileHandler.php | 30 +- src/Handler.php | 6 +- src/Session.php | 93 +- src/SessionSetup.php | 4 +- src/SessionStore.php | 6 +- src/SessionStoreFactory.php | 7 +- .../Helper/DataProvider/ConfigProvider.php | 5 +- .../DataProvider/KeyValuePairProvider.php | 6 +- test/phpunit/SessionStoreTest.php | 14 +- test/phpunit/SessionTest.php | 358 ++-- test/phpunit/phpunit.xml | 18 - 19 files changed, 1768 insertions(+), 676 deletions(-) delete mode 100644 .scrutinizer.yml create mode 100644 phpcs.xml create mode 100644 phpmd.xml create mode 100644 phpunit.xml delete mode 100644 test/phpunit/phpunit.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d75366..280e4b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,37 +1,49 @@ name: CI -on: [push, pull_request] +on: [push] jobs: composer: runs-on: ubuntu-latest + strategy: + matrix: + php: [ 8.0, 8.1, 8.2 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Cache Composer dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/composer-cache key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} - - uses: php-actions/composer@v6 + - name: Composer install + uses: php-actions/composer@v6 + with: + php_version: ${{ matrix.php }} - name: Archive build run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./ - name: Upload build archive for test runners - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build-artifact path: /tmp/github-actions phpunit: runs-on: ubuntu-latest - needs: [composer] + needs: [ composer ] + strategy: + matrix: + php: [ 8.0, 8.1, 8.2 ] + + outputs: + coverage: ${{ steps.store-coverage.outputs.coverage_text }} steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build-artifact path: /tmp/github-actions @@ -41,18 +53,47 @@ jobs: - name: PHP Unit tests uses: php-actions/phpunit@v3 + env: + XDEBUG_MODE: cover with: - php_version: 8.0 + php_version: ${{ matrix.php }} php_extensions: xdebug - configuration: test/phpunit/phpunit.xml - bootstrap: vendor/autoload.php + coverage_text: _coverage/coverage.txt + coverage_clover: _coverage/clover.xml + + - name: Store coverage data + uses: actions/upload-artifact@v3 + with: + name: code-coverage + path: _coverage + + coverage: + runs-on: ubuntu-latest + needs: [ phpunit ] + + steps: + - uses: actions/checkout@v3 + + - uses: actions/download-artifact@v3 + with: + name: code-coverage + path: _coverage + + - name: Output coverage + run: cat "_coverage/coverage.txt" + + - name: Upload to Codecov + uses: codecov/codecov-action@v3 phpstan: runs-on: ubuntu-latest - needs: [composer] + needs: [ composer ] + strategy: + matrix: + php: [ 8.0, 8.1, 8.2 ] steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build-artifact path: /tmp/github-actions @@ -63,5 +104,67 @@ jobs: - name: PHP Static Analysis uses: php-actions/phpstan@v3 with: + php_version: ${{ matrix.php }} + path: src/ + + phpmd: + runs-on: ubuntu-latest + needs: [ composer ] + strategy: + matrix: + php: [ 8.0, 8.1, 8.2 ] + + steps: + - uses: actions/download-artifact@v3 + with: + name: build-artifact + path: /tmp/github-actions + + - name: Extract build archive + run: tar -xvf /tmp/github-actions/build.tar ./ + + - name: PHP Mess Detector + uses: php-actions/phpmd@v1 + with: + php_version: ${{ matrix.php }} path: src/ - level: 7 + output: text + ruleset: phpmd.xml + + phpcs: + runs-on: ubuntu-latest + needs: [ composer ] + strategy: + matrix: + php: [ 8.0, 8.1, 8.2 ] + + steps: + - uses: actions/download-artifact@v3 + with: + name: build-artifact + path: /tmp/github-actions + + - name: Extract build archive + run: tar -xvf /tmp/github-actions/build.tar ./ + + - name: PHP Code Sniffer + uses: php-actions/phpcs@v1 + with: + php_version: ${{ matrix.php }} + path: src/ + standard: phpcs.xml + + remove_old_artifacts: + runs-on: ubuntu-latest + + steps: + - name: Remove old artifacts for prior workflow runs on this repository + env: + GH_TOKEN: ${{ github.token }} + run: | + gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name == \"build-artifact\") | .id" > artifact-id-list.txt + while read id + do + echo -n "Deleting artifact ID $id ... " + gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done" + done Build status - + Code quality - + Code coverage diff --git a/composer.json b/composer.json index 3b02ef2..7064090 100644 --- a/composer.json +++ b/composer.json @@ -5,11 +5,13 @@ "require": { "php": ">=8.0", - "phpgt/typesafegetter": "^v1.2" + "phpgt/typesafegetter": "^1.3" }, "require-dev": { - "phpstan/phpstan": "^v1.8", - "phpunit/phpunit": "^v9.5" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.1", + "phpmd/phpmd": "^2.13", + "squizlabs/php_codesniffer": "^3.7" }, "autoload": { diff --git a/composer.lock b/composer.lock index 66652e9..1df8c3b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,28 +4,30 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a25ea95d124b2a3fa96037b62a43f07a", + "content-hash": "dca7d7d7e4c41ce367a4a7b9aa4da3c6", "packages": [ { "name": "phpgt/typesafegetter", - "version": "v1.2.4", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/PhpGt/TypeSafeGetter.git", - "reference": "ebffd758e69b8a0eebcad30f3daf408915b9ddf3" + "reference": "f760c05a37b1cc188dcbf800c5fdfab8a926b4b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/ebffd758e69b8a0eebcad30f3daf408915b9ddf3", - "reference": "ebffd758e69b8a0eebcad30f3daf408915b9ddf3", + "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/f760c05a37b1cc188dcbf800c5fdfab8a926b4b0", + "reference": "f760c05a37b1cc188dcbf800c5fdfab8a926b4b0", "shasum": "" }, "require": { "php": ">=8.0" }, "require-dev": { - "phpstan/phpstan": "v1.8.0", - "phpunit/phpunit": "v9.5.21" + "phpmd/phpmd": "^2.13", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.1", + "squizlabs/php_codesniffer": "^3.7" }, "type": "library", "autoload": { @@ -46,7 +48,7 @@ "description": "An interface for objects that expose type-safe getter methods.", "support": { "issues": "https://github.com/PhpGt/TypeSafeGetter/issues", - "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.2.4" + "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.3.2" }, "funding": [ { @@ -54,41 +56,109 @@ "type": "github" } ], - "time": "2022-07-08T17:17:42+00:00" + "time": "2023-04-28T14:42:27+00:00" } ], "packages-dev": [ { - "name": "doctrine/instantiator", - "version": "1.4.1", + "name": "composer/pcre", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "Composer\\XdebugHandler\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -97,49 +167,48 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Restarts a process without Xdebug.", "keywords": [ - "constructor", - "instantiate" + "Xdebug", + "performance" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { - "url": "https://www.doctrine-project.org/sponsorship.html", + "url": "https://packagist.com", "type": "custom" }, { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" + "url": "https://github.com/composer", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "url": "https://tidelift.com/funding/github/packagist/composer/composer", "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -177,7 +246,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -185,20 +254,20 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.1", + "version": "v4.15.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, "require": { @@ -239,9 +308,66 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + }, + "time": "2023-03-05T19:49:14+00:00" + }, + { + "name": "pdepend/pdepend", + "version": "2.13.0", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "31be7cd4f305f3f7b52af99c1cb13fc938d1cfad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/31be7cd4f305f3f7b52af99c1cb13fc938d1cfad", + "reference": "31be7cd4f305f3f7b52af99c1cb13fc938d1cfad", + "shasum": "" + }, + "require": { + "php": ">=5.3.7", + "symfony/config": "^2.3.0|^3|^4|^5|^6.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0|^1.2.3", + "gregwar/rst": "^1.0", + "phpunit/phpunit": "^4.8.36|^5.7.27", + "squizlabs/php_codesniffer": "^2.0.0" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PDepend\\": "src/main/php/PDepend" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Official version of pdepend to be handled with Composer", + "support": { + "issues": "https://github.com/pdepend/pdepend/issues", + "source": "https://github.com/pdepend/pdepend/tree/2.13.0" }, - "time": "2022-09-04T07:30:47+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend", + "type": "tidelift" + } + ], + "time": "2023-02-28T20:56:15+00:00" }, { "name": "phar-io/manifest", @@ -354,18 +480,101 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpmd/phpmd", + "version": "2.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpmd/phpmd.git", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/dad0228156856b3ad959992f9748514fa943f3e3", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3", + "shasum": "" + }, + "require": { + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", + "ext-xml": "*", + "pdepend/pdepend": "^2.12.1", + "php": ">=5.3.9" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0 || ^1.3.2", + "ext-json": "*", + "ext-simplexml": "*", + "gregwar/rst": "^1.0", + "mikey179/vfsstream": "^1.6.8", + "phpunit/phpunit": "^4.8.36 || ^5.7.27", + "squizlabs/php_codesniffer": "^2.0" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Manuel Pichler", + "email": "github@manuel-pichler.de", + "homepage": "https://github.com/manuelpichler", + "role": "Project Founder" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" + }, + { + "name": "Other contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", + "role": "Contributors" + } + ], + "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", + "homepage": "https://phpmd.org/", + "keywords": [ + "mess detection", + "mess detector", + "pdepend", + "phpmd", + "pmd" + ], + "support": { + "irc": "irc://irc.freenode.org/phpmd", + "issues": "https://github.com/phpmd/phpmd/issues", + "source": "https://github.com/phpmd/phpmd/tree/2.13.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", + "type": "tidelift" + } + ], + "time": "2022-09-10T08:44:15+00:00" + }, { "name": "phpstan/phpstan", - "version": "1.8.5", + "version": "1.10.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20" + "reference": "d232901b09e67538e5c86a724be841bea5768a7c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f6598a5ff12ca4499a836815e08b4d77a2ddeb20", - "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d232901b09e67538e5c86a724be841bea5768a7c", + "reference": "d232901b09e67538e5c86a724be841bea5768a7c", "shasum": "" }, "require": { @@ -394,8 +603,11 @@ "static analysis" ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.5" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -411,48 +623,48 @@ "type": "tidelift" } ], - "time": "2022-09-07T16:05:32+00:00" + "time": "2023-04-19T13:47:27+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.17", + "version": "10.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" + "reference": "884a0da7f9f46f28b2cb69134217fd810b793974" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/884a0da7f9f46f28b2cb69134217fd810b793974", + "reference": "884a0da7f9f46f28b2cb69134217fd810b793974", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -480,7 +692,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.1" }, "funding": [ { @@ -488,32 +701,32 @@ "type": "github" } ], - "time": "2022-08-30T12:24:04+00:00" + "time": "2023-04-17T12:15:40+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -540,7 +753,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1" }, "funding": [ { @@ -548,28 +761,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-02-10T16:53:14+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -577,7 +790,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -603,7 +816,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -611,32 +824,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -662,7 +875,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" }, "funding": [ { @@ -670,32 +883,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-02-03T06:56:46+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -721,7 +934,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -729,24 +942,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.5.24", + "version": "10.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" + "reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6f0cd95be71add539f8fd2be25b2a4a29789000b", + "reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -756,27 +968,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.1", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.0", + "sebastian/global-state": "^6.0", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -784,7 +995,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -815,7 +1026,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.2" }, "funding": [ { @@ -825,34 +1037,141 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-04-22T07:38:19+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "time": "2022-08-30T07:42:16+00:00" + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -875,7 +1194,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -883,32 +1202,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -931,7 +1250,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -939,32 +1258,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -986,7 +1305,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -994,34 +1313,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.7", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "7fa545db548c90bdebeb9da0583001a252be5578" + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7fa545db548c90bdebeb9da0583001a252be5578", - "reference": "7fa545db548c90bdebeb9da0583001a252be5578", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1060,7 +1381,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.7" + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" }, "funding": [ { @@ -1068,33 +1389,33 @@ "type": "github" } ], - "time": "2022-09-14T06:33:43+00:00" + "time": "2023-02-03T07:07:16+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1117,7 +1438,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" }, "funding": [ { @@ -1125,33 +1446,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-02-03T06:59:47+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1183,7 +1504,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" }, "funding": [ { @@ -1191,27 +1513,27 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-03-23T05:12:41+00:00" }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -1219,7 +1541,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1238,7 +1560,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -1246,7 +1568,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -1254,34 +1577,34 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1323,7 +1646,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" }, "funding": [ { @@ -1331,38 +1654,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-02-03T07:06:49+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "aab257c712de87b90194febd52e4d184551c2d44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", + "reference": "aab257c712de87b90194febd52e4d184551c2d44", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1387,7 +1707,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" }, "funding": [ { @@ -1395,33 +1715,33 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-02-03T07:07:38+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1444,7 +1764,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" }, "funding": [ { @@ -1452,34 +1772,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-02-03T07:08:02+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1501,7 +1821,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -1509,32 +1829,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1556,7 +1876,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -1564,32 +1884,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1616,10 +1936,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -1627,32 +1947,32 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.3", + "name": "sebastian/type", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1667,14 +1987,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -1682,32 +2003,29 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { - "name": "sebastian/type", - "version": "3.2.0", + "name": "sebastian/version", + "version": "4.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1726,11 +2044,11 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -1738,60 +2056,682 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { - "name": "sebastian/version", - "version": "3.0.2", + "name": "squizlabs/php_codesniffer", + "version": "3.7.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { - "php": ">=7.3" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "src/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", + "name": "Greg Sherwood", "role": "lead" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "time": "2023-02-22T23:07:41+00:00" + }, + { + "name": "symfony/config", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "249271da6f545d6579e0663374f8249a80be2893" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/249271da6f545d6579e0663374f8249a80be2893", + "reference": "249271da6f545d6579e0663374f8249a80be2893", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^5.4|^6.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<5.4" + }, + "require-dev": { + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "d732a66a2672669232c0b4536c8c96724a679780" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d732a66a2672669232c0b4536c8c96724a679780", + "reference": "d732a66a2672669232c0b4536c8c96724a679780", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/service-contracts": "^1.1.6|^2.0|^3.0", + "symfony/var-exporter": "^6.2.7" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.1", + "symfony/finder": "<5.4", + "symfony/proxy-manager-bridge": "<6.2", + "symfony/yaml": "<5.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.1", + "symfony/expression-language": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "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": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v6.2.10" + }, + "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": "2023-04-21T15:42:15+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:25:55+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.2.10" + }, + "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": "2023-04-18T13:46:08+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.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-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.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-11-03T14:55:06+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "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 writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:32:47+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "9a07920c2058bafee921ce4d90aeef2193837d63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/9a07920c2058bafee921ce4d90aeef2193837d63", + "reference": "9a07920c2058bafee921ce4d90aeef2193837d63", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v6.2.10" + }, + "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": "2020-09-28T06:39:44+00:00" + "time": "2023-04-21T08:33:05+00:00" }, { "name": "theseer/tokenizer", @@ -1853,5 +2793,5 @@ "php": ">=8.0" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..b771656 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,61 @@ + + + Created from PHP.Gt/Styleguide + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phpmd.xml b/phpmd.xml new file mode 100644 index 0000000..c30e0b4 --- /dev/null +++ b/phpmd.xml @@ -0,0 +1,41 @@ + + + Custom ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..5e1b5d9 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,28 @@ + + + + + + + + ./test/phpunit/ + + + + + + + + + + src/ + + + + diff --git a/src/FileHandler.php b/src/FileHandler.php index 0e602a7..563e84f 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -11,20 +11,20 @@ class FileHandler extends Handler { /** * @link http://php.net/manual/en/sessionhandlerinterface.open.php - * @param string $save_path The path where to store/retrieve the session. + * @param string $savePath The path where to store/retrieve the session. * @param string $name The session name. */ - public function open(string $save_path, string $name):bool { + public function open(string $savePath, string $name):bool { $success = true; - $save_path = str_replace( + $savePath = str_replace( ["/", "\\"], DIRECTORY_SEPARATOR, - $save_path + $savePath ); $this->path = implode(DIRECTORY_SEPARATOR, [ - $save_path, + $savePath, $name, ]); @@ -43,28 +43,28 @@ public function close():bool { } /** @link http://php.net/manual/en/sessionhandlerinterface.read.php */ - public function read(string $session_id):string { - if(isset($this->cache[$session_id])) { - return $this->cache[$session_id]; + public function read(string $sessionId):string { + if(isset($this->cache[$sessionId])) { + return $this->cache[$sessionId]; } - $filePath = $this->getFilePath($session_id); + $filePath = $this->getFilePath($sessionId); if(!file_exists($filePath)) { return ""; } - $this->cache[$session_id] = file_get_contents($filePath) ?: ""; - return $this->cache[$session_id]; + $this->cache[$sessionId] = file_get_contents($filePath) ?: ""; + return $this->cache[$sessionId]; } /** @link http://php.net/manual/en/sessionhandlerinterface.write.php */ - public function write(string $session_id, string $session_data):bool { - if($session_data === self::EMPTY_PHP_ARRAY) { + public function write(string $sessionId, string $sessionData):bool { + if($sessionData === self::EMPTY_PHP_ARRAY) { return true; } - $filePath = $this->getFilePath($session_id); - $bytesWritten = file_put_contents($filePath, $session_data); + $filePath = $this->getFilePath($sessionId); + $bytesWritten = file_put_contents($filePath, $sessionData); return $bytesWritten !== false; } diff --git a/src/Handler.php b/src/Handler.php index 39891af..c914658 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -15,11 +15,11 @@ abstract public function destroy(string $id = ""):bool; abstract public function gc(int $maxLifeTime):int|false; /** @link http://php.net/manual/en/sessionhandlerinterface.open.php */ - abstract public function open(string $save_path, string $name):bool; + abstract public function open(string $savePath, string $name):bool; /** @link http://php.net/manual/en/sessionhandlerinterface.read.php */ - abstract public function read(string $session_id):string; + abstract public function read(string $sessionId):string; /** @link http://php.net/manual/en/sessionhandlerinterface.write.php */ - abstract public function write(string $session_id, string $session_data):bool; + abstract public function write(string $sessionId, string $sessionData):bool; } diff --git a/src/Session.php b/src/Session.php index 482c954..713a823 100644 --- a/src/Session.php +++ b/src/Session.php @@ -1,9 +1,11 @@ |array $config */ + /** @param ArrayAccess|array $config */ public function __construct( SessionHandlerInterface $sessionHandler, - array|\ArrayAccess $config = [], + array|ArrayAccess $config = [], string $id = null ) { $this->sessionHandler = $sessionHandler; - @ini_set("session.sid_length", $config["sid_length"] ?? self::DEFAULT_SESSION_ID_LENGTH); - @ini_set("session.sid_bits_per_character", $config["sid_bits_per_character"] ?? (string)self::DEFAULT_SESSION_ID_BITS_PER_CHARACTER); + $this->setIniDefaults($config); if(is_null($id)) { $id = $this->getId(); @@ -44,30 +45,7 @@ public function __construct( $config["save_path"] ?? self::DEFAULT_SESSION_PATH ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; - - // Allow a single failure to start session. If it fails to start, - // destroy the existing session. - $startAttempts = 0; - do { - $success = session_start([ - "save_path" => $sessionPath, - "name" => $sessionName, - "serialize_handler" => "php_serialize", - "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, - "cookie_path" => $config["cookie_path"] ?? self::DEFAULT_COOKIE_PATH, - "cookie_domain" => $config["cookie_domain"] ?? self::DEFAULT_SESSION_DOMAIN, - "cookie_secure" => $config["cookie_secure"] ?? self::DEFAULT_SESSION_SECURE, - "cookie_httponly" => $config["cookie_httponly"] ?? self::DEFAULT_SESSION_HTTPONLY, - "cookie_samesite" => $config["cookie_samesite"] ?? self::DEFAULT_COOKIE_SAMESITE, - "use_strict_mode" => $config["use_strict_mode"] ?? self::DEFAULT_STRICT_MODE, - ]); - - if(!$success) { - @session_destroy(); - } - $startAttempts++; - } - while(!$success && $startAttempts <= 1); + $this->attemptStart($sessionPath, $sessionName, $config); $this->sessionHandler->open($sessionPath, $sessionName); $this->store = $this->readSessionData(); @@ -156,4 +134,63 @@ public function write():bool { serialize($this->store) ); } + + /** @param ArrayAccess|array $config */ + private function setIniDefaults(ArrayAccess|array $config):void { + // phpcs:ignore + @ini_set( + "session.sid_length", + $config["sid_length"] + ?? self::DEFAULT_SESSION_ID_LENGTH + ); + // phpcs:ignore + @ini_set( + "session.sid_bits_per_character", + $config["sid_bits_per_character"] + ?? (string)self::DEFAULT_SESSION_ID_BITS_PER_CHARACTER + ); + } + + /** + * @param string $sessionPath + * @param string $sessionName + * @param ArrayAccess|array $config + * @return void + */ + private function attemptStart( + string $sessionPath, + string $sessionName, + ArrayAccess|array $config, + ):void { +// Allow a single failure to start session. If it fails to start, + // destroy the existing session. + $startAttempts = 0; + do { + $success = session_start([ + "save_path" => $sessionPath, + "name" => $sessionName, + "serialize_handler" => "php_serialize", + "cookie_lifetime" => $config["cookie_lifetime"] + ?? self::DEFAULT_SESSION_LIFETIME, + "cookie_path" => $config["cookie_path"] + ?? self::DEFAULT_COOKIE_PATH, + "cookie_domain" => $config["cookie_domain"] + ?? self::DEFAULT_SESSION_DOMAIN, + "cookie_secure" => $config["cookie_secure"] + ?? self::DEFAULT_SESSION_SECURE, + "cookie_httponly" => $config["cookie_httponly"] + ?? self::DEFAULT_SESSION_HTTPONLY, + "cookie_samesite" => $config["cookie_samesite"] + ?? self::DEFAULT_COOKIE_SAMESITE, + "use_strict_mode" => $config["use_strict_mode"] + ?? self::DEFAULT_STRICT_MODE, + ]); + + if(!$success) { + // phpcs:ignore + @session_destroy(); + } + $startAttempts++; + } while(!$success && $startAttempts <= 1); + } } diff --git a/src/SessionSetup.php b/src/SessionSetup.php index 4228390..c548a9f 100644 --- a/src/SessionSetup.php +++ b/src/SessionSetup.php @@ -1,4 +1,5 @@ createStore($namespace); } - else { - return null; - } + return null; } if(empty($namespaceParts)) { @@ -177,7 +175,7 @@ private function normaliseKey(string $key):string { public function remove(string $key = null):void { if(is_null($key)) { - foreach($this->stores as $i => $childStore) { + foreach(array_keys($this->stores) as $i) { unset($this->stores[$i]); } diff --git a/src/SessionStoreFactory.php b/src/SessionStoreFactory.php index 10bdae1..7e6aeb3 100644 --- a/src/SessionStoreFactory.php +++ b/src/SessionStoreFactory.php @@ -2,7 +2,10 @@ namespace Gt\Session; class SessionStoreFactory { - public static function create(string $namespace, Session $session):SessionStore { + public static function create( + string $namespace, + Session $session, + ):SessionStore { $namespaceParts = explode(".", $namespace); $store = new SessionStore( array_shift($namespaceParts), @@ -16,4 +19,4 @@ public static function create(string $namespace, Session $session):SessionStore return $store; } -} \ No newline at end of file +} diff --git a/test/phpunit/Helper/DataProvider/ConfigProvider.php b/test/phpunit/Helper/DataProvider/ConfigProvider.php index 541d7c1..576e42a 100644 --- a/test/phpunit/Helper/DataProvider/ConfigProvider.php +++ b/test/phpunit/Helper/DataProvider/ConfigProvider.php @@ -1,6 +1,8 @@ getMockBuilder(Handler::class) - ->getMock(); + protected static function createStaticMock(string $className):MockObject { + $tc = new SessionStoreTest(""); + return $tc->createMock($className); + } + + /** @dataProvider data_randomKeyValuePairs */ + public static function testGetSetDotNotation(array $keyValuePairs, Handler $handler):void { $session = new Session($handler); $sessionNamespace = "gt.test.session"; diff --git a/test/phpunit/SessionTest.php b/test/phpunit/SessionTest.php index eee23f4..9d061e5 100644 --- a/test/phpunit/SessionTest.php +++ b/test/phpunit/SessionTest.php @@ -22,12 +22,14 @@ protected function setUp():void { FunctionMocker::mock("session_destroy"); } - public function testSessionStarts():void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + protected static function createStaticMock(string $className):MockObject { + $tc = new SessionStoreTest(""); + return $tc->createMock($className); + } + public function testSessionStarts():void { self::assertEmpty(FunctionMocker::$mockCalls["session_start"]); + $handler = self::createMock(Handler::class); new Session($handler); self::assertCount( 1, @@ -35,15 +37,71 @@ public function testSessionStarts():void { ); } - /** - * @dataProvider data_randomConfig - */ - public function testSessionStartsWithConfig(array $config):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + public function testWriteSessionDataCalled() { + $handler = self::createMock(Handler::class); + $handler->expects($this->exactly(2)) + ->method("write"); + $session = new Session($handler); + + $session->set("test-key", "test-value"); + $session->remove("test-key"); + } + + public function testGetString():void { + $handler = self::createMock(Handler::class); + $sut = new Session($handler); + + $numericValue = rand(1000, 9999); + $sut->set("test.value", $numericValue); + + self::assertSame((string)$numericValue, $sut->getString("test.value")); + } + + public function testGetInt():void { + $handler = self::createMock(Handler::class); + $sut = new Session($handler); + + $numericStringValue = (string)rand(1000, 9999); + $sut->set("test.value", $numericStringValue); + + self::assertSame((int)$numericStringValue, $sut->getInt("test.value")); + } + + public function testGetFloat():void { + $handler = self::createMock(Handler::class); + $sut = new Session($handler); + + $numericStringValue = (string)(rand(1000, 9999) - 0.105); + $sut->set("test.value", $numericStringValue); - new Session($handler ,$config); + self::assertSame((float)$numericStringValue, $sut->getFloat("test.value")); + } + + public function testGetBool():void { + $handler = self::createMock(Handler::class); + $sut = new Session($handler); + + $numericValue = rand(0, 1); + $sut->set("test.value", $numericValue); + + self::assertSame((bool)$numericValue, $sut->getBool("test.value")); + } + + public function testGetDateTime():void { + $handler = self::createMock(Handler::class); + $sut = new Session($handler); + + $numericValue = time(); + $sut->set("test.value", $numericValue); + + $dateTime = new DateTime(); + $dateTime->setTimestamp($numericValue); + self::assertEquals($dateTime, $sut->getDateTime("test.value")); + } + + /** @dataProvider data_randomConfig */ + private static function testSessionStartsWithConfig(array $config, Handler $handler):void { + new Session($handler, $config); $sessionStartParameter = FunctionMocker::$mockCalls["session_start"][0][0]; foreach($config as $key => $value) { @@ -56,46 +114,20 @@ public function testSessionStartsWithConfig(array $config):void { } /** @dataProvider data_randomConfig */ - public function testSessionStartDestroysFailedSession(array $config):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - + private static function testSessionStartDestroysFailedSession(array $config, Handler $handler):void { FunctionMocker::$callState["session_start__fail"] = true; new Session($handler, $config); self::assertCount(1, FunctionMocker::$mockCalls["session_destroy"]); } - public function testWriteSessionDataCalled() { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $handler->expects($this->exactly(2)) - ->method("write"); - $session = new Session($handler); - - $session->set("test-key", "test-value"); - $session->remove("test-key"); - } - - /** - * @dataProvider data_randomString - */ - public function testGetReturnsNull(string $randomString):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomString */ + private static function testGetReturnsNull(string $randomString, Handler $handler):void { $session = new Session($handler); self::assertNull($session->get($randomString)); } - /** - * @@dataProvider data_randomKeyValuePairs - */ - public function testSetGet(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testSetGet(array $keyValuePairs, Handler $handler):void { $session = new Session($handler); foreach($keyValuePairs as $key => $value) { @@ -107,13 +139,8 @@ public function testSetGet(array $keyValuePairs):void { } } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testSetGetNamespaced(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testSetGetNamespaced(array $keyValuePairs, Handler $handler):void { $session = new Session($handler); foreach($keyValuePairs as $key => $value) { @@ -135,45 +162,35 @@ public function testSetGetNamespaced(array $keyValuePairs):void { } } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testSetGetNamespacedSameParentNamespace(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $session = new Session($handler); - - $parentNamespace = implode(".", [ - uniqid("namespace1-"), - uniqid("namespace2-"), - ]); - - foreach($keyValuePairs as $key => $value) { - $newKey = implode(".", [ - $parentNamespace, - $key, - ]); - $keyValuePairs[$newKey] = $value; - unset($keyValuePairs[$key]); - } - - foreach($keyValuePairs as $key => $value) { - $session->set($key, $value); - } - - foreach($keyValuePairs as $key => $value) { - self::assertEquals($value, $session->get($key)); - } - } - - /** - * @@dataProvider data_randomKeyValuePairs - */ - public function testSetGetNotExistsOtherKey(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testSetGetNamespacedSameParentNamespace(array $keyValuePairs, Handler $handler):void { + $session = new Session($handler); + + $parentNamespace = implode(".", [ + uniqid("namespace1-"), + uniqid("namespace2-"), + ]); + + foreach($keyValuePairs as $key => $value) { + $newKey = implode(".", [ + $parentNamespace, + $key, + ]); + $keyValuePairs[$newKey] = $value; + unset($keyValuePairs[$key]); + } + + foreach($keyValuePairs as $key => $value) { + $session->set($key, $value); + } + + foreach($keyValuePairs as $key => $value) { + self::assertEquals($value, $session->get($key)); + } + } + + /** @dataProvider data_randomKeyValuePairs */ + private static function testSetGetNotExistsOtherKey(array $keyValuePairs, Handler $handler):void { $session = new Session($handler); foreach($keyValuePairs as $key => $value) { @@ -198,13 +215,8 @@ public function testSetGetNotExistsOtherKey(array $keyValuePairs):void { } } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testContains(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testContains(array $keyValuePairs, Handler $handler):void { $session = new Session($handler); foreach($keyValuePairs as $key => $value) { @@ -216,13 +228,8 @@ public function testContains(array $keyValuePairs):void { } } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testNotContains(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testNotContains(array $keyValuePairs, Handler $handler):void { $session = new Session($handler); foreach($keyValuePairs as $key => $value) { @@ -234,20 +241,15 @@ public function testNotContains(array $keyValuePairs):void { } } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testRemove(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testRemove(array $keyValuePairs, Handler $handler):void { $session = new Session($handler); foreach($keyValuePairs as $key => $value) { $session->set($key, $value); } - uasort($keyValuePairs, function () { + uasort($keyValuePairs, function() { return rand(-1, 1); }); @@ -258,57 +260,47 @@ public function testRemove(array $keyValuePairs):void { } } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testNamespaceKeyIsRemovedFromSession(array $keyValuePairs):void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $session = new Session($handler); - - $parentNamespace = implode(".", [ - uniqid("namespace1-"), - uniqid("namespace2-"), + /** @dataProvider data_randomKeyValuePairs */ + private static function testNamespaceKeyIsRemovedFromSession(array $keyValuePairs, Handler $handler):void { + $session = new Session($handler); + + $parentNamespace = implode(".", [ + uniqid("namespace1-"), + uniqid("namespace2-"), ]); - foreach($keyValuePairs as $key => $value) { - $fullKey = implode(".", [ - $parentNamespace, + foreach($keyValuePairs as $key => $value) { + $fullKey = implode(".", [ + $parentNamespace, $key, ]); - $session->set($fullKey, $value); + $session->set($fullKey, $value); } $keyToRemove = array_rand($keyValuePairs); - $fullKeyToRemove = implode(".", [ - $parentNamespace, + $fullKeyToRemove = implode(".", [ + $parentNamespace, $keyToRemove, ]); - $store = $session->getStore($parentNamespace); - $store->remove($keyToRemove); - unset($keyValuePairs[$keyToRemove]); + $store = $session->getStore($parentNamespace); + $store->remove($keyToRemove); + unset($keyValuePairs[$keyToRemove]); - foreach($keyValuePairs as $key => $value) { - $fullKey = implode(".", [ - $parentNamespace, + foreach($keyValuePairs as $key => $value) { + $fullKey = implode(".", [ + $parentNamespace, $key, ]); - self::assertTrue($session->contains($fullKey)); + self::assertTrue($session->contains($fullKey)); } self::assertFalse($session->contains($fullKeyToRemove)); } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testNamespaceKeyIsRemovedFromStore(array $keyValuePairs): void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testNamespaceKeyIsRemovedFromStore(array $keyValuePairs, Handler $handler): void { $session = new Session($handler); $parentNamespace = implode(".", [ @@ -337,13 +329,8 @@ public function testNamespaceKeyIsRemovedFromStore(array $keyValuePairs): void { self::assertFalse($store->contains($keyToRemove)); } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testRemoveNamespace(array $keyValuePairs) { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testRemoveNamespace(array $keyValuePairs, Handler $handler) { $session = new Session($handler); $namespace1 = uniqid("namespace1-"); @@ -380,13 +367,8 @@ public function testRemoveNamespace(array $keyValuePairs) { self::assertFalse($session->contains($parentNamespace)); } - /** - * @dataProvider data_randomKeyValuePairs - */ - public function testRemoveSiblingNamespace(array $keyValuePairs) { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); + /** @dataProvider data_randomKeyValuePairs */ + private static function testRemoveSiblingNamespace(array $keyValuePairs, Handler $handler) { $session = new Session($handler); $namespace0 = uniqid("namespace0-"); @@ -465,66 +447,4 @@ public function testRemoveSiblingNamespace(array $keyValuePairs) { ); } } - - public function testGetString():void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $sut = new Session($handler); - - $numericValue = rand(1000, 9999); - $sut->set("test.value", $numericValue); - - self::assertSame((string)$numericValue, $sut->getString("test.value")); - } - - public function testGetInt():void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $sut = new Session($handler); - - $numericStringValue = (string)rand(1000, 9999); - $sut->set("test.value", $numericStringValue); - - self::assertSame((int)$numericStringValue, $sut->getInt("test.value")); - } - - public function testGetFloat():void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $sut = new Session($handler); - - $numericStringValue = (string)(rand(1000, 9999) - 0.105); - $sut->set("test.value", $numericStringValue); - - self::assertSame((float)$numericStringValue, $sut->getFloat("test.value")); - } - - public function testGetBool():void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $sut = new Session($handler); - - $numericValue = rand(0, 1); - $sut->set("test.value", $numericValue); - - self::assertSame((bool)$numericValue, $sut->getBool("test.value")); - } - - public function testGetDateTime():void { - /** @var Handler|MockObject $handler */ - $handler = $this->getMockBuilder(Handler::class) - ->getMock(); - $sut = new Session($handler); - - $numericValue = time(); - $sut->set("test.value", $numericValue); - - $dateTime = new DateTime(); - $dateTime->setTimestamp($numericValue); - self::assertEquals($dateTime, $sut->getDateTime("test.value")); - } } diff --git a/test/phpunit/phpunit.xml b/test/phpunit/phpunit.xml deleted file mode 100644 index cf95bea..0000000 --- a/test/phpunit/phpunit.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - ../../src - - - - - - - - - . - - - - \ No newline at end of file From b2e21a3147f135aee9dc16b04e352c28898d78fa Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 25 May 2023 14:15:56 +0100 Subject: [PATCH 089/110] feature: samesite lax (#249) closes #248 --- src/FileHandler.php | 4 +--- src/Session.php | 10 ++++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/FileHandler.php b/src/FileHandler.php index 563e84f..2753072 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -35,9 +35,7 @@ public function open(string $savePath, string $name):bool { return $success; } - /** - * @link http://php.net/manual/en/sessionhandlerinterface.close.php - */ + /** @link http://php.net/manual/en/sessionhandlerinterface.close.php */ public function close():bool { return true; } diff --git a/src/Session.php b/src/Session.php index 713a823..a89a96d 100644 --- a/src/Session.php +++ b/src/Session.php @@ -16,7 +16,7 @@ class Session implements SessionContainer, TypeSafeGetter { const DEFAULT_SESSION_SECURE = true; const DEFAULT_SESSION_HTTPONLY = true; const DEFAULT_COOKIE_PATH = "/"; - const DEFAULT_COOKIE_SAMESITE = "Strict"; + const DEFAULT_COOKIE_SAMESITE = "Lax"; const DEFAULT_STRICT_MODE = true; const DEFAULT_SESSION_ID_LENGTH = 64; const DEFAULT_SESSION_ID_BITS_PER_CHARACTER = 5; @@ -29,7 +29,7 @@ class Session implements SessionContainer, TypeSafeGetter { public function __construct( SessionHandlerInterface $sessionHandler, array|ArrayAccess $config = [], - string $id = null + string $id = null, ) { $this->sessionHandler = $sessionHandler; @@ -137,14 +137,12 @@ public function write():bool { /** @param ArrayAccess|array $config */ private function setIniDefaults(ArrayAccess|array $config):void { - // phpcs:ignore - @ini_set( + ini_set( "session.sid_length", $config["sid_length"] ?? self::DEFAULT_SESSION_ID_LENGTH ); - // phpcs:ignore - @ini_set( + ini_set( "session.sid_bits_per_character", $config["sid_bits_per_character"] ?? (string)self::DEFAULT_SESSION_ID_BITS_PER_CHARACTER From 1899302bb910edb9d3e1507f92463b0426c331dd Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 19 Oct 2023 12:07:59 +0100 Subject: [PATCH 090/110] Trans IDs (#252) * feature: type safe getters closes #81 * loosen type (can be array access) * feature: allow transparent ids --- src/Session.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Session.php b/src/Session.php index a89a96d..e46e593 100644 --- a/src/Session.php +++ b/src/Session.php @@ -28,7 +28,7 @@ class Session implements SessionContainer, TypeSafeGetter { /** @param ArrayAccess|array $config */ public function __construct( SessionHandlerInterface $sessionHandler, - array|ArrayAccess $config = [], + private array|ArrayAccess $config = [], string $id = null, ) { $this->sessionHandler = $sessionHandler; @@ -121,6 +121,9 @@ protected function getAbsolutePath(string $path):string { } protected function createNewId():string { + if($this->config->offsetGet("use_trans_sid") && !$this->config->offsetGet("use_cookies")) { + return $_GET[$this->config->offsetGet("name")] ?? session_create_id(); + } return session_create_id() ?: ""; } @@ -168,6 +171,9 @@ private function attemptStart( "save_path" => $sessionPath, "name" => $sessionName, "serialize_handler" => "php_serialize", + "use_only_cookies" => $config["use_only_cookies"] ?? true, + "use_cookies" => $config["use_cookies"] ?? true, + "use_trans_sid" => $config["use_trans_sid"] ?? false, "cookie_lifetime" => $config["cookie_lifetime"] ?? self::DEFAULT_SESSION_LIFETIME, "cookie_path" => $config["cookie_path"] From c086d19202e2974a27d2376c89069f252cda5175 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 21 Apr 2025 15:02:03 +0100 Subject: [PATCH 091/110] Create SECURITY.md --- SECURITY.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..ee9f073 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,25 @@ +# Security Policy + +## Supported Versions + +All MAJOR versions of this package will receive security updates for **two years after the next major version is released**. For example, if version 4.0.0 is released, version 3.x will continue receiving security updates for two years from that date. + +Versions outside this window are considered end-of-life and will no longer receive updates, even for critical vulnerabilities. + +## Reporting a Vulnerability + +If you discover a security issue, please report it using GitHub's [**"Report a vulnerability"** feature](../../security/advisories/new) under the **Security** tab of this repository. + +When reporting, please include the following information to help us investigate quickly and thoroughly: + +- A clear description of the vulnerability and what part of the code it affects. +- Steps to reproduce the issue, ideally including: + - The affected version + - A code snippet or minimal test case + - The expected vs. actual behavior +- If applicable, an explanation of potential impact or severity. +- Any suggested mitigations or patches (optional, but appreciated). + +Please do not disclose the vulnerability publicly until we've had a chance to investigate and publish a fix. + +We appreciate responsible disclosure and are committed to resolving issues promptly. From 4de609d9745143ac5fe990734ed67eab8f0ff2e9 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 5 May 2025 13:07:57 +0100 Subject: [PATCH 092/110] Implement countable (#253) * feature: type safe getters closes #81 * loosen type (can be array access) * feature: implement countable closes #12 * ci: improve ci, fix security vulnerability * build: bump deps * tidy: fix deprecations * tidy: refactor classes from static analysis --------- Co-authored-by: Greg Bowler --- .github/workflows/ci.yml | 67 +-- composer.json | 2 +- composer.lock | 672 ++++++++++++++++-------------- src/Session.php | 121 +++--- src/SessionStore.php | 18 +- test/phpunit/SessionStoreTest.php | 17 + 6 files changed, 504 insertions(+), 393 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 280e4b7..948ea04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,22 +1,27 @@ name: CI -on: [push] +on: [push, pull_request] + +permissions: + contents: read + actions: read + id-token: none jobs: composer: runs-on: ubuntu-latest strategy: matrix: - php: [ 8.0, 8.1, 8.2 ] + php: [ 8.1, 8.2, 8.3, 8.4 ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/composer-cache - key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} - name: Composer install uses: php-actions/composer@v6 @@ -24,12 +29,12 @@ jobs: php_version: ${{ matrix.php }} - name: Archive build - run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./ + run: mkdir /tmp/github-actions/ && tar --exclude=".git" -cvf /tmp/github-actions/build.tar ./ - name: Upload build archive for test runners - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: build-artifact + name: build-artifact-${{ matrix.php }} path: /tmp/github-actions phpunit: @@ -37,22 +42,22 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.0, 8.1, 8.2 ] + php: [ 8.1, 8.2, 8.3, 8.4 ] outputs: coverage: ${{ steps.store-coverage.outputs.coverage_text }} steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: build-artifact + name: build-artifact-${{ matrix.php }} path: /tmp/github-actions - name: Extract build archive run: tar -xvf /tmp/github-actions/build.tar ./ - name: PHP Unit tests - uses: php-actions/phpunit@v3 + uses: php-actions/phpunit@v4 env: XDEBUG_MODE: cover with: @@ -62,40 +67,43 @@ jobs: coverage_clover: _coverage/clover.xml - name: Store coverage data - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: code-coverage + name: code-coverage-${{ matrix.php }}-${{ github.run_number }} path: _coverage coverage: runs-on: ubuntu-latest needs: [ phpunit ] + strategy: + matrix: + php: [ 8.1, 8.2, 8.3, 8.4 ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: code-coverage + name: code-coverage-${{ matrix.php }}-${{ github.run_number }} path: _coverage - name: Output coverage run: cat "_coverage/coverage.txt" - name: Upload to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 phpstan: runs-on: ubuntu-latest needs: [ composer ] strategy: matrix: - php: [ 8.0, 8.1, 8.2 ] + php: [ 8.1, 8.2, 8.3, 8.4 ] steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: build-artifact + name: build-artifact-${{ matrix.php }} path: /tmp/github-actions - name: Extract build archive @@ -112,12 +120,12 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.0, 8.1, 8.2 ] + php: [ 8.1, 8.2, 8.3, 8.4 ] steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: build-artifact + name: build-artifact-${{ matrix.php }} path: /tmp/github-actions - name: Extract build archive @@ -136,12 +144,12 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.0, 8.1, 8.2 ] + php: [ 8.1, 8.2, 8.3, 8.4 ] steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: build-artifact + name: build-artifact-${{ matrix.php }} path: /tmp/github-actions - name: Extract build archive @@ -157,12 +165,15 @@ jobs: remove_old_artifacts: runs-on: ubuntu-latest + permissions: + actions: write + steps: - name: Remove old artifacts for prior workflow runs on this repository env: GH_TOKEN: ${{ github.token }} run: | - gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name == \"build-artifact\") | .id" > artifact-id-list.txt + gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt while read id do echo -n "Deleting artifact ID $id ... " diff --git a/composer.json b/composer.json index 7064090..cf6ee88 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "license": "MIT", "require": { - "php": ">=8.0", + "php": ">=8.1", "phpgt/typesafegetter": "^1.3" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 1df8c3b..0160b61 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": "dca7d7d7e4c41ce367a4a7b9aa4da3c6", + "content-hash": "d32bb34f857ad466056beaa4e80cf68a", "packages": [ { "name": "phpgt/typesafegetter", @@ -62,28 +62,36 @@ "packages-dev": [ { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, "branch-alias": { "dev-main": "3.x-dev" } @@ -113,7 +121,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/3.3.2" }, "funding": [ { @@ -129,20 +137,20 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2024-11-12T16:29:46+00:00" }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -153,7 +161,7 @@ "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -177,9 +185,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -195,20 +203,20 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", "shasum": "" }, "require": { @@ -216,11 +224,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -246,7 +255,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" }, "funding": [ { @@ -254,29 +263,31 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2025-04-29T12:36:36+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.4", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -284,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -308,34 +319,34 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2023-03-05T19:49:14+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "pdepend/pdepend", - "version": "2.13.0", + "version": "2.16.2", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "31be7cd4f305f3f7b52af99c1cb13fc938d1cfad" + "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/31be7cd4f305f3f7b52af99c1cb13fc938d1cfad", - "reference": "31be7cd4f305f3f7b52af99c1cb13fc938d1cfad", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/f942b208dc2a0868454d01b29f0c75bbcfc6ed58", + "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58", "shasum": "" }, "require": { "php": ">=5.3.7", - "symfony/config": "^2.3.0|^3|^4|^5|^6.0", - "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0", - "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0" + "symfony/config": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/polyfill-mbstring": "^1.19" }, "require-dev": { "easy-doc/easy-doc": "0.0.0|^1.2.3", "gregwar/rst": "^1.0", - "phpunit/phpunit": "^4.8.36|^5.7.27", "squizlabs/php_codesniffer": "^2.0.0" }, "bin": [ @@ -357,9 +368,15 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", + "keywords": [ + "PHP Depend", + "PHP_Depend", + "dev", + "pdepend" + ], "support": { "issues": "https://github.com/pdepend/pdepend/issues", - "source": "https://github.com/pdepend/pdepend/tree/2.13.0" + "source": "https://github.com/pdepend/pdepend/tree/2.16.2" }, "funding": [ { @@ -367,24 +384,25 @@ "type": "tidelift" } ], - "time": "2023-02-28T20:56:15+00:00" + "time": "2023-12-17T18:09:59+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -425,9 +443,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -482,22 +506,22 @@ }, { "name": "phpmd/phpmd", - "version": "2.13.0", + "version": "2.15.0", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "dad0228156856b3ad959992f9748514fa943f3e3" + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/dad0228156856b3ad959992f9748514fa943f3e3", - "reference": "dad0228156856b3ad959992f9748514fa943f3e3", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/74a1f56e33afad4128b886e334093e98e1b5e7c0", + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0", "shasum": "" }, "require": { "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", "ext-xml": "*", - "pdepend/pdepend": "^2.12.1", + "pdepend/pdepend": "^2.16.1", "php": ">=5.3.9" }, "require-dev": { @@ -506,8 +530,7 @@ "ext-simplexml": "*", "gregwar/rst": "^1.0", "mikey179/vfsstream": "^1.6.8", - "phpunit/phpunit": "^4.8.36 || ^5.7.27", - "squizlabs/php_codesniffer": "^2.0" + "squizlabs/php_codesniffer": "^2.9.2 || ^3.7.2" }, "bin": [ "src/bin/phpmd" @@ -544,6 +567,7 @@ "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", "homepage": "https://phpmd.org/", "keywords": [ + "dev", "mess detection", "mess detector", "pdepend", @@ -553,7 +577,7 @@ "support": { "irc": "irc://irc.freenode.org/phpmd", "issues": "https://github.com/phpmd/phpmd/issues", - "source": "https://github.com/phpmd/phpmd/tree/2.13.0" + "source": "https://github.com/phpmd/phpmd/tree/2.15.0" }, "funding": [ { @@ -561,20 +585,20 @@ "type": "tidelift" } ], - "time": "2022-09-10T08:44:15+00:00" + "time": "2023-12-11T08:22:20+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.14", + "version": "1.12.25", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d232901b09e67538e5c86a724be841bea5768a7c" + "reference": "e310849a19e02b8bfcbb63147f495d8f872dd96f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d232901b09e67538e5c86a724be841bea5768a7c", - "reference": "d232901b09e67538e5c86a724be841bea5768a7c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e310849a19e02b8bfcbb63147f495d8f872dd96f", + "reference": "e310849a19e02b8bfcbb63147f495d8f872dd96f", "shasum": "" }, "require": { @@ -617,42 +641,38 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2023-04-19T13:47:27+00:00" + "time": "2025-04-27T12:20:45+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "10.1.1", + "version": "10.1.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "884a0da7f9f46f28b2cb69134217fd810b793974" + "reference": "7e308268858ed6baedc8704a304727d20bc07c77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/884a0da7f9f46f28b2cb69134217fd810b793974", - "reference": "884a0da7f9f46f28b2cb69134217fd810b793974", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", + "reference": "7e308268858ed6baedc8704a304727d20bc07c77", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=8.1", - "phpunit/php-file-iterator": "^4.0", - "phpunit/php-text-template": "^3.0", - "sebastian/code-unit-reverse-lookup": "^3.0", - "sebastian/complexity": "^3.0", - "sebastian/environment": "^6.0", - "sebastian/lines-of-code": "^2.0", - "sebastian/version": "^4.0", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-text-template": "^3.0.1", + "sebastian/code-unit-reverse-lookup": "^3.0.0", + "sebastian/complexity": "^3.2.0", + "sebastian/environment": "^6.1.0", + "sebastian/lines-of-code": "^2.0.2", + "sebastian/version": "^4.0.1", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { "phpunit/phpunit": "^10.1" @@ -664,7 +684,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1-dev" + "dev-main": "10.1.x-dev" } }, "autoload": { @@ -693,7 +713,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.1" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" }, "funding": [ { @@ -701,20 +721,20 @@ "type": "github" } ], - "time": "2023-04-17T12:15:40+00:00" + "time": "2024-08-22T04:31:57+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.0.1", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/fd9329ab3368f59fe1fe808a189c51086bd4b6bd", - "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { @@ -753,7 +773,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -761,7 +782,7 @@ "type": "github" } ], - "time": "2023-02-10T16:53:14+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", @@ -828,16 +849,16 @@ }, { "name": "phpunit/php-text-template", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { @@ -875,7 +896,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -883,7 +905,7 @@ "type": "github" } ], - "time": "2023-02-03T06:56:46+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", @@ -946,16 +968,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.1.2", + "version": "10.5.46", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b" + "reference": "8080be387a5be380dda48c6f41cee4a13aadab3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6f0cd95be71add539f8fd2be25b2a4a29789000b", - "reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8080be387a5be380dda48c6f41cee4a13aadab3d", + "reference": "8080be387a5be380dda48c6f41cee4a13aadab3d", "shasum": "" }, "require": { @@ -965,26 +987,26 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.13.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.1", - "phpunit/php-file-iterator": "^4.0", - "phpunit/php-invoker": "^4.0", - "phpunit/php-text-template": "^3.0", - "phpunit/php-timer": "^6.0", - "sebastian/cli-parser": "^2.0", - "sebastian/code-unit": "^2.0", - "sebastian/comparator": "^5.0", - "sebastian/diff": "^5.0", - "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", - "sebastian/global-state": "^6.0", - "sebastian/object-enumerator": "^5.0", - "sebastian/recursion-context": "^5.0", - "sebastian/type": "^4.0", - "sebastian/version": "^4.0" + "phpunit/php-code-coverage": "^10.1.16", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.3", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.2", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.0", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -995,7 +1017,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -1027,7 +1049,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.46" }, "funding": [ { @@ -1038,12 +1060,20 @@ "url": "https://github.com/sebastianbergmann", "type": "github" }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2023-04-22T07:38:19+00:00" + "time": "2025-05-02T06:46:24+00:00" }, { "name": "psr/container", @@ -1100,16 +1130,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -1144,22 +1174,22 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "sebastian/cli-parser", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { @@ -1194,7 +1224,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -1202,7 +1233,7 @@ "type": "github" } ], - "time": "2023-02-03T06:58:15+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", @@ -1317,16 +1348,16 @@ }, { "name": "sebastian/comparator", - "version": "5.0.0", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", "shasum": "" }, "require": { @@ -1337,7 +1368,7 @@ "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { @@ -1381,7 +1412,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3" }, "funding": [ { @@ -1389,24 +1421,24 @@ "type": "github" } ], - "time": "2023-02-03T07:07:16+00:00" + "time": "2024-10-18T14:56:07+00:00" }, { "name": "sebastian/complexity", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -1415,7 +1447,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -1438,7 +1470,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -1446,20 +1479,20 @@ "type": "github" } ], - "time": "2023-02-03T06:59:47+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "5.0.1", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", - "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { @@ -1467,12 +1500,12 @@ }, "require-dev": { "phpunit/phpunit": "^10.0", - "symfony/process": "^4.2 || ^5" + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1505,7 +1538,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -1513,20 +1546,20 @@ "type": "github" } ], - "time": "2023-03-23T05:12:41+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "6.0.1", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { @@ -1541,7 +1574,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -1569,7 +1602,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -1577,20 +1610,20 @@ "type": "github" } ], - "time": "2023-04-11T05:39:26+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "5.0.0", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { @@ -1604,7 +1637,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1646,7 +1679,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -1654,20 +1688,20 @@ "type": "github" } ], - "time": "2023-02-03T07:06:49+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.0", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "aab257c712de87b90194febd52e4d184551c2d44" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", - "reference": "aab257c712de87b90194febd52e4d184551c2d44", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { @@ -1701,13 +1735,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -1715,24 +1750,24 @@ "type": "github" } ], - "time": "2023-02-03T07:07:38+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -1764,7 +1799,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -1772,7 +1808,7 @@ "type": "github" } ], - "time": "2023-02-03T07:08:02+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", @@ -2060,16 +2096,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.12.2", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa", + "reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa", "shasum": "" }, "require": { @@ -2079,11 +2115,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -2098,55 +2134,80 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-04-13T04:10:18+00:00" }, { "name": "symfony/config", - "version": "v6.2.7", + "version": "v6.4.14", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "249271da6f545d6579e0663374f8249a80be2893" + "reference": "4e55e7e4ffddd343671ea972216d4509f46c22ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/249271da6f545d6579e0663374f8249a80be2893", - "reference": "249271da6f545d6579e0663374f8249a80be2893", + "url": "https://api.github.com/repos/symfony/config/zipball/4e55e7e4ffddd343671ea972216d4509f46c22ef", + "reference": "4e55e7e4ffddd343671ea972216d4509f46c22ef", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/filesystem": "^5.4|^6.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^5.4|^6.0|^7.0", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<5.4" + "symfony/finder": "<5.4", + "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/yaml": "^5.4|^6.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -2174,7 +2235,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.2.7" + "source": "https://github.com/symfony/config/tree/v6.4.14" }, "funding": [ { @@ -2190,34 +2251,34 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2024-11-04T11:33:53+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.2.10", + "version": "v6.4.20", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "d732a66a2672669232c0b4536c8c96724a679780" + "reference": "c49796a9184a532843e78e50df9e55708b92543a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d732a66a2672669232c0b4536c8c96724a679780", - "reference": "d732a66a2672669232c0b4536c8c96724a679780", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c49796a9184a532843e78e50df9e55708b92543a", + "reference": "c49796a9184a532843e78e50df9e55708b92543a", "shasum": "" }, "require": { "php": ">=8.1", "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/service-contracts": "^1.1.6|^2.0|^3.0", - "symfony/var-exporter": "^6.2.7" + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4.20|^7.2.5" }, "conflict": { "ext-psr": "<1.1|>=2", "symfony/config": "<6.1", "symfony/finder": "<5.4", - "symfony/proxy-manager-bridge": "<6.2", + "symfony/proxy-manager-bridge": "<6.3", "symfony/yaml": "<5.4" }, "provide": { @@ -2225,15 +2286,9 @@ "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^6.1", - "symfony/expression-language": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/yaml": "" + "symfony/config": "^6.1|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -2261,7 +2316,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.2.10" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.20" }, "funding": [ { @@ -2277,20 +2332,20 @@ "type": "tidelift" } ], - "time": "2023-04-21T15:42:15+00:00" + "time": "2025-03-13T09:55:08+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.1", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -2298,12 +2353,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -2328,7 +2383,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -2344,20 +2399,20 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:25:55+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", - "version": "v6.2.10", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894" + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd588debf7d1bc16a2c84b4b3b71145d9946b894", - "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4856c9cf585d5a0313d8d35afd681a526f038dd3", + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3", "shasum": "" }, "require": { @@ -2365,6 +2420,9 @@ "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" + }, "type": "library", "autoload": { "psr-4": { @@ -2391,7 +2449,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.10" + "source": "https://github.com/symfony/filesystem/tree/v6.4.13" }, "funding": [ { @@ -2407,24 +2465,24 @@ "type": "tidelift" } ], - "time": "2023-04-18T13:46:08+00:00" + "time": "2024-10-25T15:07:50+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -2434,12 +2492,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2473,7 +2528,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -2489,24 +2544,25 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { - "php": ">=7.1" + "ext-iconv": "*", + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -2516,12 +2572,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2556,7 +2609,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -2572,40 +2625,38 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.2.1", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "a8c9cedf55f314f3a186041d19537303766df09a" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", - "reference": "a8c9cedf55f314f3a186041d19537303766df09a", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -2641,7 +2692,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -2657,27 +2708,30 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:32:47+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.2.10", + "version": "v6.4.21", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "9a07920c2058bafee921ce4d90aeef2193837d63" + "reference": "717e7544aa99752c54ecba5c0e17459c48317472" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/9a07920c2058bafee921ce4d90aeef2193837d63", - "reference": "9a07920c2058bafee921ce4d90aeef2193837d63", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/717e7544aa99752c54ecba5c0e17459c48317472", + "reference": "717e7544aa99752c54ecba5c0e17459c48317472", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { - "symfony/var-dumper": "^5.4|^6.0" + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -2715,7 +2769,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.2.10" + "source": "https://github.com/symfony/var-exporter/tree/v6.4.21" }, "funding": [ { @@ -2731,20 +2785,20 @@ "type": "tidelift" } ], - "time": "2023-04-21T08:33:05+00:00" + "time": "2025-04-27T21:06:26+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -2773,7 +2827,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -2781,17 +2835,17 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.0" + "php": ">=8.1" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/src/Session.php b/src/Session.php index e46e593..318ad28 100644 --- a/src/Session.php +++ b/src/Session.php @@ -2,9 +2,11 @@ namespace Gt\Session; use ArrayAccess; +use ArrayObject; use Gt\TypeSafeGetter\NullableTypeSafeGetter; use Gt\TypeSafeGetter\TypeSafeGetter; use SessionHandlerInterface; +use Traversable; class Session implements SessionContainer, TypeSafeGetter { use NullableTypeSafeGetter; @@ -24,16 +26,22 @@ class Session implements SessionContainer, TypeSafeGetter { protected string $id; protected SessionHandlerInterface $sessionHandler; protected ?SessionStore $store; + /** @var array */ + protected array $config; - /** @param ArrayAccess|array $config */ + /** @param iterable $config */ public function __construct( SessionHandlerInterface $sessionHandler, - private array|ArrayAccess $config = [], - string $id = null, + iterable $config = [], + ?string $id = null, ) { $this->sessionHandler = $sessionHandler; - $this->setIniDefaults($config); + if(!is_array($config)) { + $config = iterator_to_array($config); + } + /** @var array $config */ + $this->config = $config; if(is_null($id)) { $id = $this->getId(); @@ -120,9 +128,10 @@ protected function getAbsolutePath(string $path):string { return $path; } + /** @SuppressWarnings(PHPMD.Superglobals) */ protected function createNewId():string { - if($this->config->offsetGet("use_trans_sid") && !$this->config->offsetGet("use_cookies")) { - return $_GET[$this->config->offsetGet("name")] ?? session_create_id(); + if($this->config["use_trans_sid"] && !$this->config["use_cookies"]) { + return $_GET[$this->config["name"]] ?? session_create_id(); } return session_create_id() ?: ""; } @@ -138,63 +147,77 @@ public function write():bool { ); } - /** @param ArrayAccess|array $config */ - private function setIniDefaults(ArrayAccess|array $config):void { - ini_set( - "session.sid_length", - $config["sid_length"] - ?? self::DEFAULT_SESSION_ID_LENGTH - ); - ini_set( - "session.sid_bits_per_character", - $config["sid_bits_per_character"] - ?? (string)self::DEFAULT_SESSION_ID_BITS_PER_CHARACTER - ); - } - /** * @param string $sessionPath * @param string $sessionName - * @param ArrayAccess|array $config + * @param array $config * @return void */ private function attemptStart( string $sessionPath, string $sessionName, - ArrayAccess|array $config, + array $config, ):void { -// Allow a single failure to start session. If it fails to start, - // destroy the existing session. + $sessionOptions = $this->getSessionOptions( + $sessionPath, + $sessionName, + $config, + ); + $this->tryStartSession($sessionOptions); + } + + /** + * @param array $config + * @return array + */ + private function getSessionOptions( + string $sessionPath, + string $sessionName, + array $config + ):array { + $defaultConfig = [ + "use_only_cookies" => true, + "use_cookies" => true, + "use_trans_sid" => false, + "cookie_lifetime" => self::DEFAULT_SESSION_LIFETIME, + "cookie_path" => self::DEFAULT_COOKIE_PATH, + "cookie_domain" => self::DEFAULT_SESSION_DOMAIN, + "cookie_secure" => self::DEFAULT_SESSION_SECURE, + "cookie_httponly" => self::DEFAULT_SESSION_HTTPONLY, + "cookie_samesite" => self::DEFAULT_COOKIE_SAMESITE, + "use_strict_mode" => self::DEFAULT_STRICT_MODE, + ]; + + $config = array_merge($defaultConfig, $config); + + return [ + "save_path" => $sessionPath, + "name" => $sessionName, + "serialize_handler" => "php_serialize", + "use_only_cookies" => $config["use_only_cookies"], + "use_cookies" => $config["use_cookies"], + "use_trans_sid" => $config["use_trans_sid"], + "cookie_lifetime" => $config["cookie_lifetime"], + "cookie_path" => $config["cookie_path"], + "cookie_domain" => $config["cookie_domain"], + "cookie_secure" => $config["cookie_secure"], + "cookie_httponly" => $config["cookie_httponly"], + "cookie_samesite" => $config["cookie_samesite"], + "use_strict_mode" => $config["use_strict_mode"], + ]; + } + + /** @param array $sessionOptions */ + private function tryStartSession(array $sessionOptions):void { $startAttempts = 0; do { - $success = session_start([ - "save_path" => $sessionPath, - "name" => $sessionName, - "serialize_handler" => "php_serialize", - "use_only_cookies" => $config["use_only_cookies"] ?? true, - "use_cookies" => $config["use_cookies"] ?? true, - "use_trans_sid" => $config["use_trans_sid"] ?? false, - "cookie_lifetime" => $config["cookie_lifetime"] - ?? self::DEFAULT_SESSION_LIFETIME, - "cookie_path" => $config["cookie_path"] - ?? self::DEFAULT_COOKIE_PATH, - "cookie_domain" => $config["cookie_domain"] - ?? self::DEFAULT_SESSION_DOMAIN, - "cookie_secure" => $config["cookie_secure"] - ?? self::DEFAULT_SESSION_SECURE, - "cookie_httponly" => $config["cookie_httponly"] - ?? self::DEFAULT_SESSION_HTTPONLY, - "cookie_samesite" => $config["cookie_samesite"] - ?? self::DEFAULT_COOKIE_SAMESITE, - "use_strict_mode" => $config["use_strict_mode"] - ?? self::DEFAULT_STRICT_MODE, - ]); - + $success = session_start($sessionOptions); if(!$success) { - // phpcs:ignore + //phpcs:ignore @session_destroy(); } $startAttempts++; - } while(!$success && $startAttempts <= 1); + } + while(!$success && $startAttempts <= 1); } } diff --git a/src/SessionStore.php b/src/SessionStore.php index 10a8a6d..e1a32f3 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -1,10 +1,12 @@ name = $name; $this->session = $session; @@ -27,6 +29,10 @@ public function __construct( $this->data = []; } + public function count():int { + return count($this->data); + } + public function setData(string $key, mixed $value):void { $this->data[$key] = $value; } @@ -173,7 +179,7 @@ private function normaliseKey(string $key):string { return $key; } - public function remove(string $key = null):void { + public function remove(?string $key = null):void { if(is_null($key)) { foreach(array_keys($this->stores) as $i) { unset($this->stores[$i]); @@ -186,16 +192,16 @@ public function remove(string $key = null):void { $store = $this; $lastDotPosition = strrpos($key, "."); - if ($lastDotPosition !== false) { + if($lastDotPosition !== false) { $namespace = $this->getNamespaceFromKey($key); $store = $this->getStore($namespace); } - if (is_null($store)) { + if(is_null($store)) { return; } - if ($lastDotPosition !== false) { + if($lastDotPosition !== false) { $key = substr($key, $lastDotPosition + 1); } diff --git a/test/phpunit/SessionStoreTest.php b/test/phpunit/SessionStoreTest.php index 30d53b2..27417b0 100644 --- a/test/phpunit/SessionStoreTest.php +++ b/test/phpunit/SessionStoreTest.php @@ -134,4 +134,21 @@ public function testGetDateTime():void { $dateTime->setTimestamp($numericValue); self::assertEquals($dateTime, $sut->getDateTime("test.value")); } + + public function testCount():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $rawData = [ + "one" => "first", + "two" => "second", + "three" => "third", + ]; + + foreach($rawData as $key => $value) { + $sut->set($key, $value); + } + + self::assertCount(3, $sut); + } } From 02bec9f80dbac2893578f73f39bc1cc4d18b8888 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 5 May 2025 14:35:54 +0100 Subject: [PATCH 093/110] Iterable session store (#254) * feature: type safe getters closes #81 * loosen type (can be array access) * feature: implement countable closes #12 * ci: improve ci, fix security vulnerability * build: bump deps * tidy: fix deprecations * tidy: refactor classes from static analysis * feature: Iterable SessionStore closes #11 --------- Co-authored-by: Greg Bowler --- src/SessionStore.php | 26 +++++++++++++------------- test/phpunit/SessionStoreTest.php | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/SessionStore.php b/src/SessionStore.php index e1a32f3..07b9788 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -1,20 +1,24 @@ + * @SuppressWarnings(PHPMD.TooManyPublicMethods) + */ +class SessionStore + extends ArrayIterator + implements SessionContainer, TypeSafeGetter, Countable { use NullableTypeSafeGetter; protected string $name; protected Session $session; /** @var array */ protected array $stores; - /** @var array */ - protected array $data; protected ?SessionStore $parentStore; public function __construct( @@ -26,23 +30,19 @@ public function __construct( $this->session = $session; $this->parentStore = $parentStore; $this->stores = []; - $this->data = []; - } - - public function count():int { - return count($this->data); + parent::__construct(); } public function setData(string $key, mixed $value):void { - $this->data[$key] = $value; + $this->offsetSet($key, $value); } public function getData(string $key):mixed { - return $this->data[$key] ?? null; + return $this->offsetGet($key) ?? null; } public function containsData(string $key):bool { - return isset($this->data[$key]); + return $this->offsetExists($key); } public function containsStore(string $key):bool { @@ -50,7 +50,7 @@ public function containsStore(string $key):bool { } public function removeData(string $key):void { - unset($this->data[$key]); + $this->offsetUnset($key); } public function removeStore(string $key):void { diff --git a/test/phpunit/SessionStoreTest.php b/test/phpunit/SessionStoreTest.php index 27417b0..2124cb3 100644 --- a/test/phpunit/SessionStoreTest.php +++ b/test/phpunit/SessionStoreTest.php @@ -151,4 +151,25 @@ public function testCount():void { self::assertCount(3, $sut); } + + + public function testSessionStoreIsIterable():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + + $rawData = [ + "key1" => "value1", + "key2" => "value2", + "key3" => "value3", + ]; + + foreach($rawData as $key => $value) { + $sut->set($key, $value); + } + + foreach($sut as $key => $value) { + self::assertArrayHasKey($key, $rawData); + self::assertSame($rawData[$key], $value); + } + } } From 5562c3eece80cc2948993b2fd65c5f15f07eb275 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 7 May 2025 14:29:30 +0100 Subject: [PATCH 094/110] Flash session (#255) * feature: type safe getters closes #81 * loosen type (can be array access) * feature: flash sessions closes #3 * tweak: check offset before getting offset (suppress php warning) --------- Co-authored-by: Greg Bowler --- src/Flash.php | 32 ++++++++++++++++++++ src/FlashMessage.php | 9 ++++++ src/SessionStore.php | 6 +++- test/FlashTest.php | 69 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 src/Flash.php create mode 100644 src/FlashMessage.php create mode 100644 test/FlashTest.php diff --git a/src/Flash.php b/src/Flash.php new file mode 100644 index 0000000..2ee0bb7 --- /dev/null +++ b/src/Flash.php @@ -0,0 +1,32 @@ +session->get("queue.$name"); + if(!$queue) { + $queue = new SplQueue(); + $this->session->set("queue.$name", $queue); + } + + $queue->enqueue(new FlashMessage($name, $message)); + } + + public function consume(string $name):?FlashMessage { + /** @var null|SplQueue $queue */ + $queue = $this->session->get("queue.$name"); + try { + return $queue->dequeue(); + } + catch(RuntimeException $e) { + $this->session->remove("queue.$name"); + return null; + } + } + +} diff --git a/src/FlashMessage.php b/src/FlashMessage.php new file mode 100644 index 0000000..7475eff --- /dev/null +++ b/src/FlashMessage.php @@ -0,0 +1,9 @@ +offsetGet($key) ?? null; + if(!$this->offsetExists($key)) { + return null; + } + + return $this->offsetGet($key); } public function containsData(string $key):bool { diff --git a/test/FlashTest.php b/test/FlashTest.php new file mode 100644 index 0000000..8056d6d --- /dev/null +++ b/test/FlashTest.php @@ -0,0 +1,69 @@ +expects(self::once()) + ->method("get") + ->with("queue.test") + ->willReturn(null); + $sessionStore->expects(self::once()) + ->method("set") + ->with( + self::equalTo("queue.test"), + self::isInstanceOf(SplQueue::class) + ); + + $sut = new Flash($sessionStore); + $sut->put("test", "Test message"); + } + + public function testConsume_none():void { + $queue = self::createMock(SplQueue::class); + $queue->expects(self::once()) + ->method("dequeue") + ->willThrowException(new RuntimeException("Can't shift from an empty datastructure")); + $sessionStore = self::createMock(SessionStore::class); + $sessionStore->expects(self::once()) + ->method("get") + ->with("queue.test") + ->willReturn($queue); + $sut = new Flash($sessionStore); + $flashMessage = $sut->consume("test"); + self::assertNull($flashMessage); + } + + public function testConsume():void { + $fm1 = new FlashMessage("test", "First"); + $fm2 = new FlashMessage("test", "Second"); + + $queue = self::createMock(SplQueue::class); + $queue->expects(self::exactly(3)) + ->method("dequeue") + ->willReturnOnConsecutiveCalls($fm1, $fm2); + + $sessionStore = self::createMock(SessionStore::class); + $sessionStore->expects(self::exactly(3)) + ->method("get") + ->with("queue.test") + ->willReturn($queue); + $sessionStore->expects(self::once()) + ->method("remove") + ->with("queue.test"); + $sut = new Flash($sessionStore); + + $flashMessage = $sut->consume("test"); + self::assertInstanceOf(FlashMessage::class, $flashMessage); + self::assertSame("First", $flashMessage->message); + $flashMessage = $sut->consume("test"); + self::assertInstanceOf(FlashMessage::class, $flashMessage); + self::assertSame("Second", $flashMessage->message); + $flashMessage = $sut->consume("test"); + self::assertNull($flashMessage); + } +} From 3ad0bb52bbfb2c5b9dd212220aa336c4d2176f22 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 7 May 2025 15:58:50 +0100 Subject: [PATCH 095/110] Upgrade PHPMD CI (#256) * feature: type safe getters closes #81 * loosen type (can be array access) * feature: flash sessions closes #3 * tweak: check offset before getting offset (suppress php warning) * ci: use phpmd@v2 --------- Co-authored-by: Greg Bowler --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 948ea04..7de7c9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,7 @@ jobs: run: tar -xvf /tmp/github-actions/build.tar ./ - name: PHP Mess Detector - uses: php-actions/phpmd@v1 + uses: php-actions/phpmd@v2 with: php_version: ${{ matrix.php }} path: src/ From bb3c8aabd7f07766eb346f20cd3fc4c7dddcfa32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 09:24:02 +0100 Subject: [PATCH 096/110] Bump phpstan/phpstan from 1.12.25 to 2.1.14 (#257) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.12.25 to 2.1.14. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/2.1.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/1.12.25...2.1.14) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.1.14 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.json | 2 +- composer.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index cf6ee88..63dbf65 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "phpgt/typesafegetter": "^1.3" }, "require-dev": { - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^10.1", "phpmd/phpmd": "^2.13", "squizlabs/php_codesniffer": "^3.7" diff --git a/composer.lock b/composer.lock index 0160b61..a6e3f05 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": "d32bb34f857ad466056beaa4e80cf68a", + "content-hash": "90f742569783bb1b522aa97fe7d3d045", "packages": [ { "name": "phpgt/typesafegetter", @@ -589,20 +589,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.25", + "version": "2.1.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e310849a19e02b8bfcbb63147f495d8f872dd96f" + "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e310849a19e02b8bfcbb63147f495d8f872dd96f", - "reference": "e310849a19e02b8bfcbb63147f495d8f872dd96f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8f2e03099cac24ff3b379864d171c5acbfc6b9a2", + "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -643,7 +643,7 @@ "type": "github" } ], - "time": "2025-04-27T12:20:45+00:00" + "time": "2025-05-02T15:32:28+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2840,12 +2840,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.1" }, - "platform-dev": {}, - "plugin-api-version": "2.6.0" + "platform-dev": [], + "plugin-api-version": "2.3.0" } From 2a5fdb91f44246267fd5b30afe6ae3f75616684a Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 12 Jun 2025 11:35:17 +0100 Subject: [PATCH 097/110] tweak: check for old use_trans_sid key --- src/Session.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Session.php b/src/Session.php index 318ad28..de9dcec 100644 --- a/src/Session.php +++ b/src/Session.php @@ -130,7 +130,7 @@ protected function getAbsolutePath(string $path):string { /** @SuppressWarnings(PHPMD.Superglobals) */ protected function createNewId():string { - if($this->config["use_trans_sid"] && !$this->config["use_cookies"]) { + if(($this->config["use_trans_sid"] ?? null) && !$this->config["use_cookies"]) { return $_GET[$this->config["name"]] ?? session_create_id(); } return session_create_id() ?: ""; @@ -196,7 +196,7 @@ private function getSessionOptions( "serialize_handler" => "php_serialize", "use_only_cookies" => $config["use_only_cookies"], "use_cookies" => $config["use_cookies"], - "use_trans_sid" => $config["use_trans_sid"], + "use_trans_sid" => $config["use_trans_sid"] ?? false, "cookie_lifetime" => $config["cookie_lifetime"], "cookie_path" => $config["cookie_path"], "cookie_domain" => $config["cookie_domain"], From 01b718a99cecb7dc40b0ff3a136417292d02ed84 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 12 Jun 2025 11:36:59 +0100 Subject: [PATCH 098/110] tweak: improve static analysis --- src/Flash.php | 2 +- src/Session.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Flash.php b/src/Flash.php index 2ee0bb7..0e1e7c6 100644 --- a/src/Flash.php +++ b/src/Flash.php @@ -18,7 +18,7 @@ public function put(string $name, string $message):void { } public function consume(string $name):?FlashMessage { - /** @var null|SplQueue $queue */ + /** @var null|SplQueue $queue */ $queue = $this->session->get("queue.$name"); try { return $queue->dequeue(); diff --git a/src/Session.php b/src/Session.php index de9dcec..d6e4e40 100644 --- a/src/Session.php +++ b/src/Session.php @@ -130,7 +130,8 @@ protected function getAbsolutePath(string $path):string { /** @SuppressWarnings(PHPMD.Superglobals) */ protected function createNewId():string { - if(($this->config["use_trans_sid"] ?? null) && !$this->config["use_cookies"]) { + if(($this->config["use_trans_sid"] ?? null) + && !$this->config["use_cookies"]) { return $_GET[$this->config["name"]] ?? session_create_id(); } return session_create_id() ?: ""; From ddf4b53920445240410719f1e2b24194b6eb311d Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 12 Jun 2025 11:37:30 +0100 Subject: [PATCH 099/110] tweak: remove obsolete test --- phpcs.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/phpcs.xml b/phpcs.xml index b771656..ad96b86 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -25,7 +25,6 @@ - From 08de9ecc2e14911b6297cea09873cea719d7de8c Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 1 Jul 2025 14:58:36 +0100 Subject: [PATCH 100/110] tweak: only write if session is active --- src/SessionStore.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SessionStore.php b/src/SessionStore.php index e934303..a9d15f4 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -71,6 +71,10 @@ public function removeDataOrStore(string $key):void { } public function write():void { + if(!isset($this->session)) { + return; + } + $this->session->write(); } From acdf1f7e6bb7aafab7daf155fc3e8d55788b9e81 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 31 Jul 2025 12:48:09 +0100 Subject: [PATCH 101/110] fix: destroy previous session if unserialize fails closes #261 (#262) * fix: destroy previous session if unserialize fails closes #261 * test: improve tests * build: 8.2+ --- .github/workflows/ci.yml | 12 +-- composer.json | 2 +- composer.lock | 195 +++++++++++++++++++++------------------ src/FileHandler.php | 2 +- src/Session.php | 38 ++++++-- src/SessionStore.php | 6 +- 6 files changed, 145 insertions(+), 110 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7de7c9d..2b440ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ 8.1, 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4 ] steps: - uses: actions/checkout@v4 @@ -42,7 +42,7 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.1, 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4 ] outputs: coverage: ${{ steps.store-coverage.outputs.coverage_text }} @@ -77,7 +77,7 @@ jobs: needs: [ phpunit ] strategy: matrix: - php: [ 8.1, 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4 ] steps: - uses: actions/checkout@v4 @@ -98,7 +98,7 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.1, 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4 ] steps: - uses: actions/download-artifact@v4 @@ -120,7 +120,7 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.1, 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4 ] steps: - uses: actions/download-artifact@v4 @@ -144,7 +144,7 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.1, 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4 ] steps: - uses: actions/download-artifact@v4 diff --git a/composer.json b/composer.json index 63dbf65..48ab401 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "license": "MIT", "require": { - "php": ">=8.1", + "php": ">=8.2", "phpgt/typesafegetter": "^1.3" }, "require-dev": { diff --git a/composer.lock b/composer.lock index a6e3f05..49e9755 100644 --- a/composer.lock +++ b/composer.lock @@ -207,16 +207,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.1", + "version": "1.13.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", - "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", "shasum": "" }, "require": { @@ -255,7 +255,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" }, "funding": [ { @@ -263,20 +263,20 @@ "type": "tidelift" } ], - "time": "2025-04-29T12:36:36+00:00" + "time": "2025-07-05T12:25:42+00:00" }, { "name": "nikic/php-parser", - "version": "v5.4.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", "shasum": "" }, "require": { @@ -319,9 +319,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" }, - "time": "2024-12-30T11:07:19+00:00" + "time": "2025-07-27T20:03:57+00:00" }, { "name": "pdepend/pdepend", @@ -589,16 +589,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.14", + "version": "2.1.21", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2" + "reference": "1ccf445757458c06a04eb3f803603cb118fe5fa6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8f2e03099cac24ff3b379864d171c5acbfc6b9a2", - "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1ccf445757458c06a04eb3f803603cb118fe5fa6", + "reference": "1ccf445757458c06a04eb3f803603cb118fe5fa6", "shasum": "" }, "require": { @@ -643,7 +643,7 @@ "type": "github" } ], - "time": "2025-05-02T15:32:28+00:00" + "time": "2025-07-28T19:35:08+00:00" }, { "name": "phpunit/php-code-coverage", @@ -968,16 +968,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.46", + "version": "10.5.48", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8080be387a5be380dda48c6f41cee4a13aadab3d" + "reference": "6e0a2bc39f6fae7617989d690d76c48e6d2eb541" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8080be387a5be380dda48c6f41cee4a13aadab3d", - "reference": "8080be387a5be380dda48c6f41cee4a13aadab3d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6e0a2bc39f6fae7617989d690d76c48e6d2eb541", + "reference": "6e0a2bc39f6fae7617989d690d76c48e6d2eb541", "shasum": "" }, "require": { @@ -987,7 +987,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.1", + "myclabs/deep-copy": "^1.13.3", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.1", @@ -1049,7 +1049,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.46" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.48" }, "funding": [ { @@ -1073,7 +1073,7 @@ "type": "tidelift" } ], - "time": "2025-05-02T06:46:24+00:00" + "time": "2025-07-11T04:07:17+00:00" }, { "name": "psr/container", @@ -2096,16 +2096,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.12.2", + "version": "3.13.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa" + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa", - "reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", "shasum": "" }, "require": { @@ -2176,38 +2176,38 @@ "type": "thanks_dev" } ], - "time": "2025-04-13T04:10:18+00:00" + "time": "2025-06-17T22:17:01+00:00" }, { "name": "symfony/config", - "version": "v6.4.14", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "4e55e7e4ffddd343671ea972216d4509f46c22ef" + "reference": "faef36e271bbeb74a9d733be4b56419b157762e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/4e55e7e4ffddd343671ea972216d4509f46c22ef", - "reference": "4e55e7e4ffddd343671ea972216d4509f46c22ef", + "url": "https://api.github.com/repos/symfony/config/zipball/faef36e271bbeb74a9d733be4b56419b157762e2", + "reference": "faef36e271bbeb74a9d733be4b56419b157762e2", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^5.4|^6.0|^7.0", + "symfony/filesystem": "^7.1", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<5.4", + "symfony/finder": "<6.4", "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2235,7 +2235,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.4.14" + "source": "https://github.com/symfony/config/tree/v7.3.2" }, "funding": [ { @@ -2246,49 +2246,52 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-11-04T11:33:53+00:00" + "time": "2025-07-26T13:55:06+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.4.20", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "c49796a9184a532843e78e50df9e55708b92543a" + "reference": "6cd2a1a77e8a0676a26e8bcddf10acfe7b0ba352" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c49796a9184a532843e78e50df9e55708b92543a", - "reference": "c49796a9184a532843e78e50df9e55708b92543a", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6cd2a1a77e8a0676a26e8bcddf10acfe7b0ba352", + "reference": "6cd2a1a77e8a0676a26e8bcddf10acfe7b0ba352", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^2.5|^3.0", + "symfony/service-contracts": "^3.5", "symfony/var-exporter": "^6.4.20|^7.2.5" }, "conflict": { "ext-psr": "<1.1|>=2", - "symfony/config": "<6.1", - "symfony/finder": "<5.4", - "symfony/proxy-manager-bridge": "<6.3", - "symfony/yaml": "<5.4" + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { "psr/container-implementation": "1.1|2.0", "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^6.1|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/config": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2316,7 +2319,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.4.20" + "source": "https://github.com/symfony/dependency-injection/tree/v7.3.2" }, "funding": [ { @@ -2327,25 +2330,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-03-13T09:55:08+00:00" + "time": "2025-07-30T17:31:46+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -2358,7 +2365,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -2383,7 +2390,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -2399,29 +2406,29 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/filesystem", - "version": "v6.4.13", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3" + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/4856c9cf585d5a0313d8d35afd681a526f038dd3", - "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^5.4|^6.4|^7.0" + "symfony/process": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2449,7 +2456,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.13" + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" }, "funding": [ { @@ -2460,12 +2467,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-25T15:07:50+00:00" + "time": "2025-07-07T08:17:47+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2629,16 +2640,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -2656,7 +2667,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -2692,7 +2703,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -2708,30 +2719,30 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.4.21", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "717e7544aa99752c54ecba5c0e17459c48317472" + "reference": "05b3e90654c097817325d6abd284f7938b05f467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/717e7544aa99752c54ecba5c0e17459c48317472", - "reference": "717e7544aa99752c54ecba5c0e17459c48317472", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/05b3e90654c097817325d6abd284f7938b05f467", + "reference": "05b3e90654c097817325d6abd284f7938b05f467", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { "symfony/property-access": "^6.4|^7.0", "symfony/serializer": "^6.4|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2769,7 +2780,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.21" + "source": "https://github.com/symfony/var-exporter/tree/v7.3.2" }, "funding": [ { @@ -2780,12 +2791,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-27T21:06:26+00:00" + "time": "2025-07-10T08:47:49+00:00" }, { "name": "theseer/tokenizer", @@ -2840,12 +2855,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.1" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/src/FileHandler.php b/src/FileHandler.php index 2753072..34eb12c 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -6,7 +6,7 @@ class FileHandler extends Handler { const EMPTY_PHP_ARRAY = "a:0:{}"; protected string $path; - /** @var array> */ + /** @var array $cache */ protected array $cache; /** diff --git a/src/Session.php b/src/Session.php index d6e4e40..0d23eea 100644 --- a/src/Session.php +++ b/src/Session.php @@ -3,9 +3,11 @@ use ArrayAccess; use ArrayObject; +use Exception; use Gt\TypeSafeGetter\NullableTypeSafeGetter; use Gt\TypeSafeGetter\TypeSafeGetter; use SessionHandlerInterface; +use Throwable; use Traversable; class Session implements SessionContainer, TypeSafeGetter { @@ -128,19 +130,31 @@ protected function getAbsolutePath(string $path):string { return $path; } - /** @SuppressWarnings(PHPMD.Superglobals) */ + /** @SuppressWarnings("PHPMD.Superglobals") */ protected function createNewId():string { if(($this->config["use_trans_sid"] ?? null) - && !$this->config["use_cookies"]) { + && !$this->config["use_cookies"]) { return $_GET[$this->config["name"]] ?? session_create_id(); } return session_create_id() ?: ""; } + /** @SuppressWarnings("PHPMD.EmptyCatchBlock") */ protected function readSessionData():?SessionStore { - return unserialize($this->sessionHandler->read($this->id)) ?: null; + try { + $data = $this->sessionHandler->read($this->id) ?: ""; + $store = unserialize($data); + if ($store instanceof SessionStore) { + return $store; + } + } + // PHPCS:ignore + catch (Throwable) {} + + return null; } + public function write():bool { return $this->sessionHandler->write( $this->id, @@ -208,14 +222,24 @@ private function getSessionOptions( ]; } - /** @param array $sessionOptions */ + /** + * @param array $sessionOptions + * @SuppressWarnings("PHPMD.EmptyCatchBlock") + */ private function tryStartSession(array $sessionOptions):void { $startAttempts = 0; do { - $success = session_start($sessionOptions); + $success = false; + + try { + $success = session_start($sessionOptions); + } + // PHPCS:ignore + catch(Throwable) {} + if(!$success) { - //phpcs:ignore - @session_destroy(); + session_destroy(); + session_regenerate_id(true); } $startAttempts++; } diff --git a/src/SessionStore.php b/src/SessionStore.php index a9d15f4..d8e4c4e 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -8,7 +8,7 @@ /** * @extends ArrayIterator - * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * @SuppressWarnings("PHPMD.TooManyPublicMethods") */ class SessionStore extends ArrayIterator @@ -71,10 +71,6 @@ public function removeDataOrStore(string $key):void { } public function write():void { - if(!isset($this->session)) { - return; - } - $this->session->write(); } From 934d39b17b1c545967df218cb58b0e779f0d7de6 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 13 Oct 2025 08:27:30 +0100 Subject: [PATCH 102/110] Add JetBrains sponsorship to README with H1 heading (#267) --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 668039a..0f0007e 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,9 @@ else { AuthenticationSystem::beginLogin($session->getStore("auth")); } ``` + +# Proudly sponsored by + +[JetBrains Open Source sponsorship program](https://www.jetbrains.com/community/opensource/) + +[![JetBrains logo.](https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg)](https://www.jetbrains.com/community/opensource/) From c9a50b491c53737dea9503ea297832138b89bfd5 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 31 Oct 2025 16:04:32 +0000 Subject: [PATCH 103/110] tweak: remove static function for test mockability (#269) --- src/SessionSetup.php | 2 +- src/SessionStoreFactory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SessionSetup.php b/src/SessionSetup.php index c548a9f..639fd0f 100644 --- a/src/SessionSetup.php +++ b/src/SessionSetup.php @@ -6,7 +6,7 @@ use SessionHandlerInterface; class SessionSetup { - public static function attachHandler( + public function attachHandler( string $handlerClass = SessionHandler::class ):SessionHandlerInterface { // Ensure class name is fully qualified. diff --git a/src/SessionStoreFactory.php b/src/SessionStoreFactory.php index 7e6aeb3..aaf6da0 100644 --- a/src/SessionStoreFactory.php +++ b/src/SessionStoreFactory.php @@ -2,7 +2,7 @@ namespace Gt\Session; class SessionStoreFactory { - public static function create( + public function create( string $namespace, Session $session, ):SessionStore { From a7ca8a830a77a9266a8ff42b5a1d77b158cadcfe Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 8 Jan 2026 11:04:12 +0000 Subject: [PATCH 104/110] tweak: protective checks when calling inbuilt session functions --- src/Session.php | 12 +++++++++--- src/SessionSetup.php | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Session.php b/src/Session.php index 0d23eea..f33ff6d 100644 --- a/src/Session.php +++ b/src/Session.php @@ -232,14 +232,20 @@ private function tryStartSession(array $sessionOptions):void { $success = false; try { - $success = session_start($sessionOptions); + if(session_status() !== PHP_SESSION_ACTIVE) { + $success = session_start($sessionOptions); + } } // PHPCS:ignore catch(Throwable) {} if(!$success) { - session_destroy(); - session_regenerate_id(true); + if(session_status() === PHP_SESSION_ACTIVE) { + session_destroy(); + } + if(session_id()) { + session_regenerate_id(true); + } } $startAttempts++; } diff --git a/src/SessionSetup.php b/src/SessionSetup.php index c548a9f..47367f5 100644 --- a/src/SessionSetup.php +++ b/src/SessionSetup.php @@ -20,7 +20,9 @@ public static function attachHandler( // There is no need to set the save handler on the inbuilt SessionHandler as // it's already set. if($handlerClass !== SessionHandler::class) { - session_set_save_handler($sessionHandler, true); + if(session_status() !== PHP_SESSION_ACTIVE) { + session_set_save_handler($sessionHandler, true); + } } return $sessionHandler; From 7a2b2163fc047ea21bd831b15ad08d2a7c118f3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:26:47 +0000 Subject: [PATCH 105/110] build(deps): bump phpgt/typesafegetter from 1.3.2 to 1.3.3 (#274) Bumps [phpgt/typesafegetter](https://github.com/PhpGt/TypeSafeGetter) from 1.3.2 to 1.3.3. - [Release notes](https://github.com/PhpGt/TypeSafeGetter/releases) - [Commits](https://github.com/PhpGt/TypeSafeGetter/compare/v1.3.2...v1.3.3) --- updated-dependencies: - dependency-name: phpgt/typesafegetter dependency-version: 1.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 49e9755..c52a1bc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "90f742569783bb1b522aa97fe7d3d045", + "content-hash": "5bf8b129b89ebdbd2f4b53a66a2b077e", "packages": [ { "name": "phpgt/typesafegetter", - "version": "v1.3.2", + "version": "v1.3.3", "source": { "type": "git", - "url": "https://github.com/PhpGt/TypeSafeGetter.git", - "reference": "f760c05a37b1cc188dcbf800c5fdfab8a926b4b0" + "url": "https://github.com/phpgt/TypeSafeGetter.git", + "reference": "a0d339103828791989cbb81f760d252f3c2f8b8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/TypeSafeGetter/zipball/f760c05a37b1cc188dcbf800c5fdfab8a926b4b0", - "reference": "f760c05a37b1cc188dcbf800c5fdfab8a926b4b0", + "url": "https://api.github.com/repos/phpgt/TypeSafeGetter/zipball/a0d339103828791989cbb81f760d252f3c2f8b8c", + "reference": "a0d339103828791989cbb81f760d252f3c2f8b8c", "shasum": "" }, "require": { @@ -47,8 +47,8 @@ ], "description": "An interface for objects that expose type-safe getter methods.", "support": { - "issues": "https://github.com/PhpGt/TypeSafeGetter/issues", - "source": "https://github.com/PhpGt/TypeSafeGetter/tree/v1.3.2" + "issues": "https://github.com/phpgt/TypeSafeGetter/issues", + "source": "https://github.com/phpgt/TypeSafeGetter/tree/v1.3.3" }, "funding": [ { @@ -56,7 +56,7 @@ "type": "github" } ], - "time": "2023-04-28T14:42:27+00:00" + "time": "2026-03-10T22:28:01+00:00" } ], "packages-dev": [ @@ -2859,8 +2859,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.1" + "php": ">=8.2" }, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From edb23bda9de30a09f218c13ad8c99fd8a6b5470f Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Sat, 14 Mar 2026 14:23:35 +0000 Subject: [PATCH 106/110] Redis handler (#273) * build: suggest redis client for #272 * feature: dsn compatibility * feature: RedisHandler closes #272 * feature: implement SessionStoreInterface closes #62 * feature: add SessionStoreInterface closes #62 * refactor: remove additional abstractions * tidy: refactor RedisHandler to reduce complexity * build: php8.2 compatibility * test: pass all tests --- README.md | 37 ++++ composer.json | 17 ++ composer.lock | 271 +++++++++++++++++------------- phpcs.xml | 6 +- phpmd.xml | 11 +- src/Flash.php | 2 +- src/RedisHandler.php | 222 ++++++++++++++++++++++++ src/Session.php | 17 +- src/SessionStore.php | 4 +- src/SessionStoreFactory.php | 2 +- src/SessionStoreInterface.php | 22 +++ test/FlashTest.php | 8 +- test/phpunit/RedisHandlerTest.php | 182 ++++++++++++++++++++ test/phpunit/SessionStoreTest.php | 7 + test/phpunit/SessionTest.php | 12 ++ 15 files changed, 690 insertions(+), 130 deletions(-) create mode 100644 src/RedisHandler.php create mode 100644 src/SessionStoreInterface.php create mode 100644 test/phpunit/RedisHandlerTest.php diff --git a/README.md b/README.md index 0f0007e..3daf4a2 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,43 @@ else { } ``` +## Redis session storage + +This package now includes `Gt\Session\RedisHandler` for shared session storage. +It works with Redis-compatible backends such as Redis and Valkey, and is intended +for deployments where application nodes are disposable and session state needs to +survive traffic moving between servers. + +`RedisHandler` expects `save_path` to be a DSN rather than a filesystem path. +It uses the `phpredis` extension at runtime. + +Example production config: + +```ini +[session] +handler=Gt\Session\RedisHandler +save_path=rediss://default:secret@example-redis.internal:25061/0?prefix=GT:&ttl=1440 +name=GT +use_cookies=true +``` + +Supported DSN forms: + +- `redis://host:6379` +- `redis://:password@host:6379/0` +- `redis://username:password@host:6379/0` +- `rediss://username:password@host:6379/0` + +Useful query parameters: + +- `prefix`: key prefix for stored sessions, defaults to `:` +- `ttl`: session lifetime in seconds, defaults to `session.gc_maxlifetime` +- `timeout`: connection timeout in seconds +- `read_timeout`: socket read timeout in seconds +- `persistent=1`: enable persistent connections +- `persistent_id`: optional persistent connection pool id +- `verify_peer=0` / `verify_peer_name=0`: optional TLS verification flags + # Proudly sponsored by [JetBrains Open Source sponsorship program](https://www.jetbrains.com/community/opensource/) diff --git a/composer.json b/composer.json index 48ab401..78112b0 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,9 @@ "php": ">=8.2", "phpgt/typesafegetter": "^1.3" }, + "suggest": { + "ext-redis": "Required to use Gt\\Session\\RedisHandler." + }, "require-dev": { "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^10.1", @@ -14,6 +17,20 @@ "squizlabs/php_codesniffer": "^3.7" }, + "scripts": { + "phpunit": "vendor/bin/phpunit --configuration phpunit.xml", + "phpunit:coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --configuration phpunit.xml --coverage-text", + "phpstan": "vendor/bin/phpstan analyse --level 6 src", + "phpcs": "vendor/bin/phpcs src --standard=phpcs.xml", + "phpmd": "vendor/bin/phpmd src/ text phpmd.xml", + "test": [ + "@phpunit", + "@phpstan", + "@phpcs", + "@phpmd" + ] + }, + "autoload": { "psr-4": { "Gt\\Session\\": "./src" diff --git a/composer.lock b/composer.lock index c52a1bc..42fa268 100644 --- a/composer.lock +++ b/composer.lock @@ -207,16 +207,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.3", + "version": "1.13.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { @@ -255,7 +255,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, "funding": [ { @@ -263,20 +263,20 @@ "type": "tidelift" } ], - "time": "2025-07-05T12:25:42+00:00" + "time": "2025-08-01T08:46:24+00:00" }, { "name": "nikic/php-parser", - "version": "v5.6.0", + "version": "v5.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -319,9 +319,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" }, - "time": "2025-07-27T20:03:57+00:00" + "time": "2025-12-06T11:56:16+00:00" }, { "name": "pdepend/pdepend", @@ -589,16 +589,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.21", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "1ccf445757458c06a04eb3f803603cb118fe5fa6" - }, + "version": "2.1.40", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1ccf445757458c06a04eb3f803603cb118fe5fa6", - "reference": "1ccf445757458c06a04eb3f803603cb118fe5fa6", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", + "reference": "9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", "shasum": "" }, "require": { @@ -643,7 +638,7 @@ "type": "github" } ], - "time": "2025-07-28T19:35:08+00:00" + "time": "2026-02-23T15:04:35+00:00" }, { "name": "phpunit/php-code-coverage", @@ -968,16 +963,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.48", + "version": "10.5.63", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6e0a2bc39f6fae7617989d690d76c48e6d2eb541" + "reference": "33198268dad71e926626b618f3ec3966661e4d90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6e0a2bc39f6fae7617989d690d76c48e6d2eb541", - "reference": "6e0a2bc39f6fae7617989d690d76c48e6d2eb541", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33198268dad71e926626b618f3ec3966661e4d90", + "reference": "33198268dad71e926626b618f3ec3966661e4d90", "shasum": "" }, "require": { @@ -987,7 +982,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.3", + "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.1", @@ -998,13 +993,13 @@ "phpunit/php-timer": "^6.0.0", "sebastian/cli-parser": "^2.0.1", "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.3", + "sebastian/comparator": "^5.0.5", "sebastian/diff": "^5.1.1", "sebastian/environment": "^6.1.0", - "sebastian/exporter": "^5.1.2", + "sebastian/exporter": "^5.1.4", "sebastian/global-state": "^6.0.2", "sebastian/object-enumerator": "^5.0.0", - "sebastian/recursion-context": "^5.0.0", + "sebastian/recursion-context": "^5.0.1", "sebastian/type": "^4.0.0", "sebastian/version": "^4.0.1" }, @@ -1049,7 +1044,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.48" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.63" }, "funding": [ { @@ -1073,7 +1068,7 @@ "type": "tidelift" } ], - "time": "2025-07-11T04:07:17+00:00" + "time": "2026-01-27T05:48:37+00:00" }, { "name": "psr/container", @@ -1348,16 +1343,16 @@ }, { "name": "sebastian/comparator", - "version": "5.0.3", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e" + "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", - "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55dfef806eb7dfeb6e7a6935601fef866f8ca48d", + "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d", "shasum": "" }, "require": { @@ -1413,15 +1408,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.5" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" } ], - "time": "2024-10-18T14:56:07+00:00" + "time": "2026-01-24T09:25:16+00:00" }, { "name": "sebastian/complexity", @@ -1614,16 +1621,16 @@ }, { "name": "sebastian/exporter", - "version": "5.1.2", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf" + "reference": "0735b90f4da94969541dac1da743446e276defa6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6", + "reference": "0735b90f4da94969541dac1da743446e276defa6", "shasum": "" }, "require": { @@ -1632,7 +1639,7 @@ "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { @@ -1680,15 +1687,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" } ], - "time": "2024-03-02T07:17:12+00:00" + "time": "2025-09-24T06:09:11+00:00" }, { "name": "sebastian/global-state", @@ -1924,23 +1943,23 @@ }, { "name": "sebastian/recursion-context", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a", + "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a", "shasum": "" }, "require": { "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { @@ -1975,15 +1994,28 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" } ], - "time": "2023-02-03T07:05:40+00:00" + "time": "2025-08-10T07:50:56+00:00" }, { "name": "sebastian/type", @@ -2096,16 +2128,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.2", + "version": "3.13.5", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", - "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", "shasum": "" }, "require": { @@ -2122,11 +2154,6 @@ "bin/phpcs" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -2176,26 +2203,26 @@ "type": "thanks_dev" } ], - "time": "2025-06-17T22:17:01+00:00" + "time": "2025-11-04T16:30:35+00:00" }, { "name": "symfony/config", - "version": "v7.3.2", + "version": "v7.4.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "faef36e271bbeb74a9d733be4b56419b157762e2" + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/faef36e271bbeb74a9d733be4b56419b157762e2", - "reference": "faef36e271bbeb74a9d733be4b56419b157762e2", + "url": "https://api.github.com/repos/symfony/config/zipball/6c17162555bfb58957a55bb0e43e00035b6ae3d5", + "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5", "shasum": "" }, "require": { "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^7.1", + "symfony/filesystem": "^7.1|^8.0", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -2203,11 +2230,11 @@ "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" + "symfony/yaml": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -2235,7 +2262,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.3.2" + "source": "https://github.com/symfony/config/tree/v7.4.7" }, "funding": [ { @@ -2255,28 +2282,28 @@ "type": "tidelift" } ], - "time": "2025-07-26T13:55:06+00:00" + "time": "2026-03-06T10:41:14+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.3.2", + "version": "v7.4.7", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "6cd2a1a77e8a0676a26e8bcddf10acfe7b0ba352" + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6cd2a1a77e8a0676a26e8bcddf10acfe7b0ba352", - "reference": "6cd2a1a77e8a0676a26e8bcddf10acfe7b0ba352", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", + "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", "shasum": "" }, "require": { "php": ">=8.2", "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^3.5", - "symfony/var-exporter": "^6.4.20|^7.2.5" + "symfony/service-contracts": "^3.6", + "symfony/var-exporter": "^6.4.20|^7.2.5|^8.0" }, "conflict": { "ext-psr": "<1.1|>=2", @@ -2289,9 +2316,9 @@ "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0" + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -2319,7 +2346,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.3.2" + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.7" }, "funding": [ { @@ -2339,7 +2366,7 @@ "type": "tidelift" } ], - "time": "2025-07-30T17:31:46+00:00" + "time": "2026-03-03T07:48:48+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2410,16 +2437,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.3.2", + "version": "v7.4.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3ebc794fa5315e59fd122561623c2e2e4280538e", + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e", "shasum": "" }, "require": { @@ -2428,7 +2455,7 @@ "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0" + "symfony/process": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -2456,7 +2483,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + "source": "https://github.com/symfony/filesystem/tree/v7.4.6" }, "funding": [ { @@ -2476,11 +2503,11 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:47+00:00" + "time": "2026-02-25T16:50:00+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -2539,7 +2566,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -2550,6 +2577,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -2559,7 +2590,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -2620,7 +2651,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -2631,6 +2662,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -2640,16 +2675,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", "shasum": "" }, "require": { @@ -2703,7 +2738,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" }, "funding": [ { @@ -2714,25 +2749,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-25T09:37:31+00:00" + "time": "2025-07-15T11:30:57+00:00" }, { "name": "symfony/var-exporter", - "version": "v7.3.2", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "05b3e90654c097817325d6abd284f7938b05f467" + "reference": "03a60f169c79a28513a78c967316fbc8bf17816f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/05b3e90654c097817325d6abd284f7938b05f467", - "reference": "05b3e90654c097817325d6abd284f7938b05f467", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f", + "reference": "03a60f169c79a28513a78c967316fbc8bf17816f", "shasum": "" }, "require": { @@ -2740,9 +2779,9 @@ "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { - "symfony/property-access": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -2780,7 +2819,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.3.2" + "source": "https://github.com/symfony/var-exporter/tree/v7.4.0" }, "funding": [ { @@ -2800,20 +2839,20 @@ "type": "tidelift" } ], - "time": "2025-07-10T08:47:49+00:00" + "time": "2025-09-11T10:15:23+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.3", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", "shasum": "" }, "require": { @@ -2842,7 +2881,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" }, "funding": [ { @@ -2850,7 +2889,7 @@ "type": "github" } ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2025-11-17T20:03:58+00:00" } ], "aliases": [], diff --git a/phpcs.xml b/phpcs.xml index ad96b86..2d2aff4 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -19,7 +19,11 @@ - + + + + + diff --git a/phpmd.xml b/phpmd.xml index c30e0b4..d125c4d 100644 --- a/phpmd.xml +++ b/phpmd.xml @@ -25,7 +25,16 @@ - + + + + + + + + + + diff --git a/src/Flash.php b/src/Flash.php index 0e1e7c6..69c3aa4 100644 --- a/src/Flash.php +++ b/src/Flash.php @@ -5,7 +5,7 @@ use SplQueue; class Flash { - public function __construct(private readonly SessionStore $session) {} + public function __construct(private readonly SessionStoreInterface $session) {} public function put(string $name, string $message):void { $queue = $this->session->get("queue.$name"); diff --git a/src/RedisHandler.php b/src/RedisHandler.php new file mode 100644 index 0000000..9bda88a --- /dev/null +++ b/src/RedisHandler.php @@ -0,0 +1,222 @@ +parseSavePath($savePath, $name); + $client = $this->createClient(); + + $connected = $client->connect( + $config["host"], + $config["port"], + $config["timeout"], + $config["persistentId"], + 0, + $config["readTimeout"], + $config["context"], + ); + + if(!$connected) { + return false; + } + + if($config["auth"] !== null && !$client->auth($config["auth"])) { + return false; + } + + if($config["database"] > 0 && !$client->select($config["database"])) { + return false; + } + + $this->client = $client; + $this->prefix = $config["prefix"]; + $this->ttl = $config["ttl"]; + return true; + } + + public function close():bool { + if(is_null($this->client)) { + return true; + } + + return $this->client->close(); + } + + public function read(string $sessionId):string { + $value = $this->requireClient()->get($this->getKey($sessionId)); + return is_string($value) ? $value : ""; + } + + public function write(string $sessionId, string $sessionData):bool { + $client = $this->requireClient(); + $key = $this->getKey($sessionId); + + if($this->ttl > 0) { + return $client->setEx($key, $this->ttl, $sessionData); + } + + return $client->set($key, $sessionData); + } + + public function destroy(string $id = ""):bool { + return $this->requireClient()->del($this->getKey($id)) >= 0; + } + + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass + public function gc(int $maxLifeTime):int|false { + return 0; + } + // phpcs:enable + + /** + * @return array{ + * host:string, + * port:int, + * timeout:float, + * readTimeout:float, + * persistentId:?string, + * prefix:string, + * ttl:int, + * database:int, + * auth:array{string,string}|string|null, + * context:array{stream:array{verify_peer:bool,verify_peer_name:bool}}|null + * } + */ + private function parseSavePath(string $savePath, string $name):array { + $parts = parse_url($savePath); + if($parts === false || !isset($parts["host"])) { + throw new RuntimeException("Invalid Redis save_path DSN."); + } + + parse_str($parts["query"] ?? "", $query); + + [$host, $context] = $this->parseHostAndContext($parts, $query); + + return [ + "host" => $host, + "port" => (int)($parts["port"] ?? self::DEFAULT_PORT), + "timeout" => (float)($query["timeout"] ?? 0), + "readTimeout" => (float)($query["read_timeout"] ?? 0), + "persistentId" => $this->parsePersistentId($query), + "prefix" => $this->parsePrefix($query, $name), + "ttl" => (int)($query["ttl"] ?? ini_get("session.gc_maxlifetime")), + "database" => $this->parseDatabase($parts), + "auth" => $this->parseAuth($parts), + "context" => $context, + ]; + } + + /** + * @param array $parts + * @param array $query + * @return array{ + * 0:string, + * 1:array{stream:array{verify_peer:bool,verify_peer_name:bool}}|null + * } + */ + private function parseHostAndContext(array $parts, array $query):array { + $scheme = strtolower($parts["scheme"] ?? "redis"); + $host = $parts["host"]; + + if(!in_array($scheme, ["rediss", "tls"], true)) { + return [$host, null]; + } + + return [ + "tls://$host", + [ + "stream" => [ + "verify_peer" => filter_var( + $query["verify_peer"] ?? true, + FILTER_VALIDATE_BOOL + ), + "verify_peer_name" => filter_var( + $query["verify_peer_name"] ?? true, + FILTER_VALIDATE_BOOL + ), + ], + ], + ]; + } + + /** + * @param array $parts + * @return array{string,string}|string|null + */ + private function parseAuth(array $parts):array|string|null { + if(isset($parts["user"]) && $parts["user"] !== "" && isset($parts["pass"])) { + return [rawurldecode($parts["user"]), rawurldecode($parts["pass"])]; + } + + if(isset($parts["pass"])) { + return rawurldecode($parts["pass"]); + } + + return null; + } + + /** + * @param array $query + */ + private function parsePersistentId(array $query):?string { + if( + !isset($query["persistent"]) + || !filter_var($query["persistent"], FILTER_VALIDATE_BOOL) + ) { + return null; + } + + return is_string($query["persistent_id"] ?? null) + ? $query["persistent_id"] + : "phpgt-session"; + } + + /** + * @param array $query + */ + private function parsePrefix(array $query, string $name):string { + return is_string($query["prefix"] ?? null) + ? $query["prefix"] + : $name . self::DEFAULT_PREFIX_SEPARATOR; + } + + /** + * @param array $parts + */ + private function parseDatabase(array $parts):int { + return isset($parts["path"]) + ? (int)trim($parts["path"], "/") + : 0; + } + + private function getKey(string $sessionId):string { + return $this->prefix . $sessionId; + } + + protected function createClient():Redis { + if(!class_exists(Redis::class)) { + throw new RuntimeException( + "The phpredis extension is required to use Gt\\Session\\RedisHandler." + ); + } + + return new Redis(); + } + + private function requireClient():Redis { + if(is_null($this->client)) { + throw new RuntimeException("RedisHandler::open() must be called before use."); + } + + return $this->client; + } +} diff --git a/src/Session.php b/src/Session.php index f33ff6d..7ae2a8b 100644 --- a/src/Session.php +++ b/src/Session.php @@ -51,7 +51,7 @@ public function __construct( $this->id = $id; - $sessionPath = $this->getAbsolutePath( + $sessionPath = $this->normaliseSavePath( $config["save_path"] ?? self::DEFAULT_SESSION_PATH ); $sessionName = $config["name"] ?? self::DEFAULT_SESSION_NAME; @@ -81,7 +81,7 @@ public function kill():void { public function getStore( string $namespace, bool $createIfNotExists = false - ):?SessionStore { + ):?SessionStoreInterface { return $this->store->getStore( $namespace, $createIfNotExists @@ -113,7 +113,11 @@ public function getId():string { return session_id() ?: ""; } - protected function getAbsolutePath(string $path):string { + protected function normaliseSavePath(string $path):string { + if($this->isDsn($path)) { + return $path; + } + $path = str_replace( ["/", "\\"], DIRECTORY_SEPARATOR, @@ -130,6 +134,10 @@ protected function getAbsolutePath(string $path):string { return $path; } + protected function isDsn(string $path):bool { + return (bool)preg_match('/^[a-z][a-z0-9+.-]*:\/\//i', $path); + } + /** @SuppressWarnings("PHPMD.Superglobals") */ protected function createNewId():string { if(($this->config["use_trans_sid"] ?? null) @@ -166,12 +174,15 @@ public function write():bool { * @param string $sessionPath * @param string $sessionName * @param array $config + * @SuppressWarnings("PHPMD.UnusedFormalParameter") * @return void */ + // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed private function attemptStart( string $sessionPath, string $sessionName, array $config, + ?string $unusedContext = null, ):void { $sessionOptions = $this->getSessionOptions( $sessionPath, diff --git a/src/SessionStore.php b/src/SessionStore.php index d8e4c4e..99ee155 100644 --- a/src/SessionStore.php +++ b/src/SessionStore.php @@ -10,9 +10,7 @@ * @extends ArrayIterator * @SuppressWarnings("PHPMD.TooManyPublicMethods") */ -class SessionStore - extends ArrayIterator - implements SessionContainer, TypeSafeGetter, Countable { +class SessionStore extends ArrayIterator implements SessionStoreInterface { use NullableTypeSafeGetter; protected string $name; diff --git a/src/SessionStoreFactory.php b/src/SessionStoreFactory.php index aaf6da0..f4cc032 100644 --- a/src/SessionStoreFactory.php +++ b/src/SessionStoreFactory.php @@ -5,7 +5,7 @@ class SessionStoreFactory { public function create( string $namespace, Session $session, - ):SessionStore { + ):SessionStoreInterface { $namespaceParts = explode(".", $namespace); $store = new SessionStore( array_shift($namespaceParts), diff --git a/src/SessionStoreInterface.php b/src/SessionStoreInterface.php new file mode 100644 index 0000000..c58251c --- /dev/null +++ b/src/SessionStoreInterface.php @@ -0,0 +1,22 @@ +expects(self::once()) ->method("get") ->with("queue.test") @@ -28,7 +28,7 @@ public function testConsume_none():void { $queue->expects(self::once()) ->method("dequeue") ->willThrowException(new RuntimeException("Can't shift from an empty datastructure")); - $sessionStore = self::createMock(SessionStore::class); + $sessionStore = self::createMock(SessionStoreInterface::class); $sessionStore->expects(self::once()) ->method("get") ->with("queue.test") @@ -47,7 +47,7 @@ public function testConsume():void { ->method("dequeue") ->willReturnOnConsecutiveCalls($fm1, $fm2); - $sessionStore = self::createMock(SessionStore::class); + $sessionStore = self::createMock(SessionStoreInterface::class); $sessionStore->expects(self::exactly(3)) ->method("get") ->with("queue.test") diff --git a/test/phpunit/RedisHandlerTest.php b/test/phpunit/RedisHandlerTest.php new file mode 100644 index 0000000..b6d3dbd --- /dev/null +++ b/test/phpunit/RedisHandlerTest.php @@ -0,0 +1,182 @@ +client; + } + }; + + $sut->open( + "redis://default:secret@example.internal:25061/2?prefix=prod:session:&ttl=1800&timeout=1.5&read_timeout=2.5&persistent=1&persistent_id=pool-a", + "GT", + ); + + self::assertSame("example.internal", $client->connectParameters["host"]); + self::assertSame(25061, $client->connectParameters["port"]); + self::assertSame(1.5, $client->connectParameters["timeout"]); + self::assertSame(2.5, $client->connectParameters["readTimeout"]); + self::assertSame("pool-a", $client->connectParameters["persistentId"]); + self::assertSame([["default", "secret"]], $client->authCalls); + self::assertSame([2], $client->selectCalls); + + $sut->write("abc123", "payload"); + self::assertSame("payload", $sut->read("abc123")); + self::assertSame( + [ + "key" => "prod:session:abc123", + "ttl" => 1800, + "value" => "payload", + ], + $client->setExCalls[0], + ); + } + + public function testOpenParsesTlsDsn():void { + $client = new TestRedisClient(); + $sut = new class($client) extends RedisHandler { + public function __construct(private readonly TestRedisClient $client) {} + + protected function createClient():Redis { + /** @phpstan-ignore-next-line */ + return $this->client; + } + }; + + $sut->open( + "rediss://:secret@example.internal?verify_peer=0&verify_peer_name=0", + "GT", + ); + $sut->write("abc123", "payload"); + + self::assertSame("tls://example.internal", $client->connectParameters["host"]); + self::assertSame( + [ + "stream" => [ + "verify_peer" => false, + "verify_peer_name" => false, + ], + ], + $client->connectParameters["context"], + ); + self::assertSame(["secret"], $client->authCalls); + self::assertSame("payload", $client->data["GT:abc123"]); + } + + public function testDestroyAndClose():void { + $client = new TestRedisClient(); + $sut = new class($client) extends RedisHandler { + public function __construct(private readonly TestRedisClient $client) {} + + protected function createClient():Redis { + /** @phpstan-ignore-next-line */ + return $this->client; + } + }; + $sut->open("redis://cache.internal", "GT"); + $sut->write("abc123", "payload"); + + self::assertTrue($sut->destroy("abc123")); + self::assertSame("", $sut->read("abc123")); + self::assertTrue($sut->close()); + self::assertTrue($client->closed); + } +} + +class TestRedisClient { + /** @var array */ + public array $connectParameters = []; + /** @var array */ + public array $setExCalls = []; + /** @var array */ + public array $setCalls = []; + /** @var array */ + public array $authCalls = []; + /** @var array */ + public array $selectCalls = []; + /** @var array */ + public array $data = []; + public int $deleted = 0; + public bool $closed = false; + + /** + * @param array{auth?:array{0:string|false|null,1?:string},stream?:array}|null $context + */ + public function connect( + string $host, + int $port, + float $timeout = 0, + ?string $persistentId = null, + int $retryInterval = 0, + float $readTimeout = 0, + ?array $context = null, + ):bool { + $this->connectParameters = [ + "host" => $host, + "port" => $port, + "timeout" => $timeout, + "persistentId" => $persistentId, + "retryInterval" => $retryInterval, + "readTimeout" => $readTimeout, + "context" => $context, + ]; + return true; + } + + /** + * @param array{string,string}|string $credentials + */ + public function auth(array|string $credentials):bool { + $this->authCalls []= $credentials; + return true; + } + + public function select(int $database):bool { + $this->selectCalls []= $database; + return true; + } + + public function get(string $key):string|false { + return $this->data[$key] ?? false; + } + + public function set(string $key, string $value):bool { + $this->setCalls []= $key; + $this->data[$key] = $value; + return true; + } + + public function setEx(string $key, int $ttl, string $value):bool { + $this->setExCalls []= [ + "key" => $key, + "ttl" => $ttl, + "value" => $value, + ]; + $this->data[$key] = $value; + return true; + } + + public function del(string $key):int { + unset($this->data[$key]); + return ++$this->deleted; + } + + public function close():bool { + $this->closed = true; + return true; + } +} + +if(!class_exists(Redis::class)) { + class_alias(TestRedisClient::class, Redis::class); +} diff --git a/test/phpunit/SessionStoreTest.php b/test/phpunit/SessionStoreTest.php index 2124cb3..8202d0f 100644 --- a/test/phpunit/SessionStoreTest.php +++ b/test/phpunit/SessionStoreTest.php @@ -5,6 +5,7 @@ use Gt\Session\Handler; use Gt\Session\Session; use Gt\Session\SessionStore; +use Gt\Session\SessionStoreInterface; use Gt\Session\Test\Helper\FunctionMocker; use Gt\Session\Test\Helper\DataProvider\KeyValuePairProvider; use PHPUnit\Framework\MockObject\MockObject; @@ -172,4 +173,10 @@ public function testSessionStoreIsIterable():void { self::assertSame($rawData[$key], $value); } } + + public function testSessionStoreImplementsInterface():void { + $session = $this->createMock(Session::class); + $sut = new SessionStore("test", $session); + self::assertInstanceOf(SessionStoreInterface::class, $sut); + } } diff --git a/test/phpunit/SessionTest.php b/test/phpunit/SessionTest.php index 9d061e5..38d1c52 100644 --- a/test/phpunit/SessionTest.php +++ b/test/phpunit/SessionTest.php @@ -37,6 +37,18 @@ public function testSessionStarts():void { ); } + public function testSessionStartPreservesDsnSavePath():void { + $handler = self::createMock(Handler::class); + $savePath = "valkey://cache.internal:6379/0?ttl=1440"; + + new Session($handler, [ + "save_path" => $savePath, + ]); + + $sessionStartParameter = FunctionMocker::$mockCalls["session_start"][0][0]; + self::assertSame($savePath, $sessionStartParameter["save_path"]); + } + public function testWriteSessionDataCalled() { $handler = self::createMock(Handler::class); $handler->expects($this->exactly(2)) From f4ec1a4f2a5e2291a2e514462b4832ef2bd6a56b Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 17 Apr 2026 12:07:23 +0100 Subject: [PATCH 107/110] Remove phpunit coverage script from composer.json --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 78112b0..33e918a 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,6 @@ "scripts": { "phpunit": "vendor/bin/phpunit --configuration phpunit.xml", - "phpunit:coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --configuration phpunit.xml --coverage-text", "phpstan": "vendor/bin/phpstan analyse --level 6 src", "phpcs": "vendor/bin/phpcs src --standard=phpcs.xml", "phpmd": "vendor/bin/phpmd src/ text phpmd.xml", From 8b6652100738303c1756dea0031de9a080585f4b Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Thu, 23 Apr 2026 15:43:03 +0100 Subject: [PATCH 108/110] Gt tidy (#275) * ci: upgrade workflow * build: upgrade dependencies * tidy: Gt->GT --- .github/workflows/ci.yml | 48 +++++------ README.md | 6 +- composer.json | 7 +- composer.lock | 80 +++++++++---------- src/FileHandler.php | 2 +- src/Flash.php | 2 +- src/FlashMessage.php | 2 +- src/Handler.php | 2 +- src/RedisHandler.php | 4 +- src/Session.php | 2 +- src/SessionArrayWrapper.php | 2 +- src/SessionContainer.php | 2 +- src/SessionSetup.php | 2 +- src/SessionStore.php | 2 +- src/SessionStoreFactory.php | 2 +- src/SessionStoreInterface.php | 2 +- test/FlashTest.php | 6 +- .../Helper/DataProvider/ConfigProvider.php | 4 +- .../DataProvider/KeyValuePairProvider.php | 6 +- .../Helper/DataProvider/StringProvider.php | 2 +- test/phpunit/Helper/FunctionMocker.php | 2 +- .../FunctionOverride/session_destroy.php | 4 +- .../Helper/FunctionOverride/session_id.php | 4 +- .../Helper/FunctionOverride/session_start.php | 4 +- test/phpunit/RedisHandlerTest.php | 4 +- test/phpunit/SessionArrayWrapperTest.php | 4 +- test/phpunit/SessionStoreTest.php | 14 ++-- test/phpunit/SessionTest.php | 14 ++-- 28 files changed, 113 insertions(+), 122 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b440ad..19f7612 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,24 +1,25 @@ name: CI -on: [push, pull_request] +on: + push: + pull_request: permissions: contents: read actions: read - id-token: none jobs: composer: runs-on: ubuntu-latest strategy: matrix: - php: [ 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4, 8.5 ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache Composer dependencies - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: /tmp/composer-cache key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} @@ -27,6 +28,7 @@ jobs: uses: php-actions/composer@v6 with: php_version: ${{ matrix.php }} + php_extensions: pcntl - name: Archive build run: mkdir /tmp/github-actions/ && tar --exclude=".git" -cvf /tmp/github-actions/build.tar ./ @@ -36,13 +38,14 @@ jobs: with: name: build-artifact-${{ matrix.php }} path: /tmp/github-actions + retention-days: 1 phpunit: runs-on: ubuntu-latest needs: [ composer ] strategy: matrix: - php: [ 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4, 8.5 ] outputs: coverage: ${{ steps.store-coverage.outputs.coverage_text }} @@ -77,7 +80,7 @@ jobs: needs: [ phpunit ] strategy: matrix: - php: [ 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4, 8.5 ] steps: - uses: actions/checkout@v4 @@ -92,13 +95,16 @@ jobs: - name: Upload to Codecov uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ${{ github.repository }} phpstan: runs-on: ubuntu-latest needs: [ composer ] strategy: matrix: - php: [ 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4, 8.5 ] steps: - uses: actions/download-artifact@v4 @@ -114,13 +120,15 @@ jobs: with: php_version: ${{ matrix.php }} path: src/ + level: 6 + memory_limit: 256M phpmd: runs-on: ubuntu-latest needs: [ composer ] strategy: matrix: - php: [ 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4, 8.5 ] steps: - uses: actions/download-artifact@v4 @@ -132,7 +140,7 @@ jobs: run: tar -xvf /tmp/github-actions/build.tar ./ - name: PHP Mess Detector - uses: php-actions/phpmd@v2 + uses: php-actions/phpmd@v1 with: php_version: ${{ matrix.php }} path: src/ @@ -144,7 +152,7 @@ jobs: needs: [ composer ] strategy: matrix: - php: [ 8.2, 8.3, 8.4 ] + php: [ 8.2, 8.3, 8.4, 8.5 ] steps: - uses: actions/download-artifact@v4 @@ -161,21 +169,3 @@ jobs: php_version: ${{ matrix.php }} path: src/ standard: phpcs.xml - - remove_old_artifacts: - runs-on: ubuntu-latest - - permissions: - actions: write - - steps: - - name: Remove old artifacts for prior workflow runs on this repository - env: - GH_TOKEN: ${{ github.token }} - run: | - gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt - while read id - do - echo -n "Deleting artifact ID $id ... " - gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done" - done - PHP.Gt/Session documentation + PHP.GT/Session documentation ## Example usage: Welcome a user by their first name or log out the user @@ -44,7 +44,7 @@ else { ## Redis session storage -This package now includes `Gt\Session\RedisHandler` for shared session storage. +This package now includes `GT\Session\RedisHandler` for shared session storage. It works with Redis-compatible backends such as Redis and Valkey, and is intended for deployments where application nodes are disposable and session state needs to survive traffic moving between servers. @@ -56,7 +56,7 @@ Example production config: ```ini [session] -handler=Gt\Session\RedisHandler +handler=GT\Session\RedisHandler save_path=rediss://default:secret@example-redis.internal:25061/0?prefix=GT:&ttl=1440 name=GT use_cookies=true diff --git a/composer.json b/composer.json index 33e918a..d11c730 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "phpgt/typesafegetter": "^1.3" }, "suggest": { - "ext-redis": "Required to use Gt\\Session\\RedisHandler." + "ext-redis": "Required to use GT\\Session\\RedisHandler." }, "require-dev": { "phpstan/phpstan": "^2.1", @@ -19,7 +19,7 @@ "scripts": { "phpunit": "vendor/bin/phpunit --configuration phpunit.xml", - "phpstan": "vendor/bin/phpstan analyse --level 6 src", + "phpstan": "vendor/bin/phpstan analyse --level 6 src --memory-limit 256M", "phpcs": "vendor/bin/phpcs src --standard=phpcs.xml", "phpmd": "vendor/bin/phpmd src/ text phpmd.xml", "test": [ @@ -32,12 +32,13 @@ "autoload": { "psr-4": { + "GT\\Session\\": "./src", "Gt\\Session\\": "./src" } }, "autoload-dev": { "psr-4": { - "Gt\\Session\\Test\\": "./test/phpunit" + "GT\\Session\\Test\\": "./test/phpunit" } }, diff --git a/composer.lock b/composer.lock index 42fa268..807a21f 100644 --- a/composer.lock +++ b/composer.lock @@ -589,11 +589,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.40", + "version": "2.1.51", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", - "reference": "9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc3b523c45e714c70de2ac5113b958223b55dc59", + "reference": "dc3b523c45e714c70de2ac5113b958223b55dc59", "shasum": "" }, "require": { @@ -638,7 +638,7 @@ "type": "github" } ], - "time": "2026-02-23T15:04:35+00:00" + "time": "2026-04-21T18:22:01+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2207,16 +2207,16 @@ }, { "name": "symfony/config", - "version": "v7.4.7", + "version": "v7.4.8", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5" + "reference": "2d19dde43fa2ff720b9a40763ace7226594f503b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/6c17162555bfb58957a55bb0e43e00035b6ae3d5", - "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5", + "url": "https://api.github.com/repos/symfony/config/zipball/2d19dde43fa2ff720b9a40763ace7226594f503b", + "reference": "2d19dde43fa2ff720b9a40763ace7226594f503b", "shasum": "" }, "require": { @@ -2262,7 +2262,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.4.7" + "source": "https://github.com/symfony/config/tree/v7.4.8" }, "funding": [ { @@ -2282,20 +2282,20 @@ "type": "tidelift" } ], - "time": "2026-03-06T10:41:14+00:00" + "time": "2026-03-24T13:12:05+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.4.7", + "version": "v7.4.8", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db" + "reference": "f7025fd7b687c240426562f86ada06a93b1e771d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", - "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f7025fd7b687c240426562f86ada06a93b1e771d", + "reference": "f7025fd7b687c240426562f86ada06a93b1e771d", "shasum": "" }, "require": { @@ -2346,7 +2346,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.4.7" + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.8" }, "funding": [ { @@ -2366,7 +2366,7 @@ "type": "tidelift" } ], - "time": "2026-03-03T07:48:48+00:00" + "time": "2026-03-31T06:50:29+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2437,16 +2437,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.4.6", + "version": "v7.4.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e" + "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3ebc794fa5315e59fd122561623c2e2e4280538e", - "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/58b9790d12f9670b7f53a1c1738febd3108970a5", + "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5", "shasum": "" }, "require": { @@ -2483,7 +2483,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.6" + "source": "https://github.com/symfony/filesystem/tree/v7.4.8" }, "funding": [ { @@ -2503,20 +2503,20 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:50:00+00:00" + "time": "2026-03-24T13:12:05+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", "shasum": "" }, "require": { @@ -2566,7 +2566,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.36.0" }, "funding": [ { @@ -2586,20 +2586,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315", + "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315", "shasum": "" }, "require": { @@ -2651,7 +2651,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.36.0" }, "funding": [ { @@ -2671,7 +2671,7 @@ "type": "tidelift" } ], - "time": "2024-12-23T08:48:59+00:00" + "time": "2026-04-10T17:25:58+00:00" }, { "name": "symfony/service-contracts", @@ -2762,16 +2762,16 @@ }, { "name": "symfony/var-exporter", - "version": "v7.4.0", + "version": "v7.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "03a60f169c79a28513a78c967316fbc8bf17816f" + "reference": "398907e89a2a56fe426f7955c6fa943ec0c77225" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f", - "reference": "03a60f169c79a28513a78c967316fbc8bf17816f", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/398907e89a2a56fe426f7955c6fa943ec0c77225", + "reference": "398907e89a2a56fe426f7955c6fa943ec0c77225", "shasum": "" }, "require": { @@ -2819,7 +2819,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.4.0" + "source": "https://github.com/symfony/var-exporter/tree/v7.4.8" }, "funding": [ { @@ -2839,7 +2839,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T10:15:23+00:00" + "time": "2026-03-24T13:12:05+00:00" }, { "name": "theseer/tokenizer", diff --git a/src/FileHandler.php b/src/FileHandler.php index 34eb12c..71f82c1 100644 --- a/src/FileHandler.php +++ b/src/FileHandler.php @@ -1,5 +1,5 @@ */ diff --git a/src/SessionContainer.php b/src/SessionContainer.php index aab32f8..68d121c 100644 --- a/src/SessionContainer.php +++ b/src/SessionContainer.php @@ -1,5 +1,5 @@ Date: Tue, 30 Jun 2026 16:28:13 +0100 Subject: [PATCH 109/110] tweak: ignore phpunit cache --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3c5399a..e38702b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /vendor -/test/unit/_coverage +/test/phpunit/_coverage +/test/phpunit/.phpunit.cache /.idea -*.phar \ No newline at end of file +*.phar From 56ceb00a580d6e008a3e78cdc0c443fe15876513 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Wed, 15 Jul 2026 06:35:25 +0100 Subject: [PATCH 110/110] tweak: redis followup from #272 (#279) --- src/RedisHandler.php | 89 ++++++++++++++++++++++++++++--- test/phpunit/RedisHandlerTest.php | 88 +++++++++++++++++++++++------- 2 files changed, 151 insertions(+), 26 deletions(-) diff --git a/src/RedisHandler.php b/src/RedisHandler.php index b53bd4a..1c4de21 100644 --- a/src/RedisHandler.php +++ b/src/RedisHandler.php @@ -3,16 +3,50 @@ use Redis; use RuntimeException; +use Throwable; class RedisHandler extends Handler { + private const EMPTY_PHP_ARRAY = "a:0:{}"; private const DEFAULT_PORT = 6379; private const DEFAULT_PREFIX_SEPARATOR = ":"; private ?Redis $client = null; + /** @var array{ + * host:string, + * port:int, + * timeout:float, + * readTimeout:float, + * persistentId:?string, + * prefix:string, + * ttl:int, + * database:int, + * auth:array{string,string}|string|null, + * context:array{stream:array{verify_peer:bool,verify_peer_name:bool}}|null + * }|null + */ + private ?array $config = null; private string $prefix = ""; private int $ttl = 0; public function open(string $savePath, string $name):bool { $config = $this->parseSavePath($savePath, $name); + $this->config = $config; + return $this->connect($config); + } + + /** @param array{ + * host:string, + * port:int, + * timeout:float, + * readTimeout:float, + * persistentId:?string, + * prefix:string, + * ttl:int, + * database:int, + * auth:array{string,string}|string|null, + * context:array{stream:array{verify_peer:bool,verify_peer_name:bool}}|null + * } $config + */ + private function connect(array $config):bool { $client = $this->createClient(); $connected = $client->connect( @@ -48,27 +82,46 @@ public function close():bool { return true; } - return $this->client->close(); + try { + return $this->client->close(); + } + catch(Throwable) { + return true; + } + finally { + $this->client = null; + } } public function read(string $sessionId):string { - $value = $this->requireClient()->get($this->getKey($sessionId)); + $value = $this->retryOnce( + fn() => $this->requireClient()->get($this->getKey($sessionId)) + ); return is_string($value) ? $value : ""; } public function write(string $sessionId, string $sessionData):bool { - $client = $this->requireClient(); + if($sessionData === self::EMPTY_PHP_ARRAY) { + return true; + } + $key = $this->getKey($sessionId); if($this->ttl > 0) { - return $client->setEx($key, $this->ttl, $sessionData); + return $this->retryOnce( + fn() => $this->requireClient()->setEx($key, $this->ttl, $sessionData) + ); } - return $client->set($key, $sessionData); + return $this->retryOnce( + fn() => $this->requireClient()->set($key, $sessionData) + ); } public function destroy(string $id = ""):bool { - return $this->requireClient()->del($this->getKey($id)) >= 0; + return $this->retryOnce( + fn() => $this->requireClient()->del($this->getKey($id)) + ) >= 0; } // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass @@ -219,4 +272,28 @@ private function requireClient():Redis { return $this->client; } + + private function reconnect():void { + if(is_null($this->config)) { + throw new RuntimeException("RedisHandler::open() must be called before reconnect."); + } + + $this->close(); + $this->connect($this->config); + } + + /** + * @template T + * @param callable():T $callback + * @return T + */ + private function retryOnce(callable $callback):mixed { + try { + return $callback(); + } + catch(Throwable) { + $this->reconnect(); + return $callback(); + } + } } diff --git a/test/phpunit/RedisHandlerTest.php b/test/phpunit/RedisHandlerTest.php index c6680d2..c658bc5 100644 --- a/test/phpunit/RedisHandlerTest.php +++ b/test/phpunit/RedisHandlerTest.php @@ -5,6 +5,11 @@ use PHPUnit\Framework\TestCase; use Redis; +if(!class_exists(Redis::class)) { + class TestRedisClientBase {} + class_alias(TestRedisClientBase::class, "Redis"); +} + class RedisHandlerTest extends TestCase { public function testOpenParsesStandardDsn():void { $client = new TestRedisClient(); @@ -91,9 +96,44 @@ protected function createClient():Redis { self::assertTrue($sut->close()); self::assertTrue($client->closed); } + + public function testEmptyNativePhpSessionWriteDoesNotOverwriteStoredSession():void { + $client = new TestRedisClient(); + $sut = new class($client) extends RedisHandler { + public function __construct(private readonly TestRedisClient $client) {} + + protected function createClient():Redis { + /** @phpstan-ignore-next-line */ + return $this->client; + } + }; + $sut->open("redis://cache.internal", "GT"); + $sut->write("abc123", "stored-session"); + $sut->write("abc123", "a:0:{}"); + + self::assertSame("stored-session", $sut->read("abc123")); + } + + public function testCommandRetriesAfterDisconnectedClient():void { + $client = new TestRedisClient(); + $sut = new class($client) extends RedisHandler { + public function __construct(private readonly TestRedisClient $client) {} + + protected function createClient():Redis { + /** @phpstan-ignore-next-line */ + return $this->client; + } + }; + $sut->open("redis://cache.internal", "GT"); + $client->failNextSetEx = true; + + self::assertTrue($sut->write("abc123", "payload")); + self::assertSame("payload", $sut->read("abc123")); + self::assertSame(2, $client->connectCount); + } } -class TestRedisClient { +class TestRedisClient extends Redis { /** @var array */ public array $connectParameters = []; /** @var array */ @@ -107,6 +147,8 @@ class TestRedisClient { /** @var array */ public array $data = []; public int $deleted = 0; + public int $connectCount = 0; + public bool $failNextSetEx = false; public bool $closed = false; /** @@ -114,20 +156,21 @@ class TestRedisClient { */ public function connect( string $host, - int $port, + int $port = 6379, float $timeout = 0, - ?string $persistentId = null, - int $retryInterval = 0, - float $readTimeout = 0, + ?string $persistent_id = null, + int $retry_interval = 0, + float $read_timeout = 0, ?array $context = null, ):bool { + $this->connectCount++; $this->connectParameters = [ "host" => $host, "port" => $port, "timeout" => $timeout, - "persistentId" => $persistentId, - "retryInterval" => $retryInterval, - "readTimeout" => $readTimeout, + "persistentId" => $persistent_id, + "retryInterval" => $retry_interval, + "readTimeout" => $read_timeout, "context" => $context, ]; return true; @@ -136,12 +179,12 @@ public function connect( /** * @param array{string,string}|string $credentials */ - public function auth(array|string $credentials):bool { + public function auth(mixed $credentials):Redis|bool { $this->authCalls []= $credentials; return true; } - public function select(int $database):bool { + public function select(int $database):Redis|bool { $this->selectCalls []= $database; return true; } @@ -150,23 +193,32 @@ public function get(string $key):string|false { return $this->data[$key] ?? false; } - public function set(string $key, string $value):bool { + public function set(string $key, mixed $value, mixed $options = null):Redis|string|bool { $this->setCalls []= $key; - $this->data[$key] = $value; + $this->data[$key] = (string)$value; return true; } - public function setEx(string $key, int $ttl, string $value):bool { + public function setEx(string $key, int $ttl, mixed $value) { + if($this->failNextSetEx) { + $this->failNextSetEx = false; + throw new \RedisException("Redis server went away"); + } + $this->setExCalls []= [ "key" => $key, "ttl" => $ttl, - "value" => $value, + "value" => (string)$value, ]; - $this->data[$key] = $value; + $this->data[$key] = (string)$value; return true; } - public function del(string $key):int { + public function del(array|string $key, string ...$otherKeys):Redis|int|false { + if(is_array($key)) { + $key = reset($key); + } + unset($this->data[$key]); return ++$this->deleted; } @@ -176,7 +228,3 @@ public function close():bool { return true; } } - -if(!class_exists(Redis::class)) { - class_alias(TestRedisClient::class, Redis::class); -}