diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..3cc04a1
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,84 @@
+name: Tests
+
+on:
+ push: ~
+ pull_request: ~
+
+jobs:
+ phpcs:
+ name: PHPCS
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: shivammathur/setup-php@v2
+ with:
+ php-version: 7.2
+ extensions: curl, mbstring
+ coverage: none
+ tools: composer:v2, cs2pr
+
+ - run: composer update --no-progress
+
+ - run: vendor/bin/phpcs -q --report=checkstyle | cs2pr
+
+ phpunit:
+ name: PHPUnit on ${{ matrix.php }} ${{ matrix.composer-flags }}
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php: ['7.2', '7.3', '7.4']
+ coverage: [pcov]
+ composer-flags: ['']
+ include:
+ - php: '8.0'
+ coverage: false
+ composer-flags: '--ignore-platform-req=php'
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: curl
+ coverage: ${{ matrix.coverage }}
+ tools: composer:v2
+
+ - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
+
+ - name: "Use PHPUnit 9.3+ on PHP 8"
+ run: composer require --no-update --dev phpunit/phpunit:^9.3
+ if: "matrix.php == '8.0'"
+
+ - run: composer update --no-progress ${{ matrix.composer-flags }}
+
+ - run: vendor/bin/phpunit --no-coverage
+ if: ${{ matrix.coverage == 'none' }}
+
+ - run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
+ if: ${{ matrix.coverage != 'none' }}
+
+ - run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
+ if: ${{ matrix.coverage != 'none' }}
+
+ phpstan:
+ name: PHPStan
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: shivammathur/setup-php@v2
+ with:
+ php-version: 7.2
+ extensions: curl
+ coverage: none
+ tools: composer:v2
+
+ - run: composer update --no-progress
+
+ - run: vendor/bin/phpstan analyse --no-progress
+
+ - run: vendor/bin/phpstan analyse --no-progress -c phpstan.tests.neon
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index bccc8fa..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-language: php
-
-php:
- - 7.2
- - nightly
-
-cache:
- directories:
- - vendor
- - $HOME/.composer/cache
-
-matrix:
- allow_failures:
- - php: hhvm
-
-before_script:
- - composer self-update
- - composer install --dev --prefer-source
-
-script:
- - ./vendor/bin/phpstan analyse
- - ./vendor/bin/phpstan analyse -c phpstan.tests.neon
- - ./vendor/bin/phpunit --coverage-clover=coverage.clover
- - ./vendor/bin/phpcs
-
-after_script:
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- - CODECLIMATE_REPO_TOKEN=269a392c7a845b5ca031f9412f44435c0ec9ceebd0e19f97ff1762e6f880ba79 ./vendor/bin/test-reporter --coverage-report=coverage.clover
-
-notifications:
- email: true
diff --git a/composer.json b/composer.json
index 43e5e45..32354c1 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
}
],
"require": {
- "php": "^7.2",
+ "php": "^7.2 || ^8.0",
"ext-pcre": "*",
"psr/http-message": "^1"
},
@@ -20,10 +20,12 @@
}
},
"require-dev": {
- "phpunit/phpunit": "^7.2.6",
+ "phpunit/phpunit": "^7.2.6 || ^9",
"squizlabs/php_codesniffer": "^3.3",
- "doctrine/coding-standard": "^4",
- "phpstan/phpstan": "^0.10.1"
+ "doctrine/coding-standard": "^8",
+ "phpstan/phpstan": "^0.12",
+ "phpstan/phpstan-phpunit": "^0.12.16",
+ "phpstan/extension-installer": "^1.0"
},
"autoload-dev": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
index a7c42df..249c0a5 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": "56de4a3ac9359be2740da28c02dc813b",
+ "content-hash": "cf0b73d3f68e7a306197622ba98e3b7c",
"packages": [
{
"name": "psr/http-message",
@@ -54,79 +54,36 @@
"request",
"response"
],
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/master"
+ },
"time": "2016-08-06T14:39:51+00:00"
}
],
"packages-dev": [
- {
- "name": "composer/xdebug-handler",
- "version": "1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/xdebug-handler.git",
- "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08",
- "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08",
- "shasum": ""
- },
- "require": {
- "php": "^5.3.2 || ^7.0",
- "psr/log": "^1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Composer\\XdebugHandler\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "John Stevenson",
- "email": "john-stevenson@blueyonder.co.uk"
- }
- ],
- "description": "Restarts a process without xdebug.",
- "keywords": [
- "Xdebug",
- "performance"
- ],
- "time": "2018-04-11T15:42:36+00:00"
- },
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
- "version": "v0.4.4",
+ "version": "v0.7.1",
"source": {
"type": "git",
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
- "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08"
+ "reference": "fe390591e0241955f22eb9ba327d137e501c771c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08",
- "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08",
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c",
+ "reference": "fe390591e0241955f22eb9ba327d137e501c771c",
"shasum": ""
},
"require": {
- "composer-plugin-api": "^1.0",
- "php": "^5.3|^7",
- "squizlabs/php_codesniffer": "*"
+ "composer-plugin-api": "^1.0 || ^2.0",
+ "php": ">=5.3",
+ "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0"
},
"require-dev": {
"composer/composer": "*",
- "wimg/php-compatibility": "^8.0"
- },
- "suggest": {
- "dealerdirect/qa-tools": "All the PHP QA tools you'll need"
+ "phpcompatibility/php-compatibility": "^9.0",
+ "sensiolabs/security-checker": "^4.1.0"
},
"type": "composer-plugin",
"extra": {
@@ -144,13 +101,13 @@
"authors": [
{
"name": "Franck Nijhof",
- "email": "f.nijhof@dealerdirect.nl",
- "homepage": "http://workingatdealerdirect.eu",
- "role": "Developer"
+ "email": "franck.nijhof@dealerdirect.com",
+ "homepage": "http://www.frenck.nl",
+ "role": "Developer / IT Manager"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
- "homepage": "http://workingatdealerdirect.eu",
+ "homepage": "http://www.dealerdirect.com",
"keywords": [
"PHPCodeSniffer",
"PHP_CodeSniffer",
@@ -168,39 +125,33 @@
"stylecheck",
"tests"
],
- "time": "2017-12-06T16:27:17+00:00"
+ "support": {
+ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
+ "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
+ },
+ "time": "2020-12-07T18:04:37+00:00"
},
{
"name": "doctrine/coding-standard",
- "version": "4.0.0",
+ "version": "8.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/coding-standard.git",
- "reference": "0469c18a1a4724c278f2879c0dd7b1fa860b52de"
+ "reference": "529d385bb3790431080493c0fe7adaec39df368a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/0469c18a1a4724c278f2879c0dd7b1fa860b52de",
- "reference": "0469c18a1a4724c278f2879c0dd7b1fa860b52de",
+ "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/529d385bb3790431080493c0fe7adaec39df368a",
+ "reference": "529d385bb3790431080493c0fe7adaec39df368a",
"shasum": ""
},
"require": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.2",
- "php": "^7.1",
- "slevomat/coding-standard": "^4.5.0",
- "squizlabs/php_codesniffer": "^3.2.3"
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
+ "php": "^7.1 || ^8.0",
+ "slevomat/coding-standard": "^6.3.9",
+ "squizlabs/php_codesniffer": "^3.5.5"
},
"type": "phpcodesniffer-standard",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Doctrine\\Sniffs\\": "lib/Doctrine/Sniffs"
- }
- },
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
@@ -215,49 +166,53 @@
"email": "st.mueller@dzh-online.de"
}
],
- "description": "Doctrine Coding Standard",
- "homepage": "http://www.doctrine-project.org",
+ "description": "The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.",
+ "homepage": "https://www.doctrine-project.org/projects/coding-standard.html",
"keywords": [
+ "checks",
"code",
"coding",
"cs",
"doctrine",
+ "rules",
"sniffer",
+ "sniffs",
"standard",
"style"
],
- "time": "2018-03-03T23:49:15+00:00"
+ "support": {
+ "issues": "https://github.com/doctrine/coding-standard/issues",
+ "source": "https://github.com/doctrine/coding-standard/tree/8.2.0"
+ },
+ "time": "2020-10-25T14:56:19+00:00"
},
{
"name": "doctrine/instantiator",
- "version": "1.1.0",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
- "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "athletic/athletic": "~0.1.8",
+ "doctrine/coding-standard": "^8.0",
"ext-pdo": "*",
"ext-phar": "*",
- "phpunit/phpunit": "^6.2.3",
- "squizlabs/php_codesniffer": "^3.0.2"
+ "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/"
@@ -271,84 +226,51 @@
{
"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",
- "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"
- },
- {
- "name": "jean85/pretty-package-versions",
- "version": "1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/Jean85/pretty-package-versions.git",
- "reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48"
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.4.0"
},
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/75c7effcf3f77501d0e0caa75111aff4daa0dd48",
- "reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48",
- "shasum": ""
- },
- "require": {
- "ocramius/package-versions": "^1.2.0",
- "php": "^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Jean85\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
+ "funding": [
{
- "name": "Alessandro Lai",
- "email": "alessandro.lai85@gmail.com"
+ "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"
}
],
- "description": "A wrapper for ocramius/package-versions to get pretty versions strings",
- "keywords": [
- "composer",
- "package",
- "release",
- "versions"
- ],
- "time": "2018-06-13T13:22:40+00:00"
+ "time": "2020-11-10T18:47:58+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.8.1",
+ "version": "1.10.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
+ "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
- "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
+ "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"
@@ -379,497 +301,30 @@
"object",
"object graph"
],
- "time": "2018-06-11T23:09:50+00:00"
- },
- {
- "name": "nette/bootstrap",
- "version": "v2.4.6",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/bootstrap.git",
- "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/bootstrap/zipball/268816e3f1bb7426c3a4ceec2bd38a036b532543",
- "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543",
- "shasum": ""
- },
- "require": {
- "nette/di": "~2.4.7",
- "nette/utils": "~2.4",
- "php": ">=5.6.0"
- },
- "conflict": {
- "nette/nette": "<2.2"
- },
- "require-dev": {
- "latte/latte": "~2.2",
- "nette/application": "~2.3",
- "nette/caching": "~2.3",
- "nette/database": "~2.3",
- "nette/forms": "~2.3",
- "nette/http": "~2.4.0",
- "nette/mail": "~2.3",
- "nette/robot-loader": "^2.4.2 || ^3.0",
- "nette/safe-stream": "~2.2",
- "nette/security": "~2.3",
- "nette/tester": "~2.0",
- "tracy/tracy": "^2.4.1"
- },
- "suggest": {
- "nette/robot-loader": "to use Configurator::createRobotLoader()",
- "tracy/tracy": "to use Configurator::enableTracy()"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.4-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0",
- "GPL-3.0"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.",
- "homepage": "https://nette.org",
- "keywords": [
- "bootstrapping",
- "configurator",
- "nette"
- ],
- "time": "2018-05-17T12:52:20+00:00"
- },
- {
- "name": "nette/di",
- "version": "v2.4.13",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/di.git",
- "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/di/zipball/3f8f212b02d5c17feb97a7e0a39ab306f40c06ca",
- "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "nette/neon": "^2.3.3 || ~3.0.0",
- "nette/php-generator": "^2.6.1 || ~3.0.0",
- "nette/utils": "^2.4.3 || ~3.0.0",
- "php": ">=5.6.0"
- },
- "conflict": {
- "nette/bootstrap": "<2.4",
- "nette/nette": "<2.2"
- },
- "require-dev": {
- "nette/tester": "^2.0",
- "tracy/tracy": "^2.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.4-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0",
- "GPL-3.0"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP 7.1 features.",
- "homepage": "https://nette.org",
- "keywords": [
- "compiled",
- "di",
- "dic",
- "factory",
- "ioc",
- "nette",
- "static"
- ],
- "time": "2018-06-11T08:46:01+00:00"
- },
- {
- "name": "nette/finder",
- "version": "v2.4.2",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/finder.git",
- "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/finder/zipball/ee951a656cb8ac622e5dd33474a01fd2470505a0",
- "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0",
- "shasum": ""
- },
- "require": {
- "nette/utils": "~2.4",
- "php": ">=5.6.0"
- },
- "conflict": {
- "nette/nette": "<2.2"
- },
- "require-dev": {
- "nette/tester": "~2.0",
- "tracy/tracy": "^2.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.4-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0",
- "GPL-3.0"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "🔍 Nette Finder: find files and directories with an intuitive API.",
- "homepage": "https://nette.org",
- "keywords": [
- "filesystem",
- "glob",
- "iterator",
- "nette"
- ],
- "time": "2018-06-28T11:49:23+00:00"
- },
- {
- "name": "nette/neon",
- "version": "v2.4.3",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/neon.git",
- "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/neon/zipball/5e72b1dd3e2d34f0863c5561139a19df6a1ef398",
- "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398",
- "shasum": ""
- },
- "require": {
- "ext-iconv": "*",
- "ext-json": "*",
- "php": ">=5.6.0"
- },
- "require-dev": {
- "nette/tester": "~2.0",
- "tracy/tracy": "^2.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.4-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0",
- "GPL-3.0"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "🍸 Nette NEON: encodes and decodes NEON file format.",
- "homepage": "http://ne-on.org",
- "keywords": [
- "export",
- "import",
- "neon",
- "nette",
- "yaml"
- ],
- "time": "2018-03-21T12:12:21+00:00"
- },
- {
- "name": "nette/php-generator",
- "version": "v3.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/php-generator.git",
- "reference": "b381ecacbf5a0b5f99cc0b303d5b0578d409f446"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/php-generator/zipball/b381ecacbf5a0b5f99cc0b303d5b0578d409f446",
- "reference": "b381ecacbf5a0b5f99cc0b303d5b0578d409f446",
- "shasum": ""
- },
- "require": {
- "nette/utils": "^2.4.2 || ~3.0.0",
- "php": ">=7.0"
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
},
- "conflict": {
- "nette/nette": "<2.2"
- },
- "require-dev": {
- "nette/tester": "^2.0",
- "tracy/tracy": "^2.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0",
- "GPL-3.0"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
+ "funding": [
{
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
}
],
- "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.2 features.",
- "homepage": "https://nette.org",
- "keywords": [
- "code",
- "nette",
- "php",
- "scaffolding"
- ],
- "time": "2018-04-26T16:48:20+00:00"
- },
- {
- "name": "nette/robot-loader",
- "version": "v3.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/robot-loader.git",
- "reference": "3cf88781a05e0bf4618ae605361afcbaa4d5b392"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/robot-loader/zipball/3cf88781a05e0bf4618ae605361afcbaa4d5b392",
- "reference": "3cf88781a05e0bf4618ae605361afcbaa4d5b392",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "nette/finder": "^2.3 || ^3.0",
- "nette/utils": "^2.4 || ^3.0",
- "php": ">=5.6.0"
- },
- "conflict": {
- "nette/nette": "<2.2"
- },
- "require-dev": {
- "nette/tester": "^2.0",
- "tracy/tracy": "^2.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0",
- "GPL-3.0"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.",
- "homepage": "https://nette.org",
- "keywords": [
- "autoload",
- "class",
- "interface",
- "nette",
- "trait"
- ],
- "time": "2018-06-22T09:34:04+00:00"
- },
- {
- "name": "nette/utils",
- "version": "v2.5.2",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/utils.git",
- "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/utils/zipball/183069866dc477fcfbac393ed486aaa6d93d19a5",
- "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6.0"
- },
- "conflict": {
- "nette/nette": "<2.2"
- },
- "require-dev": {
- "nette/tester": "~2.0",
- "tracy/tracy": "^2.3"
- },
- "suggest": {
- "ext-gd": "to use Image",
- "ext-iconv": "to use Strings::webalize() and toAscii()",
- "ext-intl": "for script transliteration in Strings::webalize() and toAscii()",
- "ext-json": "to use Nette\\Utils\\Json",
- "ext-mbstring": "to use Strings::lower() etc...",
- "ext-xml": "to use Strings::length() etc. when mbstring is not available"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.5-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ],
- "files": [
- "src/loader.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0",
- "GPL-3.0"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
- "homepage": "https://nette.org",
- "keywords": [
- "array",
- "core",
- "datetime",
- "images",
- "json",
- "nette",
- "paginator",
- "password",
- "slugify",
- "string",
- "unicode",
- "utf-8",
- "utility",
- "validation"
- ],
- "time": "2018-05-02T17:16:08+00:00"
+ "time": "2020-11-13T09:40:50+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v4.0.2",
+ "version": "v4.10.4",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12"
+ "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/35b8caf75e791ba1b2d24fec1552168d72692b12",
- "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
+ "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"shasum": ""
},
"require": {
@@ -877,7 +332,8 @@
"php": ">=7.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.5 || ^7.0"
+ "ircmaxell/php-yacc": "^0.0.7",
+ "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
@@ -885,7 +341,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-master": "4.9-dev"
}
},
"autoload": {
@@ -907,81 +363,37 @@
"parser",
"php"
],
- "time": "2018-06-03T11:33:10+00:00"
- },
- {
- "name": "ocramius/package-versions",
- "version": "1.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/Ocramius/PackageVersions.git",
- "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f"
+ "support": {
+ "issues": "https://github.com/nikic/PHP-Parser/issues",
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4"
},
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/4489d5002c49d55576fa0ba786f42dbb009be46f",
- "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f",
- "shasum": ""
- },
- "require": {
- "composer-plugin-api": "^1.0.0",
- "php": "^7.1.0"
- },
- "require-dev": {
- "composer/composer": "^1.6.3",
- "ext-zip": "*",
- "infection/infection": "^0.7.1",
- "phpunit/phpunit": "^7.0.0"
- },
- "type": "composer-plugin",
- "extra": {
- "class": "PackageVersions\\Installer",
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "PackageVersions\\": "src/PackageVersions"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com"
- }
- ],
- "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
- "time": "2018-02-05T13:05:30+00:00"
+ "time": "2020-12-20T10:01:03+00:00"
},
{
"name": "phar-io/manifest",
- "version": "1.0.1",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
- "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
+ "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133"
},
"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/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
+ "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-phar": "*",
- "phar-io/version": "^1.0.1",
- "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": {
@@ -1011,24 +423,28 @@
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
- "time": "2017-03-05T18:14:27+00:00"
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/master"
+ },
+ "time": "2020-06-27T14:33:11+00:00"
},
{
"name": "phar-io/version",
- "version": "1.0.1",
+ "version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
- "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
+ "reference": "e4782611070e50613683d2b9a57730e9a3ba5451"
},
"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/e4782611070e50613683d2b9a57730e9a3ba5451",
+ "reference": "e4782611070e50613683d2b9a57730e9a3ba5451",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -1058,39 +474,38 @@
}
],
"description": "Library for handling version information and constraints",
- "time": "2017-03-05T17:38:23+00:00"
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/3.0.4"
+ },
+ "time": "2020-12-13T23:18:30+00:00"
},
{
"name": "phpdocumentor/reflection-common",
- "version": "1.0.1",
+ "version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
- "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
- "php": ">=5.5"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.6"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src"
- ]
+ "phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1112,44 +527,45 @@
"reflection",
"static analysis"
],
- "time": "2017-09-11T18:02:19+00:00"
+ "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": "4.3.0",
+ "version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "94fd0001232e47129dd3504189fa1c7225010d08"
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
- "reference": "94fd0001232e47129dd3504189fa1c7225010d08",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "phpdocumentor/reflection-common": "^1.0.0",
- "phpdocumentor/type-resolver": "^0.4.0",
- "webmozart/assert": "^1.0"
+ "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.0.5",
- "mockery/mockery": "^1.0",
- "phpunit/phpunit": "^6.4"
+ "mockery/mockery": "~1.3.2"
},
"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/",
@@ -1160,44 +576,49 @@
{
"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": "2017-11-30T07:14:17+00:00"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
+ },
+ "time": "2020-09-03T19:13:55+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.4.0",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
- "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"shasum": ""
},
"require": {
- "php": "^5.5 || ^7.0",
- "phpdocumentor/reflection-common": "^1.0"
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^5.2||^4.8.24"
+ "ext-tokenizer": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1210,42 +631,47 @@
"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",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
+ },
+ "time": "2020-09-17T18:55:26+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "1.7.6",
+ "version": "1.12.2",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712"
+ "reference": "245710e971a030f42e08f4912863805570f23d39"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
- "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
+ "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",
- "sebastian/comparator": "^1.1|^2.0|^3.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.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"
+ "phpspec/phpspec": "^6.0",
+ "phpunit/phpunit": "^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.7.x-dev"
+ "dev-master": "1.11.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
+ "psr-4": {
+ "Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1263,48 +689,100 @@
"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"
- ],
- "time": "2018-04-18T13:57:24+00:00"
+ "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/1.12.2"
+ },
+ "time": "2020-12-19T10:15:11+00:00"
+ },
+ {
+ "name": "phpstan/extension-installer",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/extension-installer.git",
+ "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/66c7adc9dfa38b6b5838a9fb728b68a7d8348051",
+ "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.1 || ^2.0",
+ "php": "^7.1 || ^8.0",
+ "phpstan/phpstan": ">=0.11.6"
+ },
+ "require-dev": {
+ "composer/composer": "^1.8",
+ "phing/phing": "^2.16.3",
+ "php-parallel-lint/php-parallel-lint": "^1.2.0",
+ "phpstan/phpstan-strict-rules": "^0.11 || ^0.12"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "PHPStan\\ExtensionInstaller\\Plugin"
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\ExtensionInstaller\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Composer plugin for automatic installation of PHPStan extensions",
+ "support": {
+ "issues": "https://github.com/phpstan/extension-installer/issues",
+ "source": "https://github.com/phpstan/extension-installer/tree/1.1.0"
+ },
+ "time": "2020-12-13T13:06:13+00:00"
},
{
"name": "phpstan/phpdoc-parser",
- "version": "0.3",
+ "version": "0.4.9",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "ed3223362174b8067729930439e139794e9e514a"
+ "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ed3223362174b8067729930439e139794e9e514a",
- "reference": "ed3223362174b8067729930439e139794e9e514a",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531",
+ "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531",
"shasum": ""
},
"require": {
- "php": "~7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "consistence/coding-standard": "^2.0.0",
+ "consistence/coding-standard": "^3.5",
+ "ergebnis/composer-normalize": "^2.0.2",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"phing/phing": "^2.16.0",
- "phpstan/phpstan": "^0.10@dev",
+ "phpstan/extension-installer": "^1.0",
+ "phpstan/phpstan": "^0.12.26",
+ "phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^6.3",
- "slevomat/coding-standard": "^3.3.0",
- "symfony/process": "^3.4 || ^4.0"
+ "slevomat/coding-standard": "^4.7.2",
+ "symfony/process": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.3-dev"
+ "dev-master": "0.4-dev"
}
},
"autoload": {
@@ -1319,112 +797,167 @@
"MIT"
],
"description": "PHPDoc parser with support for nullable, intersection and generic types",
- "time": "2018-06-20T17:48:01+00:00"
+ "support": {
+ "issues": "https://github.com/phpstan/phpdoc-parser/issues",
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/master"
+ },
+ "time": "2020-08-03T20:32:43+00:00"
},
{
"name": "phpstan/phpstan",
- "version": "0.10.1",
+ "version": "0.12.68",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "3179cf27542e9e47acb548150e7ca21ca5ab92d6"
+ "reference": "ddbe01af0706ee094c3f1ce9730b35aebb508d3d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3179cf27542e9e47acb548150e7ca21ca5ab92d6",
- "reference": "3179cf27542e9e47acb548150e7ca21ca5ab92d6",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ddbe01af0706ee094c3f1ce9730b35aebb508d3d",
+ "reference": "ddbe01af0706ee094c3f1ce9730b35aebb508d3d",
"shasum": ""
},
"require": {
- "composer/xdebug-handler": "^1.0",
- "jean85/pretty-package-versions": "^1.0.3",
- "nette/bootstrap": "^2.4 || ^3.0",
- "nette/di": "^2.4.7 || ^3.0",
- "nette/robot-loader": "^3.0.1",
- "nette/utils": "^2.4.5 || ^3.0",
- "nikic/php-parser": "^4.0.2",
- "php": "~7.1",
- "phpstan/phpdoc-parser": "^0.3",
- "symfony/console": "~3.2 || ~4.0",
- "symfony/finder": "~3.2 || ~4.0"
+ "php": "^7.1|^8.0"
},
- "require-dev": {
- "brianium/paratest": "^2.0",
- "consistence/coding-standard": "^3.3",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
- "ext-gd": "*",
- "ext-intl": "*",
- "ext-mysqli": "*",
- "ext-zip": "*",
- "jakub-onderka/php-parallel-lint": "^1.0",
- "phing/phing": "^2.16.0",
- "phpstan/phpstan-deprecation-rules": "^0.10.2",
- "phpstan/phpstan-php-parser": "^0.10",
- "phpstan/phpstan-phpunit": "^0.10",
- "phpstan/phpstan-strict-rules": "^0.10",
- "phpunit/phpunit": "^7.0",
- "slevomat/coding-standard": "^4.6.2"
+ "conflict": {
+ "phpstan/phpstan-shim": "*"
},
"bin": [
- "bin/phpstan"
+ "phpstan",
+ "phpstan.phar"
],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.10-dev"
+ "dev-master": "0.12-dev"
}
},
"autoload": {
- "psr-4": {
- "PHPStan\\": [
- "src/",
- "build/PHPStan"
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan - PHP Static Analysis Tool",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "source": "https://github.com/phpstan/phpstan/tree/0.12.68"
+ },
+ "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": "2021-01-18T12:29:17+00:00"
+ },
+ {
+ "name": "phpstan/phpstan-phpunit",
+ "version": "0.12.17",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-phpunit.git",
+ "reference": "432575b41cf2d4f44e460234acaf56119ed97d36"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/432575b41cf2d4f44e460234acaf56119ed97d36",
+ "reference": "432575b41cf2d4f44e460234acaf56119ed97d36",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0",
+ "phpstan/phpstan": "^0.12.60"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<7.0"
+ },
+ "require-dev": {
+ "phing/phing": "^2.16.3",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-strict-rules": "^0.12.6",
+ "phpunit/phpunit": "^7.5.20"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.12-dev"
+ },
+ "phpstan": {
+ "includes": [
+ "extension.neon",
+ "rules.neon"
]
}
},
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
- "description": "PHPStan - PHP Static Analysis Tool",
- "time": "2018-07-01T18:22:12+00:00"
+ "description": "PHPUnit extensions and rules for PHPStan",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-phpunit/issues",
+ "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.17"
+ },
+ "time": "2020-12-13T12:12:51+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "6.0.7",
+ "version": "9.2.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a"
+ "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1"
},
"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/f3e026641cc91909d421802dd3ac7827ebfd97e1",
+ "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1",
"shasum": ""
},
"require": {
"ext-dom": "*",
+ "ext-libxml": "*",
"ext-xmlwriter": "*",
- "php": "^7.1",
- "phpunit/php-file-iterator": "^2.0",
- "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/version": "^2.0.1",
- "theseer/tokenizer": "^1.1"
+ "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": "^7.0"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
- "ext-xdebug": "^2.6.0"
+ "ext-pcov": "*",
+ "ext-xdebug": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.0-dev"
+ "dev-master": "9.2-dev"
}
},
"autoload": {
@@ -1450,29 +983,42 @@
"testing",
"xunit"
],
- "time": "2018-06-01T07:51:50+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-28T06:44:49+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "2.0.1",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c"
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
},
"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/aa4be8575f26070b100fccb67faabb28f21f66f8",
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1497,26 +1043,48 @@
"filesystem",
"iterator"
],
- "time": "2018-06-11T11:44:00+00:00"
+ "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",
+ "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/"
@@ -1533,32 +1101,42 @@
"role": "lead"
}
],
- "description": "Simple template engine.",
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "description": "Invoke callables with a timeout",
+ "homepage": "https://github.com/sebastianbergmann/php-invoker/",
"keywords": [
- "template"
+ "process"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
],
- "time": "2015-06-21T13:50:34+00:00"
+ "time": "2020-09-28T05:58:55+00:00"
},
{
- "name": "phpunit/php-timer",
- "version": "2.0.0",
+ "name": "phpunit/php-text-template",
+ "version": "2.0.4",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f"
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f",
- "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f",
+ "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": {
@@ -1582,38 +1160,47 @@
"role": "lead"
}
],
- "description": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
- "timer"
+ "template"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
],
- "time": "2018-02-01T13:07:23+00:00"
+ "time": "2020-10-26T05:33:50+00:00"
},
{
- "name": "phpunit/php-token-stream",
- "version": "3.0.0",
+ "name": "phpunit/php-timer",
+ "version": "5.0.3",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace"
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"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-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.0-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -1628,65 +1215,78 @@
"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"
],
- "time": "2018-02-01T13:16:43+00:00"
+ "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",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:16:10+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "7.2.6",
+ "version": "9.5.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "400a3836ee549ae6f665323ac3f21e27eac7155f"
+ "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/400a3836ee549ae6f665323ac3f21e27eac7155f",
- "reference": "400a3836ee549ae6f665323ac3f21e27eac7155f",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360",
+ "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.1",
+ "doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "^1.7",
- "phar-io/manifest": "^1.0.1",
- "phar-io/version": "^1.0",
- "php": "^7.1",
- "phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^6.0.7",
- "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": "^3.1",
- "sebastian/exporter": "^3.1",
- "sebastian/global-state": "^2.0",
- "sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^1.0",
- "sebastian/version": "^2.0.1"
- },
- "conflict": {
- "phpunit/phpunit-mock-objects": "*"
+ "ext-xmlwriter": "*",
+ "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"
+ "ext-xdebug": "*"
},
"bin": [
"phpunit"
@@ -1694,12 +1294,15 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "7.2-dev"
+ "dev-master": "9.5-dev"
}
},
"autoload": {
"classmap": [
"src/"
+ ],
+ "files": [
+ "src/Framework/Assert/Functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -1720,79 +1323,158 @@
"testing",
"xunit"
],
- "time": "2018-06-21T13:13:39+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.1"
+ },
+ "funding": [
+ {
+ "url": "https://phpunit.de/donate.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-01-17T07:42:25+00:00"
},
{
- "name": "psr/log",
- "version": "1.0.2",
+ "name": "sebastian/cli-parser",
+ "version": "1.0.1",
"source": {
"type": "git",
- "url": "https://github.com/php-fig/log.git",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ "url": "https://github.com/sebastianbergmann/cli-parser.git",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.0-dev"
}
},
"autoload": {
- "psr-4": {
- "Psr\\Log\\": "Psr/Log/"
+ "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",
+ "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",
+ "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": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
}
],
- "description": "Common interface for logging libraries",
- "homepage": "https://github.com/php-fig/log",
- "keywords": [
- "log",
- "psr",
- "psr-3"
+ "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",
+ "type": "github"
+ }
],
- "time": "2016-10-10T12:19:37+00:00"
+ "time": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.1",
+ "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": {
@@ -1812,34 +1494,44 @@
],
"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"
+ "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",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
- "version": "3.0.1",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "591a30922f54656695e59b1f39501aec513403da"
+ "reference": "55f4261989e546dc112258c7a75935a81a7ce382"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/591a30922f54656695e59b1f39501aec513403da",
- "reference": "591a30922f54656695e59b1f39501aec513403da",
+ "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": {
@@ -1852,6 +1544,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1863,10 +1559,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",
@@ -1876,33 +1568,100 @@
"compare",
"equality"
],
- "time": "2018-06-14T15:05:28+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T15:49:45+00:00"
+ },
+ {
+ "name": "sebastian/complexity",
+ "version": "2.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/complexity.git",
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.7",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for calculating the complexity of PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/complexity",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/complexity/issues",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T15:52:27+00:00"
},
{
"name": "sebastian/diff",
- "version": "3.0.1",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "366541b989927187c4ca70490a35615d3fef2dce"
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce",
- "reference": "366541b989927187c4ca70490a35615d3fef2dce",
+ "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.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": {
@@ -1915,13 +1674,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",
@@ -1932,32 +1691,45 @@
"unidiff",
"unified diff"
],
- "time": "2018-06-10T07:54:39+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:10:38+00:00"
},
{
"name": "sebastian/environment",
- "version": "3.1.0",
+ "version": "5.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
- "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^6.1"
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-posix": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1.x-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -1982,34 +1754,44 @@
"environment",
"hhvm"
],
- "time": "2017-07-01T08:51:00+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T05:52:38+00:00"
},
{
"name": "sebastian/exporter",
- "version": "3.1.0",
+ "version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
+ "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
+ "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": {
@@ -2022,6 +1804,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -2030,17 +1816,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",
@@ -2049,27 +1831,40 @@
"export",
"exporter"
],
- "time": "2017-04-03T13:19:02+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T05:24:23+00:00"
},
{
"name": "sebastian/global-state",
- "version": "2.0.0",
+ "version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
+ "reference": "a90ccbddffa067b51f574dea6eb25d5680839455"
},
"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/a90ccbddffa067b51f574dea6eb25d5680839455",
+ "reference": "a90ccbddffa067b51f574dea6eb25d5680839455",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "ext-dom": "*",
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-uopz": "*"
@@ -2077,7 +1872,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -2100,34 +1895,101 @@
"keywords": [
"global state"
],
- "time": "2017-04-27T15:39:26+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2"
+ },
+ "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",
+ "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",
+ "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": {
@@ -2147,32 +2009,42 @@
],
"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"
+ "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",
+ "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": {
@@ -2192,32 +2064,42 @@
],
"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"
+ "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",
+ "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": {
@@ -2230,14 +2112,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"
@@ -2245,29 +2127,42 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2017-03-03T06:23:57+00:00"
+ "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",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:17:30+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "1.0.0",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
},
"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/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"shasum": ""
},
"require": {
- "php": ">=5.6.0"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -2287,29 +2182,42 @@
],
"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"
+ "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",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T06:45:17+00:00"
},
{
- "name": "sebastian/version",
- "version": "2.0.1",
+ "name": "sebastian/type",
+ "version": "2.3.1",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/version.git",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+ "url": "https://github.com/sebastianbergmann/type.git",
+ "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
+ "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -2328,246 +2236,223 @@
"role": "lead"
}
],
- "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"
- },
- {
- "name": "slevomat/coding-standard",
- "version": "4.6.3",
- "source": {
- "type": "git",
- "url": "https://github.com/slevomat/coding-standard.git",
- "reference": "76e31b7cb2ce1de53b36430a332daae2db0be549"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/76e31b7cb2ce1de53b36430a332daae2db0be549",
- "reference": "76e31b7cb2ce1de53b36430a332daae2db0be549",
- "shasum": ""
- },
- "require": {
- "php": "^7.1",
- "squizlabs/php_codesniffer": "^3.2.3"
- },
- "require-dev": {
- "jakub-onderka/php-parallel-lint": "1.0.0",
- "phing/phing": "2.16.1",
- "phpstan/phpstan": "0.9.2",
- "phpstan/phpstan-phpunit": "0.9.4",
- "phpstan/phpstan-strict-rules": "0.9",
- "phpunit/phpunit": "7.2.4"
+ "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.1"
},
- "type": "phpcodesniffer-standard",
- "autoload": {
- "psr-4": {
- "SlevomatCodingStandard\\": "SlevomatCodingStandard"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
}
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
],
- "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
- "time": "2018-06-29T20:25:43+00:00"
+ "time": "2020-10-26T13:18:59+00:00"
},
{
- "name": "squizlabs/php_codesniffer",
- "version": "3.3.0",
+ "name": "sebastian/version",
+ "version": "3.0.2",
"source": {
"type": "git",
- "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266"
+ "url": "https://github.com/sebastianbergmann/version.git",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d86873af43b4aa9d1f39a3601cc0cfcf02b25266",
- "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c",
"shasum": ""
},
"require": {
- "ext-simplexml": "*",
- "ext-tokenizer": "*",
- "ext-xmlwriter": "*",
- "php": ">=5.4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+ "php": ">=7.3"
},
- "bin": [
- "bin/phpcs",
- "bin/phpcbf"
- ],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.x-dev"
+ "dev-master": "3.0-dev"
}
},
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
- "name": "Greg Sherwood",
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
- "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
- "homepage": "http://www.squizlabs.com/php-codesniffer",
- "keywords": [
- "phpcs",
- "standards"
+ "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",
+ "type": "github"
+ }
],
- "time": "2018-06-06T23:58:19+00:00"
+ "time": "2020-09-28T06:39:44+00:00"
},
{
- "name": "symfony/console",
- "version": "v4.1.1",
+ "name": "slevomat/coding-standard",
+ "version": "6.4.1",
"source": {
"type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f"
+ "url": "https://github.com/slevomat/coding-standard.git",
+ "reference": "696dcca217d0c9da2c40d02731526c1e25b65346"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/70591cda56b4b47c55776ac78e157c4bb6c8b43f",
- "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f",
+ "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346",
+ "reference": "696dcca217d0c9da2c40d02731526c1e25b65346",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
- "symfony/polyfill-mbstring": "~1.0"
- },
- "conflict": {
- "symfony/dependency-injection": "<3.4",
- "symfony/process": "<3.3"
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
+ "php": "^7.1 || ^8.0",
+ "phpstan/phpdoc-parser": "0.4.5 - 0.4.9",
+ "squizlabs/php_codesniffer": "^3.5.6"
},
"require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "~3.4|~4.0",
- "symfony/dependency-injection": "~3.4|~4.0",
- "symfony/event-dispatcher": "~3.4|~4.0",
- "symfony/lock": "~3.4|~4.0",
- "symfony/process": "~3.4|~4.0"
- },
- "suggest": {
- "psr/log-implementation": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": ""
+ "phing/phing": "2.16.3",
+ "php-parallel-lint/php-parallel-lint": "1.2.0",
+ "phpstan/phpstan": "0.12.48",
+ "phpstan/phpstan-deprecation-rules": "0.12.5",
+ "phpstan/phpstan-phpunit": "0.12.16",
+ "phpstan/phpstan-strict-rules": "0.12.5",
+ "phpunit/phpunit": "7.5.20|8.5.5|9.4.0"
},
- "type": "library",
+ "type": "phpcodesniffer-standard",
"extra": {
"branch-alias": {
- "dev-master": "4.1-dev"
+ "dev-master": "6.x-dev"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\Console\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
+ "SlevomatCodingStandard\\": "SlevomatCodingStandard"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
- "authors": [
+ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
+ "support": {
+ "issues": "https://github.com/slevomat/coding-standard/issues",
+ "source": "https://github.com/slevomat/coding-standard/tree/6.4.1"
+ },
+ "funding": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "url": "https://github.com/kukulich",
+ "type": "github"
},
{
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
+ "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
+ "type": "tidelift"
}
],
- "description": "Symfony Console Component",
- "homepage": "https://symfony.com",
- "time": "2018-05-31T10:17:53+00:00"
+ "time": "2020-10-05T12:39:37+00:00"
},
{
- "name": "symfony/finder",
- "version": "v4.1.1",
+ "name": "squizlabs/php_codesniffer",
+ "version": "3.5.8",
"source": {
"type": "git",
- "url": "https://github.com/symfony/finder.git",
- "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb"
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
+ "reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/84714b8417d19e4ba02ea78a41a975b3efaafddb",
- "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
+ "reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
"shasum": ""
},
"require": {
- "php": "^7.1.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": "4.1-dev"
+ "dev-master": "3.x-dev"
}
},
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Finder\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
+ "name": "Greg Sherwood",
+ "role": "lead"
}
],
- "description": "Symfony Finder Component",
- "homepage": "https://symfony.com",
- "time": "2018-06-19T21:38:16+00:00"
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "keywords": [
+ "phpcs",
+ "standards"
+ ],
+ "support": {
+ "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
+ "source": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
+ },
+ "time": "2020-10-23T02:01:07+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.8.0",
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.22.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "3296adf6a6454a050679cde90f95350ad604b171"
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
- "reference": "3296adf6a6454a050679cde90f95350ad604b171",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
- "ext-mbstring": "For best performance"
+ "ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.8-dev"
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
+ "Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
@@ -2579,44 +2464,60 @@
],
"authors": [
{
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
+ "ctype",
"polyfill",
- "portable",
- "shim"
+ "portable"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.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": "2018-04-26T10:06:28+00:00"
+ "time": "2021-01-07T16:49:33+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.1.0",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
+ "reference": "75a63c33a8577608444246075ea0af0d052e452a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
- "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "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": {
@@ -2636,35 +2537,44 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "time": "2017-04-07T12:08:54+00:00"
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/master"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2020-07-12T23:59:07+00:00"
},
{
"name": "webmozart/assert",
- "version": "1.3.0",
+ "version": "1.9.1",
"source": {
"type": "git",
- "url": "https://github.com/webmozart/assert.git",
- "reference": "0df1908962e7a3071564e857d86874dad1ef204a"
+ "url": "https://github.com/webmozarts/assert.git",
+ "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
- "reference": "0df1908962e7a3071564e857d86874dad1ef204a",
+ "url": "https://api.github.com/repos/webmozarts/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": {
+ "phpstan/phpstan": "<0.12.20",
+ "vimeo/psalm": "<3.9.1"
},
"require-dev": {
- "phpunit/phpunit": "^4.6",
- "sebastian/version": "^1.0.1"
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.3-dev"
- }
- },
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@@ -2686,7 +2596,11 @@
"check",
"validate"
],
- "time": "2018-01-29T19:49:41+00:00"
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.9.1"
+ },
+ "time": "2020-07-08T17:02:28+00:00"
}
],
"aliases": [],
@@ -2695,8 +2609,9 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": "^7.2",
+ "php": "^7.2 || ^8.0",
"ext-pcre": "*"
},
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "2.0.0"
}
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index d704845..04d42fb 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -17,6 +17,10 @@
+
+
+
+
diff --git a/phpstan.neon b/phpstan.neon
index eab1b77..bd874bc 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,4 +1,6 @@
parameters:
- level: 7
- paths:
- - src
+ level: 8
+ paths:
+ - src
+ ignoreErrors:
+ - '#Unsafe usage of new static\(\)\.#'
diff --git a/src/Dflydev/FigCookies/Cookie.php b/src/Dflydev/FigCookies/Cookie.php
index a9b3479..aabc367 100644
--- a/src/Dflydev/FigCookies/Cookie.php
+++ b/src/Dflydev/FigCookies/Cookie.php
@@ -21,19 +21,19 @@ public function __construct(string $name, ?string $value = null)
$this->value = $value;
}
- public function getName() : string
+ public function getName(): string
{
return $this->name;
}
- public function getValue() : ?string
+ public function getValue(): ?string
{
return $this->value;
}
- public function withValue(?string $value = null) : Cookie
+ public function withValue(?string $value = null): Cookie
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->value = $value;
@@ -42,18 +42,16 @@ public function withValue(?string $value = null) : Cookie
/**
* Render Cookie as a string.
- *
*/
- public function __toString() : string
+ public function __toString(): string
{
return urlencode($this->name) . '=' . urlencode((string) $this->value);
}
/**
* Create a Cookie.
- *
*/
- public static function create(string $name, ?string $value = null) : Cookie
+ public static function create(string $name, ?string $value = null): Cookie
{
return new static($name, $value);
}
@@ -63,24 +61,22 @@ public static function create(string $name, ?string $value = null) : Cookie
*
* @return Cookie[]
*/
- public static function listFromCookieString(string $string) : array
+ public static function listFromCookieString(string $string): array
{
$cookies = StringUtil::splitOnAttributeDelimiter($string);
- return array_map(function ($cookiePair) {
+ return array_map(static function ($cookiePair) {
return static::oneFromCookiePair($cookiePair);
}, $cookies);
}
/**
* Create one Cookie from a cookie key/value header value string.
- *
*/
- public static function oneFromCookiePair(string $string) : Cookie
+ public static function oneFromCookiePair(string $string): Cookie
{
- list ($cookieName, $cookieValue) = StringUtil::splitCookiePair($string);
+ [$cookieName, $cookieValue] = StringUtil::splitCookiePair($string);
- /** @var Cookie $cookie */
$cookie = new static($cookieName);
if ($cookieValue !== null) {
diff --git a/src/Dflydev/FigCookies/Cookies.php b/src/Dflydev/FigCookies/Cookies.php
index ca1626e..58f9997 100644
--- a/src/Dflydev/FigCookies/Cookies.php
+++ b/src/Dflydev/FigCookies/Cookies.php
@@ -5,6 +5,7 @@
namespace Dflydev\FigCookies;
use Psr\Http\Message\RequestInterface;
+
use function array_values;
use function implode;
@@ -26,12 +27,12 @@ public function __construct(array $cookies = [])
}
}
- public function has(string $name) : bool
+ public function has(string $name): bool
{
return isset($this->cookies[$name]);
}
- public function get(string $name) : ?Cookie
+ public function get(string $name): ?Cookie
{
if (! $this->has($name)) {
return null;
@@ -41,23 +42,23 @@ public function get(string $name) : ?Cookie
}
/** @return Cookie[] */
- public function getAll() : array
+ public function getAll(): array
{
return array_values($this->cookies);
}
- public function with(Cookie $cookie) : Cookies
+ public function with(Cookie $cookie): Cookies
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->cookies[$cookie->getName()] = $cookie;
return $clone;
}
- public function without(string $name) : Cookies
+ public function without(string $name): Cookies
{
- $clone = clone($this);
+ $clone = clone $this;
if (! $clone->has($name)) {
return $clone;
@@ -71,7 +72,7 @@ public function without(string $name) : Cookies
/**
* Render Cookies into a Request.
*/
- public function renderIntoCookieHeader(RequestInterface $request) : RequestInterface
+ public function renderIntoCookieHeader(RequestInterface $request): RequestInterface
{
$cookieString = implode('; ', $this->cookies);
@@ -82,15 +83,13 @@ public function renderIntoCookieHeader(RequestInterface $request) : RequestInter
/**
* Create Cookies from a Cookie header value string.
- *
- * @return static
*/
- public static function fromCookieString(string $string) : self
+ public static function fromCookieString(string $string): self
{
return new static(Cookie::listFromCookieString($string));
}
- public static function fromRequest(RequestInterface $request) : Cookies
+ public static function fromRequest(RequestInterface $request): Cookies
{
$cookieString = $request->getHeaderLine(static::COOKIE_HEADER);
diff --git a/src/Dflydev/FigCookies/FigRequestCookies.php b/src/Dflydev/FigCookies/FigRequestCookies.php
index 122085c..861e4f0 100644
--- a/src/Dflydev/FigCookies/FigRequestCookies.php
+++ b/src/Dflydev/FigCookies/FigRequestCookies.php
@@ -6,11 +6,12 @@
use InvalidArgumentException;
use Psr\Http\Message\RequestInterface;
+
use function is_callable;
class FigRequestCookies
{
- public static function get(RequestInterface $request, string $name, ?string $value = null) : Cookie
+ public static function get(RequestInterface $request, string $name, ?string $value = null): Cookie
{
$cookies = Cookies::fromRequest($request);
$cookie = $cookies->get($name);
@@ -22,15 +23,14 @@ public static function get(RequestInterface $request, string $name, ?string $val
return Cookie::create($name, $value);
}
- public static function set(RequestInterface $request, Cookie $cookie) : RequestInterface
+ public static function set(RequestInterface $request, Cookie $cookie): RequestInterface
{
return Cookies::fromRequest($request)
->with($cookie)
- ->renderIntoCookieHeader($request)
- ;
+ ->renderIntoCookieHeader($request);
}
- public static function modify(RequestInterface $request, string $name, callable $modify) : RequestInterface
+ public static function modify(RequestInterface $request, string $name, callable $modify): RequestInterface
{
if (! is_callable($modify)) {
throw new InvalidArgumentException('$modify must be callable.');
@@ -43,15 +43,13 @@ public static function modify(RequestInterface $request, string $name, callable
return $cookies
->with($cookie)
- ->renderIntoCookieHeader($request)
- ;
+ ->renderIntoCookieHeader($request);
}
- public static function remove(RequestInterface $request, string $name) : RequestInterface
+ public static function remove(RequestInterface $request, string $name): RequestInterface
{
return Cookies::fromRequest($request)
->without($name)
- ->renderIntoCookieHeader($request)
- ;
+ ->renderIntoCookieHeader($request);
}
}
diff --git a/src/Dflydev/FigCookies/FigResponseCookies.php b/src/Dflydev/FigCookies/FigResponseCookies.php
index 5330305..7d8bbe0 100644
--- a/src/Dflydev/FigCookies/FigResponseCookies.php
+++ b/src/Dflydev/FigCookies/FigResponseCookies.php
@@ -6,11 +6,12 @@
use InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;
+
use function is_callable;
class FigResponseCookies
{
- public static function get(ResponseInterface $response, string $name, ?string $value = null) : SetCookie
+ public static function get(ResponseInterface $response, string $name, ?string $value = null): SetCookie
{
$setCookies = SetCookies::fromResponse($response);
$cookie = $setCookies->get($name);
@@ -22,20 +23,19 @@ public static function get(ResponseInterface $response, string $name, ?string $v
return SetCookie::create($name, $value);
}
- public static function set(ResponseInterface $response, SetCookie $setCookie) : ResponseInterface
+ public static function set(ResponseInterface $response, SetCookie $setCookie): ResponseInterface
{
return SetCookies::fromResponse($response)
->with($setCookie)
- ->renderIntoSetCookieHeader($response)
- ;
+ ->renderIntoSetCookieHeader($response);
}
- public static function expire(ResponseInterface $response, string $cookieName) : ResponseInterface
+ public static function expire(ResponseInterface $response, string $cookieName): ResponseInterface
{
return static::set($response, SetCookie::createExpired($cookieName));
}
- public static function modify(ResponseInterface $response, string $name, callable $modify) : ResponseInterface
+ public static function modify(ResponseInterface $response, string $name, callable $modify): ResponseInterface
{
if (! is_callable($modify)) {
throw new InvalidArgumentException('$modify must be callable.');
@@ -48,15 +48,13 @@ public static function modify(ResponseInterface $response, string $name, callabl
return $setCookies
->with($setCookie)
- ->renderIntoSetCookieHeader($response)
- ;
+ ->renderIntoSetCookieHeader($response);
}
- public static function remove(ResponseInterface $response, string $name) : ResponseInterface
+ public static function remove(ResponseInterface $response, string $name): ResponseInterface
{
return SetCookies::fromResponse($response)
->without($name)
- ->renderIntoSetCookieHeader($response)
- ;
+ ->renderIntoSetCookieHeader($response);
}
}
diff --git a/src/Dflydev/FigCookies/Modifier/SameSite.php b/src/Dflydev/FigCookies/Modifier/SameSite.php
index 9f3cfce..6e74420 100644
--- a/src/Dflydev/FigCookies/Modifier/SameSite.php
+++ b/src/Dflydev/FigCookies/Modifier/SameSite.php
@@ -4,6 +4,8 @@
namespace Dflydev\FigCookies\Modifier;
+use InvalidArgumentException;
+
use function sprintf;
use function strtolower;
@@ -24,25 +26,25 @@ private function __construct(string $value)
$this->value = $value;
}
- public static function strict() : self
+ public static function strict(): self
{
return new self(self::STRICT);
}
- public static function lax() : self
+ public static function lax(): self
{
return new self(self::LAX);
}
- public static function none() : self
+ public static function none(): self
{
return new self(self::NONE);
}
/**
- * @throws \InvalidArgumentException If the given SameSite string is neither strict nor lax.
+ * @throws InvalidArgumentException If the given SameSite string is neither strict nor lax.
*/
- public static function fromString(string $sameSite) : self
+ public static function fromString(string $sameSite): self
{
$lowerCaseSite = strtolower($sameSite);
@@ -58,13 +60,13 @@ public static function fromString(string $sameSite) : self
return self::none();
}
- throw new \InvalidArgumentException(sprintf(
+ throw new InvalidArgumentException(sprintf(
'Expected modifier value to be either "strict", "lax", or "none", "%s" given',
$sameSite
));
}
- public function asString() : string
+ public function asString(): string
{
return 'SameSite=' . $this->value;
}
diff --git a/src/Dflydev/FigCookies/SetCookie.php b/src/Dflydev/FigCookies/SetCookie.php
index 8b5ccb0..3fe6a3f 100644
--- a/src/Dflydev/FigCookies/SetCookie.php
+++ b/src/Dflydev/FigCookies/SetCookie.php
@@ -7,6 +7,8 @@
use DateTime;
use DateTimeInterface;
use Dflydev\FigCookies\Modifier\SameSite;
+use InvalidArgumentException;
+
use function array_shift;
use function count;
use function explode;
@@ -47,69 +49,69 @@ private function __construct(string $name, ?string $value = null)
$this->value = $value;
}
- public function getName() : string
+ public function getName(): string
{
return $this->name;
}
- public function getValue() : ?string
+ public function getValue(): ?string
{
return $this->value;
}
- public function getExpires() : int
+ public function getExpires(): int
{
return $this->expires;
}
- public function getMaxAge() : int
+ public function getMaxAge(): int
{
return $this->maxAge;
}
- public function getPath() : ?string
+ public function getPath(): ?string
{
return $this->path;
}
- public function getDomain() : ?string
+ public function getDomain(): ?string
{
return $this->domain;
}
- public function getSecure() : bool
+ public function getSecure(): bool
{
return $this->secure;
}
- public function getHttpOnly() : bool
+ public function getHttpOnly(): bool
{
return $this->httpOnly;
}
- public function getSameSite() : ?SameSite
+ public function getSameSite(): ?SameSite
{
return $this->sameSite;
}
- public function withValue(?string $value = null) : self
+ public function withValue(?string $value = null): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->value = $value;
return $clone;
}
- /** @param int|\DateTimeInterface|string|null $expires */
- private function resolveExpires($expires = null) : int
+ /** @param int|DateTimeInterface|string|null $expires */
+ private function resolveExpires($expires = null): int
{
if ($expires === null) {
return 0;
}
if ($expires instanceof DateTimeInterface) {
- return $expires->getTimestamp();
+ return (int) $expires->getTimestamp();
}
if (is_numeric($expires)) {
@@ -119,98 +121,98 @@ private function resolveExpires($expires = null) : int
$time = strtotime($expires);
if (! is_int($time)) {
- throw new \InvalidArgumentException(sprintf('Invalid expires "%s" provided', $expires));
+ throw new InvalidArgumentException(sprintf('Invalid expires "%s" provided', $expires));
}
return $time;
}
- /** @param int|string|\DateTimeInterface|null $expires */
- public function withExpires($expires = null) : self
+ /** @param int|string|DateTimeInterface|null $expires */
+ public function withExpires($expires = null): self
{
$expires = $this->resolveExpires($expires);
- $clone = clone($this);
+ $clone = clone $this;
$clone->expires = $expires;
return $clone;
}
- public function rememberForever() : self
+ public function rememberForever(): self
{
return $this->withExpires(new DateTime('+5 years'));
}
- public function expire() : self
+ public function expire(): self
{
return $this->withExpires(new DateTime('-5 years'));
}
- public function withMaxAge(?int $maxAge = null) : self
+ public function withMaxAge(?int $maxAge = null): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->maxAge = (int) $maxAge;
return $clone;
}
- public function withPath(?string $path = null) : self
+ public function withPath(?string $path = null): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->path = $path;
return $clone;
}
- public function withDomain(?string $domain = null) : self
+ public function withDomain(?string $domain = null): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->domain = $domain;
return $clone;
}
- public function withSecure(bool $secure = true) : self
+ public function withSecure(bool $secure = true): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->secure = $secure;
return $clone;
}
- public function withHttpOnly(bool $httpOnly = true) : self
+ public function withHttpOnly(bool $httpOnly = true): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->httpOnly = $httpOnly;
return $clone;
}
- public function withSameSite(SameSite $sameSite) : self
+ public function withSameSite(SameSite $sameSite): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->sameSite = $sameSite;
return $clone;
}
- public function withoutSameSite() : self
+ public function withoutSameSite(): self
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->sameSite = null;
return $clone;
}
- public function __toString() : string
+ public function __toString(): string
{
$cookieStringParts = [
urlencode($this->name) . '=' . urlencode((string) $this->value),
@@ -227,37 +229,36 @@ public function __toString() : string
return implode('; ', $cookieStringParts);
}
- public static function create(string $name, ?string $value = null) : self
+ public static function create(string $name, ?string $value = null): self
{
return new static($name, $value);
}
- public static function createRememberedForever(string $name, ?string $value = null) : self
+ public static function createRememberedForever(string $name, ?string $value = null): self
{
return static::create($name, $value)->rememberForever();
}
- public static function createExpired(string $name) : self
+ public static function createExpired(string $name): self
{
return static::create($name)->expire();
}
- public static function fromSetCookieString(string $string) : self
+ public static function fromSetCookieString(string $string): self
{
$rawAttributes = StringUtil::splitOnAttributeDelimiter($string);
$rawAttribute = array_shift($rawAttributes);
if (! is_string($rawAttribute)) {
- throw new \InvalidArgumentException(sprintf(
+ throw new InvalidArgumentException(sprintf(
'The provided cookie string "%s" must have at least one attribute',
$string
));
}
- list ($cookieName, $cookieValue) = StringUtil::splitCookiePair($rawAttribute);
+ [$cookieName, $cookieValue] = StringUtil::splitCookiePair($rawAttribute);
- /** @var SetCookie $setCookie */
$setCookie = new static($cookieName);
if ($cookieValue !== null) {
@@ -305,7 +306,7 @@ public static function fromSetCookieString(string $string) : self
*
* @return string[]
*/
- private function appendFormattedDomainPartIfSet(array $cookieStringParts) : array
+ private function appendFormattedDomainPartIfSet(array $cookieStringParts): array
{
if ($this->domain) {
$cookieStringParts[] = sprintf('Domain=%s', $this->domain);
@@ -319,7 +320,7 @@ private function appendFormattedDomainPartIfSet(array $cookieStringParts) : arra
*
* @return string[]
*/
- private function appendFormattedPathPartIfSet(array $cookieStringParts) : array
+ private function appendFormattedPathPartIfSet(array $cookieStringParts): array
{
if ($this->path) {
$cookieStringParts[] = sprintf('Path=%s', $this->path);
@@ -333,7 +334,7 @@ private function appendFormattedPathPartIfSet(array $cookieStringParts) : array
*
* @return string[]
*/
- private function appendFormattedExpiresPartIfSet(array $cookieStringParts) : array
+ private function appendFormattedExpiresPartIfSet(array $cookieStringParts): array
{
if ($this->expires) {
$cookieStringParts[] = sprintf('Expires=%s', gmdate('D, d M Y H:i:s T', $this->expires));
@@ -347,7 +348,7 @@ private function appendFormattedExpiresPartIfSet(array $cookieStringParts) : arr
*
* @return string[]
*/
- private function appendFormattedMaxAgePartIfSet(array $cookieStringParts) : array
+ private function appendFormattedMaxAgePartIfSet(array $cookieStringParts): array
{
if ($this->maxAge) {
$cookieStringParts[] = sprintf('Max-Age=%s', $this->maxAge);
@@ -361,7 +362,7 @@ private function appendFormattedMaxAgePartIfSet(array $cookieStringParts) : arra
*
* @return string[]
*/
- private function appendFormattedSecurePartIfSet(array $cookieStringParts) : array
+ private function appendFormattedSecurePartIfSet(array $cookieStringParts): array
{
if ($this->secure) {
$cookieStringParts[] = 'Secure';
@@ -375,7 +376,7 @@ private function appendFormattedSecurePartIfSet(array $cookieStringParts) : arra
*
* @return string[]
*/
- private function appendFormattedHttpOnlyPartIfSet(array $cookieStringParts) : array
+ private function appendFormattedHttpOnlyPartIfSet(array $cookieStringParts): array
{
if ($this->httpOnly) {
$cookieStringParts[] = 'HttpOnly';
@@ -389,7 +390,7 @@ private function appendFormattedHttpOnlyPartIfSet(array $cookieStringParts) : ar
*
* @return string[]
*/
- private function appendFormattedSameSitePartIfSet(array $cookieStringParts) : array
+ private function appendFormattedSameSitePartIfSet(array $cookieStringParts): array
{
if ($this->sameSite === null) {
return $cookieStringParts;
diff --git a/src/Dflydev/FigCookies/SetCookies.php b/src/Dflydev/FigCookies/SetCookies.php
index 4d5f80b..72cb6c4 100644
--- a/src/Dflydev/FigCookies/SetCookies.php
+++ b/src/Dflydev/FigCookies/SetCookies.php
@@ -5,6 +5,7 @@
namespace Dflydev\FigCookies;
use Psr\Http\Message\ResponseInterface;
+
use function array_map;
use function array_values;
@@ -26,12 +27,12 @@ public function __construct(array $setCookies = [])
}
}
- public function has(string $name) : bool
+ public function has(string $name): bool
{
return isset($this->setCookies[$name]);
}
- public function get(string $name) : ?SetCookie
+ public function get(string $name): ?SetCookie
{
if (! $this->has($name)) {
return null;
@@ -41,23 +42,23 @@ public function get(string $name) : ?SetCookie
}
/** @return SetCookie[] */
- public function getAll() : array
+ public function getAll(): array
{
return array_values($this->setCookies);
}
- public function with(SetCookie $setCookie) : SetCookies
+ public function with(SetCookie $setCookie): SetCookies
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->setCookies[$setCookie->getName()] = $setCookie;
return $clone;
}
- public function without(string $name) : SetCookies
+ public function without(string $name): SetCookies
{
- $clone = clone($this);
+ $clone = clone $this;
if (! $clone->has($name)) {
return $clone;
@@ -70,9 +71,8 @@ public function without(string $name) : SetCookies
/**
* Render SetCookies into a Response.
- *
*/
- public function renderIntoSetCookieHeader(ResponseInterface $response) : ResponseInterface
+ public function renderIntoSetCookieHeader(ResponseInterface $response): ResponseInterface
{
$response = $response->withoutHeader(static::SET_COOKIE_HEADER);
foreach ($this->setCookies as $setCookie) {
@@ -86,22 +86,20 @@ public function renderIntoSetCookieHeader(ResponseInterface $response) : Respons
* Create SetCookies from a collection of SetCookie header value strings.
*
* @param string[] $setCookieStrings
- * @return static
*/
- public static function fromSetCookieStrings(array $setCookieStrings) : self
+ public static function fromSetCookieStrings(array $setCookieStrings): self
{
- return new static(array_map(function (string $setCookieString) : SetCookie {
+ return new static(array_map(static function (string $setCookieString): SetCookie {
return SetCookie::fromSetCookieString($setCookieString);
}, $setCookieStrings));
}
/**
* Create SetCookies from a Response.
- *
*/
- public static function fromResponse(ResponseInterface $response) : SetCookies
+ public static function fromResponse(ResponseInterface $response): SetCookies
{
- return new static(array_map(function (string $setCookieString) : SetCookie {
+ return new static(array_map(static function (string $setCookieString): SetCookie {
return SetCookie::fromSetCookieString($setCookieString);
}, $response->getHeader(static::SET_COOKIE_HEADER)));
}
diff --git a/src/Dflydev/FigCookies/StringUtil.php b/src/Dflydev/FigCookies/StringUtil.php
index 6779072..ce73c66 100644
--- a/src/Dflydev/FigCookies/StringUtil.php
+++ b/src/Dflydev/FigCookies/StringUtil.php
@@ -14,7 +14,7 @@
class StringUtil
{
/** @return string[] */
- public static function splitOnAttributeDelimiter(string $string) : array
+ public static function splitOnAttributeDelimiter(string $string): array
{
$splitAttributes = preg_split('@\s*[;]\s*@', $string);
@@ -24,7 +24,7 @@ public static function splitOnAttributeDelimiter(string $string) : array
}
/** @return string[] */
- public static function splitCookiePair(string $string) : array
+ public static function splitCookiePair(string $string): array
{
$pairParts = explode('=', $string, 2);
$pairParts[1] = urldecode($pairParts[1] ?? '');
diff --git a/tests/Dflydev/FigCookies/CookieTest.php b/tests/Dflydev/FigCookies/CookieTest.php
index 152a81a..a0664f6 100644
--- a/tests/Dflydev/FigCookies/CookieTest.php
+++ b/tests/Dflydev/FigCookies/CookieTest.php
@@ -5,6 +5,7 @@
namespace Dflydev\FigCookies;
use PHPUnit\Framework\TestCase;
+
use function count;
class CookieTest extends TestCase
@@ -13,8 +14,7 @@ class CookieTest extends TestCase
* @test
* @dataProvider provideParsesOneFromCookieStringData
*/
- public function it_parses_one_from_cookie_string(string $cookieString, string $expectedName, ?string $expectedValue
- ) : void
+ public function it_parses_one_from_cookie_string(string $cookieString, string $expectedName, ?string $expectedValue): void
{
$cookie = Cookie::oneFromCookiePair($cookieString);
@@ -27,28 +27,28 @@ public function it_parses_one_from_cookie_string(string $cookieString, string $e
* @test
* @dataProvider provideParsesListFromCookieString
*/
- public function it_parses_list_from_cookie_string(string $cookieString, array $expectedNameValuePairs) : void
+ public function it_parses_list_from_cookie_string(string $cookieString, array $expectedNameValuePairs): void
{
$cookies = Cookie::listFromCookieString($cookieString);
self::assertCount(count($expectedNameValuePairs), $cookies);
for ($i = 0; $i < count($cookies); $i++) {
- $cookie = $cookies[$i];
- list ($expectedName, $expectedValue) = $expectedNameValuePairs[$i];
+ $cookie = $cookies[$i];
+ [$expectedName, $expectedValue] = $expectedNameValuePairs[$i];
self::assertCookieNameAndValue($cookie, $expectedName, $expectedValue);
}
}
- private function assertCookieNameAndValue(Cookie $cookie, string $expectedName, ?string $expectedValue) : void
+ private function assertCookieNameAndValue(Cookie $cookie, string $expectedName, ?string $expectedValue): void
{
self::assertEquals($expectedName, $cookie->getName());
self::assertEquals($expectedValue, $cookie->getValue());
}
/** @return string[][] */
- public function provideParsesOneFromCookieStringData() : array
+ public function provideParsesOneFromCookieStringData(): array
{
return [
['someCookie=something', 'someCookie', 'something'],
@@ -59,7 +59,7 @@ public function provideParsesOneFromCookieStringData() : array
}
/** @return string[][]|string[][][][] */
- public function provideParsesListFromCookieString() : array
+ public function provideParsesListFromCookieString(): array
{
return [
[
diff --git a/tests/Dflydev/FigCookies/CookiesTest.php b/tests/Dflydev/FigCookies/CookiesTest.php
index 69177c8..02d7c6d 100644
--- a/tests/Dflydev/FigCookies/CookiesTest.php
+++ b/tests/Dflydev/FigCookies/CookiesTest.php
@@ -4,9 +4,10 @@
namespace Dflydev\FigCookies;
+use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
-use Prophecy\Prophecy\ObjectProphecy;
use Psr\Http\Message\RequestInterface;
+
use function str_rot13;
class CookiesTest extends TestCase
@@ -19,13 +20,13 @@ class CookiesTest extends TestCase
* @test
* @dataProvider provideCookieStringAndExpectedCookiesData
*/
- public function it_creates_from_request(string $cookieString, array $expectedCookies) : void
+ public function it_creates_from_request(string $cookieString, array $expectedCookies): void
{
- /** @var RequestInterface|ObjectProphecy $request */
- $request = $this->prophesize(static::INTERFACE_PSR_HTTP_MESSAGE_REQUEST);
- $request->getHeaderLine(Cookies::COOKIE_HEADER)->willReturn($cookieString);
+ /** @var RequestInterface|MockObject $request */
+ $request = $this->createMock(self::INTERFACE_PSR_HTTP_MESSAGE_REQUEST);
+ $request->expects(self::once())->method('getHeaderLine')->with(Cookies::COOKIE_HEADER)->willReturn($cookieString);
- $cookies = Cookies::fromRequest($request->reveal());
+ $cookies = Cookies::fromRequest($request);
self::assertEquals($expectedCookies, $cookies->getAll());
}
@@ -36,7 +37,7 @@ public function it_creates_from_request(string $cookieString, array $expectedCoo
* @test
* @dataProvider provideCookieStringAndExpectedCookiesData
*/
- public function it_creates_from_cookie_string(string $cookieString, array $expectedCookies) : void
+ public function it_creates_from_cookie_string(string $cookieString, array $expectedCookies): void
{
$cookies = Cookies::fromCookieString($cookieString);
@@ -49,7 +50,7 @@ public function it_creates_from_cookie_string(string $cookieString, array $expec
* @test
* @dataProvider provideCookieStringAndExpectedCookiesData
*/
- public function it_knows_which_cookies_are_available(string $cookieString, array $expectedCookies) : void
+ public function it_knows_which_cookies_are_available(string $cookieString, array $expectedCookies): void
{
$cookies = Cookies::fromCookieString($cookieString);
@@ -64,7 +65,7 @@ public function it_knows_which_cookies_are_available(string $cookieString, array
* @test
* @dataProvider provideGetsCookieByNameData
*/
- public function it_gets_cookie_by_name(string $cookieString, string $cookieName, Cookie $expectedCookie) : void
+ public function it_gets_cookie_by_name(string $cookieString, string $cookieName, Cookie $expectedCookie): void
{
$cookies = Cookies::fromCookieString($cookieString);
@@ -74,7 +75,7 @@ public function it_gets_cookie_by_name(string $cookieString, string $cookieName,
/**
* @test
*/
- public function it_sets_overrides_and_removes_cookie() : void
+ public function it_sets_overrides_and_removes_cookie(): void
{
$cookies = new Cookies();
@@ -94,12 +95,11 @@ public function it_sets_overrides_and_removes_cookie() : void
/**
* @test
*/
- public function it_renders_new_cookies_into_empty_cookie_header() : void
+ public function it_renders_new_cookies_into_empty_cookie_header(): void
{
$cookies = (new Cookies())
->with(Cookie::create('theme', 'light'))
- ->with(Cookie::create('sessionToken', 'abc123'))
- ;
+ ->with(Cookie::create('sessionToken', 'abc123'));
$originalRequest = new FigCookieTestingRequest();
$request = $cookies->renderIntoCookieHeader($originalRequest);
@@ -112,13 +112,12 @@ public function it_renders_new_cookies_into_empty_cookie_header() : void
/**
* @test
*/
- public function it_renders_added_and_removed_cookies_header() : void
+ public function it_renders_added_and_removed_cookies_header(): void
{
$cookies = Cookies::fromCookieString('theme=light; sessionToken=abc123; hello=world')
->with(Cookie::create('theme', 'blue'))
->without('sessionToken')
- ->with(Cookie::create('who', 'me'))
- ;
+ ->with(Cookie::create('who', 'me'));
$originalRequest = new FigCookieTestingRequest();
$request = $cookies->renderIntoCookieHeader($originalRequest);
@@ -131,13 +130,12 @@ public function it_renders_added_and_removed_cookies_header() : void
/**
* @test
*/
- public function it_gets_cookie_value_from_request() : void
+ public function it_gets_cookie_value_from_request(): void
{
// Example of accessing a cookie value.
// Simulate a request coming in with several cookies.
$request = (new FigCookieTestingRequest())
- ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world')
- ;
+ ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world');
$theme = Cookies::fromRequest($request)->get('theme')->getValue();
@@ -147,7 +145,7 @@ public function it_gets_cookie_value_from_request() : void
/**
* @test
*/
- public function it_gets_and_updates_cookie_value_on_request() : void
+ public function it_gets_and_updates_cookie_value_on_request(): void
{
// Example of naive cookie decryption middleware.
//
@@ -155,8 +153,7 @@ public function it_gets_and_updates_cookie_value_on_request() : void
// instances from outside the Request object itself.
// Simulate a request coming in with several cookies.
$request = (new FigCookieTestingRequest())
- ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world')
- ;
+ ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world');
// Get our cookies from the request.
$cookies = Cookies::fromRequest($request);
@@ -186,7 +183,7 @@ public function it_gets_and_updates_cookie_value_on_request() : void
}
/** @return string[][]|Cookie[][][] */
- public function provideCookieStringAndExpectedCookiesData() : array
+ public function provideCookieStringAndExpectedCookiesData(): array
{
return [
[
@@ -210,7 +207,7 @@ public function provideCookieStringAndExpectedCookiesData() : array
}
/** @return string[][]|Cookie[][] */
- public function provideGetsCookieByNameData()
+ public function provideGetsCookieByNameData(): array
{
return [
['theme=light', 'theme', Cookie::create('theme', 'light')],
diff --git a/tests/Dflydev/FigCookies/FigCookieTestingMessage.php b/tests/Dflydev/FigCookies/FigCookieTestingMessage.php
index b5f2d10..21d7dce 100644
--- a/tests/Dflydev/FigCookies/FigCookieTestingMessage.php
+++ b/tests/Dflydev/FigCookies/FigCookieTestingMessage.php
@@ -5,35 +5,37 @@
namespace Dflydev\FigCookies;
use Psr\Http\Message\StreamInterface;
+use RuntimeException;
+
use function implode;
trait FigCookieTestingMessage
{
- /** @var string[] */
+ /** @var array */
private $headers = [];
/** {@inheritDoc} */
- public function getProtocolVersion() : void
+ public function getProtocolVersion(): string
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function withProtocolVersion($version) : void
+ public function withProtocolVersion($version)
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function hasHeader($name) : void
+ public function hasHeader($name): bool
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
public function withHeader($name, $value)
{
- $clone = clone($this);
+ $clone = clone $this;
$clone->headers[$name] = [$value];
@@ -43,7 +45,7 @@ public function withHeader($name, $value)
/** {@inheritDoc} */
public function withAddedHeader($name, $value)
{
- $clone = clone($this);
+ $clone = clone $this;
if (! isset($clone->headers[$name])) {
$clone->headers[$name] = [];
@@ -57,7 +59,7 @@ public function withAddedHeader($name, $value)
/** {@inheritDoc} */
public function withoutHeader($name)
{
- $clone = clone($this);
+ $clone = clone $this;
if (isset($clone->headers[$name])) {
unset($clone->headers[$name]);
@@ -67,21 +69,21 @@ public function withoutHeader($name)
}
/** {@inheritDoc} */
- public function getBody() : void
+ public function getBody(): StreamInterface
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function withBody(StreamInterface $body) : void
+ public function withBody(StreamInterface $body): StreamInterface
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function getHeaders() : void
+ public function getHeaders(): array
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
diff --git a/tests/Dflydev/FigCookies/FigCookieTestingRequest.php b/tests/Dflydev/FigCookies/FigCookieTestingRequest.php
index a22a029..5a43c13 100644
--- a/tests/Dflydev/FigCookies/FigCookieTestingRequest.php
+++ b/tests/Dflydev/FigCookies/FigCookieTestingRequest.php
@@ -6,41 +6,42 @@
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\UriInterface;
+use RuntimeException;
class FigCookieTestingRequest implements RequestInterface
{
use FigCookieTestingMessage;
- public function getRequestTarget() : void
+ public function getRequestTarget(): string
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function withRequestTarget($requestTarget) : void
+ public function withRequestTarget($requestTarget)
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
- public function getMethod() : void
+ public function getMethod(): string
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function withMethod($method) : void
+ public function withMethod($method)
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
- public function getUri() : void
+ public function getUri(): UriInterface
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function withUri(UriInterface $uri, $preserveHost = false) : void
+ public function withUri(UriInterface $uri, $preserveHost = false)
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
}
diff --git a/tests/Dflydev/FigCookies/FigCookieTestingResponse.php b/tests/Dflydev/FigCookies/FigCookieTestingResponse.php
index b029102..5ea11f2 100644
--- a/tests/Dflydev/FigCookies/FigCookieTestingResponse.php
+++ b/tests/Dflydev/FigCookies/FigCookieTestingResponse.php
@@ -5,24 +5,25 @@
namespace Dflydev\FigCookies;
use Psr\Http\Message\ResponseInterface;
+use RuntimeException;
class FigCookieTestingResponse implements ResponseInterface
{
use FigCookieTestingMessage;
- public function getStatusCode() : void
+ public function getStatusCode(): int
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
/** {@inheritDoc} */
- public function withStatus($code, $reasonPhrase = '') : void
+ public function withStatus($code, $reasonPhrase = '')
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
- public function getReasonPhrase() : void
+ public function getReasonPhrase(): string
{
- throw new \RuntimeException('This method has not been implemented.');
+ throw new RuntimeException('This method has not been implemented.');
}
}
diff --git a/tests/Dflydev/FigCookies/FigCookiesTest.php b/tests/Dflydev/FigCookies/FigCookiesTest.php
index 7250345..c89b143 100644
--- a/tests/Dflydev/FigCookies/FigCookiesTest.php
+++ b/tests/Dflydev/FigCookies/FigCookiesTest.php
@@ -5,6 +5,7 @@
namespace Dflydev\FigCookies;
use PHPUnit\Framework\TestCase;
+
use function str_rot13;
class FigCookiesTest extends TestCase
@@ -12,19 +13,18 @@ class FigCookiesTest extends TestCase
/**
* @test
*/
- public function it_encrypts_and_decrypts_cookies() : void
+ public function it_encrypts_and_decrypts_cookies(): void
{
// Simulate a request coming in with several cookies.
$request = (new FigCookieTestingRequest())
- ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world')
- ;
+ ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world');
// "Before" Middleware Example
//
// Get our token from an encrypted cookie value, "decrypt" it, and replace the cookie on the request.
// From here on out, any part of the system that gets our token will be able to see the contents
// in plaintext.
- $request = FigRequestCookies::modify($request, 'sessionToken', function (Cookie $cookie) : Cookie {
+ $request = FigRequestCookies::modify($request, 'sessionToken', static function (Cookie $cookie): Cookie {
return $cookie->withValue(str_rot13($cookie->getValue()));
});
@@ -44,15 +44,14 @@ public function it_encrypts_and_decrypts_cookies() : void
$response = $response
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('theme', 'light'))
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('sessionToken', 'ENCRYPTED'))
- ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'))
- ;
+ ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'));
// "After" Middleware Example
//
// Get our token from an unencrypted set cookie value, "encrypt" it, and replace the cook on the response.
// From here on out, any part of the system that gets our token will only be able to see the encrypted
// value.
- $response = FigResponseCookies::modify($response, 'sessionToken', function (SetCookie $setCookie) : SetCookie {
+ $response = FigResponseCookies::modify($response, 'sessionToken', static function (SetCookie $setCookie): SetCookie {
return $setCookie->withValue(str_rot13($setCookie->getValue()));
});
diff --git a/tests/Dflydev/FigCookies/FigRequestCookiesTest.php b/tests/Dflydev/FigCookies/FigRequestCookiesTest.php
index e522118..f07d1b5 100644
--- a/tests/Dflydev/FigCookies/FigRequestCookiesTest.php
+++ b/tests/Dflydev/FigCookies/FigRequestCookiesTest.php
@@ -5,6 +5,7 @@
namespace Dflydev\FigCookies;
use PHPUnit\Framework\TestCase;
+
use function strtoupper;
class FigRequestCookiesTest extends TestCase
@@ -12,11 +13,10 @@ class FigRequestCookiesTest extends TestCase
/**
* @test
*/
- public function it_gets_cookies() : void
+ public function it_gets_cookies(): void
{
$request = (new FigCookieTestingRequest())
- ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world')
- ;
+ ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world');
self::assertEquals(
'RAPELCGRQ',
@@ -27,11 +27,10 @@ public function it_gets_cookies() : void
/**
* @test
*/
- public function it_sets_cookies() : void
+ public function it_sets_cookies(): void
{
$request = (new FigCookieTestingRequest())
- ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world')
- ;
+ ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world');
$request = FigRequestCookies::set($request, Cookie::create('hello', 'WORLD!'));
@@ -44,13 +43,12 @@ public function it_sets_cookies() : void
/**
* @test
*/
- public function it_modifies_cookies() : void
+ public function it_modifies_cookies(): void
{
$request = (new FigCookieTestingRequest())
- ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world')
- ;
+ ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world');
- $request = FigRequestCookies::modify($request, 'hello', function (Cookie $cookie) {
+ $request = FigRequestCookies::modify($request, 'hello', static function (Cookie $cookie) {
return $cookie->withValue(strtoupper($cookie->getName()));
});
@@ -63,11 +61,10 @@ public function it_modifies_cookies() : void
/**
* @test
*/
- public function it_removes_cookies() : void
+ public function it_removes_cookies(): void
{
$request = (new FigCookieTestingRequest())
- ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world')
- ;
+ ->withHeader(Cookies::COOKIE_HEADER, 'theme=light; sessionToken=RAPELCGRQ; hello=world');
$request = FigRequestCookies::remove($request, 'sessionToken');
diff --git a/tests/Dflydev/FigCookies/FigResponseCookiesTest.php b/tests/Dflydev/FigCookies/FigResponseCookiesTest.php
index 88ff278..0840528 100644
--- a/tests/Dflydev/FigCookies/FigResponseCookiesTest.php
+++ b/tests/Dflydev/FigCookies/FigResponseCookiesTest.php
@@ -5,6 +5,7 @@
namespace Dflydev\FigCookies;
use PHPUnit\Framework\TestCase;
+
use function strtoupper;
class FigResponseCookiesTest extends TestCase
@@ -12,15 +13,14 @@ class FigResponseCookiesTest extends TestCase
/**
* @test
*/
- public function it_gets_cookies() : void
+ public function it_gets_cookies(): void
{
$response = (new FigCookieTestingResponse());
$response = $response
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('theme', 'light'))
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('sessionToken', 'ENCRYPTED'))
- ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'))
- ;
+ ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'));
self::assertEquals(
'ENCRYPTED',
@@ -31,15 +31,14 @@ public function it_gets_cookies() : void
/**
* @test
*/
- public function it_sets_cookies() : void
+ public function it_sets_cookies(): void
{
$response = (new FigCookieTestingResponse());
$response = $response
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('theme', 'light'))
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('sessionToken', 'ENCRYPTED'))
- ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'))
- ;
+ ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'));
$response = FigResponseCookies::set($response, SetCookie::create('hello', 'WORLD!'));
@@ -52,17 +51,16 @@ public function it_sets_cookies() : void
/**
* @test
*/
- public function it_modifies_cookies() : void
+ public function it_modifies_cookies(): void
{
$response = (new FigCookieTestingResponse());
$response = $response
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('theme', 'light'))
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('sessionToken', 'ENCRYPTED'))
- ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'))
- ;
+ ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'));
- $response = FigResponseCookies::modify($response, 'hello', function (SetCookie $setCookie) {
+ $response = FigResponseCookies::modify($response, 'hello', static function (SetCookie $setCookie) {
return $setCookie->withValue(strtoupper($setCookie->getName()));
});
@@ -75,15 +73,14 @@ public function it_modifies_cookies() : void
/**
* @test
*/
- public function it_removes_cookies() : void
+ public function it_removes_cookies(): void
{
$response = (new FigCookieTestingResponse());
$response = $response
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('theme', 'light'))
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('sessionToken', 'ENCRYPTED'))
- ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'))
- ;
+ ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, SetCookie::create('hello', 'world'));
$response = FigResponseCookies::remove($response, 'sessionToken');
diff --git a/tests/Dflydev/FigCookies/Modifier/SameSiteTest.php b/tests/Dflydev/FigCookies/Modifier/SameSiteTest.php
index 4fe2a1b..9f97f5c 100644
--- a/tests/Dflydev/FigCookies/Modifier/SameSiteTest.php
+++ b/tests/Dflydev/FigCookies/Modifier/SameSiteTest.php
@@ -13,7 +13,7 @@
final class SameSiteTest extends TestCase
{
/** @test */
- public function it_can_be_a_Strict_SameSite_modifier() : void
+ public function it_can_be_a_Strict_SameSite_modifier(): void
{
$strict = SameSite::strict();
@@ -23,7 +23,7 @@ public function it_can_be_a_Strict_SameSite_modifier() : void
}
/** @test */
- public function it_can_be_a_Lax_SameSite_modifier() : void
+ public function it_can_be_a_Lax_SameSite_modifier(): void
{
$lax = SameSite::lax();
@@ -33,7 +33,7 @@ public function it_can_be_a_Lax_SameSite_modifier() : void
}
/** @test */
- public function it_can_be_a_None_SameSite_modifier() : void
+ public function it_can_be_a_None_SameSite_modifier(): void
{
$none = SameSite::none();
@@ -43,7 +43,7 @@ public function it_can_be_a_None_SameSite_modifier() : void
}
/** @test */
- public function lax_strict_and_none_are_different() : void
+ public function lax_strict_and_none_are_different(): void
{
self::assertNotEquals(SameSite::lax(), SameSite::strict());
self::assertNotEquals(SameSite::lax(), SameSite::none());
@@ -51,7 +51,7 @@ public function lax_strict_and_none_are_different() : void
}
/** @test */
- public function it_can_be_built_from_a_string() : void
+ public function it_can_be_built_from_a_string(): void
{
self::assertEquals(SameSite::strict(), SameSite::fromString('Strict'));
self::assertEquals(SameSite::strict(), SameSite::fromString('strict'));
diff --git a/tests/Dflydev/FigCookies/SetCookieTest.php b/tests/Dflydev/FigCookies/SetCookieTest.php
index 946fd6d..024a033 100644
--- a/tests/Dflydev/FigCookies/SetCookieTest.php
+++ b/tests/Dflydev/FigCookies/SetCookieTest.php
@@ -4,9 +4,11 @@
namespace Dflydev\FigCookies;
+use DateTime;
use Dflydev\FigCookies\Modifier\SameSite;
use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
+
use function time;
class SetCookieTest extends TestCase
@@ -15,7 +17,7 @@ class SetCookieTest extends TestCase
* @test
* @dataProvider provideParsesFromSetCookieStringData
*/
- public function it_parses_from_set_cookie_string(string $cookieString, SetCookie $expectedSetCookie) : void
+ public function it_parses_from_set_cookie_string(string $cookieString, SetCookie $expectedSetCookie): void
{
$setCookie = SetCookie::fromSetCookieString($cookieString);
@@ -24,7 +26,7 @@ public function it_parses_from_set_cookie_string(string $cookieString, SetCookie
}
/** @return string[][]|SetCookie[][] */
- public function provideParsesFromSetCookieStringData() : array
+ public function provideParsesFromSetCookieStringData(): array
{
return [
[
@@ -109,7 +111,7 @@ public function provideParsesFromSetCookieStringData() : array
'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Expires=Tue, 15 Jan 2013 21:47:38 GMT; Max-Age=500; Secure; HttpOnly',
SetCookie::create('lu')
->withValue('Rg3vHJZnehYLjVg7qi3bZjzg')
- ->withExpires(new \DateTime('Tue, 15-Jan-2013 21:47:38 GMT'))
+ ->withExpires(new DateTime('Tue, 15-Jan-2013 21:47:38 GMT'))
->withMaxAge(500)
->withPath('/')
->withDomain('.example.com')
@@ -120,7 +122,7 @@ public function provideParsesFromSetCookieStringData() : array
'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Expires=Tue, 15 Jan 2013 21:47:38 GMT; Max-Age=500; Secure; HttpOnly; SameSite=Strict',
SetCookie::create('lu')
->withValue('Rg3vHJZnehYLjVg7qi3bZjzg')
- ->withExpires(new \DateTime('Tue, 15-Jan-2013 21:47:38 GMT'))
+ ->withExpires(new DateTime('Tue, 15-Jan-2013 21:47:38 GMT'))
->withMaxAge(500)
->withPath('/')
->withDomain('.example.com')
@@ -132,7 +134,7 @@ public function provideParsesFromSetCookieStringData() : array
'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Expires=Tue, 15 Jan 2013 21:47:38 GMT; Max-Age=500; Secure; HttpOnly; SameSite=Lax',
SetCookie::create('lu')
->withValue('Rg3vHJZnehYLjVg7qi3bZjzg')
- ->withExpires(new \DateTime('Tue, 15-Jan-2013 21:47:38 GMT'))
+ ->withExpires(new DateTime('Tue, 15-Jan-2013 21:47:38 GMT'))
->withMaxAge(500)
->withPath('/')
->withDomain('.example.com')
@@ -146,7 +148,7 @@ public function provideParsesFromSetCookieStringData() : array
/**
* @test
*/
- public function it_expires_cookies() : void
+ public function it_expires_cookies(): void
{
$setCookie = SetCookie::createExpired('expire_immediately');
@@ -156,16 +158,16 @@ public function it_expires_cookies() : void
/**
* @test
*/
- public function it_creates_long_living_cookies() : void
+ public function it_creates_long_living_cookies(): void
{
$setCookie = SetCookie::createRememberedForever('remember_forever');
- $fourYearsFromNow = (new \DateTime('+4 years'))->getTimestamp();
+ $fourYearsFromNow = (new DateTime('+4 years'))->getTimestamp();
self::assertGreaterThan($fourYearsFromNow, $setCookie->getExpires());
}
/** @test */
- public function SameSite_modifier_can_be_added_and_removed() : void
+ public function SameSite_modifier_can_be_added_and_removed(): void
{
$setCookie = SetCookie::create('foo', 'bar');
@@ -183,7 +185,7 @@ public function SameSite_modifier_can_be_added_and_removed() : void
}
/** @test */
- public function invalid_expires_format_will_be_rejected() : void
+ public function invalid_expires_format_will_be_rejected(): void
{
$setCookie = SetCookie::create('foo', 'bar');
@@ -194,7 +196,7 @@ public function invalid_expires_format_will_be_rejected() : void
}
/** @test */
- public function empty_cookie_is_rejected() : void
+ public function empty_cookie_is_rejected(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('The provided cookie string "" must have at least one attribute');
diff --git a/tests/Dflydev/FigCookies/SetCookiesTest.php b/tests/Dflydev/FigCookies/SetCookiesTest.php
index f429734..eb16ec7 100644
--- a/tests/Dflydev/FigCookies/SetCookiesTest.php
+++ b/tests/Dflydev/FigCookies/SetCookiesTest.php
@@ -4,9 +4,10 @@
namespace Dflydev\FigCookies;
+use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
-use Prophecy\Prophecy\ObjectProphecy;
use Psr\Http\Message\ResponseInterface;
+
use function str_rot13;
class SetCookiesTest extends TestCase
@@ -20,13 +21,13 @@ class SetCookiesTest extends TestCase
* @test
* @dataProvider provideSetCookieStringsAndExpectedSetCookiesData
*/
- public function it_creates_from_response(array $setCookieStrings, array $expectedSetCookies) : void
+ public function it_creates_from_response(array $setCookieStrings, array $expectedSetCookies): void
{
- /** @var ResponseInterface|ObjectProphecy $response */
- $response = $this->prophesize(static::INTERFACE_PSR_HTTP_MESSAGE_RESPONSE);
- $response->getHeader(SetCookies::SET_COOKIE_HEADER)->willReturn($setCookieStrings);
+ /** @var ResponseInterface|MockObject $response */
+ $response = $this->createMock(self::INTERFACE_PSR_HTTP_MESSAGE_RESPONSE);
+ $response->expects(self::once())->method('getHeader')->with(SetCookies::SET_COOKIE_HEADER)->willReturn($setCookieStrings);
- $setCookies = SetCookies::fromResponse($response->reveal());
+ $setCookies = SetCookies::fromResponse($response);
self::assertEquals($expectedSetCookies, $setCookies->getAll());
}
@@ -38,7 +39,7 @@ public function it_creates_from_response(array $setCookieStrings, array $expecte
* @test
* @dataProvider provideSetCookieStringsAndExpectedSetCookiesData
*/
- public function it_creates_from_set_cookie_strings(array $setCookieStrings, array $expectedSetCookies) : void
+ public function it_creates_from_set_cookie_strings(array $setCookieStrings, array $expectedSetCookies): void
{
$setCookies = SetCookies::fromSetCookieStrings($setCookieStrings);
@@ -52,7 +53,7 @@ public function it_creates_from_set_cookie_strings(array $setCookieStrings, arra
* @test
* @dataProvider provideSetCookieStringsAndExpectedSetCookiesData
*/
- public function it_knows_which_set_cookies_are_available(array $setCookieStrings, array $expectedSetCookies) : void
+ public function it_knows_which_set_cookies_are_available(array $setCookieStrings, array $expectedSetCookies): void
{
$setCookies = SetCookies::fromSetCookieStrings($setCookieStrings);
@@ -69,7 +70,7 @@ public function it_knows_which_set_cookies_are_available(array $setCookieStrings
* @test
* @dataProvider provideGetsSetCookieByNameData
*/
- public function it_gets_set_cookie_by_name(array $setCookieStrings, string $setCookieName, ?SetCookie $expectedSetCookie = null) : void
+ public function it_gets_set_cookie_by_name(array $setCookieStrings, string $setCookieName, ?SetCookie $expectedSetCookie = null): void
{
$setCookies = SetCookies::fromSetCookieStrings($setCookieStrings);
@@ -79,13 +80,12 @@ public function it_gets_set_cookie_by_name(array $setCookieStrings, string $setC
/**
* @test
*/
- public function it_renders_added_and_removed_set_cookies_header() : void
+ public function it_renders_added_and_removed_set_cookies_header(): void
{
$setCookies = SetCookies::fromSetCookieStrings(['theme=light', 'sessionToken=abc123', 'hello=world'])
->with(SetCookie::create('theme', 'blue'))
->without('sessionToken')
- ->with(SetCookie::create('who', 'me'))
- ;
+ ->with(SetCookie::create('who', 'me'));
$originalResponse = new FigCookieTestingResponse();
$response = $setCookies->renderIntoSetCookieHeader($originalResponse);
@@ -101,7 +101,7 @@ public function it_renders_added_and_removed_set_cookies_header() : void
/**
* @test
*/
- public function it_gets_and_updates_set_cookie_value_on_request() : void
+ public function it_gets_and_updates_set_cookie_value_on_request(): void
{
// Example of naive cookie encryption middleware.
//
@@ -111,8 +111,7 @@ public function it_gets_and_updates_set_cookie_value_on_request() : void
$response = (new FigCookieTestingResponse())
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, 'theme=light')
->withAddedHeader(SetCookies::SET_COOKIE_HEADER, 'sessionToken=ENCRYPTED')
- ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, 'hello=world')
- ;
+ ->withAddedHeader(SetCookies::SET_COOKIE_HEADER, 'hello=world');
// Get our set cookies from the response.
$setCookies = SetCookies::fromResponse($response);
@@ -142,7 +141,7 @@ public function it_gets_and_updates_set_cookie_value_on_request() : void
}
/** @return string[][][]|SetCookie[][][] */
- public function provideSetCookieStringsAndExpectedSetCookiesData()
+ public function provideSetCookieStringsAndExpectedSetCookiesData(): array
{
return [
[
@@ -186,7 +185,7 @@ public function provideSetCookieStringsAndExpectedSetCookiesData()
}
/** @return string[][]|string[][][]|SetCookie[][]|null[][] */
- public function provideGetsSetCookieByNameData() : array
+ public function provideGetsSetCookieByNameData(): array
{
return [
[