diff --git a/app/composer.json b/app/composer.json
index 4f2ec1d9b..f229bdbf8 100644
--- a/app/composer.json
+++ b/app/composer.json
@@ -5,28 +5,27 @@
"type": "project",
"license": "MIT",
"require": {
- "php": ">=7.2",
- "adodb/adodb-php": "^5.20",
- "cakephp/cakephp": "4.0.*",
- "cakephp/migrations": "^3.0.0",
- "cakephp/plugin-installer": "^1.0",
- "doctrine/dbal": "^2.9",
- "josegonzalez/dotenv": "2.*",
- "mobiledetect/mobiledetectlib": "2.*"
+ "php": ">=7.3",
+ "adodb/adodb-php": "^5.21",
+ "cakephp/cakephp": "4.2.x",
+ "cakephp/migrations": "^3.0",
+ "cakephp/plugin-installer": "^1.3",
+ "doctrine/dbal": "^3.1",
+ "mobiledetect/mobiledetectlib": "^2.8"
},
"require-dev": {
- "cakephp/bake": "^2.0.10",
- "cakephp/cakephp-codesniffer": "^3.0",
- "cakephp/debug_kit": "^4.0.6",
- "phpstan/phpstan": "^0.12.18",
- "phpunit/phpunit": "^8.0",
+ "cakephp/bake": "^2.3",
+ "cakephp/cakephp-codesniffer": "~4.2.0",
+ "cakephp/debug_kit": "^4.4",
+ "josegonzalez/dotenv": "^3.2",
+ "phpstan/phpstan": "^0.12.99",
+ "phpunit/phpunit": "~8.5.0 || ^9.3",
"psy/psysh": "@stable"
},
"suggest": {
"markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
"dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.",
- "phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
- "cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
+ "phpstan/phpstan": "PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code."
},
"autoload": {
"psr-4": {
@@ -46,8 +45,9 @@
"@test",
"@cs-check"
],
- "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
- "cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
+ "cs-check": "phpcs --colors -p src/ tests/",
+ "cs-fix": "phpcbf --colors -p src/ tests/",
+ "stan": "phpstan analyse src/",
"test": "phpunit --colors=always"
},
"prefer-stable": true,
diff --git a/app/composer.lock b/app/composer.lock
index 891a7509e..1f282961d 100644
--- a/app/composer.lock
+++ b/app/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": "fd5988586d5d9d91062852addfcc0c0d",
+ "content-hash": "d6f8816fb1bdfe3edbc0bf4f1381a6c3",
"packages": [
{
"name": "adodb/adodb-php",
@@ -67,72 +67,21 @@
},
"time": "2021-08-22T10:49:44+00:00"
},
- {
- "name": "aura/intl",
- "version": "3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/auraphp/Aura.Intl.git",
- "reference": "7fce228980b19bf4dee2d7bbd6202a69b0dde926"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/auraphp/Aura.Intl/zipball/7fce228980b19bf4dee2d7bbd6202a69b0dde926",
- "reference": "7fce228980b19bf4dee2d7bbd6202a69b0dde926",
- "shasum": ""
- },
- "require": {
- "php": "^5.6|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Aura\\Intl\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Aura.Intl Contributors",
- "homepage": "https://github.com/auraphp/Aura.Intl/contributors"
- }
- ],
- "description": "The Aura Intl package provides internationalization tools, specifically message translation.",
- "homepage": "https://github.com/auraphp/Aura.Intl",
- "keywords": [
- "g11n",
- "globalization",
- "i18n",
- "internationalization",
- "intl",
- "l10n",
- "localization"
- ],
- "support": {
- "issues": "https://github.com/auraphp/Aura.Intl/issues",
- "source": "https://github.com/auraphp/Aura.Intl/tree/3.x"
- },
- "time": "2017-01-20T05:00:11+00:00"
- },
{
"name": "cakephp/cakephp",
- "version": "4.0.10",
+ "version": "4.2.10",
"source": {
"type": "git",
"url": "https://github.com/cakephp/cakephp.git",
- "reference": "5c6d72bc9bb1be6eec1b00b3930f9e5054ee6d76"
+ "reference": "ea47e927083e2f4bfaed0c404756d9852b617cad"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/cakephp/zipball/5c6d72bc9bb1be6eec1b00b3930f9e5054ee6d76",
- "reference": "5c6d72bc9bb1be6eec1b00b3930f9e5054ee6d76",
+ "url": "https://api.github.com/repos/cakephp/cakephp/zipball/ea47e927083e2f4bfaed0c404756d9852b617cad",
+ "reference": "ea47e927083e2f4bfaed0c404756d9852b617cad",
"shasum": ""
},
"require": {
- "aura/intl": "^3.0.0",
"cakephp/chronos": "^2.0",
"composer/ca-bundle": "^1.2",
"ext-intl": "*",
@@ -140,6 +89,7 @@
"ext-mbstring": "*",
"laminas/laminas-diactoros": "^2.2.2",
"laminas/laminas-httphandlerrunner": "^1.1",
+ "league/container": "^3.2",
"php": ">=7.2.0",
"psr/http-client": "^1.0",
"psr/http-server-handler": "^1.0",
@@ -168,7 +118,7 @@
"cakephp/cakephp-codesniffer": "^4.0",
"mikey179/vfsstream": "^1.6",
"paragonie/csp-builder": "^2.3",
- "phpunit/phpunit": "~8.5.0"
+ "phpunit/phpunit": "^8.5 || ^9.3"
},
"suggest": {
"ext-curl": "To enable more efficient network calls in Http\\Client.",
@@ -185,6 +135,7 @@
"src/Core/functions.php",
"src/Collection/functions.php",
"src/I18n/functions.php",
+ "src/Routing/functions.php",
"src/Utility/bootstrap.php"
]
},
@@ -217,7 +168,7 @@
"issues": "https://github.com/cakephp/cakephp/issues",
"source": "https://github.com/cakephp/cakephp"
},
- "time": "2020-12-08T03:04:12+00:00"
+ "time": "2021-10-14T01:50:57+00:00"
},
{
"name": "cakephp/chronos",
@@ -389,16 +340,16 @@
},
{
"name": "composer/ca-bundle",
- "version": "1.2.10",
+ "version": "1.2.11",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
- "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8"
+ "reference": "0b072d51c5a9c6f3412f7ea3ab043d6603cb2582"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8",
- "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8",
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/0b072d51c5a9c6f3412f7ea3ab043d6603cb2582",
+ "reference": "0b072d51c5a9c6f3412f7ea3ab043d6603cb2582",
"shasum": ""
},
"require": {
@@ -410,7 +361,7 @@
"phpstan/phpstan": "^0.12.55",
"psr/log": "^1.0",
"symfony/phpunit-bridge": "^4.2 || ^5",
- "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
+ "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
},
"type": "library",
"extra": {
@@ -445,7 +396,80 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues",
- "source": "https://github.com/composer/ca-bundle/tree/1.2.10"
+ "source": "https://github.com/composer/ca-bundle/tree/1.2.11"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-09-25T20:32:43+00:00"
+ },
+ {
+ "name": "composer/package-versions-deprecated",
+ "version": "1.11.99.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/package-versions-deprecated.git",
+ "reference": "b174585d1fe49ceed21928a945138948cb394600"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600",
+ "reference": "b174585d1fe49ceed21928a945138948cb394600",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.1.0 || ^2.0",
+ "php": "^7 || ^8"
+ },
+ "replace": {
+ "ocramius/package-versions": "1.11.99"
+ },
+ "require-dev": {
+ "composer/composer": "^1.9.3 || ^2.0@dev",
+ "ext-zip": "^1.13",
+ "phpunit/phpunit": "^6.5 || ^7"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "PackageVersions\\Installer",
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PackageVersions\\": "src/PackageVersions"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be"
+ }
+ ],
+ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
+ "support": {
+ "issues": "https://github.com/composer/package-versions-deprecated/issues",
+ "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4"
},
"funding": [
{
@@ -461,7 +485,7 @@
"type": "tidelift"
}
],
- "time": "2021-06-07T13:58:28+00:00"
+ "time": "2021-09-13T08:41:34+00:00"
},
{
"name": "doctrine/cache",
@@ -564,34 +588,35 @@
},
{
"name": "doctrine/dbal",
- "version": "2.13.3",
+ "version": "3.1.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838"
+ "reference": "96b0053775a544b4a6ab47654dac0621be8b4cf8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/0d7adf4cadfee6f70850e5b163e6cdd706417838",
- "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/96b0053775a544b4a6ab47654dac0621be8b4cf8",
+ "reference": "96b0053775a544b4a6ab47654dac0621be8b4cf8",
"shasum": ""
},
"require": {
+ "composer/package-versions-deprecated": "^1.11.99",
"doctrine/cache": "^1.0|^2.0",
"doctrine/deprecations": "^0.5.3",
"doctrine/event-manager": "^1.0",
- "ext-pdo": "*",
- "php": "^7.1 || ^8"
+ "php": "^7.3 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "9.0.0",
"jetbrains/phpstorm-stubs": "2021.1",
- "phpstan/phpstan": "0.12.96",
- "phpunit/phpunit": "^7.5.20|^8.5|9.5.5",
+ "phpstan/phpstan": "0.12.99",
+ "phpstan/phpstan-strict-rules": "^0.12.11",
+ "phpunit/phpunit": "9.5.10",
"psalm/plugin-phpunit": "0.16.1",
"squizlabs/php_codesniffer": "3.6.0",
- "symfony/cache": "^4.4",
- "symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
+ "symfony/cache": "^5.2|^6.0",
+ "symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0",
"vimeo/psalm": "4.10.0"
},
"suggest": {
@@ -603,7 +628,7 @@
"type": "library",
"autoload": {
"psr-4": {
- "Doctrine\\DBAL\\": "lib/Doctrine/DBAL"
+ "Doctrine\\DBAL\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -646,14 +671,13 @@
"queryobject",
"sasql",
"sql",
- "sqlanywhere",
"sqlite",
"sqlserver",
"sqlsrv"
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/2.13.3"
+ "source": "https://github.com/doctrine/dbal/tree/3.1.3"
},
"funding": [
{
@@ -669,7 +693,7 @@
"type": "tidelift"
}
],
- "time": "2021-09-12T19:11:48+00:00"
+ "time": "2021-10-02T16:15:05+00:00"
},
{
"name": "doctrine/deprecations",
@@ -808,74 +832,18 @@
],
"time": "2020-05-29T18:28:51+00:00"
},
- {
- "name": "josegonzalez/dotenv",
- "version": "2.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/josegonzalez/php-dotenv.git",
- "reference": "ff3461f2960737f54054dff4fef3482a2bb9682b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/ff3461f2960737f54054dff4fef3482a2bb9682b",
- "reference": "ff3461f2960737f54054dff4fef3482a2bb9682b",
- "shasum": ""
- },
- "require": {
- "m1/env": "2.*",
- "php": ">=5.3.0"
- },
- "require-dev": {
- "satooshi/php-coveralls": "1.*",
- "squizlabs/php_codesniffer": "2.*"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "josegonzalez\\Dotenv": [
- "src",
- "tests"
- ]
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jose Diaz-Gonzalez",
- "email": "dotenv@josegonzalez.com",
- "homepage": "http://josediazgonzalez.com",
- "role": "Maintainer"
- }
- ],
- "description": "dotenv file parsing for PHP",
- "homepage": "https://github.com/josegonzalez/php-dotenv",
- "keywords": [
- "configuration",
- "dotenv",
- "php"
- ],
- "support": {
- "issues": "https://github.com/josegonzalez/php-dotenv/issues",
- "source": "https://github.com/josegonzalez/php-dotenv/tree/2.1.0"
- },
- "time": "2017-01-03T01:04:05+00:00"
- },
{
"name": "laminas/laminas-diactoros",
- "version": "2.7.0",
+ "version": "2.8.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-diactoros.git",
- "reference": "8b5792b7c81465efb14780c2d4787f158bd96183"
+ "reference": "0c26ef1d95b6d7e6e3943a243ba3dc0797227199"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/8b5792b7c81465efb14780c2d4787f158bd96183",
- "reference": "8b5792b7c81465efb14780c2d4787f158bd96183",
+ "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/0c26ef1d95b6d7e6e3943a243ba3dc0797227199",
+ "reference": "0c26ef1d95b6d7e6e3943a243ba3dc0797227199",
"shasum": ""
},
"require": {
@@ -961,25 +929,25 @@
"type": "community_bridge"
}
],
- "time": "2021-09-15T08:41:12+00:00"
+ "time": "2021-09-22T03:54:36+00:00"
},
{
"name": "laminas/laminas-httphandlerrunner",
- "version": "1.4.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-httphandlerrunner.git",
- "reference": "6a2dd33e4166469ade07ad1283b45924383b224b"
+ "reference": "5f94e55d93f756e8ad07b9049aeb3d6d84582d0e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/6a2dd33e4166469ade07ad1283b45924383b224b",
- "reference": "6a2dd33e4166469ade07ad1283b45924383b224b",
+ "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/5f94e55d93f756e8ad07b9049aeb3d6d84582d0e",
+ "reference": "5f94e55d93f756e8ad07b9049aeb3d6d84582d0e",
"shasum": ""
},
"require": {
"laminas/laminas-zendframework-bridge": "^1.0",
- "php": "^7.3 || ~8.0.0",
+ "php": "^7.3 || ~8.0.0 || ~8.1.0",
"psr/http-message": "^1.0",
"psr/http-message-implementation": "^1.0",
"psr/http-server-handler": "^1.0"
@@ -989,10 +957,10 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
- "laminas/laminas-diactoros": "^2.1.1",
- "phpunit/phpunit": "^9.3",
- "psalm/plugin-phpunit": "^0.15.1",
- "vimeo/psalm": "^4.6"
+ "laminas/laminas-diactoros": "^2.8.0",
+ "phpunit/phpunit": "^9.5.9",
+ "psalm/plugin-phpunit": "^0.16.1",
+ "vimeo/psalm": "^4.10.0"
},
"type": "library",
"extra": {
@@ -1032,7 +1000,7 @@
"type": "community_bridge"
}
],
- "time": "2021-04-08T13:52:56+00:00"
+ "time": "2021-09-22T09:17:54+00:00"
},
{
"name": "laminas/laminas-zendframework-bridge",
@@ -1097,35 +1065,47 @@
"time": "2021-09-03T17:53:30+00:00"
},
{
- "name": "m1/env",
- "version": "2.2.0",
+ "name": "league/container",
+ "version": "3.4.1",
"source": {
"type": "git",
- "url": "https://github.com/m1/Env.git",
- "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3"
+ "url": "https://github.com/thephpleague/container.git",
+ "reference": "84ecbc2dbecc31bd23faf759a0e329ee49abddbd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/m1/Env/zipball/5c296e3e13450a207e12b343f3af1d7ab569f6f3",
- "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3",
+ "url": "https://api.github.com/repos/thephpleague/container/zipball/84ecbc2dbecc31bd23faf759a0e329ee49abddbd",
+ "reference": "84ecbc2dbecc31bd23faf759a0e329ee49abddbd",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": "^7.0 || ^8.0",
+ "psr/container": "^1.0.0"
},
- "require-dev": {
- "phpunit/phpunit": "4.*",
- "scrutinizer/ocular": "~1.1",
- "squizlabs/php_codesniffer": "^2.3"
+ "provide": {
+ "psr/container-implementation": "^1.0"
},
- "suggest": {
- "josegonzalez/dotenv": "For loading of .env",
- "m1/vars": "For loading of configs"
+ "replace": {
+ "orno/di": "~2.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0 || ^7.0",
+ "roave/security-advisories": "dev-latest",
+ "scrutinizer/ocular": "^1.8",
+ "squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev",
+ "dev-3.x": "3.x-dev",
+ "dev-2.x": "2.x-dev",
+ "dev-1.x": "1.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
- "M1\\Env\\": "src"
+ "League\\Container\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1134,29 +1114,34 @@
],
"authors": [
{
- "name": "Miles Croxford",
- "email": "hello@milescroxford.com",
- "homepage": "http://milescroxford.com",
+ "name": "Phil Bennett",
+ "email": "philipobenito@gmail.com",
+ "homepage": "http://www.philipobenito.com",
"role": "Developer"
}
],
- "description": "Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.",
- "homepage": "https://github.com/m1/Env",
+ "description": "A fast and intuitive dependency injection container.",
+ "homepage": "https://github.com/thephpleague/container",
"keywords": [
- ".env",
- "config",
- "dotenv",
- "env",
- "loader",
- "m1",
- "parser",
- "support"
+ "container",
+ "dependency",
+ "di",
+ "injection",
+ "league",
+ "provider",
+ "service"
],
"support": {
- "issues": "https://github.com/m1/Env/issues",
- "source": "https://github.com/m1/Env/tree/2.2.0"
+ "issues": "https://github.com/thephpleague/container/issues",
+ "source": "https://github.com/thephpleague/container/tree/3.4.1"
},
- "time": "2020-02-19T09:02:13+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/philipobenito",
+ "type": "github"
+ }
+ ],
+ "time": "2021-07-09T08:23:52+00:00"
},
{
"name": "mobiledetect/mobiledetectlib",
@@ -1222,27 +1207,22 @@
},
{
"name": "psr/container",
- "version": "2.0.1",
+ "version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
- "reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef"
+ "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/2ae37329ee82f91efadc282cc2d527fd6065a5ef",
- "reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
+ "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@@ -1269,9 +1249,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/2.0.1"
+ "source": "https://github.com/php-fig/container/tree/1.1.1"
},
- "time": "2021-03-24T13:40:57+00:00"
+ "time": "2021-03-05T17:36:06+00:00"
},
{
"name": "psr/http-client",
@@ -1650,16 +1630,16 @@
},
{
"name": "robmorgan/phinx",
- "version": "0.12.8",
+ "version": "0.12.9",
"source": {
"type": "git",
"url": "https://github.com/cakephp/phinx.git",
- "reference": "d2ed1b452cc90f4cae4ea6b5976b94fb9e5ed2a2"
+ "reference": "5a0146a74c1bc195d1f5da86afa3b68badf7d90e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/phinx/zipball/d2ed1b452cc90f4cae4ea6b5976b94fb9e5ed2a2",
- "reference": "d2ed1b452cc90f4cae4ea6b5976b94fb9e5ed2a2",
+ "url": "https://api.github.com/repos/cakephp/phinx/zipball/5a0146a74c1bc195d1f5da86afa3b68badf7d90e",
+ "reference": "5a0146a74c1bc195d1f5da86afa3b68badf7d90e",
"shasum": ""
},
"require": {
@@ -1730,9 +1710,9 @@
],
"support": {
"issues": "https://github.com/cakephp/phinx/issues",
- "source": "https://github.com/cakephp/phinx/tree/0.12.8"
+ "source": "https://github.com/cakephp/phinx/tree/0.12.9"
},
- "time": "2021-07-28T15:31:39+00:00"
+ "time": "2021-10-12T10:49:25+00:00"
},
{
"name": "symfony/config",
@@ -2609,29 +2589,33 @@
},
{
"name": "symfony/service-contracts",
- "version": "v1.1.2",
+ "version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0"
+ "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0",
- "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
+ "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
"shasum": ""
},
"require": {
- "php": "^7.1.3"
+ "php": ">=7.2.5",
+ "psr/container": "^1.1"
},
"suggest": {
- "psr/container": "",
"symfony/service-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-main": "2.4-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
@@ -2664,9 +2648,23 @@
"standards"
],
"support": {
- "source": "https://github.com/symfony/service-contracts/tree/v1.1.2"
+ "source": "https://github.com/symfony/service-contracts/tree/v2.4.0"
},
- "time": "2019-05-28T07:50:59+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-04-01T10:43:52+00:00"
},
{
"name": "symfony/string",
@@ -2753,28 +2751,73 @@
}
],
"packages-dev": [
+ {
+ "name": "brick/varexporter",
+ "version": "0.3.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/brick/varexporter.git",
+ "reference": "05241f28dfcba2b51b11e2d750e296316ebbe518"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/brick/varexporter/zipball/05241f28dfcba2b51b11e2d750e296316ebbe518",
+ "reference": "05241f28dfcba2b51b11e2d750e296316ebbe518",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.0",
+ "php": "^7.2 || ^8.0"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.2",
+ "phpunit/phpunit": "^8.5 || ^9.0",
+ "vimeo/psalm": "4.4.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Brick\\VarExporter\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "A powerful alternative to var_export(), which can export closures and objects without __set_state()",
+ "keywords": [
+ "var_export"
+ ],
+ "support": {
+ "issues": "https://github.com/brick/varexporter/issues",
+ "source": "https://github.com/brick/varexporter/tree/0.3.5"
+ },
+ "time": "2021-02-10T13:53:07+00:00"
+ },
{
"name": "cakephp/bake",
- "version": "2.2.0",
+ "version": "2.5.2",
"source": {
"type": "git",
"url": "https://github.com/cakephp/bake.git",
- "reference": "f1c297c4e903a15188389011b93ce46119849d01"
+ "reference": "bfb856afcfbc70c5cf5341669c3036a45ca15d94"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/bake/zipball/f1c297c4e903a15188389011b93ce46119849d01",
- "reference": "f1c297c4e903a15188389011b93ce46119849d01",
+ "url": "https://api.github.com/repos/cakephp/bake/zipball/bfb856afcfbc70c5cf5341669c3036a45ca15d94",
+ "reference": "bfb856afcfbc70c5cf5341669c3036a45ca15d94",
"shasum": ""
},
"require": {
- "cakephp/cakephp": "^4.0",
- "cakephp/twig-view": "^1.0",
+ "brick/varexporter": "^0.3.5",
+ "cakephp/cakephp": "^4.1",
+ "cakephp/twig-view": "^1.0.2",
"php": ">=7.2"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "^4.0",
"cakephp/debug_kit": "^4.1",
+ "cakephp/plugin-installer": "^1.3",
"phpunit/phpunit": "~8.5.0"
},
"type": "cakephp-plugin",
@@ -2805,28 +2848,29 @@
"issues": "https://github.com/cakephp/bake/issues",
"source": "https://github.com/cakephp/bake"
},
- "time": "2020-10-23T01:17:19+00:00"
+ "time": "2021-07-26T14:56:18+00:00"
},
{
"name": "cakephp/cakephp-codesniffer",
- "version": "3.3.0",
+ "version": "4.2.4",
"source": {
"type": "git",
"url": "https://github.com/cakephp/cakephp-codesniffer.git",
- "reference": "7998a191e787fd5b68cb635d7050cb0d7b55e1a1"
+ "reference": "c5bb1faeebf09cd4a3604bdb0c84f7bc92dc5475"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/7998a191e787fd5b68cb635d7050cb0d7b55e1a1",
- "reference": "7998a191e787fd5b68cb635d7050cb0d7b55e1a1",
+ "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/c5bb1faeebf09cd4a3604bdb0c84f7bc92dc5475",
+ "reference": "c5bb1faeebf09cd4a3604bdb0c84f7bc92dc5475",
"shasum": ""
},
"require": {
- "php": ">=5.6",
- "squizlabs/php_codesniffer": "^3.0.0"
+ "php": ">=7.2.0",
+ "slevomat/coding-standard": "^6.3.6",
+ "squizlabs/php_codesniffer": "~3.5.5"
},
"require-dev": {
- "phpunit/phpunit": "<6.0"
+ "phpunit/phpunit": "^7.1"
},
"type": "phpcodesniffer-standard",
"autoload": {
@@ -2856,33 +2900,33 @@
"issues": "https://github.com/cakephp/cakephp-codesniffer/issues",
"source": "https://github.com/cakephp/cakephp-codesniffer"
},
- "time": "2019-12-07T03:02:34+00:00"
+ "time": "2020-12-03T20:39:38+00:00"
},
{
"name": "cakephp/debug_kit",
- "version": "4.2.0",
+ "version": "4.4.4",
"source": {
"type": "git",
"url": "https://github.com/cakephp/debug_kit.git",
- "reference": "940a0214947e85bbaa0724acfda852f64831f04f"
+ "reference": "10d7d9ba36945844211f1d8763e59618917e1784"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/940a0214947e85bbaa0724acfda852f64831f04f",
- "reference": "940a0214947e85bbaa0724acfda852f64831f04f",
+ "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/10d7d9ba36945844211f1d8763e59618917e1784",
+ "reference": "10d7d9ba36945844211f1d8763e59618917e1784",
"shasum": ""
},
"require": {
- "cakephp/cakephp": "^4.0",
+ "cakephp/cakephp": "^4.2.0",
"cakephp/chronos": "^2.0",
- "composer/composer": "^1.3",
+ "composer/composer": "^1.3 | ^2.0",
"jdorn/sql-formatter": "^1.2",
"php": ">=7.2"
},
"require-dev": {
"cakephp/authorization": "^2.0",
"cakephp/cakephp-codesniffer": "^4.0",
- "phpunit/phpunit": "^8.0"
+ "phpunit/phpunit": "~8.5.0 | ^9.3"
},
"suggest": {
"ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use."
@@ -2922,20 +2966,20 @@
"issues": "https://github.com/cakephp/debug_kit/issues",
"source": "https://github.com/cakephp/debug_kit"
},
- "time": "2020-06-10T01:37:18+00:00"
+ "time": "2021-09-12T20:06:14+00:00"
},
{
"name": "cakephp/twig-view",
- "version": "1.2.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/cakephp/twig-view.git",
- "reference": "668dd6aee43dd616b1e83cb9ba166f094c10fbce"
+ "reference": "14df50360b809a171d0688020fbdfe513763f89b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/twig-view/zipball/668dd6aee43dd616b1e83cb9ba166f094c10fbce",
- "reference": "668dd6aee43dd616b1e83cb9ba166f094c10fbce",
+ "url": "https://api.github.com/repos/cakephp/twig-view/zipball/14df50360b809a171d0688020fbdfe513763f89b",
+ "reference": "14df50360b809a171d0688020fbdfe513763f89b",
"shasum": ""
},
"require": {
@@ -2985,43 +3029,42 @@
"issues": "https://github.com/cakephp/twig-view/issues",
"source": "https://github.com/cakephp/twig-view"
},
- "time": "2020-12-13T19:57:31+00:00"
+ "time": "2021-09-17T14:07:52+00:00"
},
{
"name": "composer/composer",
- "version": "1.10.22",
+ "version": "2.1.9",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
- "reference": "28c9dfbe2351635961f670773e8d7b17bc5eda25"
+ "reference": "e558c88f28d102d497adec4852802c0dc14c7077"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/composer/zipball/28c9dfbe2351635961f670773e8d7b17bc5eda25",
- "reference": "28c9dfbe2351635961f670773e8d7b17bc5eda25",
+ "url": "https://api.github.com/repos/composer/composer/zipball/e558c88f28d102d497adec4852802c0dc14c7077",
+ "reference": "e558c88f28d102d497adec4852802c0dc14c7077",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
- "composer/semver": "^1.0",
+ "composer/metadata-minifier": "^1.0",
+ "composer/semver": "^3.0",
"composer/spdx-licenses": "^1.2",
- "composer/xdebug-handler": "^1.1",
- "justinrainbow/json-schema": "^5.2.10",
+ "composer/xdebug-handler": "^2.0",
+ "justinrainbow/json-schema": "^5.2.11",
"php": "^5.3.2 || ^7.0 || ^8.0",
"psr/log": "^1.0",
+ "react/promise": "^1.2 || ^2.7",
"seld/jsonlint": "^1.4",
"seld/phar-utils": "^1.0",
- "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
- },
- "conflict": {
- "symfony/console": "2.8.38"
+ "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
+ "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
+ "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
+ "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
},
"require-dev": {
"phpspec/prophecy": "^1.10",
- "symfony/phpunit-bridge": "^4.2"
+ "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
},
"suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -3034,7 +3077,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.10-dev"
+ "dev-master": "2.1-dev"
}
},
"autoload": {
@@ -3050,12 +3093,12 @@
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
- "homepage": "http://www.naderman.de"
+ "homepage": "https://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
- "homepage": "http://seld.be"
+ "homepage": "https://seld.be"
}
],
"description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.",
@@ -3066,9 +3109,78 @@
"package"
],
"support": {
- "irc": "irc://irc.freenode.org/composer",
+ "irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/composer/issues",
- "source": "https://github.com/composer/composer/tree/1.10.22"
+ "source": "https://github.com/composer/composer/tree/2.1.9"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-10-05T07:47:38+00:00"
+ },
+ {
+ "name": "composer/metadata-minifier",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/metadata-minifier.git",
+ "reference": "c549d23829536f0d0e984aaabbf02af91f443207"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207",
+ "reference": "c549d23829536f0d0e984aaabbf02af91f443207",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "composer/composer": "^2",
+ "phpstan/phpstan": "^0.12.55",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\MetadataMinifier\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "Small utility library that handles metadata minification and expansion.",
+ "keywords": [
+ "composer",
+ "compression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/metadata-minifier/issues",
+ "source": "https://github.com/composer/metadata-minifier/tree/1.0.0"
},
"funding": [
{
@@ -3084,32 +3196,33 @@
"type": "tidelift"
}
],
- "time": "2021-04-27T11:10:45+00:00"
+ "time": "2021-04-07T13:37:33+00:00"
},
{
"name": "composer/semver",
- "version": "1.7.2",
+ "version": "3.2.5",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
- "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a"
+ "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a",
- "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a",
+ "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
+ "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.5 || ^5.0.5"
+ "phpstan/phpstan": "^0.12.54",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"
+ "dev-main": "3.x-dev"
}
},
"autoload": {
@@ -3148,7 +3261,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
- "source": "https://github.com/composer/semver/tree/1.7.2"
+ "source": "https://github.com/composer/semver/tree/3.2.5"
},
"funding": [
{
@@ -3164,7 +3277,7 @@
"type": "tidelift"
}
],
- "time": "2020-12-03T15:47:16+00:00"
+ "time": "2021-05-24T12:41:47+00:00"
},
{
"name": "composer/spdx-licenses",
@@ -3247,21 +3360,21 @@
},
{
"name": "composer/xdebug-handler",
- "version": "1.4.6",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
- "reference": "f27e06cd9675801df441b3656569b328e04aa37c"
+ "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c",
- "reference": "f27e06cd9675801df441b3656569b328e04aa37c",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
+ "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0",
- "psr/log": "^1.0"
+ "psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
"phpstan/phpstan": "^0.12.55",
@@ -3291,7 +3404,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
- "source": "https://github.com/composer/xdebug-handler/tree/1.4.6"
+ "source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
},
"funding": [
{
@@ -3307,7 +3420,77 @@
"type": "tidelift"
}
],
- "time": "2021-03-25T17:01:18+00:00"
+ "time": "2021-07-31T17:03:58+00:00"
+ },
+ {
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
+ "version": "v0.7.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
+ "reference": "fe390591e0241955f22eb9ba327d137e501c771c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c",
+ "reference": "fe390591e0241955f22eb9ba327d137e501c771c",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0 || ^2.0",
+ "php": ">=5.3",
+ "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0"
+ },
+ "require-dev": {
+ "composer/composer": "*",
+ "phpcompatibility/php-compatibility": "^9.0",
+ "sensiolabs/security-checker": "^4.1.0"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
+ },
+ "autoload": {
+ "psr-4": {
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Franck Nijhof",
+ "email": "franck.nijhof@dealerdirect.com",
+ "homepage": "http://www.frenck.nl",
+ "role": "Developer / IT Manager"
+ }
+ ],
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
+ "homepage": "http://www.dealerdirect.com",
+ "keywords": [
+ "PHPCodeSniffer",
+ "PHP_CodeSniffer",
+ "code quality",
+ "codesniffer",
+ "composer",
+ "installer",
+ "phpcs",
+ "plugin",
+ "qa",
+ "quality",
+ "standard",
+ "standards",
+ "style guide",
+ "stylecheck",
+ "tests"
+ ],
+ "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/instantiator",
@@ -3496,6 +3679,63 @@
},
"time": "2014-01-12T16:20:24+00:00"
},
+ {
+ "name": "josegonzalez/dotenv",
+ "version": "3.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/josegonzalez/php-dotenv.git",
+ "reference": "f19174d9d7213a6c20e8e5e268aa7dd042d821ca"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/f19174d9d7213a6c20e8e5e268aa7dd042d821ca",
+ "reference": "f19174d9d7213a6c20e8e5e268aa7dd042d821ca",
+ "shasum": ""
+ },
+ "require": {
+ "m1/env": "2.*",
+ "php": ">=5.5.0"
+ },
+ "require-dev": {
+ "php-mock/php-mock-phpunit": "^1.1",
+ "satooshi/php-coveralls": "1.*",
+ "squizlabs/php_codesniffer": "2.*"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "josegonzalez\\Dotenv": [
+ "src",
+ "tests"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jose Diaz-Gonzalez",
+ "email": "dotenv@josegonzalez.com",
+ "homepage": "http://josediazgonzalez.com",
+ "role": "Maintainer"
+ }
+ ],
+ "description": "dotenv file parsing for PHP",
+ "homepage": "https://github.com/josegonzalez/php-dotenv",
+ "keywords": [
+ "configuration",
+ "dotenv",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/josegonzalez/php-dotenv/issues",
+ "source": "https://github.com/josegonzalez/php-dotenv/tree/master"
+ },
+ "time": "2017-09-19T15:49:58+00:00"
+ },
{
"name": "justinrainbow/json-schema",
"version": "5.2.11",
@@ -3566,6 +3806,68 @@
},
"time": "2021-07-22T09:24:00+00:00"
},
+ {
+ "name": "m1/env",
+ "version": "2.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/m1/Env.git",
+ "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/m1/Env/zipball/5c296e3e13450a207e12b343f3af1d7ab569f6f3",
+ "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*",
+ "scrutinizer/ocular": "~1.1",
+ "squizlabs/php_codesniffer": "^2.3"
+ },
+ "suggest": {
+ "josegonzalez/dotenv": "For loading of .env",
+ "m1/vars": "For loading of configs"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "M1\\Env\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Miles Croxford",
+ "email": "hello@milescroxford.com",
+ "homepage": "http://milescroxford.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.",
+ "homepage": "https://github.com/m1/Env",
+ "keywords": [
+ ".env",
+ "config",
+ "dotenv",
+ "env",
+ "loader",
+ "m1",
+ "parser",
+ "support"
+ ],
+ "support": {
+ "issues": "https://github.com/m1/Env/issues",
+ "source": "https://github.com/m1/Env/tree/2.2.0"
+ },
+ "time": "2020-02-19T09:02:13+00:00"
+ },
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
@@ -3626,16 +3928,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.12.0",
+ "version": "v4.13.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "6608f01670c3cc5079e18c1dab1104e002579143"
+ "reference": "50953a2691a922aa1769461637869a0a2faa3f53"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143",
- "reference": "6608f01670c3cc5079e18c1dab1104e002579143",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53",
+ "reference": "50953a2691a922aa1769461637869a0a2faa3f53",
"shasum": ""
},
"require": {
@@ -3676,9 +3978,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0"
},
- "time": "2021-07-21T10:44:31+00:00"
+ "time": "2021-09-20T12:20:58+00:00"
},
{
"name": "phar-io/manifest",
@@ -3902,16 +4204,16 @@
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.5.0",
+ "version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f"
+ "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f",
- "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
+ "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"shasum": ""
},
"require": {
@@ -3946,9 +4248,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0"
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
},
- "time": "2021-09-17T15:28:14+00:00"
+ "time": "2021-10-02T14:08:47+00:00"
},
{
"name": "phpspec/prophecy",
@@ -4017,6 +4319,59 @@
},
"time": "2021-09-10T09:02:12+00:00"
},
+ {
+ "name": "phpstan/phpdoc-parser",
+ "version": "0.4.9",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpdoc-parser.git",
+ "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531",
+ "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "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/extension-installer": "^1.0",
+ "phpstan/phpstan": "^0.12.26",
+ "phpstan/phpstan-strict-rules": "^0.12",
+ "phpunit/phpunit": "^6.3",
+ "slevomat/coding-standard": "^4.7.2",
+ "symfony/process": "^4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\PhpDocParser\\": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPDoc parser with support for nullable, intersection and generic types",
+ "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.12.99",
@@ -4083,40 +4438,44 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "7.0.15",
+ "version": "9.2.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "819f92bba8b001d4363065928088de22f25a3a48"
+ "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48",
- "reference": "819f92bba8b001d4363065928088de22f25a3a48",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218",
+ "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218",
"shasum": ""
},
"require": {
"ext-dom": "*",
+ "ext-libxml": "*",
"ext-xmlwriter": "*",
- "php": ">=7.2",
- "phpunit/php-file-iterator": "^2.0.2",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^3.1.3 || ^4.0",
- "sebastian/code-unit-reverse-lookup": "^1.0.1",
- "sebastian/environment": "^4.2.2",
- "sebastian/version": "^2.0.1",
- "theseer/tokenizer": "^1.1.3"
+ "nikic/php-parser": "^4.12.0",
+ "php": ">=7.3",
+ "phpunit/php-file-iterator": "^3.0.3",
+ "phpunit/php-text-template": "^2.0.2",
+ "sebastian/code-unit-reverse-lookup": "^2.0.2",
+ "sebastian/complexity": "^2.0",
+ "sebastian/environment": "^5.1.2",
+ "sebastian/lines-of-code": "^1.0.3",
+ "sebastian/version": "^3.0.1",
+ "theseer/tokenizer": "^1.2.0"
},
"require-dev": {
- "phpunit/phpunit": "^8.2.2"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
- "ext-xdebug": "^2.7.2"
+ "ext-pcov": "*",
+ "ext-xdebug": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "7.0-dev"
+ "dev-master": "9.2-dev"
}
},
"autoload": {
@@ -4144,7 +4503,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7"
},
"funding": [
{
@@ -4152,32 +4511,32 @@
"type": "github"
}
],
- "time": "2021-07-26T12:20:09+00:00"
+ "time": "2021-09-17T05:39:03+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "2.0.4",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05"
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05",
- "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^8.5"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -4204,7 +4563,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4"
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5"
},
"funding": [
{
@@ -4212,28 +4571,40 @@
"type": "github"
}
],
- "time": "2021-07-19T06:46:01+00:00"
+ "time": "2020-09-28T05:57:25+00:00"
},
{
- "name": "phpunit/php-text-template",
- "version": "1.2.1",
+ "name": "phpunit/php-invoker",
+ "version": "3.1.1",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+ "url": "https://github.com/sebastianbergmann/php-invoker.git",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.3"
},
- "type": "library",
- "autoload": {
- "classmap": [
+ "require-dev": {
+ "ext-pcntl": "*",
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-pcntl": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
"src/"
]
},
@@ -4248,41 +4619,47 @@
"role": "lead"
}
],
- "description": "Simple template engine.",
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "description": "Invoke callables with a timeout",
+ "homepage": "https://github.com/sebastianbergmann/php-invoker/",
"keywords": [
- "template"
+ "process"
],
"support": {
- "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
+ "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
},
- "time": "2015-06-21T13:50:34+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T05:58:55+00:00"
},
{
- "name": "phpunit/php-timer",
- "version": "2.1.3",
+ "name": "phpunit/php-text-template",
+ "version": "2.0.4",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662"
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662",
- "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^8.5"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -4301,14 +4678,14 @@
"role": "lead"
}
],
- "description": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
- "timer"
+ "template"
],
"support": {
- "issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3"
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
},
"funding": [
{
@@ -4316,33 +4693,32 @@
"type": "github"
}
],
- "time": "2020-11-30T08:20:02+00:00"
+ "time": "2020-10-26T05:33:50+00:00"
},
{
- "name": "phpunit/php-token-stream",
- "version": "4.0.4",
+ "name": "phpunit/php-timer",
+ "version": "5.0.3",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3"
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3",
- "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"shasum": ""
},
"require": {
- "ext-tokenizer": "*",
- "php": "^7.3 || ^8.0"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -4357,17 +4733,18 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
}
],
- "description": "Wrapper around PHP's tokenizer extension.",
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
- "tokenizer"
+ "timer"
],
"support": {
- "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
- "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master"
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
},
"funding": [
{
@@ -4375,21 +4752,20 @@
"type": "github"
}
],
- "abandoned": true,
- "time": "2020-08-04T08:28:15+00:00"
+ "time": "2020-10-26T13:16:10+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "8.5.20",
+ "version": "9.5.10",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70"
+ "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9deefba183198398a09b927a6ac6bc1feb0b7b70",
- "reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a",
+ "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a",
"shasum": ""
},
"require": {
@@ -4400,32 +4776,35 @@
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.10.0",
+ "myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
- "php": ">=7.2",
- "phpspec/prophecy": "^1.10.3",
- "phpunit/php-code-coverage": "^7.0.12",
- "phpunit/php-file-iterator": "^2.0.4",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-timer": "^2.1.2",
- "sebastian/comparator": "^3.0.2",
- "sebastian/diff": "^3.0.2",
- "sebastian/environment": "^4.2.3",
- "sebastian/exporter": "^3.1.2",
- "sebastian/global-state": "^3.0.0",
- "sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^2.0.1",
- "sebastian/type": "^1.1.3",
- "sebastian/version": "^2.0.1"
+ "php": ">=7.3",
+ "phpspec/prophecy": "^1.12.1",
+ "phpunit/php-code-coverage": "^9.2.7",
+ "phpunit/php-file-iterator": "^3.0.5",
+ "phpunit/php-invoker": "^3.1.1",
+ "phpunit/php-text-template": "^2.0.3",
+ "phpunit/php-timer": "^5.0.2",
+ "sebastian/cli-parser": "^1.0.1",
+ "sebastian/code-unit": "^1.0.6",
+ "sebastian/comparator": "^4.0.5",
+ "sebastian/diff": "^4.0.3",
+ "sebastian/environment": "^5.1.3",
+ "sebastian/exporter": "^4.0.3",
+ "sebastian/global-state": "^5.0.1",
+ "sebastian/object-enumerator": "^4.0.3",
+ "sebastian/resource-operations": "^3.0.3",
+ "sebastian/type": "^2.3.4",
+ "sebastian/version": "^3.0.2"
},
"require-dev": {
- "ext-pdo": "*"
+ "ext-pdo": "*",
+ "phpspec/prophecy-phpunit": "^2.0.1"
},
"suggest": {
"ext-soap": "*",
- "ext-xdebug": "*",
- "phpunit/php-invoker": "^2.0.0"
+ "ext-xdebug": "*"
},
"bin": [
"phpunit"
@@ -4433,12 +4812,15 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "8.5-dev"
+ "dev-master": "9.5-dev"
}
},
"autoload": {
"classmap": [
"src/"
+ ],
+ "files": [
+ "src/Framework/Assert/Functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -4461,7 +4843,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.20"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10"
},
"funding": [
{
@@ -4473,20 +4855,20 @@
"type": "github"
}
],
- "time": "2021-08-31T06:44:38+00:00"
+ "time": "2021-09-25T07:38:51+00:00"
},
{
"name": "psy/psysh",
- "version": "v0.10.8",
+ "version": "v0.10.9",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
- "reference": "e4573f47750dd6c92dca5aee543fa77513cbd8d3"
+ "reference": "01281336c4ae557fe4a994544f30d3a1bc204375"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e4573f47750dd6c92dca5aee543fa77513cbd8d3",
- "reference": "e4573f47750dd6c92dca5aee543fa77513cbd8d3",
+ "url": "https://api.github.com/repos/bobthecow/psysh/zipball/01281336c4ae557fe4a994544f30d3a1bc204375",
+ "reference": "01281336c4ae557fe4a994544f30d3a1bc204375",
"shasum": ""
},
"require": {
@@ -4546,34 +4928,196 @@
],
"support": {
"issues": "https://github.com/bobthecow/psysh/issues",
- "source": "https://github.com/bobthecow/psysh/tree/v0.10.8"
+ "source": "https://github.com/bobthecow/psysh/tree/v0.10.9"
+ },
+ "time": "2021-10-10T13:37:39+00:00"
+ },
+ {
+ "name": "react/promise",
+ "version": "v2.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/promise.git",
+ "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4"
},
- "time": "2021-04-10T16:23:39+00:00"
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4",
+ "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "React\\Promise\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jan Sorgalla",
+ "email": "jsorgalla@gmail.com"
+ }
+ ],
+ "description": "A lightweight implementation of CommonJS Promises/A for PHP",
+ "keywords": [
+ "promise",
+ "promises"
+ ],
+ "support": {
+ "issues": "https://github.com/reactphp/promise/issues",
+ "source": "https://github.com/reactphp/promise/tree/v2.8.0"
+ },
+ "time": "2020-05-12T15:16:56+00:00"
+ },
+ {
+ "name": "sebastian/cli-parser",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/cli-parser.git",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for parsing CLI options",
+ "homepage": "https://github.com/sebastianbergmann/cli-parser",
+ "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": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/code-unit",
+ "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": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.2",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
- "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^8.5"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -4595,7 +5139,7 @@
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
- "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2"
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
},
"funding": [
{
@@ -4603,34 +5147,34 @@
"type": "github"
}
],
- "time": "2020-11-30T08:15:22+00:00"
+ "time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
- "version": "3.0.3",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "1071dfcef776a57013124ff35e1fc41ccd294758"
+ "reference": "55f4261989e546dc112258c7a75935a81a7ce382"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758",
- "reference": "1071dfcef776a57013124ff35e1fc41ccd294758",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
+ "reference": "55f4261989e546dc112258c7a75935a81a7ce382",
"shasum": ""
},
"require": {
- "php": ">=7.1",
- "sebastian/diff": "^3.0",
- "sebastian/exporter": "^3.1"
+ "php": ">=7.3",
+ "sebastian/diff": "^4.0",
+ "sebastian/exporter": "^4.0"
},
"require-dev": {
- "phpunit/phpunit": "^8.5"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -4669,7 +5213,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3"
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
},
"funding": [
{
@@ -4677,33 +5221,90 @@
"type": "github"
}
],
- "time": "2020-11-30T08:04:30+00:00"
+ "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.3",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211"
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
- "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.5 || ^8.0",
- "symfony/process": "^2 || ^3.3 || ^4"
+ "phpunit/phpunit": "^9.3",
+ "symfony/process": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -4735,7 +5336,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3"
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
},
"funding": [
{
@@ -4743,27 +5344,27 @@
"type": "github"
}
],
- "time": "2020-11-30T07:59:04+00:00"
+ "time": "2020-10-26T13:10:38+00:00"
},
{
"name": "sebastian/environment",
- "version": "4.2.4",
+ "version": "5.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0"
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
- "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.5"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-posix": "*"
@@ -4771,7 +5372,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.2-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4798,7 +5399,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4"
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
},
"funding": [
{
@@ -4806,34 +5407,34 @@
"type": "github"
}
],
- "time": "2020-11-30T07:53:42+00:00"
+ "time": "2020-09-28T05:52:38+00:00"
},
{
"name": "sebastian/exporter",
- "version": "3.1.3",
+ "version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e"
+ "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e",
- "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
+ "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"shasum": ""
},
"require": {
- "php": ">=7.0",
- "sebastian/recursion-context": "^3.0"
+ "php": ">=7.3",
+ "sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1.x-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -4875,7 +5476,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3"
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
},
"funding": [
{
@@ -4883,30 +5484,30 @@
"type": "github"
}
],
- "time": "2020-11-30T07:47:53+00:00"
+ "time": "2020-09-28T05:24:23+00:00"
},
{
"name": "sebastian/global-state",
- "version": "3.0.1",
+ "version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b"
+ "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b",
- "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49",
+ "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49",
"shasum": ""
},
"require": {
- "php": ">=7.2",
- "sebastian/object-reflector": "^1.1.1",
- "sebastian/recursion-context": "^3.0"
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-dom": "*",
- "phpunit/phpunit": "^8.0"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-uopz": "*"
@@ -4914,7 +5515,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -4939,7 +5540,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3"
},
"funding": [
{
@@ -4947,34 +5548,91 @@
"type": "github"
}
],
- "time": "2020-11-30T07:43:24+00:00"
+ "time": "2021-06-11T13:31:12+00:00"
+ },
+ {
+ "name": "sebastian/lines-of-code",
+ "version": "1.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/lines-of-code.git",
+ "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.6",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for counting the lines of code in PHP source code",
+ "homepage": "https://github.com/sebastianbergmann/lines-of-code",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-28T06:42:11+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "3.0.4",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2"
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
- "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
"shasum": ""
},
"require": {
- "php": ">=7.0",
- "sebastian/object-reflector": "^1.1.1",
- "sebastian/recursion-context": "^3.0"
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0.x-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -4996,7 +5654,7 @@
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
- "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4"
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
},
"funding": [
{
@@ -5004,32 +5662,32 @@
"type": "github"
}
],
- "time": "2020-11-30T07:40:27+00:00"
+ "time": "2020-10-26T13:12:34+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "1.1.2",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d"
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
- "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"shasum": ""
},
"require": {
- "php": ">=7.0"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -5051,7 +5709,7 @@
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
- "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2"
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
},
"funding": [
{
@@ -5059,32 +5717,32 @@
"type": "github"
}
],
- "time": "2020-11-30T07:37:18+00:00"
+ "time": "2020-10-26T13:14:26+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "3.0.1",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb"
+ "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb",
- "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
+ "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
"shasum": ""
},
"require": {
- "php": ">=7.0"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0.x-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -5114,7 +5772,7 @@
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
},
"funding": [
{
@@ -5122,29 +5780,32 @@
"type": "github"
}
],
- "time": "2020-11-30T07:34:24+00:00"
+ "time": "2020-10-26T13:17:30+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "2.0.2",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3"
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3",
- "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -5166,7 +5827,7 @@
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"support": {
"issues": "https://github.com/sebastianbergmann/resource-operations/issues",
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2"
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
},
"funding": [
{
@@ -5174,32 +5835,32 @@
"type": "github"
}
],
- "time": "2020-11-30T07:30:19+00:00"
+ "time": "2020-09-28T06:45:17+00:00"
},
{
"name": "sebastian/type",
- "version": "1.1.4",
+ "version": "2.3.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4"
+ "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4",
- "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914",
+ "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914",
"shasum": ""
},
"require": {
- "php": ">=7.2"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^8.2"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -5222,7 +5883,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/1.1.4"
+ "source": "https://github.com/sebastianbergmann/type/tree/2.3.4"
},
"funding": [
{
@@ -5230,29 +5891,29 @@
"type": "github"
}
],
- "time": "2020-11-30T07:25:11+00:00"
+ "time": "2021-06-15T12:49:02+00:00"
},
{
"name": "sebastian/version",
- "version": "2.0.1",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+ "reference": "c6c1022351a901512170118436c764e473f6de8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": ">=7.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -5275,9 +5936,15 @@
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
- "source": "https://github.com/sebastianbergmann/version/tree/master"
+ "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
},
- "time": "2016-10-03T07:35:21+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T06:39:44+00:00"
},
{
"name": "seld/jsonlint",
@@ -5390,18 +6057,79 @@
},
"time": "2021-08-19T21:01:38+00:00"
},
+ {
+ "name": "slevomat/coding-standard",
+ "version": "6.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/slevomat/coding-standard.git",
+ "reference": "696dcca217d0c9da2c40d02731526c1e25b65346"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346",
+ "reference": "696dcca217d0c9da2c40d02731526c1e25b65346",
+ "shasum": ""
+ },
+ "require": {
+ "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": {
+ "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": "phpcodesniffer-standard",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "SlevomatCodingStandard\\": "SlevomatCodingStandard"
+ }
+ },
+ "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.",
+ "support": {
+ "issues": "https://github.com/slevomat/coding-standard/issues",
+ "source": "https://github.com/slevomat/coding-standard/tree/6.4.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/kukulich",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-05T12:39:37+00:00"
+ },
{
"name": "squizlabs/php_codesniffer",
- "version": "3.6.0",
+ "version": "3.5.8",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
+ "reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
- "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
+ "reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
"shasum": ""
},
"require": {
@@ -5444,7 +6172,7 @@
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
- "time": "2021-04-09T00:54:41+00:00"
+ "time": "2020-10-23T02:01:07+00:00"
},
{
"name": "symfony/finder",
@@ -5572,16 +6300,16 @@
},
{
"name": "symfony/var-dumper",
- "version": "v5.3.7",
+ "version": "v5.3.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f"
+ "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f",
- "reference": "3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eaaea4098be1c90c8285543e1356a09c8aa5c8da",
+ "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da",
"shasum": ""
},
"require": {
@@ -5640,7 +6368,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v5.3.7"
+ "source": "https://github.com/symfony/var-dumper/tree/v5.3.8"
},
"funding": [
{
@@ -5656,7 +6384,7 @@
"type": "tidelift"
}
],
- "time": "2021-08-04T23:19:25+00:00"
+ "time": "2021-09-24T15:59:58+00:00"
},
{
"name": "theseer/tokenizer",
@@ -5924,7 +6652,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": ">=7.2"
+ "php": ">=7.3"
},
"platform-dev": [],
"plugin-api-version": "2.1.0"
diff --git a/app/config/app.php b/app/config/app.php
index 9f35ce8bd..7fad48a61 100644
--- a/app/config/app.php
+++ b/app/config/app.php
@@ -42,7 +42,8 @@
* Development Mode:
* true: Errors and warnings shown.
*/
- 'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN),
+// 'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN),
+ 'debug' => true,
/*
* Configure basic information about the application.
diff --git a/app/config/bootstrap.php b/app/config/bootstrap.php
index b47318334..5709bada3 100644
--- a/app/config/bootstrap.php
+++ b/app/config/bootstrap.php
@@ -257,6 +257,6 @@
* Debug Kit should not be installed on a production system
*/
//if (Configure::read('debug')) {
-// This mucks with CSS, maybe just remove it entirely?
+//// This mucks with CSS, maybe just remove it entirely?
// Plugin::load('DebugKit', ['bootstrap' => true]);
//}
\ No newline at end of file
diff --git a/app/src/Application.php b/app/src/Application.php
index 987dc7754..3e3c914df 100644
--- a/app/src/Application.php
+++ b/app/src/Application.php
@@ -14,13 +14,12 @@
*/
namespace App;
-use Cake\Core\Configure;
use Cake\Error\Middleware\ErrorHandlerMiddleware;
use Cake\Http\BaseApplication;
use Cake\Http\Middleware\CsrfProtectionMiddleware;
+use Cake\Http\Middleware\BodyParserMiddleware;
use Cake\Routing\Middleware\AssetMiddleware;
use Cake\Routing\Middleware\RoutingMiddleware;
-use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
/**
@@ -37,17 +36,17 @@ class Application extends BaseApplication {
* @return \Cake\Http\MiddlewareQueue The updated middleware queue.
*/
- public function middleware($middlewareQueue): \Cake\Http\MiddlewareQueue {
+ public function middleware(\Cake\Http\MiddlewareQueue $middlewareQueue): \Cake\Http\MiddlewareQueue {
// loading csrf Middleware
$csrf = new CsrfProtectionMiddleware(['cookieName' => 'matchCsrfToken']);
- $csrf->whitelistCallback(function (ServerRequestInterface $request) {
+ $csrf->skipCheckCallback(function (ServerRequestInterface $request) {
// skip controllers
$skipedControllers = ['TierApi']; // Controllers list
if(in_array($request->getParam('controller'), $skipedControllers, true)) {
return true;
}
// skip debugkit
- if($request->getParam('plugin') == 'DebugKit') {
+ if($request->getParam('plugin') === 'DebugKit') {
return true;
}
return $request;
@@ -63,6 +62,12 @@ public function middleware($middlewareQueue): \Cake\Http\MiddlewareQueue {
// Add routing middleware.
->add(new RoutingMiddleware($this))
+
+ // https://book.cakephp.org/4/en/controllers/middleware.html#body-parser-middleware
+ // Enable requests decoding into an array that is available via $request->getParsedData()
+ // and $request->getData()
+ // // only JSON will be parsed
+ ->add(new BodyParserMiddleware())
// Enable CSRF protection using Cake v3.5+ approach.
// Initially, we use the default options, except a different CSRF cookie
diff --git a/app/src/Auth/EnvAuthenticate.php b/app/src/Auth/EnvAuthenticate.php
index 3640b4599..fc872719b 100644
--- a/app/src/Auth/EnvAuthenticate.php
+++ b/app/src/Auth/EnvAuthenticate.php
@@ -33,7 +33,7 @@
use Cake\Core\InstanceConfigTrait;
use Cake\Http\ServerRequest;
use Cake\Http\Response;
-use Cake\ORM\TableRegistry;
+use Cake\Datasource\FactoryLocator;
use Cake\Log\Log;
diff --git a/app/src/Command/BulkLoadCommand.php b/app/src/Command/BulkLoadCommand.php
index ec29df1b3..b7bbcb7b8 100644
--- a/app/src/Command/BulkLoadCommand.php
+++ b/app/src/Command/BulkLoadCommand.php
@@ -33,10 +33,10 @@
use Cake\Console\Arguments;
use Cake\Console\Command;
use Cake\Console\CommandRunner;
+use Cake\ORM\Locator\LocatorAwareTrait;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Datasource\Exception\RecordNotFoundException;
-use Cake\ORM\TableRegistry;
use Cake\Utility\Hash;
use Cake\Utility\Security;
@@ -74,7 +74,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
public function execute(Arguments $args, ConsoleIo $io) {
// Verify that we have a valid matchgrid
- $Matchgrids = TableRegistry::get('Matchgrids');
+ $Matchgrids = $this->getTableLocator()->get('Matchgrids');
try {
$mg = $Matchgrids->getMatchgridConfig($args->getOption('matchgrid-id'));
@@ -85,7 +85,7 @@ public function execute(Arguments $args, ConsoleIo $io) {
}
// Pull the list of Systems of Record so we can validate the inbound records
- $SoR = TableRegistry::get('SystemsOfRecord');
+ $SoR = $this->getTableLocator()->get('SystemsOfRecord');
$sors = $SoR->find('list', ['keyField' => 'label', 'valueField' => 'id'])
->where(['matchgrid_id' => $mg->id])
diff --git a/app/src/Command/DatabaseCommand.php b/app/src/Command/DatabaseCommand.php
index c72238f6e..89d8f4570 100644
--- a/app/src/Command/DatabaseCommand.php
+++ b/app/src/Command/DatabaseCommand.php
@@ -221,7 +221,7 @@ public function execute(Arguments $args, ConsoleIo $io) {
$toSql = $schema->toSql($conn->getDatabasePlatform());
// SchemaManager provides info about the database
- $sm = $conn->getSchemaManager();
+ $sm = $conn->createSchemaManager();
// The is the current database representation
$curSchema = $sm->createSchema();
@@ -258,7 +258,7 @@ public function execute(Arguments $args, ConsoleIo $io) {
$io->out("Skipping sequence drop");
} else {
if($doSQL) {
- $stmt = $conn->query($sql);
+ $stmt = $conn->executeQuery($sql);
// $stmt just returns the query string so we don't bother examining it
}
}
diff --git a/app/src/Command/SetupCommand.php b/app/src/Command/SetupCommand.php
index e40d3dfc9..ecf59c7d2 100644
--- a/app/src/Command/SetupCommand.php
+++ b/app/src/Command/SetupCommand.php
@@ -35,7 +35,6 @@
use Cake\Console\CommandRunner;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
-use Cake\ORM\TableRegistry;
use Cake\Utility\Security;
use \App\Lib\Enum\PermissionEnum;
@@ -105,7 +104,7 @@ public function execute(Arguments $args, ConsoleIo $io) {
// Create the initial admin permission
$io->out(__('match.cmd.se.admin'));
- $permissionsTable = TableRegistry::get('Permissions');
+ $permissionsTable = $this->getTableLocator()->get('Permissions');
$permission = $permissionsTable->newEmptyEntity();
$permission->username = $user;
@@ -122,7 +121,7 @@ public function execute(Arguments $args, ConsoleIo $io) {
$targetVersion = rtrim(file_get_contents($versionFile));
- $metaTable = TableRegistry::get('Meta');
+ $metaTable = $this->getTableLocator()->get('Meta');
$metaTable->setUpgradeVersion($targetVersion, true);
// Write out the salt file
diff --git a/app/src/Controller/AppController.php b/app/src/Controller/AppController.php
index 22127ad8b..d42740fc4 100644
--- a/app/src/Controller/AppController.php
+++ b/app/src/Controller/AppController.php
@@ -33,7 +33,6 @@
use Cake\Datasource\Exception;
use Cake\Datasource\Exception\RecordNotFoundException;
use Cake\Event\EventInterface;
-use Cake\ORM\TableRegistry;
use InvalidArgumentException;
class AppController extends Controller {
@@ -217,7 +216,7 @@ protected function getPrimaryLink(bool $lookup=false) {
// Look up the link value to find the related entity
$linkModelName = $this->$modelsName->getPrimaryLinkTableName();
- $linkModel = TableRegistry::get($linkModelName);
+ $linkModel = $this->getTableLocator()->get($linkModelName);
$this->set('vv_primary_link_model', $linkModelName);
$this->set('vv_primary_link_obj', $linkModel->findById($this->cur_pl['linkvalue'])->firstOrFail());
diff --git a/app/src/Controller/Component/AuthorizationComponent.php b/app/src/Controller/Component/AuthorizationComponent.php
index 21e915b0c..5ba649930 100644
--- a/app/src/Controller/Component/AuthorizationComponent.php
+++ b/app/src/Controller/Component/AuthorizationComponent.php
@@ -30,13 +30,13 @@
namespace App\Controller\Component;
use Cake\Controller\Component;
-use Cake\ORM\TableRegistry;
+use Cake\Datasource\FactoryLocator;
use \App\Lib\Enum\PermissionEnum;
class AuthorizationComponent extends Component {
// Cached copy of permissions, by username
protected $userPermissions = null;
-
+
/**
* Class initializations.
*
@@ -45,8 +45,6 @@ class AuthorizationComponent extends Component {
public function initialize(array $config): void {
parent::initialize($config);
-
- $this->Permissions = TableRegistry::get('Permissions');
}
/**
@@ -70,6 +68,7 @@ protected function getPermissions($username) {
];
// Pull the permissions from the database
+ $this->Permissions = FactoryLocator::get('Table')->get('Permissions');
$perms = $this->Permissions->findForUser($username);
foreach($perms as $mgid => $p) {
diff --git a/app/src/Controller/MatchgridRecordsController.php b/app/src/Controller/MatchgridRecordsController.php
index 28db151d4..72c04d996 100644
--- a/app/src/Controller/MatchgridRecordsController.php
+++ b/app/src/Controller/MatchgridRecordsController.php
@@ -30,7 +30,6 @@
namespace App\Controller;
use Cake\Log\Log;
-use Cake\ORM\TableRegistry;
use Cake\Utility\Hash;
use Cake\Event\EventInterface;
@@ -61,8 +60,7 @@ public function initialize(): void {
// the table. We also can't manually call setMatchgrid() (or really anything)
// since that will trigger the instantiation of the model.
- $Matchgrids = TableRegistry::get('Matchgrids');
- $obj = null;
+ $Matchgrids = $this->getTableLocator()->get('Matchgrids');
// Note we allow matchgrid_id to be asserted by *all* actions, since the
// record ID is specific to the matchgrid.
@@ -73,7 +71,7 @@ public function initialize(): void {
}
// Set the table name and Matchgrid ID for MatchgridRecordsTable
- TableRegistry::getTableLocator()->setConfig('MatchgridRecords', [
+ $this->getTableLocator()->setConfig('MatchgridRecords', [
'table' => $obj->prefixed_table_name,
'matchgrid_id' => $this->request->getQuery('matchgrid_id')
]);
@@ -166,7 +164,7 @@ public function beforeRender(EventInterface $event) {
// Pull the Matchgrid configuration in order to pass the attribute configuration.
// We can almost, but not quite, use autoViewVars for this, since we need the
// attribute grouping to create the full api name.
- $Matchgrids = TableRegistry::get('Matchgrids');
+ $Matchgrids = $this->getTableLocator()->get('Matchgrids');
try {
$mg = $Matchgrids->getMatchgridConfig($this->cur_mg->id);
diff --git a/app/src/Controller/RuleAttributesController.php b/app/src/Controller/RuleAttributesController.php
index cbe510e9f..9fb67e988 100644
--- a/app/src/Controller/RuleAttributesController.php
+++ b/app/src/Controller/RuleAttributesController.php
@@ -34,9 +34,7 @@ class RuleAttributesController extends StandardController {
'order' => [
'Attributes.name' => 'asc'
],
-// 'sortWhitelist' is renamed 'sortableFields' in Cake 4.1
-// 'sortableFields' => [
- 'sortWhitelist' => [
+ 'sortableFields' => [
'Attributes.name'
]
];
diff --git a/app/src/Controller/TierApiController.php b/app/src/Controller/TierApiController.php
index 1d1b80f36..668f48e24 100644
--- a/app/src/Controller/TierApiController.php
+++ b/app/src/Controller/TierApiController.php
@@ -29,8 +29,7 @@
namespace App\Controller;
-use Cake\Mailer\Email;
-use Cake\ORM\TableRegistry;
+use Cake\Mailer\Mailer;
use Cake\Log\Log;
use Cake\Routing\Router;
@@ -179,8 +178,8 @@ protected function doMatchRequest(bool $searchOnly=false) {
$sor = $this->request->getParam('sor');
$sorid = $this->request->getParam('sorid');
// Request attributes are here (json body)
- $json = $this->request->input('json_decode');
-
+ $json = $this->request->getParsedBody();
+
Log::write('debug', $sor . "/" . $sorid . ($searchOnly ? " Search" : " Match") . " request received for matchgrid " . $matchgridId);
try {
@@ -336,7 +335,7 @@ protected function doMatchRequest(bool $searchOnly=false) {
// Pull the SOR configuration
- $SoR = TableRegistry::get('SystemsOfRecord');
+ $SoR = $this->getTableLocator()->get('SystemsOfRecord');
$sorobj = $SoR->find('all')->where(['matchgrid_id' => $matchgridId, 'label' => $sor])->firstOrFail();
@@ -353,7 +352,7 @@ protected function doMatchRequest(bool $searchOnly=false) {
if(!empty($sorobj->notification_email)) {
$notify = $sorobj->notification_email;
} else {
- $MatchgridSettings = TableRegistry::get('MatchgridSettings');
+ $MatchgridSettings = $this->getTableLocator()->get('MatchgridSettings');
$notify = $MatchgridSettings->getNotificationEmail($matchgridId);
}
@@ -364,7 +363,7 @@ protected function doMatchRequest(bool $searchOnly=false) {
$url = "/matchgrids/reconcile/" . $this->cur_mg->id . "?rowid=" . $matchRequest;
- $email = new Email('default');
+ $email = new Mailer('default');
$email->setViewVars([
'vv_matchgrid_id' => $this->cur_mg->id,
'vv_pending_url' => Router::url($url, true)
@@ -372,7 +371,7 @@ protected function doMatchRequest(bool $searchOnly=false) {
$email->viewBuilder()->setTemplate('potential_match');
$email->setEmailFormat('text');
$email->setTo($notify);
- $email->send();
+ $email->deliver();
Log::write('debug', $sor . "/" . $sorid . " Potential match requiring resolution, notification sent to " . $notify);
}
@@ -426,8 +425,8 @@ protected function doMerge(\App\Lib\Match\MatchService $MatchService) {
// Reference ID we want to keep / merge to
$targetId = $this->request->getParam('id');
- $json = $this->request->input('json_decode');
-
+ $json = $this->request->getParsedBody();
+
if($targetId && !empty($json->referenceIds)) {
$MatchService->merge($targetId, $json->referenceIds);
diff --git a/app/src/Lib/Identifier/Sequence.php b/app/src/Lib/Identifier/Sequence.php
index 35c80d3da..1fc48e3b4 100644
--- a/app/src/Lib/Identifier/Sequence.php
+++ b/app/src/Lib/Identifier/Sequence.php
@@ -41,7 +41,7 @@ class Sequence extends ReferenceIdService {
*/
public function generate(\App\Model\Entity\Matchgrid $mgConfig, \ADOConnection $dbc) {
- $MatchgridSettings = \Cake\ORM\TableRegistry::get('MatchgridSettings');
+ $MatchgridSettings = Cake\Datasource\FactoryLocator::get('MatchgridSettings');
// We'll use the matchgrid ID rather than name in the sequence name to avoid
// issues if the matchgrid is renamed for some reason.
diff --git a/app/src/Lib/Match/MatchService.php b/app/src/Lib/Match/MatchService.php
index 41dc18157..c2e23f5eb 100644
--- a/app/src/Lib/Match/MatchService.php
+++ b/app/src/Lib/Match/MatchService.php
@@ -30,7 +30,7 @@
namespace App\Lib\Match;
use Cake\Log\Log;
-use Cake\ORM\TableRegistry;
+use Cake\Datasource\FactoryLocator;
use \App\Lib\Enum\ConfidenceModeEnum;
use \App\Lib\Enum\ReferenceIdEnum;
@@ -104,7 +104,7 @@ public function attachReferenceId(string $sor, string $sorid, AttributeManager $
*/
protected function generateReferenceId() {
- $MatchgridSettings = TableRegistry::get('MatchgridSettings');
+ $MatchgridSettings = FactoryLocator::get('MatchgridSettings');
if($MatchgridSettings->getReferenceIdMethod($this->mgConfig->id) == ReferenceIdEnum::Sequence) {
$IdService = new \App\Lib\Identifier\Sequence;
@@ -553,7 +553,6 @@ protected function search(string $mode,
$attribute = $ruleattr->crosscheck_attribute ?: $ruleattr->attribute;
$attrclause = "";
- $colclause = "";
// The column name
$colclause = $attribute->name;
@@ -774,7 +773,7 @@ public function searchReferenceId(string $sor, string $sorid, AttributeManager $
*/
public function setConfig(int $matchgridId) {
- $Matchgrids = TableRegistry::get('Matchgrids');
+ $Matchgrids = FactoryLocator::get('Table')->get('Matchgrids');
$this->mgConfig = $Matchgrids->findById($matchgridId)
->where(['status' => StatusEnum::Active])
diff --git a/app/src/Lib/Traits/MatchgridLinkTrait.php b/app/src/Lib/Traits/MatchgridLinkTrait.php
index fe6f61231..4de262431 100644
--- a/app/src/Lib/Traits/MatchgridLinkTrait.php
+++ b/app/src/Lib/Traits/MatchgridLinkTrait.php
@@ -29,7 +29,7 @@
namespace App\Lib\Traits;
-use Cake\ORM\TableRegistry;
+use Cake\Datasource\FactoryLocator;
trait MatchgridLinkTrait {
// Does the associated model require a matchgrid ID?
@@ -79,7 +79,7 @@ public function calculateMatchgridId(int $id) {
// Look up $linkAttr to get its Matchgrid. We currently assume only
// one level of nesting.
- $linkTable = TableRegistry::get($this->getPrimaryLinkTableName());
+ $linkTable = FactoryLocator::get($this->getPrimaryLinkTableName());
return $linkTable->calculateMatchgridId($obj->$linkAttr);
}
diff --git a/app/src/Model/Table/ApiUsersTable.php b/app/src/Model/Table/ApiUsersTable.php
index ab9200305..e6400d345 100644
--- a/app/src/Model/Table/ApiUsersTable.php
+++ b/app/src/Model/Table/ApiUsersTable.php
@@ -31,7 +31,7 @@
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
-use Cake\ORM\TableRegistry;
+use Cake\Datasource\FactoryLocator;
use Cake\Validation\Validator;
use \App\Lib\Enum\ResolutionModeEnum;
@@ -122,7 +122,7 @@ public function checkUsername(\App\Model\Entity\ApiUser $entity, array $options)
if($entity->matchgrid_id) {
// This is a Matchgrid API user, so make sure it is prefixed with the matchgrid name
- $matchgrids = TableRegistry::get('Matchgrids');
+ $matchgrids = FactoryLocator::get('Table')->get('Matchgrids');
// This throws Cake\Datasource\Exception\RecordNotFoundException if not found
$matchgrid = $matchgrids->get($entity->matchgrid_id);
diff --git a/app/src/Model/Table/MatchgridRecordsTable.php b/app/src/Model/Table/MatchgridRecordsTable.php
index 7f82b81f7..898e3ba51 100644
--- a/app/src/Model/Table/MatchgridRecordsTable.php
+++ b/app/src/Model/Table/MatchgridRecordsTable.php
@@ -30,7 +30,7 @@
namespace App\Model\Table;
use Cake\ORM\Table;
-use Cake\ORM\TableRegistry;
+use Cake\Datasource\FactoryLocator;
class MatchgridRecordsTable extends Table {
use \App\Lib\Traits\AutoViewVarsTrait;
@@ -67,7 +67,7 @@ public function initialize(array $config): void {
// Use the matchgrid ID to figure out the attribute configuration for
// search filter purposes
- $Matchgrid = TableRegistry::get('Matchgrids');
+ $Matchgrid = FactoryLocator::get('Table')->get('Matchgrids');
$mgconfig = $Matchgrid->getMatchgridConfig($config['matchgrid_id']);
diff --git a/app/vendor/aura/intl/.gitignore b/app/vendor/aura/intl/.gitignore
deleted file mode 100644
index 75d706bcb..000000000
--- a/app/vendor/aura/intl/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/tests/tmp
-/vendor
-/composer.lock
diff --git a/app/vendor/aura/intl/.scrutinizer.yml b/app/vendor/aura/intl/.scrutinizer.yml
deleted file mode 100644
index 7c7c84543..000000000
--- a/app/vendor/aura/intl/.scrutinizer.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-filter:
- paths: ["src/*"]
-tools:
- external_code_coverage: true
- php_code_coverage: true
- php_sim: true
- php_mess_detector: true
- php_pdepend: true
- php_analyzer: true
- php_cpd: true
diff --git a/app/vendor/aura/intl/.travis.yml b/app/vendor/aura/intl/.travis.yml
deleted file mode 100644
index 823c70497..000000000
--- a/app/vendor/aura/intl/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-sudo: false
-language: php
-php:
- - 5.6
- - hhvm
- - 7
-before_script:
- - composer self-update
- - composer install
-script:
- - phpunit --coverage-clover=coverage.clover
-after_script:
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
diff --git a/app/vendor/aura/intl/CHANGELOG.md b/app/vendor/aura/intl/CHANGELOG.md
deleted file mode 100644
index 12e89902c..000000000
--- a/app/vendor/aura/intl/CHANGELOG.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# CHANGELOG
-
-## 3.0.0
-
-- Final release. No changes after first beta.
-
-## 3.0.0-beta1
-
-- Removed `aura/installer-default` from composer.json which was used by aura framework version 1 to install in package folder.
-- Fixes [issue 17](https://github.com/auraphp/Aura.Intl/issues/17) by removing Aura.Di wiring trait tests.
-- Changed directory structure from PSR-0 to PSR-4.
-- Supported PHP version : 5.6+.
-- There is no other BC breaks from 1.x version
-
-
-## 1.1.1
-
-Hygiene release: Composer update.
-
-## 1.1.0
-
-- Merge pull request #11 from lorenzo/feature/format-key. If Translator::translate() cannot translate, it now returns the incoming translation key as the translated message. This makes it easier to use the key as a human readable string, which can contain formatting placeholders. With this feature the developer will be able to see immediate feedback of their translation messages without having to translate to a specific locale beforehand.
-
-## 1.0.1
-
-Hygiene release.
-
-- Merge pull request #10 from harikt/fixdoc; fixes #9, add a test for failure. The expected exception need to be fixed.
-
-- Merge pull request #8 from harikt/v2config, adding v2 config files.
-
-- Merge pull request #7 from harikt/issue6, add a test to show it works. Thank you @samdark.
-
-- Point travis status badge to develop branch
-
-## 1.0.0
-
-- [CHG] When interpolating array values into strings, now converts the array
- to comma-separated values instead of printing 'Array'.
-
-- [DOC] PHP 5.5 appears to be able to format strings with missing token
- replacements; updated tests to account for this.
-
-## 1.0.0-beta2
-
-- [FIX] Multiple typo fixes; thanks, @pborreli.
-
-- [CHG] Use {foo} instead of {:foo} in line with PSR-3 placeholders.
-
-- [NEW] Add a PackageFactory
-
-- [NEW] Add more-detailed exception classes
-
-- [ADD] In config, add 'intl_package_factory' as a service
-
-- [CHG] Throw IcuVersionTooLow Exception if IntlFormatter is instantiated with
- ICU Version lower than 4.8; Skip all IntlFormatter tests if the intl
- extension is not loaded. Thanks, @mapthegod.
-
-- [CHG] In the FormatterLocator, registry entries *must* be wrapped in a
- callable from now on.
-
-
-## 1.0.0-beta1
-
-Initial release.
diff --git a/app/vendor/aura/intl/CONTRIBUTING.md b/app/vendor/aura/intl/CONTRIBUTING.md
deleted file mode 100644
index b68f9b85c..000000000
--- a/app/vendor/aura/intl/CONTRIBUTING.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Contributing
-
-We are happy to review any contributions you want to make. When contributing, please follow the rules outlined at {:context}
-
-
-
-
-
+
+
+
@@ -41,6 +39,8 @@ a starting point. For existing applications you can run the following:
$ composer require cakephp/cakephp
```
+For details on the (minimum/maximum) PHP version see [version map](https://github.com/cakephp/cakephp/wiki#version-map).
+
## Running Tests
Assuming you have PHPUnit installed system wide using one of the methods stated
@@ -68,6 +68,7 @@ tests for CakePHP by doing the following:
## Get Support!
* [Slack](https://cakesf.herokuapp.com/) - Join us on Slack.
+* [Discord](https://discord.gg/k4trEMPebj) - Join us on Discord.
* [#cakephp](https://webchat.freenode.net/?channels=#cakephp) on irc.freenode.net - Come chat with us, we have cake.
* [Forum](https://discourse.cakephp.org/) - Official CakePHP forum.
* [GitHub Issues](https://github.com/cakephp/cakephp/issues) - Got issues? Please tell us!
diff --git a/app/vendor/cakephp/cakephp/SECURITY.md b/app/vendor/cakephp/cakephp/SECURITY.md
index fed257e9e..551efc470 100644
--- a/app/vendor/cakephp/cakephp/SECURITY.md
+++ b/app/vendor/cakephp/cakephp/SECURITY.md
@@ -4,13 +4,12 @@
We support fixing security issues on the following releases:
-| Version | Supported |
-| ------- | ------------------ |
-| 4.0.x | :white_check_mark: |
-| 3.8.x | :white_check_mark: |
-| 3.7.x | :white_check_mark: |
-| <= 3.6 | :x: |
-| 2.10.x | :white_check_mark: |
+| Version | Supported | Security fixes until
+| ------- | ------------------ | --------------------
+| 4.x | :white_check_mark: |
+| 3.10.x | :white_check_mark: | 15th December 2022 (36 months after 4.0.0)
+| <= 3.9 | :x: |
+| 2.10.x | :x: | 15th June 2021 (18 months after 4.0.0)
| <= 2.9 | :x: |
## Reporting a Vulnerability
diff --git a/app/vendor/cakephp/cakephp/VERSION.txt b/app/vendor/cakephp/cakephp/VERSION.txt
index c4bcf7458..741c5af23 100644
--- a/app/vendor/cakephp/cakephp/VERSION.txt
+++ b/app/vendor/cakephp/cakephp/VERSION.txt
@@ -16,4 +16,4 @@
// @license https://opensource.org/licenses/mit-license.php MIT License
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
-4.0.10
+4.2.10
diff --git a/app/vendor/cakephp/cakephp/composer.json b/app/vendor/cakephp/cakephp/composer.json
index e89f5c60f..2575cda2d 100644
--- a/app/vendor/cakephp/cakephp/composer.json
+++ b/app/vendor/cakephp/cakephp/composer.json
@@ -1,7 +1,7 @@
{
"name": "cakephp/cakephp",
- "description": "The CakePHP framework",
"type": "library",
+ "description": "The CakePHP framework",
"keywords": [
"framework",
"mvc",
@@ -21,39 +21,54 @@
"homepage": "https://github.com/cakephp/cakephp/graphs/contributors"
}
],
- "support": {
- "issues": "https://github.com/cakephp/cakephp/issues",
- "forum": "https://stackoverflow.com/tags/cakephp",
- "irc": "irc://irc.freenode.org/cakephp",
- "source": "https://github.com/cakephp/cakephp"
- },
"require": {
"php": ">=7.2.0",
- "ext-json": "*",
"ext-intl": "*",
+ "ext-json": "*",
"ext-mbstring": "*",
- "aura/intl": "^3.0.0",
"cakephp/chronos": "^2.0",
"composer/ca-bundle": "^1.2",
"laminas/laminas-diactoros": "^2.2.2",
"laminas/laminas-httphandlerrunner": "^1.1",
+ "league/container": "^3.2",
"psr/http-client": "^1.0",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0",
"psr/log": "^1.0.0",
"psr/simple-cache": "^1.0.0"
},
- "suggest": {
- "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.",
- "ext-curl": "To enable more efficient network calls in Http\\Client.",
- "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()",
- "paragonie/csp-builder": "CSP builder, to use the CSP Middleware"
+ "replace": {
+ "cakephp/cache": "self.version",
+ "cakephp/collection": "self.version",
+ "cakephp/console": "self.version",
+ "cakephp/core": "self.version",
+ "cakephp/database": "self.version",
+ "cakephp/datasource": "self.version",
+ "cakephp/event": "self.version",
+ "cakephp/filesystem": "self.version",
+ "cakephp/form": "self.version",
+ "cakephp/http": "self.version",
+ "cakephp/i18n": "self.version",
+ "cakephp/log": "self.version",
+ "cakephp/orm": "self.version",
+ "cakephp/utility": "self.version",
+ "cakephp/validation": "self.version"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "^4.0",
"mikey179/vfsstream": "^1.6",
"paragonie/csp-builder": "^2.3",
- "phpunit/phpunit": "~8.5.0"
+ "phpunit/phpunit": "^8.5 || ^9.3"
+ },
+ "suggest": {
+ "ext-curl": "To enable more efficient network calls in Http\\Client.",
+ "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.",
+ "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()",
+ "paragonie/csp-builder": "CSP builder, to use the CSP Middleware"
+ },
+ "config": {
+ "process-timeout": 900,
+ "sort-packages": true
},
"autoload": {
"psr-4": {
@@ -63,6 +78,7 @@
"src/Core/functions.php",
"src/Collection/functions.php",
"src/I18n/functions.php",
+ "src/Routing/functions.php",
"src/Utility/bootstrap.php"
]
},
@@ -79,23 +95,6 @@
"ParentPlugin\\": "tests/test_app/Plugin/ParentPlugin/src/"
}
},
- "replace": {
- "cakephp/cache": "self.version",
- "cakephp/collection": "self.version",
- "cakephp/console": "self.version",
- "cakephp/core": "self.version",
- "cakephp/datasource": "self.version",
- "cakephp/database": "self.version",
- "cakephp/event": "self.version",
- "cakephp/filesystem": "self.version",
- "cakephp/form": "self.version",
- "cakephp/http": "self.version",
- "cakephp/i18n": "self.version",
- "cakephp/log": "self.version",
- "cakephp/orm": "self.version",
- "cakephp/utility": "self.version",
- "cakephp/validation": "self.version"
- },
"scripts": {
"check": [
"@cs-check",
@@ -103,18 +102,20 @@
],
"cs-check": "phpcs --colors --parallel=16 -p src/ tests/",
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
- "test": "phpunit",
- "test-coverage": "phpunit --coverage-clover=clover.xml",
"phpstan": "phpstan.phar analyse",
"psalm": "psalm.phar --show-info=false",
"stan": [
"@phpstan",
"@psalm"
],
- "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 psalm/phar:~3.11.2 && mv composer.backup composer.json"
+ "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.94 psalm/phar:~4.9.3 && mv composer.backup composer.json",
+ "test": "phpunit",
+ "test-coverage": "phpunit --coverage-clover=clover.xml"
},
- "config": {
- "sort-packages": true,
- "process-timeout": 900
+ "support": {
+ "issues": "https://github.com/cakephp/cakephp/issues",
+ "forum": "https://stackoverflow.com/tags/cakephp",
+ "irc": "irc://irc.freenode.org/cakephp",
+ "source": "https://github.com/cakephp/cakephp"
}
}
diff --git a/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php b/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php
index 8e0b62065..a09d438a5 100644
--- a/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php
+++ b/app/vendor/cakephp/cakephp/src/Auth/BasicAuthenticate.php
@@ -89,13 +89,13 @@ public function getUser(ServerRequest $request)
*
* @param \Cake\Http\ServerRequest $request A request object.
* @param \Cake\Http\Response $response A response object.
- * @return void
+ * @return \Cake\Http\Response|null|void
* @throws \Cake\Http\Exception\UnauthorizedException
*/
public function unauthenticated(ServerRequest $request, Response $response)
{
$unauthorizedException = new UnauthorizedException();
- $unauthorizedException->responseHeader($this->loginHeaders($request));
+ $unauthorizedException->setHeaders($this->loginHeaders($request));
throw $unauthorizedException;
}
diff --git a/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php b/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php
index 89a9e05b5..58355ba78 100644
--- a/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php
+++ b/app/vendor/cakephp/cakephp/src/Auth/ControllerAuthorize.php
@@ -18,7 +18,7 @@
use Cake\Controller\ComponentRegistry;
use Cake\Controller\Controller;
-use Cake\Core\Exception\Exception;
+use Cake\Core\Exception\CakeException;
use Cake\Http\ServerRequest;
/**
@@ -80,13 +80,13 @@ public function controller(?Controller $controller = null): Controller
*
* @param array|\ArrayAccess $user Active user data
* @param \Cake\Http\ServerRequest $request Request instance.
- * @throws \Cake\Core\Exception\Exception If controller does not have method `isAuthorized()`.
+ * @throws \Cake\Core\Exception\CakeException If controller does not have method `isAuthorized()`.
* @return bool
*/
public function authorize($user, ServerRequest $request): bool
{
if (!method_exists($this->_Controller, 'isAuthorized')) {
- throw new Exception(sprintf(
+ throw new CakeException(sprintf(
'%s does not implement an isAuthorized() method.',
get_class($this->_Controller)
));
diff --git a/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php b/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php
index 738c79029..b5ecda934 100644
--- a/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php
+++ b/app/vendor/cakephp/cakephp/src/Auth/DigestAuthenticate.php
@@ -123,7 +123,12 @@ public function getUser(ServerRequest $request)
$password = $user[$field];
unset($user[$field]);
- $hash = $this->generateResponseHash($digest, $password, (string)$request->getEnv('ORIGINAL_REQUEST_METHOD'));
+ $requestMethod = $request->getEnv('ORIGINAL_REQUEST_METHOD') ?: $request->getMethod();
+ $hash = $this->generateResponseHash(
+ $digest,
+ $password,
+ (string)$requestMethod
+ );
if (hash_equals($hash, $digest['response'])) {
return $user;
}
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Cache.php b/app/vendor/cakephp/cakephp/src/Cache/Cache.php
index 417d8a6ec..56a9c34da 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Cache.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Cache.php
@@ -68,7 +68,7 @@ class Cache
use StaticConfigTrait;
/**
- * An array mapping url schemes to fully qualified caching engine
+ * An array mapping URL schemes to fully qualified caching engine
* class names.
*
* @var string[]
@@ -206,6 +206,8 @@ protected static function _buildEngine(string $name): void
*/
public static function engine(string $config)
{
+ deprecationWarning('Cache::engine() is deprecated. Use Cache::pool() instead.');
+
return static::pool($config);
}
@@ -568,7 +570,7 @@ public static function enabled(): bool
*
* ```
* $results = Cache::remember('all_articles', function () {
- * return $this->find('all');
+ * return $this->find('all')->toArray();
* });
* ```
*
@@ -577,9 +579,8 @@ public static function enabled(): bool
* the cache key is empty. Can be any callable type supported by your PHP.
* @param string $config The cache configuration to use for this operation.
* Defaults to default.
- * @return mixed If the key is found: the cached data, false if the data
- * missing/expired, or an error. If the key is not found: boolean of the
- * success of the write
+ * @return mixed If the key is found: the cached data.
+ * If the key is not found the value returned by the callable.
*/
public static function remember(string $key, callable $callable, string $config = 'default')
{
@@ -587,7 +588,7 @@ public static function remember(string $key, callable $callable, string $config
if ($existing !== null) {
return $existing;
}
- $results = call_user_func($callable);
+ $results = $callable();
self::write($key, $results, $config);
return $results;
diff --git a/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php b/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php
index 2ece9ebcd..56db69536 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php
@@ -342,7 +342,7 @@ protected function _key($key): string
if ($this->_groupPrefix) {
$prefix = md5(implode('_', $this->groups()));
}
- $key = preg_replace('/[\s]+/', '_', (string)$key);
+ $key = preg_replace('/[\s]+/', '_', $key);
return $this->_config['prefix'] . $prefix . $key;
}
diff --git a/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php b/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php
index 0b8c9cf63..fb6d0ab06 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/CacheRegistry.php
@@ -87,7 +87,10 @@ protected function _create($class, string $alias, array $config): CacheEngine
if (!$instance->init($config)) {
throw new RuntimeException(
- sprintf('Cache engine %s is not properly configured.', get_class($instance))
+ sprintf(
+ 'Cache engine %s is not properly configured. Check error log for additional information.',
+ get_class($instance)
+ )
);
}
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php
index 14d1f111a..170ea4a43 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/ApcuEngine.php
@@ -18,6 +18,7 @@
use APCUIterator;
use Cake\Cache\CacheEngine;
+use RuntimeException;
/**
* APCu storage engine for cache
@@ -43,7 +44,7 @@ class ApcuEngine extends CacheEngine
public function init(array $config = []): bool
{
if (!extension_loaded('apcu')) {
- return false;
+ throw new RuntimeException('The `apcu` extension must be enabled to use ApcuEngine.');
}
return parent::init($config);
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php
index 0c89c2e21..c33608204 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/ArrayEngine.php
@@ -43,17 +43,17 @@ class ArrayEngine extends CacheEngine
* Write data for key into cache
*
* @param string $key Identifier for the data
- * @param mixed $data Data to be cached
+ * @param mixed $value Data to be cached
* @param \DateInterval|int|null $ttl Optional. The TTL value of this item. If no value is sent and
* the driver supports TTL then the library may set a default value
* for it or let the driver take care of that.
* @return bool True on success and false on failure.
*/
- public function set($key, $data, $ttl = null): bool
+ public function set($key, $value, $ttl = null): bool
{
$key = $this->_key($key);
$expires = time() + $this->duration($ttl);
- $this->data[$key] = ['exp' => $expires, 'val' => $data];
+ $this->data[$key] = ['exp' => $expires, 'val' => $value];
return true;
}
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php
index f8447a036..22ec33ce0 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php
@@ -105,15 +105,15 @@ public function init(array $config = []): bool
* Write data for key into cache
*
* @param string $key Identifier for the data
- * @param mixed $data Data to be cached
+ * @param mixed $value Data to be cached
* @param \DateInterval|int|null $ttl Optional. The TTL value of this item. If no value is sent and
* the driver supports TTL then the library may set a default value
* for it or let the driver take care of that.
* @return bool True on success and false on failure.
*/
- public function set($key, $data, $ttl = null): bool
+ public function set($key, $value, $ttl = null): bool
{
- if ($data === '' || !$this->_init) {
+ if ($value === '' || !$this->_init) {
return false;
}
@@ -124,11 +124,11 @@ public function set($key, $data, $ttl = null): bool
}
if (!empty($this->_config['serialize'])) {
- $data = serialize($data);
+ $value = serialize($value);
}
$expires = time() + $this->duration($ttl);
- $contents = implode([$expires, PHP_EOL, $data, PHP_EOL]);
+ $contents = implode([$expires, PHP_EOL, $value, PHP_EOL]);
if ($this->_config['lock']) {
/** @psalm-suppress PossiblyNullReference */
@@ -198,7 +198,7 @@ public function get($key, $default = null)
$data = trim($data);
if ($data !== '' && !empty($this->_config['serialize'])) {
- $data = unserialize((string)$data);
+ $data = unserialize($data);
}
return $data;
@@ -251,18 +251,33 @@ public function clear(): bool
RecursiveIteratorIterator::SELF_FIRST
);
$cleared = [];
- foreach ($contents as $path) {
- if ($path->isFile()) {
+ /** @var \SplFileInfo $fileInfo */
+ foreach ($contents as $fileInfo) {
+ if ($fileInfo->isFile()) {
+ unset($fileInfo);
continue;
}
- $path = $path->getRealPath() . DIRECTORY_SEPARATOR;
+ $realPath = $fileInfo->getRealPath();
+ if (!$realPath) {
+ unset($fileInfo);
+ continue;
+ }
+
+ $path = $realPath . DIRECTORY_SEPARATOR;
if (!in_array($path, $cleared, true)) {
$this->_clearDirectory($path);
$cleared[] = $path;
}
+
+ // possible inner iterators need to be unset too in order for locks on parents to be released
+ unset($fileInfo);
}
+ // unsetting iterators helps releasing possible locks in certain environments,
+ // which could otherwise make `rmdir()` fail
+ unset($directory, $contents);
+
return true;
}
@@ -365,7 +380,7 @@ protected function _setKey(string $key, bool $createKey = false): bool
$this->_File->getBasename() !== $key ||
$this->_File->valid() === false
) {
- $exists = file_exists($path->getPathname());
+ $exists = is_file($path->getPathname());
try {
$this->_File = $path->openFile('c+');
} catch (Exception $e) {
@@ -477,6 +492,10 @@ function (SplFileInfo $current) use ($group, $prefix) {
@unlink($path);
}
+ // unsetting iterators helps releasing possible locks in certain environments,
+ // which could otherwise make `rmdir()` fail
+ unset($directoryIterator, $contents, $filtered);
+
return true;
}
}
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php
index 6c3f8878a..781c4cfc7 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php
@@ -19,6 +19,7 @@
use Cake\Cache\CacheEngine;
use InvalidArgumentException;
use Memcached;
+use RuntimeException;
/**
* Memcached storage engine for cache. Memcached has some limitations in the amount of
@@ -51,8 +52,8 @@ class MemcachedEngine extends CacheEngine
* the same persistent value will share a single underlying connection.
* - `prefix` Prepended to all entries. Good for when you need to share a keyspace
* with either another cache config or another application.
- * - `serialize` The serializer engine used to serialize data. Available engines are php,
- * igbinary and json. Beside php, the memcached extension must be compiled with the
+ * - `serialize` The serializer engine used to serialize data. Available engines are 'php',
+ * 'igbinary' and 'json'. Beside 'php', the memcached extension must be compiled with the
* appropriate serializer support.
* - `servers` String or array of memcached servers. If an array MemcacheEngine will use
* them as a pool.
@@ -79,7 +80,7 @@ class MemcachedEngine extends CacheEngine
/**
* List of available serializer engines
*
- * Memcached must be compiled with json and igbinary support to use these engines
+ * Memcached must be compiled with JSON and igbinary support to use these engines
*
* @var array
*/
@@ -103,7 +104,7 @@ class MemcachedEngine extends CacheEngine
public function init(array $config = []): bool
{
if (!extension_loaded('memcached')) {
- return false;
+ throw new RuntimeException('The `memcached` extension must be enabled to use MemcachedEngine.');
}
$this->_serializers = [
@@ -133,6 +134,7 @@ public function init(array $config = []): bool
$this->_config['servers'] = [$this->_config['servers']];
}
+ /** @psalm-suppress RedundantPropertyInitializationCheck */
if (isset($this->_Memcached)) {
return true;
}
@@ -144,7 +146,20 @@ public function init(array $config = []): bool
}
$this->_setOptions();
- if (count($this->_Memcached->getServerList())) {
+ $serverList = $this->_Memcached->getServerList();
+ if ($serverList) {
+ if ($this->_Memcached->isPersistent()) {
+ foreach ($serverList as $server) {
+ if (!in_array($server['host'] . ':' . $server['port'], $this->_config['servers'], true)) {
+ throw new InvalidArgumentException(
+ 'Invalid cache configuration. Multiple persistent cache configurations are detected' .
+ ' with different `servers` values. `servers` values for persistent cache configurations' .
+ ' must be the same when using the same persistence id.'
+ );
+ }
+ }
+ }
+
return true;
}
@@ -301,21 +316,21 @@ public function set($key, $value, $ttl = null): bool
/**
* Write many cache entries to the cache at once
*
- * @param iterable $data An array of data to be stored in the cache
+ * @param iterable $values An array of data to be stored in the cache
* @param \DateInterval|int|null $ttl Optional. The TTL value of this item. If no value is sent and
* the driver supports TTL then the library may set a default value
* for it or let the driver take care of that.
* @return bool Whether the write was successful or not.
*/
- public function setMultiple($data, $ttl = null): bool
+ public function setMultiple($values, $ttl = null): bool
{
$cacheData = [];
- foreach ($data as $key => $value) {
+ foreach ($values as $key => $value) {
$cacheData[$this->_key($key)] = $value;
}
$duration = $this->duration($ttl);
- return (bool)$this->_Memcached->setMulti($cacheData, $duration);
+ return $this->_Memcached->setMulti($cacheData, $duration);
}
/**
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php
index 665863c2f..1eeed8cad 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/RedisEngine.php
@@ -18,8 +18,10 @@
namespace Cake\Cache\Engine;
use Cake\Cache\CacheEngine;
+use Cake\Log\Log;
use Redis;
use RedisException;
+use RuntimeException;
/**
* Redis storage engine for cache.
@@ -45,7 +47,7 @@ class RedisEngine extends CacheEngine
* - `port` port number to the Redis server.
* - `prefix` Prefix appended to all entries. Good for when you need to share a keyspace
* with either another cache config or another application.
- * - `server` URL or ip to the Redis server host.
+ * - `server` URL or IP to the Redis server host.
* - `timeout` timeout in seconds (float).
* - `unix_socket` Path to the unix socket file (default: false)
*
@@ -76,7 +78,7 @@ class RedisEngine extends CacheEngine
public function init(array $config = []): bool
{
if (!extension_loaded('redis')) {
- return false;
+ throw new RuntimeException('The `redis` extension must be enabled to use RedisEngine.');
}
if (!empty($config['host'])) {
@@ -115,6 +117,10 @@ protected function _connect(): bool
);
}
} catch (RedisException $e) {
+ if (class_exists(Log::class)) {
+ Log::error('RedisEngine could not connect. Got error: ' . $e->getMessage());
+ }
+
return false;
}
if ($return && $this->_config['password']) {
@@ -180,7 +186,7 @@ public function increment(string $key, int $offset = 1)
$duration = $this->_config['duration'];
$key = $this->_key($key);
- $value = (int)$this->_Redis->incrBy($key, $offset);
+ $value = $this->_Redis->incrBy($key, $offset);
if ($duration > 0) {
$this->_Redis->expire($key, $duration);
}
@@ -200,7 +206,7 @@ public function decrement(string $key, int $offset = 1)
$duration = $this->_config['duration'];
$key = $this->_key($key);
- $value = (int)$this->_Redis->decrBy($key, $offset);
+ $value = $this->_Redis->decrBy($key, $offset);
if ($duration > 0) {
$this->_Redis->expire($key, $duration);
}
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php
index de6b34834..9d9e36eb6 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/WincacheEngine.php
@@ -17,6 +17,7 @@
namespace Cake\Cache\Engine;
use Cake\Cache\CacheEngine;
+use RuntimeException;
/**
* Wincache storage engine for cache
@@ -44,7 +45,7 @@ class WincacheEngine extends CacheEngine
public function init(array $config = []): bool
{
if (!extension_loaded('wincache')) {
- return false;
+ throw new RuntimeException('The `wincache` extension must be enabled to use WincacheEngine.');
}
parent::init($config);
diff --git a/app/vendor/cakephp/cakephp/src/Cache/InvalidArgumentException.php b/app/vendor/cakephp/cakephp/src/Cache/InvalidArgumentException.php
index 69450c9cf..c44a45808 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/InvalidArgumentException.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/InvalidArgumentException.php
@@ -16,12 +16,12 @@
*/
namespace Cake\Cache;
-use Cake\Core\Exception\Exception;
+use Cake\Core\Exception\CakeException;
use Psr\SimpleCache\InvalidArgumentException as InvalidArgumentInterface;
/**
* Exception raised when cache keys are invalid.
*/
-class InvalidArgumentException extends Exception implements InvalidArgumentInterface
+class InvalidArgumentException extends CakeException implements InvalidArgumentInterface
{
}
diff --git a/app/vendor/cakephp/cakephp/src/Cache/README.md b/app/vendor/cakephp/cakephp/src/Cache/README.md
index 7e3d6c743..5f2c078bd 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/README.md
+++ b/app/vendor/cakephp/cakephp/src/Cache/README.md
@@ -39,7 +39,7 @@ $object = new FileEngine($config);
Cache::config('other', $object);
```
-You can now read a write from the cache:
+You can now read and write from the cache:
```php
$data = Cache::remember('my_cache_key', function () {
diff --git a/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php b/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php
index d1d4467cb..986e63976 100644
--- a/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php
+++ b/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php
@@ -28,9 +28,7 @@
interface CollectionInterface extends Iterator, JsonSerializable
{
/**
- * Executes the passed callable for each of the elements in this collection
- * and passes both the value and key for them on each step.
- * Returns the same collection for chaining.
+ * Applies a callback to the elements in this collection.
*
* ### Example:
*
@@ -40,11 +38,10 @@ interface CollectionInterface extends Iterator, JsonSerializable
* });
* ```
*
- * @param callable $c callable function that will receive each of the elements
- * in this collection
+ * @param callable $callback Callback to run for each element in collection.
* @return $this
*/
- public function each(callable $c);
+ public function each(callable $callback);
/**
* Looks through each value in the collection, and returns another collection with
@@ -66,12 +63,12 @@ public function each(callable $c);
* });
* ```
*
- * @param callable|null $c the method that will receive each of the elements and
+ * @param callable|null $callback the method that will receive each of the elements and
* returns true whether or not they should be in the resulting collection.
* If left null, a callback that filters out falsey values will be used.
* @return self
*/
- public function filter(?callable $c = null): CollectionInterface;
+ public function filter(?callable $callback = null): CollectionInterface;
/**
* Looks through each value in the collection, and returns another collection with
@@ -92,11 +89,11 @@ public function filter(?callable $c = null): CollectionInterface;
* });
* ```
*
- * @param callable $c the method that will receive each of the elements and
+ * @param callable $callback the method that will receive each of the elements and
* returns true whether or not they should be out of the resulting collection.
* @return self
*/
- public function reject(callable $c): CollectionInterface;
+ public function reject(callable $callback): CollectionInterface;
/**
* Returns true if all values in this collection pass the truth test provided
@@ -116,11 +113,11 @@ public function reject(callable $c): CollectionInterface;
*
* Empty collections always return true because it is a vacuous truth.
*
- * @param callable $c a callback function
+ * @param callable $callback a callback function
* @return bool true if for all elements in this collection the provided
* callback returns true, false otherwise.
*/
- public function every(callable $c): bool;
+ public function every(callable $callback): bool;
/**
* Returns true if any of the values in this collection pass the truth test
@@ -138,11 +135,11 @@ public function every(callable $c): bool;
* });
* ```
*
- * @param callable $c a callback function
+ * @param callable $callback a callback function
* @return bool true if the provided callback returns true for any element in this
* collection, false otherwise
*/
- public function some(callable $c): bool;
+ public function some(callable $callback): bool;
/**
* Returns true if $value is present in this collection. Comparisons are made
@@ -171,11 +168,11 @@ public function contains($value): bool;
* });
* ```
*
- * @param callable $c the method that will receive each of the elements and
+ * @param callable $callback the method that will receive each of the elements and
* returns the new value for the key that is being iterated
* @return self
*/
- public function map(callable $c): CollectionInterface;
+ public function map(callable $callback): CollectionInterface;
/**
* Folds the values in this collection to a single value, as the result of
@@ -185,15 +182,15 @@ public function map(callable $c): CollectionInterface;
* If $zero is omitted the first value of the collection will be used in its place
* and reduction will start from the second item.
*
- * @param callable $c The callback function to be called
- * @param mixed $zero The state of reduction
+ * @param callable $callback The callback function to be called
+ * @param mixed $initial The state of reduction
* @return mixed
*/
- public function reduce(callable $c, $zero = null);
+ public function reduce(callable $callback, $initial = null);
/**
* Returns a new collection containing the column or property value found in each
- * of the elements, as requested in the $matcher param.
+ * of the elements.
*
* The matcher can be a string with a property name to extract or a dot separated
* path of properties that should be followed to get the last one in the path.
@@ -229,16 +226,16 @@ public function reduce(callable $c, $zero = null);
* [1, 2, 3, 4]
* ```
*
- * @param string|callable $matcher A dot separated path of column to follow
+ * @param string|callable $path A dot separated path of column to follow
* so that the final one can be returned or a callable that will take care
* of doing that.
* @return self
*/
- public function extract($matcher): CollectionInterface;
+ public function extract($path): CollectionInterface;
/**
* Returns the top element in this collection after being sorted by a property.
- * Check the sortBy method for information on the callback and $type parameters
+ * Check the sortBy method for information on the callback and $sort parameters
*
* ### Examples:
*
@@ -254,17 +251,17 @@ public function extract($matcher): CollectionInterface;
* echo $max->name;
* ```
*
- * @param callable|string $callback the callback or column name to use for sorting
- * @param int $type the type of comparison to perform, either SORT_STRING
+ * @param callable|string $path The column name to use for sorting or callback that returns the value.
+ * @param int $sort The sort type, one of SORT_STRING
* SORT_NUMERIC or SORT_NATURAL
* @see \Cake\Collection\CollectionInterface::sortBy()
* @return mixed The value of the top element in the collection
*/
- public function max($callback, int $type = \SORT_NUMERIC);
+ public function max($path, int $sort = \SORT_NUMERIC);
/**
* Returns the bottom element in this collection after being sorted by a property.
- * Check the sortBy method for information on the callback and $type parameters
+ * Check the sortBy method for information on the callback and $sort parameters
*
* ### Examples:
*
@@ -280,16 +277,16 @@ public function max($callback, int $type = \SORT_NUMERIC);
* echo $min->name;
* ```
*
- * @param callable|string $callback the callback or column name to use for sorting
- * @param int $type the type of comparison to perform, either SORT_STRING
+ * @param callable|string $path The column name to use for sorting or callback that returns the value.
+ * @param int $sort The sort type, one of SORT_STRING
* SORT_NUMERIC or SORT_NATURAL
* @see \Cake\Collection\CollectionInterface::sortBy()
* @return mixed The value of the bottom element in the collection
*/
- public function min($callback, int $type = \SORT_NUMERIC);
+ public function min($path, int $sort = \SORT_NUMERIC);
/**
- * Returns the average of all the values extracted with $matcher
+ * Returns the average of all the values extracted with $path
* or of this collection.
*
* ### Example:
@@ -308,15 +305,18 @@ public function min($callback, int $type = \SORT_NUMERIC);
* // Total: 2
* ```
*
- * @param string|callable|null $matcher The property name to sum or a function
+ * The average of an empty set or 0 rows is `null`. Collections with `null`
+ * values are not considered empty.
+ *
+ * @param string|callable|null $path The property name to sum or a function
* If no value is passed, an identity function will be used.
* that will return the value of the property to sum.
* @return float|int|null
*/
- public function avg($matcher = null);
+ public function avg($path = null);
/**
- * Returns the median of all the values extracted with $matcher
+ * Returns the median of all the values extracted with $path
* or of this collection.
*
* ### Example:
@@ -338,12 +338,15 @@ public function avg($matcher = null);
* // Total: 2.5
* ```
*
- * @param string|callable|null $matcher The property name to sum or a function
+ * The median of an empty set or 0 rows is `null`. Collections with `null`
+ * values are not considered empty.
+ *
+ * @param string|callable|null $path The property name to sum or a function
* If no value is passed, an identity function will be used.
* that will return the value of the property to sum.
* @return float|int|null
*/
- public function median($matcher = null);
+ public function median($path = null);
/**
* Returns a sorted iterator out of the elements in this collection,
@@ -375,13 +378,13 @@ public function median($matcher = null);
* }
* ```
*
- * @param callable|string $callback the callback or column name to use for sorting
- * @param int $dir either SORT_DESC or SORT_ASC
- * @param int $type the type of comparison to perform, either SORT_STRING
+ * @param callable|string $path The column name to use for sorting or callback that returns the value.
+ * @param int $order The sort order, either SORT_DESC or SORT_ASC
+ * @param int $sort The sort type, one of SORT_STRING
* SORT_NUMERIC or SORT_NATURAL
* @return self
*/
- public function sortBy($callback, int $dir = SORT_DESC, int $type = \SORT_NUMERIC): CollectionInterface;
+ public function sortBy($path, int $order = SORT_DESC, int $sort = \SORT_NUMERIC): CollectionInterface;
/**
* Splits a collection into sets, grouped by the result of running each value
@@ -420,11 +423,11 @@ public function sortBy($callback, int $dir = SORT_DESC, int $type = \SORT_NUMERI
* ];
* ```
*
- * @param callable|string $callback the callback or column name to use for grouping
+ * @param callable|string $path The column name to use for grouping or callback that returns the value.
* or a function returning the grouping key out of the provided element
* @return self
*/
- public function groupBy($callback): CollectionInterface;
+ public function groupBy($path): CollectionInterface;
/**
* Given a list and a callback function that returns a key for each element
@@ -459,11 +462,11 @@ public function groupBy($callback): CollectionInterface;
* ];
* ```
*
- * @param callable|string $callback the callback or column name to use for indexing
+ * @param callable|string $path The column name to use for indexing or callback that returns the value.
* or a function returning the indexing key out of the provided element
* @return self
*/
- public function indexBy($callback): CollectionInterface;
+ public function indexBy($path): CollectionInterface;
/**
* Sorts a list into groups and returns a count for the number of elements
@@ -497,11 +500,11 @@ public function indexBy($callback): CollectionInterface;
* ];
* ```
*
- * @param callable|string $callback the callback or column name to use for indexing
+ * @param callable|string $path The column name to use for indexing or callback that returns the value.
* or a function returning the indexing key out of the provided element
* @return self
*/
- public function countBy($callback): CollectionInterface;
+ public function countBy($path): CollectionInterface;
/**
* Returns the total sum of all the values extracted with $matcher
@@ -523,12 +526,12 @@ public function countBy($callback): CollectionInterface;
* // Total: 6
* ```
*
- * @param string|callable|null $matcher The property name to sum or a function
+ * @param string|callable|null $path The property name to sum or a function
* If no value is passed, an identity function will be used.
* that will return the value of the property to sum.
* @return float|int
*/
- public function sumOf($matcher = null);
+ public function sumOf($path = null);
/**
* Returns a new collection with the elements placed in a random order,
@@ -542,23 +545,23 @@ public function shuffle(): CollectionInterface;
* Returns a new collection with maximum $size random elements
* from this collection
*
- * @param int $size the maximum number of elements to randomly
+ * @param int $length the maximum number of elements to randomly
* take from this collection
* @return self
*/
- public function sample(int $size = 10): CollectionInterface;
+ public function sample(int $length = 10): CollectionInterface;
/**
* Returns a new collection with maximum $size elements in the internal
* order this collection was created. If a second parameter is passed, it
* will determine from what position to start taking elements.
*
- * @param int $size the maximum number of elements to take from
+ * @param int $length the maximum number of elements to take from
* this collection
- * @param int $from A positional offset from where to take the elements
+ * @param int $offset A positional offset from where to take the elements
* @return self
*/
- public function take(int $size = 1, int $from = 0): CollectionInterface;
+ public function take(int $length = 1, int $offset = 0): CollectionInterface;
/**
* Returns the last N elements of a collection
@@ -574,19 +577,19 @@ public function take(int $size = 1, int $from = 0): CollectionInterface;
* [3, 4, 5];
* ```
*
- * @param int $howMany The number of elements at the end of the collection
+ * @param int $length The number of elements at the end of the collection
* @return self
*/
- public function takeLast(int $howMany): CollectionInterface;
+ public function takeLast(int $length): CollectionInterface;
/**
* Returns a new collection that will skip the specified amount of elements
* at the beginning of the iteration.
*
- * @param int $howMany The number of elements to skip.
+ * @param int $length The number of elements to skip.
* @return self
*/
- public function skip(int $howMany): CollectionInterface;
+ public function skip(int $length): CollectionInterface;
/**
* Looks through each value in the list, returning a Collection of all the
@@ -789,7 +792,8 @@ public function toArray(bool $preserveKeys = true): array;
public function toList(): array;
/**
- * Convert a result set into JSON.
+ * Returns the data that can be converted to JSON. This returns the same data
+ * as `toArray()` which contains only unique keys.
*
* Part of JsonSerializable interface.
*
@@ -886,12 +890,12 @@ public function buffered(): CollectionInterface;
* $flattenedIds = $collection->listNested()->extract('id'); // Yields [1, 2, 3, 4, 5]
* ```
*
- * @param string|int $dir The direction in which to return the elements
+ * @param string|int $order The order in which to return the elements
* @param string|callable $nestingKey The key name under which children are nested
* or a callable function that will return the children list
* @return self
*/
- public function listNested($dir = 'desc', $nestingKey = 'children'): CollectionInterface;
+ public function listNested($order = 'desc', $nestingKey = 'children'): CollectionInterface;
/**
* Creates a new collection that when iterated will stop yielding results if
@@ -957,11 +961,11 @@ public function stopWhen($condition): CollectionInterface;
* });
* ```
*
- * @param callable|null $transformer A callable function that will receive each of
+ * @param callable|null $callback A callable function that will receive each of
* the items in the collection and should return an array or Traversable object
* @return self
*/
- public function unfold(?callable $transformer = null): CollectionInterface;
+ public function unfold(?callable $callback = null): CollectionInterface;
/**
* Passes this collection through a callable as its first argument.
@@ -976,11 +980,11 @@ public function unfold(?callable $transformer = null): CollectionInterface;
* });
* ```
*
- * @param callable $handler A callable function that will receive
+ * @param callable $callback A callable function that will receive
* this collection as first argument.
* @return self
*/
- public function through(callable $handler): CollectionInterface;
+ public function through(callable $callback): CollectionInterface;
/**
* Combines the elements of this collection with each of the elements of the
@@ -1015,10 +1019,10 @@ public function zip(iterable $items): CollectionInterface;
* ```
*
* @param iterable ...$items The collections to zip.
- * @param callable $callable The function to use for zipping the elements together.
+ * @param callable $callback The function to use for zipping the elements together.
* @return self
*/
- public function zipWith(iterable $items, $callable): CollectionInterface;
+ public function zipWith(iterable $items, $callback): CollectionInterface;
/**
* Breaks the collection into smaller arrays of the given size.
@@ -1113,6 +1117,12 @@ public function transpose(): CollectionInterface;
*
* ## WARNINGS:
*
+ * ### Will change the current position of the iterator:
+ *
+ * Calling this method at the same time that you are iterating this collections, for example in
+ * a foreach, will result in undefined behavior. Avoid doing this.
+ *
+ *
* ### Consumes all elements for NoRewindIterator collections:
*
* On certain type of collections, calling this method may render unusable afterwards.
@@ -1135,17 +1145,12 @@ public function transpose(): CollectionInterface;
* If you need the count of elements after taking the keys in consideration
* (the count of unique keys), you can call `countKeys()`
*
- * ### Will change the current position of the iterator:
- *
- * Calling this method at the same time that you are iterating this collections, for example in
- * a foreach, will result in undefined behavior. Avoid doing this.
- *
* @return int
*/
public function count(): int;
/**
- * Returns the number of unique keys in this iterator. This is, the number of
+ * Returns the number of unique keys in this iterator. This is the same as the number of
* elements the collection will contain after calling `toArray()`
*
* This method comes with a number of caveats. Please refer to `CollectionInterface::count()`
diff --git a/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php b/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php
index 1a7690c65..18ccbafef 100644
--- a/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php
+++ b/app/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php
@@ -63,10 +63,10 @@ protected function newCollection(...$args): CollectionInterface
/**
* @inheritDoc
*/
- public function each(callable $c)
+ public function each(callable $callback)
{
foreach ($this->optimizeUnwrap() as $k => $v) {
- $c($v, $k);
+ $callback($v, $k);
}
return $this;
@@ -75,34 +75,34 @@ public function each(callable $c)
/**
* @inheritDoc
*/
- public function filter(?callable $c = null): CollectionInterface
+ public function filter(?callable $callback = null): CollectionInterface
{
- if ($c === null) {
- $c = function ($v) {
+ if ($callback === null) {
+ $callback = function ($v) {
return (bool)$v;
};
}
- return new FilterIterator($this->unwrap(), $c);
+ return new FilterIterator($this->unwrap(), $callback);
}
/**
* @inheritDoc
*/
- public function reject(callable $c): CollectionInterface
+ public function reject(callable $callback): CollectionInterface
{
- return new FilterIterator($this->unwrap(), function ($key, $value, $items) use ($c) {
- return !$c($key, $value, $items);
+ return new FilterIterator($this->unwrap(), function ($key, $value, $items) use ($callback) {
+ return !$callback($key, $value, $items);
});
}
/**
* @inheritDoc
*/
- public function every(callable $c): bool
+ public function every(callable $callback): bool
{
foreach ($this->optimizeUnwrap() as $key => $value) {
- if (!$c($value, $key)) {
+ if (!$callback($value, $key)) {
return false;
}
}
@@ -113,10 +113,10 @@ public function every(callable $c): bool
/**
* @inheritDoc
*/
- public function some(callable $c): bool
+ public function some(callable $callback): bool
{
foreach ($this->optimizeUnwrap() as $key => $value) {
- if ($c($value, $key) === true) {
+ if ($callback($value, $key) === true) {
return true;
}
}
@@ -141,29 +141,29 @@ public function contains($value): bool
/**
* @inheritDoc
*/
- public function map(callable $c): CollectionInterface
+ public function map(callable $callback): CollectionInterface
{
- return new ReplaceIterator($this->unwrap(), $c);
+ return new ReplaceIterator($this->unwrap(), $callback);
}
/**
* @inheritDoc
*/
- public function reduce(callable $c, $zero = null)
+ public function reduce(callable $callback, $initial = null)
{
$isFirst = false;
if (func_num_args() < 2) {
$isFirst = true;
}
- $result = $zero;
+ $result = $initial;
foreach ($this->optimizeUnwrap() as $k => $value) {
if ($isFirst) {
$result = $value;
$isFirst = false;
continue;
}
- $result = $c($result, $value, $k);
+ $result = $callback($result, $value, $k);
}
return $result;
@@ -172,10 +172,10 @@ public function reduce(callable $c, $zero = null)
/**
* @inheritDoc
*/
- public function extract($matcher): CollectionInterface
+ public function extract($path): CollectionInterface
{
- $extractor = new ExtractIterator($this->unwrap(), $matcher);
- if (is_string($matcher) && strpos($matcher, '{*}') !== false) {
+ $extractor = new ExtractIterator($this->unwrap(), $path);
+ if (is_string($path) && strpos($path, '{*}') !== false) {
$extractor = $extractor
->filter(function ($data) {
return $data !== null && ($data instanceof Traversable || is_array($data));
@@ -189,27 +189,27 @@ public function extract($matcher): CollectionInterface
/**
* @inheritDoc
*/
- public function max($callback, int $type = \SORT_NUMERIC)
+ public function max($path, int $sort = \SORT_NUMERIC)
{
- return (new SortIterator($this->unwrap(), $callback, \SORT_DESC, $type))->first();
+ return (new SortIterator($this->unwrap(), $path, \SORT_DESC, $sort))->first();
}
/**
* @inheritDoc
*/
- public function min($callback, int $type = \SORT_NUMERIC)
+ public function min($path, int $sort = \SORT_NUMERIC)
{
- return (new SortIterator($this->unwrap(), $callback, \SORT_ASC, $type))->first();
+ return (new SortIterator($this->unwrap(), $path, \SORT_ASC, $sort))->first();
}
/**
* @inheritDoc
*/
- public function avg($matcher = null)
+ public function avg($path = null)
{
$result = $this;
- if ($matcher !== null) {
- $result = $result->extract($matcher);
+ if ($path !== null) {
+ $result = $result->extract($path);
}
$result = $result
->reduce(function ($acc, $current) {
@@ -228,13 +228,13 @@ public function avg($matcher = null)
/**
* @inheritDoc
*/
- public function median($matcher = null)
+ public function median($path = null)
{
- $elements = $this;
- if ($matcher !== null) {
- $elements = $elements->extract($matcher);
+ $items = $this;
+ if ($path !== null) {
+ $items = $items->extract($path);
}
- $values = $elements->toList();
+ $values = $items->toList();
sort($values);
$count = count($values);
@@ -254,20 +254,27 @@ public function median($matcher = null)
/**
* @inheritDoc
*/
- public function sortBy($callback, int $dir = \SORT_DESC, int $type = \SORT_NUMERIC): CollectionInterface
+ public function sortBy($path, int $order = \SORT_DESC, int $sort = \SORT_NUMERIC): CollectionInterface
{
- return new SortIterator($this->unwrap(), $callback, $dir, $type);
+ return new SortIterator($this->unwrap(), $path, $order, $sort);
}
/**
* @inheritDoc
*/
- public function groupBy($callback): CollectionInterface
+ public function groupBy($path): CollectionInterface
{
- $callback = $this->_propertyExtractor($callback);
+ $callback = $this->_propertyExtractor($path);
$group = [];
foreach ($this->optimizeUnwrap() as $value) {
- $group[$callback($value)][] = $value;
+ $pathValue = $callback($value);
+ if ($pathValue === null) {
+ throw new InvalidArgumentException(
+ 'Cannot group by path that does not exist or contains a null value. ' .
+ 'Use a callback to return a default value for that path.'
+ );
+ }
+ $group[$pathValue][] = $value;
}
return $this->newCollection($group);
@@ -276,12 +283,19 @@ public function groupBy($callback): CollectionInterface
/**
* @inheritDoc
*/
- public function indexBy($callback): CollectionInterface
+ public function indexBy($path): CollectionInterface
{
- $callback = $this->_propertyExtractor($callback);
+ $callback = $this->_propertyExtractor($path);
$group = [];
foreach ($this->optimizeUnwrap() as $value) {
- $group[$callback($value)] = $value;
+ $pathValue = $callback($value);
+ if ($pathValue === null) {
+ throw new InvalidArgumentException(
+ 'Cannot index by path that does not exist or contains a null value. ' .
+ 'Use a callback to return a default value for that path.'
+ );
+ }
+ $group[$pathValue] = $value;
}
return $this->newCollection($group);
@@ -290,9 +304,9 @@ public function indexBy($callback): CollectionInterface
/**
* @inheritDoc
*/
- public function countBy($callback): CollectionInterface
+ public function countBy($path): CollectionInterface
{
- $callback = $this->_propertyExtractor($callback);
+ $callback = $this->_propertyExtractor($path);
$mapper = function ($value, $key, $mr) use ($callback): void {
/** @var \Cake\Collection\Iterator\MapReduce $mr */
@@ -310,13 +324,13 @@ public function countBy($callback): CollectionInterface
/**
* @inheritDoc
*/
- public function sumOf($matcher = null)
+ public function sumOf($path = null)
{
- if ($matcher === null) {
+ if ($path === null) {
return array_sum($this->toList());
}
- $callback = $this->_propertyExtractor($matcher);
+ $callback = $this->_propertyExtractor($path);
$sum = 0;
foreach ($this->optimizeUnwrap() as $k => $v) {
$sum += $callback($v, $k);
@@ -330,34 +344,34 @@ public function sumOf($matcher = null)
*/
public function shuffle(): CollectionInterface
{
- $elements = $this->toArray();
- shuffle($elements);
+ $items = $this->toList();
+ shuffle($items);
- return $this->newCollection($elements);
+ return $this->newCollection($items);
}
/**
* @inheritDoc
*/
- public function sample(int $size = 10): CollectionInterface
+ public function sample(int $length = 10): CollectionInterface
{
- return $this->newCollection(new LimitIterator($this->shuffle(), 0, $size));
+ return $this->newCollection(new LimitIterator($this->shuffle(), 0, $length));
}
/**
* @inheritDoc
*/
- public function take(int $size = 1, int $from = 0): CollectionInterface
+ public function take(int $length = 1, int $offset = 0): CollectionInterface
{
- return $this->newCollection(new LimitIterator($this, $from, $size));
+ return $this->newCollection(new LimitIterator($this, $offset, $length));
}
/**
* @inheritDoc
*/
- public function skip(int $howMany): CollectionInterface
+ public function skip(int $length): CollectionInterface
{
- return $this->newCollection(new LimitIterator($this, $howMany));
+ return $this->newCollection(new LimitIterator($this, $length));
}
/**
@@ -417,15 +431,15 @@ public function last()
/**
* @inheritDoc
*/
- public function takeLast(int $howMany): CollectionInterface
+ public function takeLast(int $length): CollectionInterface
{
- if ($howMany < 1) {
+ if ($length < 1) {
throw new InvalidArgumentException('The takeLast method requires a number greater than 0.');
}
$iterator = $this->optimizeUnwrap();
if (is_array($iterator)) {
- return $this->newCollection(array_slice($iterator, $howMany * -1));
+ return $this->newCollection(array_slice($iterator, $length * -1));
}
if ($iterator instanceof Countable) {
@@ -435,12 +449,12 @@ public function takeLast(int $howMany): CollectionInterface
return $this->newCollection([]);
}
- $iterator = new LimitIterator($iterator, max(0, $count - $howMany), $howMany);
+ $iterator = new LimitIterator($iterator, max(0, $count - $length), $length);
return $this->newCollection($iterator);
}
- $generator = function ($iterator, $howMany) {
+ $generator = function ($iterator, $length) {
$result = [];
$bucket = 0;
$offset = 0;
@@ -493,11 +507,11 @@ public function takeLast(int $howMany): CollectionInterface
foreach ($iterator as $k => $item) {
$result[$bucket] = [$k, $item];
- $bucket = (++$bucket) % $howMany;
+ $bucket = (++$bucket) % $length;
$offset++;
}
- $offset = $offset % $howMany;
+ $offset = $offset % $length;
$head = array_slice($result, $offset);
$tail = array_slice($result, 0, $offset);
@@ -510,7 +524,7 @@ public function takeLast(int $howMany): CollectionInterface
}
};
- return $this->newCollection($generator($iterator, $howMany));
+ return $this->newCollection($generator($iterator, $length));
}
/**
@@ -626,6 +640,7 @@ public function nest($idPath, $parentPath, string $nestingKey = 'children'): Col
}
if (empty($key) || !isset($parents[$key])) {
foreach ($values as $id) {
+ /** @psalm-suppress PossiblyInvalidArgument */
$parents[$id] = $isObject ? $parents[$id] : new ArrayIterator($parents[$id], 1);
$mapReduce->emit($parents[$id]);
}
@@ -724,28 +739,28 @@ public function buffered(): CollectionInterface
/**
* @inheritDoc
*/
- public function listNested($dir = 'desc', $nestingKey = 'children'): CollectionInterface
+ public function listNested($order = 'desc', $nestingKey = 'children'): CollectionInterface
{
- if (is_string($dir)) {
- $dir = strtolower($dir);
+ if (is_string($order)) {
+ $order = strtolower($order);
$modes = [
'desc' => RecursiveIteratorIterator::SELF_FIRST,
'asc' => RecursiveIteratorIterator::CHILD_FIRST,
'leaves' => RecursiveIteratorIterator::LEAVES_ONLY,
];
- if (!isset($modes[$dir])) {
+ if (!isset($modes[$order])) {
throw new RuntimeException(sprintf(
"Invalid direction `%s` provided. Must be one of: 'desc', 'asc', 'leaves'",
- $dir
+ $order
));
}
- $dir = $modes[$dir];
+ $order = $modes[$order];
}
return new TreeIterator(
new NestIterator($this, $nestingKey),
- $dir
+ $order
);
}
@@ -764,17 +779,17 @@ public function stopWhen($condition): CollectionInterface
/**
* @inheritDoc
*/
- public function unfold(?callable $transformer = null): CollectionInterface
+ public function unfold(?callable $callback = null): CollectionInterface
{
- if ($transformer === null) {
- $transformer = function ($item) {
+ if ($callback === null) {
+ $callback = function ($item) {
return $item;
};
}
return $this->newCollection(
new RecursiveIteratorIterator(
- new UnfoldIterator($this->unwrap(), $transformer),
+ new UnfoldIterator($this->unwrap(), $callback),
RecursiveIteratorIterator::LEAVES_ONLY
)
);
@@ -783,9 +798,9 @@ public function unfold(?callable $transformer = null): CollectionInterface
/**
* @inheritDoc
*/
- public function through(callable $handler): CollectionInterface
+ public function through(callable $callback): CollectionInterface
{
- $result = $handler($this);
+ $result = $callback($this);
return $result instanceof CollectionInterface ? $result : $this->newCollection($result);
}
@@ -801,16 +816,16 @@ public function zip(iterable $items): CollectionInterface
/**
* @inheritDoc
*/
- public function zipWith(iterable $items, $callable): CollectionInterface
+ public function zipWith(iterable $items, $callback): CollectionInterface
{
if (func_num_args() > 2) {
$items = func_get_args();
- $callable = array_pop($items);
+ $callback = array_pop($items);
} else {
$items = [$items];
}
- return new ZipIterator(array_merge([$this->unwrap()], $items), $callable);
+ return new ZipIterator(array_merge([$this->unwrap()], $items), $callback);
}
/**
@@ -939,10 +954,8 @@ public function cartesianProduct(?callable $operation = null, ?callable $filter
$currentIndexes[$lastIndex]++;
- // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterFirst
for (
$changeIndex = $lastIndex;
- // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterSecond
$currentIndexes[$changeIndex] === $collectionArraysCounts[$changeIndex] && $changeIndex > 0;
$changeIndex--
) {
diff --git a/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php b/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php
index 2c6eb767c..81cc8d142 100644
--- a/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php
+++ b/app/vendor/cakephp/cakephp/src/Collection/ExtractTrait.php
@@ -29,27 +29,27 @@ trait ExtractTrait
* Returns a callable that can be used to extract a property or column from
* an array or object based on a dot separated path.
*
- * @param string|callable $callback A dot separated path of column to follow
+ * @param string|callable $path A dot separated path of column to follow
* so that the final one can be returned or a callable that will take care
* of doing that.
* @return callable
*/
- protected function _propertyExtractor($callback): callable
+ protected function _propertyExtractor($path): callable
{
- if (!is_string($callback)) {
- return $callback;
+ if (!is_string($path)) {
+ return $path;
}
- $path = explode('.', $callback);
+ $parts = explode('.', $path);
- if (strpos($callback, '{*}') !== false) {
- return function ($element) use ($path) {
- return $this->_extract($element, $path);
+ if (strpos($path, '{*}') !== false) {
+ return function ($element) use ($parts) {
+ return $this->_extract($element, $parts);
};
}
- return function ($element) use ($path) {
- return $this->_simpleExtract($element, $path);
+ return function ($element) use ($parts) {
+ return $this->_simpleExtract($element, $parts);
};
}
@@ -59,15 +59,15 @@ protected function _propertyExtractor($callback): callable
* It will return arrays for elements in represented with `{*}`
*
* @param array|\ArrayAccess $data Data.
- * @param string[] $path Path to extract from.
+ * @param string[] $parts Path to extract from.
* @return mixed
*/
- protected function _extract($data, array $path)
+ protected function _extract($data, array $parts)
{
$value = null;
$collectionTransform = false;
- foreach ($path as $i => $column) {
+ foreach ($parts as $i => $column) {
if ($column === '{*}') {
$collectionTransform = true;
continue;
@@ -84,7 +84,7 @@ protected function _extract($data, array $path)
}
if ($collectionTransform) {
- $rest = implode('.', array_slice($path, $i));
+ $rest = implode('.', array_slice($parts, $i));
return (new Collection($data))->extract($rest);
}
@@ -105,13 +105,13 @@ protected function _extract($data, array $path)
* by iterating over the column names contained in $path
*
* @param array|\ArrayAccess $data Data.
- * @param string[] $path Path to extract from.
+ * @param string[] $parts Path to extract from.
* @return mixed
*/
- protected function _simpleExtract($data, array $path)
+ protected function _simpleExtract($data, array $parts)
{
$value = null;
- foreach ($path as $column) {
+ foreach ($parts as $column) {
if (!isset($data[$column])) {
return null;
}
diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php
index fc1590621..5c46c9198 100644
--- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php
+++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/BufferedIterator.php
@@ -159,6 +159,10 @@ public function next(): void
{
$this->_index++;
+ // Don't move inner iterator if we have more buffer
+ if ($this->_buffer->offsetExists($this->_index)) {
+ return;
+ }
if (!$this->_finished) {
parent::next();
}
@@ -200,13 +204,13 @@ public function serialize(): string
/**
* Unserializes the passed string and rebuilds the BufferedIterator instance
*
- * @param string $buffer The serialized buffer iterator
+ * @param string $collection The serialized buffer iterator
* @return void
*/
- public function unserialize($buffer): void
+ public function unserialize($collection): void
{
$this->__construct([]);
- $this->_buffer = unserialize($buffer);
+ $this->_buffer = unserialize($collection);
$this->_started = true;
$this->_finished = true;
}
diff --git a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php
index 4a550b7bc..3ab17e834 100644
--- a/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php
+++ b/app/vendor/cakephp/cakephp/src/Collection/Iterator/ZipIterator.php
@@ -88,7 +88,7 @@ public function __construct(array $sets, ?callable $callable = null)
* Returns the value resulting out of zipping all the elements for all the
* iterators with the same positional index.
*
- * @return array|false
+ * @return array
*/
public function current()
{
diff --git a/app/vendor/cakephp/cakephp/src/Command/I18nExtractCommand.php b/app/vendor/cakephp/cakephp/src/Command/I18nExtractCommand.php
index 590401423..a90815bd1 100644
--- a/app/vendor/cakephp/cakephp/src/Command/I18nExtractCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/I18nExtractCommand.php
@@ -207,7 +207,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
['y', 'n'],
'n'
);
- $this->_extractCore = strtolower((string)$response) === 'y';
+ $this->_extractCore = strtolower($response) === 'y';
}
if ($args->hasOption('exclude-plugins') && $this->_isExtractingApp()) {
@@ -263,7 +263,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
['y', 'n'],
'n'
);
- $this->_merge = strtolower((string)$response) === 'y';
+ $this->_merge = strtolower($response) === 'y';
}
$this->_markerError = (bool)$args->getOption('marker-error');
@@ -504,7 +504,8 @@ protected function _parse(ConsoleIo $io, string $functionName, array $map): void
if ($mapCount === count($strings)) {
$singular = '';
$plural = $context = null;
- extract(array_combine($map, $strings));
+ $vars = array_combine($map, $strings);
+ extract($vars);
$domain = $domain ?? 'default';
$details = [
'file' => $this->_file,
diff --git a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsTrait.php b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsTrait.php
index 4770fe718..9470ff939 100644
--- a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsTrait.php
+++ b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsTrait.php
@@ -180,7 +180,8 @@ protected function _remove(array $config): bool
if (is_link($dest)) {
// phpcs:ignore
- if (@unlink($dest)) {
+ $success = DS === '\\' ? @rmdir($dest) : @unlink($dest);
+ if ($success) {
$this->io->out('Unlinked ' . $dest);
return true;
diff --git a/app/vendor/cakephp/cakephp/src/Command/PluginLoadCommand.php b/app/vendor/cakephp/cakephp/src/Command/PluginLoadCommand.php
index e371436da..4897ccae0 100644
--- a/app/vendor/cakephp/cakephp/src/Command/PluginLoadCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/PluginLoadCommand.php
@@ -19,6 +19,8 @@
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
+use Cake\Core\Exception\MissingPluginException;
+use Cake\Core\Plugin;
/**
* Command for loading plugins.
@@ -69,6 +71,15 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
return static::CODE_ERROR;
}
+ try {
+ Plugin::getCollection()->findPath($plugin);
+ } catch (MissingPluginException $e) {
+ $this->io->err($e->getMessage());
+ $this->io->err('Ensure you have the correct spelling and casing.');
+
+ return static::CODE_ERROR;
+ }
+
$app = APP . 'Application.php';
if (file_exists($app)) {
$this->modifyApplication($app, $plugin);
diff --git a/app/vendor/cakephp/cakephp/src/Command/RoutesCheckCommand.php b/app/vendor/cakephp/cakephp/src/Command/RoutesCheckCommand.php
index b3f396b27..b660e4d68 100644
--- a/app/vendor/cakephp/cakephp/src/Command/RoutesCheckCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/RoutesCheckCommand.php
@@ -19,6 +19,7 @@
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
+use Cake\Http\Exception\RedirectException;
use Cake\Http\ServerRequest;
use Cake\Routing\Exception\MissingRouteException;
use Cake\Routing\Router;
@@ -66,6 +67,13 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
];
$io->helper('table')->output($output);
$io->out();
+ } catch (RedirectException $e) {
+ $output = [
+ ['URI template', 'Redirect'],
+ [$url, $e->getMessage()],
+ ];
+ $io->helper('table')->output($output);
+ $io->out();
} catch (MissingRouteException $e) {
$io->warning("'$url' did not match any routes.");
$io->out();
diff --git a/app/vendor/cakephp/cakephp/src/Command/ServerCommand.php b/app/vendor/cakephp/cakephp/src/Command/ServerCommand.php
index f0b53c4d5..fb32a3ec7 100644
--- a/app/vendor/cakephp/cakephp/src/Command/ServerCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/ServerCommand.php
@@ -126,8 +126,10 @@ protected function startup(Arguments $args, ConsoleIo $io): void
public function execute(Arguments $args, ConsoleIo $io): ?int
{
$this->startup($args, $io);
+ $phpBinary = (string)env('PHP', 'php');
$command = sprintf(
- 'php -S %s:%d -t %s',
+ '%s -S %s:%d -t %s',
+ $phpBinary,
$this->_host,
$this->_port,
escapeshellarg($this->_documentRoot)
diff --git a/app/vendor/cakephp/cakephp/src/Console/BaseCommand.php b/app/vendor/cakephp/cakephp/src/Console/BaseCommand.php
index 2ef795153..18b5ad38a 100644
--- a/app/vendor/cakephp/cakephp/src/Console/BaseCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Console/BaseCommand.php
@@ -172,6 +172,10 @@ public function run(array $argv, ConsoleIo $io): ?int
return static::CODE_SUCCESS;
}
+ if ($args->getOption('quiet')) {
+ $io->setInteractive(false);
+ }
+
return $this->execute($args, $io);
}
@@ -238,6 +242,10 @@ public function abort(int $code = self::CODE_ERROR): void
/**
* Execute another command with the provided set of arguments.
*
+ * If you are using a string command name, that command's dependencies
+ * will not be resolved with the application container. Instead you will
+ * need to pass the command as an object with all of its dependencies.
+ *
* @param string|\Cake\Console\CommandInterface $command The command class name or command instance.
* @param array $args The arguments to invoke the command with.
* @param \Cake\Console\ConsoleIo $io The ConsoleIo instance to use for the executed command.
diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php b/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php
index 11a6048b3..e65dcc039 100644
--- a/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php
+++ b/app/vendor/cakephp/cakephp/src/Console/CommandCollection.php
@@ -25,7 +25,7 @@
/**
* Collection for Commands.
*
- * Used by Applications to whitelist their console commands.
+ * Used by Applications to specify their console commands.
* CakePHP will use the mapped commands to construct and dispatch
* shell commands.
*/
@@ -36,6 +36,7 @@ class CommandCollection implements IteratorAggregate, Countable
*
* @var array
* @psalm-var (\Cake\Console\Shell|\Cake\Console\CommandInterface|class-string)[]
+ * @psalm-suppress DeprecatedClass
*/
protected $commands = [];
@@ -66,7 +67,7 @@ public function add(string $name, $command)
$class = is_string($command) ? $command : get_class($command);
throw new InvalidArgumentException(sprintf(
"Cannot use '%s' for command '%s'. " .
- "It is not a subclass of Cake\Console\Shell or Cake\Command\CommandInterface.",
+ "It is not a subclass of Cake\Console\Shell or Cake\Command\Command.",
$class,
$name
));
@@ -219,7 +220,7 @@ protected function resolveNames(array $input): array
* - CakePHP provided commands
* - Application commands
*
- * Commands defined in the application will ovewrite commands with
+ * Commands defined in the application will overwrite commands with
* the same name provided by CakePHP.
*
* @return string[] An array of command names and their classes.
diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php b/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php
index 730dfbc3c..20c8367a2 100644
--- a/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php
+++ b/app/vendor/cakephp/cakephp/src/Console/CommandFactory.php
@@ -14,6 +14,7 @@
*/
namespace Cake\Console;
+use Cake\Core\ContainerInterface;
use InvalidArgumentException;
/**
@@ -24,12 +25,32 @@
*/
class CommandFactory implements CommandFactoryInterface
{
+ /**
+ * @var \Cake\Core\ContainerInterface|null
+ */
+ protected $container;
+
+ /**
+ * Constructor
+ *
+ * @param \Cake\Core\ContainerInterface|null $container The container to use if available.
+ */
+ public function __construct(?ContainerInterface $container = null)
+ {
+ $this->container = $container;
+ }
+
/**
* @inheritDoc
*/
public function create(string $className)
{
- $command = new $className();
+ if ($this->container && $this->container->has($className)) {
+ $command = $this->container->get($className);
+ } else {
+ $command = new $className();
+ }
+
if (!($command instanceof CommandInterface) && !($command instanceof Shell)) {
/** @psalm-suppress DeprecatedClass */
$valid = implode('` or `', [Shell::class, CommandInterface::class]);
diff --git a/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php b/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php
index 904adc0a4..1892eff42 100644
--- a/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php
+++ b/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php
@@ -21,6 +21,7 @@
use Cake\Console\Exception\MissingOptionException;
use Cake\Console\Exception\StopException;
use Cake\Core\ConsoleApplicationInterface;
+use Cake\Core\ContainerApplicationInterface;
use Cake\Core\PluginApplicationInterface;
use Cake\Event\EventDispatcherInterface;
use Cake\Event\EventDispatcherTrait;
@@ -49,7 +50,7 @@ class CommandRunner implements EventDispatcherInterface
/**
* The application console commands are being run for.
*
- * @var \Cake\Console\CommandFactoryInterface
+ * @var \Cake\Console\CommandFactoryInterface|null
*/
protected $factory;
@@ -81,7 +82,7 @@ public function __construct(
) {
$this->app = $app;
$this->root = $root;
- $this->factory = $factory ?: new CommandFactory();
+ $this->factory = $factory;
$this->aliases = [
'--version' => 'version',
'--help' => 'help',
@@ -184,9 +185,8 @@ public function run(array $argv, ?ConsoleIo $io = null): int
/**
* Application bootstrap wrapper.
*
- * Calls `bootstrap()` and `events()` if application implements `EventApplicationInterface`.
- * After the application is bootstrapped and events are attached, plugins are bootstrapped
- * and have their events attached.
+ * Calls the application's `bootstrap()` hook. After the application the
+ * plugins are bootstrapped.
*
* @return void
*/
@@ -218,14 +218,14 @@ public function getEventManager(): EventManagerInterface
* If the application does not support events and this method is used as
* a setter, an exception will be raised.
*
- * @param \Cake\Event\EventManagerInterface $events The event manager to set.
+ * @param \Cake\Event\EventManagerInterface $eventManager The event manager to set.
* @return $this
* @throws \InvalidArgumentException
*/
- public function setEventManager(EventManagerInterface $events)
+ public function setEventManager(EventManagerInterface $eventManager)
{
if ($this->app instanceof PluginApplicationInterface) {
- $this->app->setEventManager($events);
+ $this->app->setEventManager($eventManager);
return $this;
}
@@ -353,9 +353,7 @@ protected function runShell(Shell $shell, array $argv)
return $shell->runCommand($argv, true);
} catch (StopException $e) {
- $code = $e->getCode();
-
- return $code === null ? $code : (int)$code;
+ return $e->getCode();
}
}
@@ -368,6 +366,14 @@ protected function runShell(Shell $shell, array $argv)
*/
protected function createCommand(string $className, ConsoleIo $io)
{
+ if (!$this->factory) {
+ $container = null;
+ if ($this->app instanceof ContainerApplicationInterface) {
+ $container = $this->app->getContainer();
+ }
+ $this->factory = new CommandFactory($container);
+ }
+
$shell = $this->factory->create($className);
if ($shell instanceof Shell) {
$shell->setIo($io);
diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php
index dae71feb9..9e4ef7a6a 100644
--- a/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php
+++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleInput.php
@@ -60,7 +60,6 @@ public function __construct(string $handle = 'php://stdin')
public function read(): ?string
{
if ($this->_canReadline) {
- /** @var string|false $line */
$line = readline('');
if ($line !== false && strlen($line) > 0) {
@@ -93,6 +92,8 @@ public function dataAvailable(int $timeout = 0): bool
$error = null;
set_error_handler(function (int $code, string $message) use (&$error) {
$error = "stream_select failed with code={$code} message={$message}.";
+
+ return true;
});
$readyFds = stream_select($readFds, $writeFds, $errorFds, $timeout);
restore_error_handler();
diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php
index 4b0034434..e76cfccc1 100644
--- a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php
+++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputArgument.php
@@ -148,7 +148,7 @@ public function usage(): string
*/
public function isRequired(): bool
{
- return (bool)$this->_required;
+ return $this->_required;
}
/**
diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php
index db108b815..fe29594eb 100644
--- a/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php
+++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php
@@ -76,6 +76,13 @@ class ConsoleInputOption
*/
protected $_choices;
+ /**
+ * Is the option required.
+ *
+ * @var bool
+ */
+ protected $required;
+
/**
* Make a new Input Option
*
@@ -86,6 +93,7 @@ class ConsoleInputOption
* @param string|bool|null $default The default value for this option.
* @param string[] $choices Valid choices for this option.
* @param bool $multiple Whether this option can accept multiple value definition.
+ * @param bool $required Whether this option is required or not.
* @throws \Cake\Console\Exception\ConsoleException
*/
public function __construct(
@@ -95,7 +103,8 @@ public function __construct(
bool $isBoolean = false,
$default = null,
array $choices = [],
- bool $multiple = false
+ bool $multiple = false,
+ bool $required = false
) {
$this->_name = $name;
$this->_short = $short;
@@ -103,6 +112,7 @@ public function __construct(
$this->_boolean = $isBoolean;
$this->_choices = $choices;
$this->_multiple = $multiple;
+ $this->required = $required;
if ($isBoolean) {
$this->_default = (bool)$default;
@@ -134,7 +144,7 @@ public function name(): string
*/
public function short(): string
{
- return (string)$this->_short;
+ return $this->_short;
}
/**
@@ -159,8 +169,12 @@ public function help(int $width = 0): string
if (strlen($name) < $width) {
$name = str_pad($name, $width, ' ');
}
+ $required = '';
+ if ($this->isRequired()) {
+ $required = '
tags around the output of given variable. Similar to debug().
+ * In terminals this will act similar to using print_r() directly, when not run on CLI
+ * print_r() will also wrap `
` tags around the output of given variable. Similar to debug().
*
* This function returns the same variable that was passed.
*
@@ -154,10 +154,10 @@ function pr($var)
if (!function_exists('pj')) {
/**
- * json pretty print convenience function.
+ * JSON pretty print convenience function.
*
- * In terminals this will act similar to using json_encode() with JSON_PRETTY_PRINT directly, when not run on cli
- * will also wrap tags around the output of given variable. Similar to pr().
+ * In terminals this will act similar to using json_encode() with JSON_PRETTY_PRINT directly, when not run on CLI
+ * will also wrap `
` tags around the output of given variable. Similar to pr().
*
* This function returns the same variable that was passed.
*
@@ -173,7 +173,7 @@ function pj($var)
}
$template = PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' ? '%s
' : "\n%s\n\n";
- printf($template, trim(json_encode($var, JSON_PRETTY_PRINT)));
+ printf($template, trim(json_encode($var, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)));
return $var;
}
@@ -292,13 +292,24 @@ function deprecationWarning(string $message, int $stackFrame = 1): void
$frame = $trace[$stackFrame];
$frame += ['file' => '[internal]', 'line' => '??'];
+ $relative = str_replace(DIRECTORY_SEPARATOR, '/', substr($frame['file'], strlen(ROOT) + 1));
+ $patterns = (array)Configure::read('Error.ignoredDeprecationPaths');
+ foreach ($patterns as $pattern) {
+ $pattern = str_replace(DIRECTORY_SEPARATOR, '/', $pattern);
+ if (fnmatch($pattern, $relative)) {
+ return;
+ }
+ }
+
$message = sprintf(
'%s - %s, line: %s' . "\n" .
- ' You can disable deprecation warnings by setting `Error.errorLevel` to' .
- ' `E_ALL & ~E_USER_DEPRECATED` in your config/app.php.',
+ ' You can disable all deprecation warnings by setting `Error.errorLevel` to' .
+ ' `E_ALL & ~E_USER_DEPRECATED`, or add `%s` to ' .
+ ' `Error.ignoredDeprecationPaths` in your `config/app.php` to mute deprecations from only this file.',
$message,
$frame['file'],
- $frame['line']
+ $frame['line'],
+ $relative
);
}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Connection.php b/app/vendor/cakephp/cakephp/src/Database/Connection.php
index e5c597d92..c2646c2ce 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Connection.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Connection.php
@@ -171,11 +171,7 @@ public function config(): array
*/
public function configName(): string
{
- if (empty($this->_config['name'])) {
- return '';
- }
-
- return $this->_config['name'];
+ return $this->_config['name'] ?? '';
}
/**
@@ -275,13 +271,13 @@ public function isConnected(): bool
/**
* Prepares a SQL statement to be executed.
*
- * @param string|\Cake\Database\Query $sql The SQL to convert into a prepared statement.
+ * @param string|\Cake\Database\Query $query The SQL to convert into a prepared statement.
* @return \Cake\Database\StatementInterface
*/
- public function prepare($sql): StatementInterface
+ public function prepare($query): StatementInterface
{
- return $this->getDisconnectRetry()->run(function () use ($sql) {
- $statement = $this->_driver->prepare($sql);
+ return $this->getDisconnectRetry()->run(function () use ($query) {
+ $statement = $this->_driver->prepare($query);
if ($this->_logQueries) {
$statement = $this->_newLogger($statement);
@@ -295,21 +291,19 @@ public function prepare($sql): StatementInterface
* Executes a query using $params for interpolating values and $types as a hint for each
* those params.
*
- * @param string $query SQL to be executed and interpolated with $params
- * @param array $params list or associative array of params to be interpolated in $query as values
+ * @param string $sql SQL to be executed and interpolated with $params
+ * @param array $params list or associative array of params to be interpolated in $sql as values
* @param array $types list or associative array of types to be used for casting values in query
* @return \Cake\Database\StatementInterface executed statement
*/
- public function execute(string $query, array $params = [], array $types = []): StatementInterface
+ public function execute(string $sql, array $params = [], array $types = []): StatementInterface
{
- return $this->getDisconnectRetry()->run(function () use ($query, $params, $types) {
+ return $this->getDisconnectRetry()->run(function () use ($sql, $params, $types) {
+ $statement = $this->prepare($sql);
if (!empty($params)) {
- $statement = $this->prepare($query);
$statement->bind($params, $types);
- $statement->execute();
- } else {
- $statement = $this->query($query);
}
+ $statement->execute();
return $statement;
});
@@ -320,12 +314,12 @@ public function execute(string $query, array $params = [], array $types = []): S
* connection's driver
*
* @param \Cake\Database\Query $query The query to be compiled
- * @param \Cake\Database\ValueBinder $generator The placeholder generator to use
+ * @param \Cake\Database\ValueBinder $binder Value binder
* @return string
*/
- public function compileQuery(Query $query, ValueBinder $generator): string
+ public function compileQuery(Query $query, ValueBinder $binder): string
{
- return $this->getDriver()->compileQuery($query, $generator)[1];
+ return $this->getDriver()->compileQuery($query, $binder)[1];
}
/**
@@ -411,18 +405,18 @@ public function getSchemaCollection(): SchemaCollectionInterface
* Executes an INSERT query on the specified table.
*
* @param string $table the table to insert values in
- * @param array $data values to be inserted
+ * @param array $values values to be inserted
* @param array $types list of associative array containing the types to be used for casting
* @return \Cake\Database\StatementInterface
*/
- public function insert(string $table, array $data, array $types = []): StatementInterface
+ public function insert(string $table, array $values, array $types = []): StatementInterface
{
- return $this->getDisconnectRetry()->run(function () use ($table, $data, $types) {
- $columns = array_keys($data);
+ return $this->getDisconnectRetry()->run(function () use ($table, $values, $types) {
+ $columns = array_keys($values);
return $this->newQuery()->insert($columns, $types)
->into($table)
- ->values($data)
+ ->values($values)
->execute();
});
}
@@ -431,16 +425,16 @@ public function insert(string $table, array $data, array $types = []): Statement
* Executes an UPDATE statement on the specified table.
*
* @param string $table the table to update rows from
- * @param array $data values to be updated
+ * @param array $values values to be updated
* @param array $conditions conditions to be set for update statement
* @param array $types list of associative array containing the types to be used for casting
* @return \Cake\Database\StatementInterface
*/
- public function update(string $table, array $data, array $conditions = [], array $types = []): StatementInterface
+ public function update(string $table, array $values, array $conditions = [], array $types = []): StatementInterface
{
- return $this->getDisconnectRetry()->run(function () use ($table, $data, $conditions, $types) {
+ return $this->getDisconnectRetry()->run(function () use ($table, $values, $conditions, $types) {
return $this->newQuery()->update($table)
- ->set($data, $types)
+ ->set($values, $types)
->where($conditions, $types)
->execute();
});
@@ -570,13 +564,8 @@ public function rollback(?bool $toBeginning = null): bool
/**
* Enables/disables the usage of savepoints, enables only if driver the allows it.
*
- * If you are trying to enable this feature, make sure you check the return value of this
- * function to verify it was enabled successfully.
- *
- * ### Example:
- *
- * `$connection->enableSavePoints(true)` Returns true if drivers supports save points, false otherwise
- * `$connection->enableSavePoints(false)` Disables usage of savepoints and returns false
+ * If you are trying to enable this feature, make sure you check
+ * `isSavePointsEnabled()` to verify that savepoints were enabled successfully.
*
* @param bool $enable Whether or not save points should be used.
* @return $this
@@ -617,7 +606,7 @@ public function isSavePointsEnabled(): bool
/**
* Creates a new save point for nested transactions.
*
- * @param string|int $name The save point name.
+ * @param string|int $name Save point name or id
* @return void
*/
public function createSavePoint($name): void
@@ -628,7 +617,7 @@ public function createSavePoint($name): void
/**
* Releases a save point by its name.
*
- * @param string|int $name The save point name.
+ * @param string|int $name Save point name or id
* @return void
*/
public function releaseSavePoint($name): void
@@ -639,7 +628,7 @@ public function releaseSavePoint($name): void
/**
* Rollback a save point by its name.
*
- * @param string|int $name The save point name.
+ * @param string|int $name Save point name or id
* @return void
*/
public function rollbackSavepoint($name): void
@@ -685,12 +674,12 @@ public function supportsDynamicConstraints(): bool
/**
* @inheritDoc
*/
- public function transactional(callable $transaction)
+ public function transactional(callable $callback)
{
$this->begin();
try {
- $result = $transaction($this);
+ $result = $callback($this);
} catch (Throwable $e) {
$this->rollback(false);
throw $e;
@@ -725,13 +714,13 @@ protected function wasNestedTransactionRolledback(): bool
/**
* @inheritDoc
*/
- public function disableConstraints(callable $operation)
+ public function disableConstraints(callable $callback)
{
- return $this->getDisconnectRetry()->run(function () use ($operation) {
+ return $this->getDisconnectRetry()->run(function () use ($callback) {
$this->disableForeignKeys();
try {
- $result = $operation($this);
+ $result = $callback($this);
} finally {
$this->enableForeignKeys();
}
@@ -841,12 +830,12 @@ public function getCacher(): CacheInterface
/**
* Enable/disable query logging
*
- * @param bool $value Enable/disable query logging
+ * @param bool $enable Enable/disable query logging
* @return $this
*/
- public function enableQueryLogging(bool $value = true)
+ public function enableQueryLogging(bool $enable = true)
{
- $this->_logQueries = $value;
+ $this->_logQueries = $enable;
return $this;
}
@@ -905,7 +894,7 @@ public function getLogger(): LoggerInterface
);
}
- return $this->_logger = new QueryLogger();
+ return $this->_logger = new QueryLogger(['connection' => $this->configName()]);
}
/**
diff --git a/app/vendor/cakephp/cakephp/src/Database/ConstraintsInterface.php b/app/vendor/cakephp/cakephp/src/Database/ConstraintsInterface.php
index dafd045d0..f1fe3c161 100644
--- a/app/vendor/cakephp/cakephp/src/Database/ConstraintsInterface.php
+++ b/app/vendor/cakephp/cakephp/src/Database/ConstraintsInterface.php
@@ -31,19 +31,19 @@ interface ConstraintsInterface
* Build and execute SQL queries necessary to create the constraints for the
* fixture
*
- * @param \Cake\Datasource\ConnectionInterface $db An instance of the database
+ * @param \Cake\Datasource\ConnectionInterface $connection An instance of the database
* into which the constraints will be created.
* @return bool on success or if there are no constraints to create, or false on failure
*/
- public function createConstraints(ConnectionInterface $db): bool;
+ public function createConstraints(ConnectionInterface $connection): bool;
/**
* Build and execute SQL queries necessary to drop the constraints for the
* fixture
*
- * @param \Cake\Datasource\ConnectionInterface $db An instance of the database
+ * @param \Cake\Datasource\ConnectionInterface $connection An instance of the database
* into which the constraints will be dropped.
* @return bool on success or if there are no constraints to drop, or false on failure
*/
- public function dropConstraints(ConnectionInterface $db): bool;
+ public function dropConstraints(ConnectionInterface $connection): bool;
}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php
deleted file mode 100644
index 87b4513aa..000000000
--- a/app/vendor/cakephp/cakephp/src/Database/Dialect/MysqlDialectTrait.php
+++ /dev/null
@@ -1,86 +0,0 @@
-_schemaDialect === null) {
- $this->_schemaDialect = new MysqlSchema($this);
- }
-
- return $this->_schemaDialect;
- }
-
- /**
- * @inheritDoc
- */
- public function disableForeignKeySQL(): string
- {
- return 'SET foreign_key_checks = 0';
- }
-
- /**
- * @inheritDoc
- */
- public function enableForeignKeySQL(): string
- {
- return 'SET foreign_key_checks = 1';
- }
-}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php
deleted file mode 100644
index 6064e0d44..000000000
--- a/app/vendor/cakephp/cakephp/src/Database/Dialect/PostgresDialectTrait.php
+++ /dev/null
@@ -1,195 +0,0 @@
-clause('epilog')) {
- $query->epilog('RETURNING *');
- }
-
- return $query;
- }
-
- /**
- * Returns a dictionary of expressions to be transformed when compiling a Query
- * to SQL. Array keys are method names to be called in this class
- *
- * @return array
- */
- protected function _expressionTranslators(): array
- {
- $namespace = 'Cake\Database\Expression';
-
- return [
- $namespace . '\FunctionExpression' => '_transformFunctionExpression',
- ];
- }
-
- /**
- * Receives a FunctionExpression and changes it so that it conforms to this
- * SQL dialect.
- *
- * @param \Cake\Database\Expression\FunctionExpression $expression The function expression to convert
- * to postgres SQL.
- * @return void
- */
- protected function _transformFunctionExpression(FunctionExpression $expression): void
- {
- switch ($expression->getName()) {
- case 'CONCAT':
- // CONCAT function is expressed as exp1 || exp2
- $expression->setName('')->setConjunction(' ||');
- break;
- case 'DATEDIFF':
- $expression
- ->setName('')
- ->setConjunction('-')
- ->iterateParts(function ($p) {
- if (is_string($p)) {
- $p = ['value' => [$p => 'literal'], 'type' => null];
- } else {
- $p['value'] = [$p['value']];
- }
-
- return new FunctionExpression('DATE', $p['value'], [$p['type']]);
- });
- break;
- case 'CURRENT_DATE':
- $time = new FunctionExpression('LOCALTIMESTAMP', [' 0 ' => 'literal']);
- $expression->setName('CAST')->setConjunction(' AS ')->add([$time, 'date' => 'literal']);
- break;
- case 'CURRENT_TIME':
- $time = new FunctionExpression('LOCALTIMESTAMP', [' 0 ' => 'literal']);
- $expression->setName('CAST')->setConjunction(' AS ')->add([$time, 'time' => 'literal']);
- break;
- case 'NOW':
- $expression->setName('LOCALTIMESTAMP')->add([' 0 ' => 'literal']);
- break;
- case 'RAND':
- $expression->setName('RANDOM');
- break;
- case 'DATE_ADD':
- $expression
- ->setName('')
- ->setConjunction(' + INTERVAL')
- ->iterateParts(function ($p, $key) {
- if ($key === 1) {
- $p = sprintf("'%s'", $p);
- }
-
- return $p;
- });
- break;
- case 'DAYOFWEEK':
- $expression
- ->setName('EXTRACT')
- ->setConjunction(' ')
- ->add(['DOW FROM' => 'literal'], [], true)
- ->add([') + (1' => 'literal']); // Postgres starts on index 0 but Sunday should be 1
- break;
- }
- }
-
- /**
- * Get the schema dialect.
- *
- * Used by Cake\Database\Schema package to reflect schema and
- * generate schema.
- *
- * @return \Cake\Database\Schema\BaseSchema
- */
- public function schemaDialect(): BaseSchema
- {
- if ($this->_schemaDialect === null) {
- $this->_schemaDialect = new PostgresSchema($this);
- }
-
- return $this->_schemaDialect;
- }
-
- /**
- * @inheritDoc
- */
- public function disableForeignKeySQL(): string
- {
- return 'SET CONSTRAINTS ALL DEFERRED';
- }
-
- /**
- * @inheritDoc
- */
- public function enableForeignKeySQL(): string
- {
- return 'SET CONSTRAINTS ALL IMMEDIATE';
- }
-}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqliteDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/SqliteDialectTrait.php
deleted file mode 100644
index 6d3127642..000000000
--- a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqliteDialectTrait.php
+++ /dev/null
@@ -1,204 +0,0 @@
- 'd',
- 'hour' => 'H',
- 'month' => 'm',
- 'minute' => 'M',
- 'second' => 'S',
- 'week' => 'W',
- 'year' => 'Y',
- ];
-
- /**
- * Returns a dictionary of expressions to be transformed when compiling a Query
- * to SQL. Array keys are method names to be called in this class
- *
- * @return array
- */
- protected function _expressionTranslators(): array
- {
- $namespace = 'Cake\Database\Expression';
-
- return [
- $namespace . '\FunctionExpression' => '_transformFunctionExpression',
- $namespace . '\TupleComparison' => '_transformTupleComparison',
- ];
- }
-
- /**
- * Receives a FunctionExpression and changes it so that it conforms to this
- * SQL dialect.
- *
- * @param \Cake\Database\Expression\FunctionExpression $expression The function expression
- * to translate for SQLite.
- * @return void
- */
- protected function _transformFunctionExpression(FunctionExpression $expression): void
- {
- switch ($expression->getName()) {
- case 'CONCAT':
- // CONCAT function is expressed as exp1 || exp2
- $expression->setName('')->setConjunction(' ||');
- break;
- case 'DATEDIFF':
- $expression
- ->setName('ROUND')
- ->setConjunction('-')
- ->iterateParts(function ($p) {
- return new FunctionExpression('JULIANDAY', [$p['value']], [$p['type']]);
- });
- break;
- case 'NOW':
- $expression->setName('DATETIME')->add(["'now'" => 'literal']);
- break;
- case 'RAND':
- $expression
- ->setName('ABS')
- ->add(['RANDOM() % 1' => 'literal'], [], true);
- break;
- case 'CURRENT_DATE':
- $expression->setName('DATE')->add(["'now'" => 'literal']);
- break;
- case 'CURRENT_TIME':
- $expression->setName('TIME')->add(["'now'" => 'literal']);
- break;
- case 'EXTRACT':
- $expression
- ->setName('STRFTIME')
- ->setConjunction(' ,')
- ->iterateParts(function ($p, $key) {
- if ($key === 0) {
- $value = rtrim(strtolower($p), 's');
- if (isset($this->_dateParts[$value])) {
- $p = ['value' => '%' . $this->_dateParts[$value], 'type' => null];
- }
- }
-
- return $p;
- });
- break;
- case 'DATE_ADD':
- $expression
- ->setName('DATE')
- ->setConjunction(',')
- ->iterateParts(function ($p, $key) {
- if ($key === 1) {
- $p = ['value' => $p, 'type' => null];
- }
-
- return $p;
- });
- break;
- case 'DAYOFWEEK':
- $expression
- ->setName('STRFTIME')
- ->setConjunction(' ')
- ->add(["'%w', " => 'literal'], [], true)
- ->add([') + (1' => 'literal']); // Sqlite starts on index 0 but Sunday should be 1
- break;
- }
- }
-
- /**
- * Get the schema dialect.
- *
- * Used by Cake\Database\Schema package to reflect schema and
- * generate schema.
- *
- * @return \Cake\Database\Schema\BaseSchema
- */
- public function schemaDialect(): BaseSchema
- {
- if ($this->_schemaDialect === null) {
- $this->_schemaDialect = new SqliteSchema($this);
- }
-
- return $this->_schemaDialect;
- }
-
- /**
- * @inheritDoc
- */
- public function disableForeignKeySQL(): string
- {
- return 'PRAGMA foreign_keys = OFF';
- }
-
- /**
- * @inheritDoc
- */
- public function enableForeignKeySQL(): string
- {
- return 'PRAGMA foreign_keys = ON';
- }
-
- /**
- * {@inheritDoc}
- *
- * @return \Cake\Database\SqliteCompiler
- */
- public function newCompiler(): QueryCompiler
- {
- return new SqliteCompiler();
- }
-}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqlserverDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Dialect/SqlserverDialectTrait.php
deleted file mode 100644
index d125f9d4d..000000000
--- a/app/vendor/cakephp/cakephp/src/Database/Dialect/SqlserverDialectTrait.php
+++ /dev/null
@@ -1,397 +0,0 @@
-clause('limit');
- $offset = $query->clause('offset');
-
- if ($limit && $offset === null) {
- $query->modifier(['_auto_top_' => sprintf('TOP %d', $limit)]);
- }
-
- if ($offset !== null && !$query->clause('order')) {
- $query->order($query->newExpr()->add('(SELECT NULL)'));
- }
-
- if ($this->version() < 11 && $offset !== null) {
- return $this->_pagingSubquery($query, $limit, $offset);
- }
-
- return $this->_transformDistinct($query);
- }
-
- /**
- * Get the version of SQLserver we are connected to.
- *
- * @return string
- */
- protected function version(): string
- {
- $this->connect();
-
- return $this->_connection->getAttribute(PDO::ATTR_SERVER_VERSION);
- }
-
- /**
- * Generate a paging subquery for older versions of SQLserver.
- *
- * Prior to SQLServer 2012 there was no equivalent to LIMIT OFFSET, so a subquery must
- * be used.
- *
- * @param \Cake\Database\Query $original The query to wrap in a subquery.
- * @param int|null $limit The number of rows to fetch.
- * @param int|null $offset The number of rows to offset.
- * @return \Cake\Database\Query Modified query object.
- */
- protected function _pagingSubquery(Query $original, ?int $limit, ?int $offset): Query
- {
- $field = '_cake_paging_._cake_page_rownum_';
-
- if ($original->clause('order')) {
- // SQL server does not support column aliases in OVER clauses. But
- // the only practical way to specify the use of calculated columns
- // is with their alias. So substitute the select SQL in place of
- // any column aliases for those entries in the order clause.
- $select = $original->clause('select');
- $order = new OrderByExpression();
- $original
- ->clause('order')
- ->iterateParts(function ($direction, $orderBy) use ($select, $order) {
- $key = $orderBy;
- if (
- isset($select[$orderBy]) &&
- $select[$orderBy] instanceof ExpressionInterface
- ) {
- $key = $select[$orderBy]->sql(new ValueBinder());
- }
- $order->add([$key => $direction]);
-
- // Leave original order clause unchanged.
- return $orderBy;
- });
- } else {
- $order = new OrderByExpression('(SELECT NULL)');
- }
-
- $query = clone $original;
- $query->select([
- '_cake_page_rownum_' => new UnaryExpression('ROW_NUMBER() OVER', $order),
- ])->limit(null)
- ->offset(null)
- ->order([], true);
-
- $outer = new Query($query->getConnection());
- $outer->select('*')
- ->from(['_cake_paging_' => $query]);
-
- if ($offset) {
- $outer->where(["$field > " . (int)$offset]);
- }
- if ($limit) {
- $value = (int)$offset + (int)$limit;
- $outer->where(["$field <= $value"]);
- }
-
- // Decorate the original query as that is what the
- // end developer will be calling execute() on originally.
- $original->decorateResults(function ($row) {
- if (isset($row['_cake_page_rownum_'])) {
- unset($row['_cake_page_rownum_']);
- }
-
- return $row;
- });
-
- return $outer;
- }
-
- /**
- * Returns the passed query after rewriting the DISTINCT clause, so that drivers
- * that do not support the "ON" part can provide the actual way it should be done
- *
- * @param \Cake\Database\Query $original The query to be transformed
- * @return \Cake\Database\Query
- */
- protected function _transformDistinct(Query $original): Query
- {
- if (!is_array($original->clause('distinct'))) {
- return $original;
- }
-
- $query = clone $original;
- $distinct = $query->clause('distinct');
- $query->distinct(false);
-
- $order = new OrderByExpression($distinct);
- $query
- ->select(function ($q) use ($distinct, $order) {
- $over = $q->newExpr('ROW_NUMBER() OVER')
- ->add('(PARTITION BY')
- ->add($q->newExpr()->add($distinct)->setConjunction(','))
- ->add($order)
- ->add(')')
- ->setConjunction(' ');
-
- return [
- '_cake_distinct_pivot_' => $over,
- ];
- })
- ->limit(null)
- ->offset(null)
- ->order([], true);
-
- $outer = new Query($query->getConnection());
- $outer->select('*')
- ->from(['_cake_distinct_' => $query])
- ->where(['_cake_distinct_pivot_' => 1]);
-
- // Decorate the original query as that is what the
- // end developer will be calling execute() on originally.
- $original->decorateResults(function ($row) {
- if (isset($row['_cake_distinct_pivot_'])) {
- unset($row['_cake_distinct_pivot_']);
- }
-
- return $row;
- });
-
- return $outer;
- }
-
- /**
- * Returns a dictionary of expressions to be transformed when compiling a Query
- * to SQL. Array keys are method names to be called in this class
- *
- * @return array
- */
- protected function _expressionTranslators(): array
- {
- $namespace = 'Cake\Database\Expression';
-
- return [
- $namespace . '\FunctionExpression' => '_transformFunctionExpression',
- $namespace . '\TupleComparison' => '_transformTupleComparison',
- ];
- }
-
- /**
- * Receives a FunctionExpression and changes it so that it conforms to this
- * SQL dialect.
- *
- * @param \Cake\Database\Expression\FunctionExpression $expression The function expression to convert to TSQL.
- * @return void
- */
- protected function _transformFunctionExpression(FunctionExpression $expression): void
- {
- switch ($expression->getName()) {
- case 'CONCAT':
- // CONCAT function is expressed as exp1 + exp2
- $expression->setName('')->setConjunction(' +');
- break;
- case 'DATEDIFF':
- /** @var bool $hasDay */
- $hasDay = false;
- $visitor = function ($value) use (&$hasDay) {
- if ($value === 'day') {
- $hasDay = true;
- }
-
- return $value;
- };
- $expression->iterateParts($visitor);
-
- if (!$hasDay) {
- $expression->add(['day' => 'literal'], [], true);
- }
- break;
- case 'CURRENT_DATE':
- $time = new FunctionExpression('GETUTCDATE');
- $expression->setName('CONVERT')->add(['date' => 'literal', $time]);
- break;
- case 'CURRENT_TIME':
- $time = new FunctionExpression('GETUTCDATE');
- $expression->setName('CONVERT')->add(['time' => 'literal', $time]);
- break;
- case 'NOW':
- $expression->setName('GETUTCDATE');
- break;
- case 'EXTRACT':
- $expression->setName('DATEPART')->setConjunction(' ,');
- break;
- case 'DATE_ADD':
- $params = [];
- $visitor = function ($p, $key) use (&$params) {
- if ($key === 0) {
- $params[2] = $p;
- } else {
- $valueUnit = explode(' ', $p);
- $params[0] = rtrim($valueUnit[1], 's');
- $params[1] = $valueUnit[0];
- }
-
- return $p;
- };
- $manipulator = function ($p, $key) use (&$params) {
- return $params[$key];
- };
-
- $expression
- ->setName('DATEADD')
- ->setConjunction(',')
- ->iterateParts($visitor)
- ->iterateParts($manipulator)
- ->add([$params[2] => 'literal']);
- break;
- case 'DAYOFWEEK':
- $expression
- ->setName('DATEPART')
- ->setConjunction(' ')
- ->add(['weekday, ' => 'literal'], [], true);
- break;
- case 'SUBSTR':
- $expression->setName('SUBSTRING');
- if (count($expression) < 4) {
- $params = [];
- $expression
- ->iterateParts(function ($p) use (&$params) {
- return $params[] = $p;
- })
- ->add([new FunctionExpression('LEN', [$params[0]]), ['string']]);
- }
-
- break;
- }
- }
-
- /**
- * Get the schema dialect.
- *
- * Used by Cake\Schema package to reflect schema and
- * generate schema.
- *
- * @return \Cake\Database\Schema\BaseSchema
- */
- public function schemaDialect(): BaseSchema
- {
- return new SqlserverSchema($this);
- }
-
- /**
- * Returns a SQL snippet for creating a new transaction savepoint
- *
- * @param string|int $name save point name
- * @return string
- */
- public function savePointSQL($name): string
- {
- return 'SAVE TRANSACTION t' . $name;
- }
-
- /**
- * Returns a SQL snippet for releasing a previously created save point
- *
- * @param string|int $name save point name
- * @return string
- */
- public function releaseSavePointSQL($name): string
- {
- return 'COMMIT TRANSACTION t' . $name;
- }
-
- /**
- * Returns a SQL snippet for rollbacking a previously created save point
- *
- * @param string|int $name save point name
- * @return string
- */
- public function rollbackSavePointSQL($name): string
- {
- return 'ROLLBACK TRANSACTION t' . $name;
- }
-
- /**
- * {@inheritDoc}
- *
- * @return \Cake\Database\SqlserverCompiler
- */
- public function newCompiler(): QueryCompiler
- {
- return new SqlserverCompiler();
- }
-
- /**
- * @inheritDoc
- */
- public function disableForeignKeySQL(): string
- {
- return 'EXEC sp_MSforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"';
- }
-
- /**
- * @inheritDoc
- */
- public function enableForeignKeySQL(): string
- {
- return 'EXEC sp_MSforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"';
- }
-}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver.php b/app/vendor/cakephp/cakephp/src/Database/Driver.php
index 9ca0cec8c..6b56a8ea1 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Driver.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Driver.php
@@ -17,8 +17,10 @@
namespace Cake\Database;
use Cake\Core\App;
+use Cake\Core\Retry\CommandRetry;
use Cake\Database\Exception\MissingConnectionException;
-use Cake\Database\Schema\BaseSchema;
+use Cake\Database\Retry\ErrorCodeWaitStrategy;
+use Cake\Database\Schema\SchemaDialect;
use Cake\Database\Schema\TableSchema;
use Cake\Database\Statement\PDOStatement;
use Closure;
@@ -37,6 +39,11 @@ abstract class Driver implements DriverInterface
*/
protected const MAX_ALIAS_LENGTH = null;
+ /**
+ * @var int[] DB-specific error codes that allow connect retry
+ */
+ protected const RETRY_ERROR_CODES = [];
+
/**
* Instance of PDO.
*
@@ -67,6 +74,27 @@ abstract class Driver implements DriverInterface
*/
protected $_autoQuoting = false;
+ /**
+ * Whether or not the server supports common table expressions.
+ *
+ * @var bool|null
+ */
+ protected $supportsCTEs = null;
+
+ /**
+ * The server version
+ *
+ * @var string|null
+ */
+ protected $_version;
+
+ /**
+ * The last number of connection retry attempts.
+ *
+ * @var int
+ */
+ protected $connectRetries = 0;
+
/**
* Constructor
*
@@ -96,13 +124,18 @@ public function __construct(array $config = [])
*/
protected function _connect(string $dsn, array $config): bool
{
- try {
- $connection = new PDO(
+ $action = function () use ($dsn, $config) {
+ $this->setConnection(new PDO(
$dsn,
$config['username'] ?: null,
$config['password'] ?: null,
$config['flags']
- );
+ ));
+ };
+
+ $retry = new CommandRetry(new ErrorCodeWaitStrategy(static::RETRY_ERROR_CODES, 5), 4);
+ try {
+ $retry->run($action);
} catch (PDOException $e) {
throw new MissingConnectionException(
[
@@ -112,8 +145,9 @@ protected function _connect(string $dsn, array $config): bool
null,
$e
);
+ } finally {
+ $this->connectRetries = $retry->getRetries();
}
- $this->setConnection($connection);
return true;
}
@@ -130,6 +164,22 @@ public function disconnect(): void
{
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
$this->_connection = null;
+ $this->_version = null;
+ }
+
+ /**
+ * Returns connected server version.
+ *
+ * @return string
+ */
+ public function version(): string
+ {
+ if ($this->_version === null) {
+ $this->connect();
+ $this->_version = (string)$this->_connection->getAttribute(PDO::ATTR_SERVER_VERSION);
+ }
+
+ return $this->_version;
}
/**
@@ -218,36 +268,6 @@ public function rollbackTransaction(): bool
return $this->_connection->rollBack();
}
- /**
- * @inheritDoc
- */
- abstract public function releaseSavePointSQL($name): string;
-
- /**
- * @inheritDoc
- */
- abstract public function savePointSQL($name): string;
-
- /**
- * @inheritDoc
- */
- abstract public function rollbackSavePointSQL($name): string;
-
- /**
- * @inheritDoc
- */
- abstract public function disableForeignKeySQL(): string;
-
- /**
- * @inheritDoc
- */
- abstract public function enableForeignKeySQL(): string;
-
- /**
- * @inheritDoc
- */
- abstract public function supportsDynamicConstraints(): bool;
-
/**
* @inheritDoc
*/
@@ -257,17 +277,23 @@ public function supportsSavePoints(): bool
}
/**
- * {@inheritDoc}
+ * Returns true if the server supports common table expressions.
*
- * @param mixed $value The value to quote.
- * @param int $type Type to be used for determining kind of quoting to perform.
- * @return string
+ * @return bool
+ */
+ public function supportsCTEs(): bool
+ {
+ return $this->supportsCTEs === true;
+ }
+
+ /**
+ * @inheritDoc
*/
public function quote($value, $type = PDO::PARAM_STR): string
{
$this->connect();
- return $this->_connection->quote($value, $type);
+ return $this->_connection->quote((string)$value, $type);
}
/**
@@ -290,7 +316,7 @@ abstract public function queryTranslator(string $type): Closure;
/**
* @inheritDoc
*/
- abstract public function schemaDialect(): BaseSchema;
+ abstract public function schemaDialect(): SchemaDialect;
/**
* @inheritDoc
@@ -330,7 +356,7 @@ public function schemaValue($value): string
return (string)$value;
}
- return $this->_connection->quote($value, PDO::PARAM_STR);
+ return $this->_connection->quote((string)$value, PDO::PARAM_STR);
}
/**
@@ -404,13 +430,13 @@ public function isAutoQuotingEnabled(): bool
/**
* @inheritDoc
*/
- public function compileQuery(Query $query, ValueBinder $generator): array
+ public function compileQuery(Query $query, ValueBinder $binder): array
{
$processor = $this->newCompiler();
$translator = $this->queryTranslator($query->type());
$query = $translator($query);
- return [$query, $processor->compile($query, $generator)];
+ return [$query, $processor->compile($query, $binder)];
}
/**
@@ -446,6 +472,16 @@ public function getMaxAliasLength(): ?int
return static::MAX_ALIAS_LENGTH;
}
+ /**
+ * Returns the number of connection retry attempts made.
+ *
+ * @return int
+ */
+ public function getConnectRetries(): int
+ {
+ return $this->connectRetries;
+ }
+
/**
* Destructor
*/
diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php b/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php
index c7dcacde6..8afe34a85 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php
@@ -16,25 +16,40 @@
*/
namespace Cake\Database\Driver;
-use Cake\Database\Dialect\MysqlDialectTrait;
use Cake\Database\Driver;
use Cake\Database\Query;
+use Cake\Database\Schema\MysqlSchemaDialect;
+use Cake\Database\Schema\SchemaDialect;
use Cake\Database\Statement\MysqlStatement;
use Cake\Database\StatementInterface;
use PDO;
/**
- * Class Mysql
+ * MySQL Driver
*/
class Mysql extends Driver
{
- use MysqlDialectTrait;
+ use SqlDialectTrait;
/**
* @inheritDoc
*/
protected const MAX_ALIAS_LENGTH = 256;
+ /**
+ * Server type MySQL
+ *
+ * @var string
+ */
+ protected const SERVER_TYPE_MYSQL = 'mysql';
+
+ /**
+ * Server type MariaDB
+ *
+ * @var string
+ */
+ protected const SERVER_TYPE_MARIADB = 'mariadb';
+
/**
* Base configuration settings for MySQL driver
*
@@ -54,19 +69,68 @@ class Mysql extends Driver
];
/**
- * The server version
+ * The schema dialect for this driver
*
- * @var string
+ * @var \Cake\Database\Schema\MysqlSchemaDialect|null
*/
- protected $_version;
+ protected $_schemaDialect;
/**
* Whether or not the server supports native JSON
*
- * @var bool
+ * @var bool|null
*/
protected $_supportsNativeJson;
+ /**
+ * Whether or not the connected server supports window functions.
+ *
+ * @var bool|null
+ */
+ protected $_supportsWindowFunctions;
+
+ /**
+ * String used to start a database identifier quoting to make it safe
+ *
+ * @var string
+ */
+ protected $_startQuote = '`';
+
+ /**
+ * String used to end a database identifier quoting to make it safe
+ *
+ * @var string
+ */
+ protected $_endQuote = '`';
+
+ /**
+ * Server type.
+ *
+ * If the underlying server is MariaDB, its value will get set to `'mariadb'`
+ * after `version()` method is called.
+ *
+ * @var string
+ */
+ protected $serverType = self::SERVER_TYPE_MYSQL;
+
+ /**
+ * Mapping of feature to db server version for feature availability checks.
+ *
+ * @var array
+ */
+ protected $featuresToVersionMap = [
+ 'mysql' => [
+ 'json' => '5.7.0',
+ 'cte' => '8.0.0',
+ 'window' => '8.0.0',
+ ],
+ 'mariadb' => [
+ 'json' => '10.2.7',
+ 'cte' => '10.2.1',
+ 'window' => '10.2.0',
+ ],
+ ];
+
/**
* Establishes a connection to the database server
*
@@ -157,6 +221,18 @@ public function prepare($query): StatementInterface
return $result;
}
+ /**
+ * @inheritDoc
+ */
+ public function schemaDialect(): SchemaDialect
+ {
+ if ($this->_schemaDialect === null) {
+ $this->_schemaDialect = new MysqlSchemaDialect($this);
+ }
+
+ return $this->_schemaDialect;
+ }
+
/**
* @inheritDoc
*/
@@ -165,6 +241,22 @@ public function schema(): string
return $this->_config['database'];
}
+ /**
+ * @inheritDoc
+ */
+ public function disableForeignKeySQL(): string
+ {
+ return 'SET foreign_key_checks = 0';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function enableForeignKeySQL(): string
+ {
+ return 'SET foreign_key_checks = 1';
+ }
+
/**
* @inheritDoc
*/
@@ -173,6 +265,57 @@ public function supportsDynamicConstraints(): bool
return true;
}
+ /**
+ * Returns true if the connected server is MariaDB.
+ *
+ * @return bool
+ */
+ public function isMariadb(): bool
+ {
+ $this->version();
+
+ return $this->serverType === static::SERVER_TYPE_MARIADB;
+ }
+
+ /**
+ * Returns connected server version.
+ *
+ * @return string
+ */
+ public function version(): string
+ {
+ if ($this->_version === null) {
+ $this->connect();
+ $this->_version = (string)$this->_connection->getAttribute(PDO::ATTR_SERVER_VERSION);
+
+ if (strpos($this->_version, 'MariaDB') !== false) {
+ $this->serverType = static::SERVER_TYPE_MARIADB;
+ preg_match('/^(?:5\.5\.5-)?(\d+\.\d+\.\d+.*-MariaDB[^:]*)/', $this->_version, $matches);
+ $this->_version = $matches[1];
+ }
+ }
+
+ return $this->_version;
+ }
+
+ /**
+ * Returns true if the server supports common table expressions.
+ *
+ * @return bool
+ */
+ public function supportsCTEs(): bool
+ {
+ if ($this->supportsCTEs === null) {
+ $this->supportsCTEs = version_compare(
+ $this->version(),
+ $this->featuresToVersionMap[$this->serverType]['cte'],
+ '>='
+ );
+ }
+
+ return $this->supportsCTEs;
+ }
+
/**
* Returns true if the server supports native JSON columns
*
@@ -180,14 +323,32 @@ public function supportsDynamicConstraints(): bool
*/
public function supportsNativeJson(): bool
{
- if ($this->_supportsNativeJson !== null) {
- return $this->_supportsNativeJson;
+ if ($this->_supportsNativeJson === null) {
+ $this->_supportsNativeJson = version_compare(
+ $this->version(),
+ $this->featuresToVersionMap[$this->serverType]['json'],
+ '>='
+ );
}
- if ($this->_version === null) {
- $this->_version = (string)$this->_connection->getAttribute(PDO::ATTR_SERVER_VERSION);
+ return $this->_supportsNativeJson;
+ }
+
+ /**
+ * Returns true if the connected server supports window functions.
+ *
+ * @return bool
+ */
+ public function supportsWindowFunctions(): bool
+ {
+ if ($this->_supportsWindowFunctions === null) {
+ $this->_supportsWindowFunctions = version_compare(
+ $this->version(),
+ $this->featuresToVersionMap[$this->serverType]['window'],
+ '>='
+ );
}
- return $this->_supportsNativeJson = version_compare($this->_version, '5.7.0', '>=');
+ return $this->_supportsWindowFunctions;
}
}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php b/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php
index abbdd65d8..51ca030b0 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Driver/Postgres.php
@@ -16,10 +16,15 @@
*/
namespace Cake\Database\Driver;
-use Cake\Database\Dialect\PostgresDialectTrait;
use Cake\Database\Driver;
+use Cake\Database\Expression\FunctionExpression;
+use Cake\Database\Expression\IdentifierExpression;
+use Cake\Database\Expression\StringExpression;
use Cake\Database\PostgresCompiler;
+use Cake\Database\Query;
use Cake\Database\QueryCompiler;
+use Cake\Database\Schema\PostgresSchemaDialect;
+use Cake\Database\Schema\SchemaDialect;
use PDO;
/**
@@ -27,7 +32,7 @@
*/
class Postgres extends Driver
{
- use PostgresDialectTrait;
+ use SqlDialectTrait;
/**
* @inheritDoc
@@ -53,6 +58,32 @@ class Postgres extends Driver
'init' => [],
];
+ /**
+ * The schema dialect class for this driver
+ *
+ * @var \Cake\Database\Schema\PostgresSchemaDialect|null
+ */
+ protected $_schemaDialect;
+
+ /**
+ * String used to start a database identifier quoting to make it safe
+ *
+ * @var string
+ */
+ protected $_startQuote = '"';
+
+ /**
+ * String used to end a database identifier quoting to make it safe
+ *
+ * @var string
+ */
+ protected $_endQuote = '"';
+
+ /**
+ * @inheritDoc
+ */
+ protected $supportsCTEs = true;
+
/**
* Establishes a connection to the database server
*
@@ -106,6 +137,18 @@ public function enabled(): bool
return in_array('pgsql', PDO::getAvailableDrivers(), true);
}
+ /**
+ * @inheritDoc
+ */
+ public function schemaDialect(): SchemaDialect
+ {
+ if ($this->_schemaDialect === null) {
+ $this->_schemaDialect = new PostgresSchemaDialect($this);
+ }
+
+ return $this->_schemaDialect;
+ }
+
/**
* Sets connection encoding
*
@@ -131,6 +174,22 @@ public function setSchema(string $schema): void
$this->_connection->exec('SET search_path TO ' . $this->_connection->quote($schema));
}
+ /**
+ * @inheritDoc
+ */
+ public function disableForeignKeySQL(): string
+ {
+ return 'SET CONSTRAINTS ALL DEFERRED';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function enableForeignKeySQL(): string
+ {
+ return 'SET CONSTRAINTS ALL IMMEDIATE';
+ }
+
/**
* @inheritDoc
*/
@@ -139,6 +198,130 @@ public function supportsDynamicConstraints(): bool
return true;
}
+ /**
+ * @inheritDoc
+ */
+ protected function _transformDistinct(Query $query): Query
+ {
+ return $query;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function _insertQueryTranslator(Query $query): Query
+ {
+ if (!$query->clause('epilog')) {
+ $query->epilog('RETURNING *');
+ }
+
+ return $query;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function _expressionTranslators(): array
+ {
+ return [
+ IdentifierExpression::class => '_transformIdentifierExpression',
+ FunctionExpression::class => '_transformFunctionExpression',
+ StringExpression::class => '_transformStringExpression',
+ ];
+ }
+
+ /**
+ * Changes identifer expression into postgresql format.
+ *
+ * @param \Cake\Database\Expression\IdentifierExpression $expression The expression to tranform.
+ * @return void
+ */
+ protected function _transformIdentifierExpression(IdentifierExpression $expression): void
+ {
+ $collation = $expression->getCollation();
+ if ($collation) {
+ // use trim() to work around expression being transformed multiple times
+ $expression->setCollation('"' . trim($collation, '"') . '"');
+ }
+ }
+
+ /**
+ * Receives a FunctionExpression and changes it so that it conforms to this
+ * SQL dialect.
+ *
+ * @param \Cake\Database\Expression\FunctionExpression $expression The function expression to convert
+ * to postgres SQL.
+ * @return void
+ */
+ protected function _transformFunctionExpression(FunctionExpression $expression): void
+ {
+ switch ($expression->getName()) {
+ case 'CONCAT':
+ // CONCAT function is expressed as exp1 || exp2
+ $expression->setName('')->setConjunction(' ||');
+ break;
+ case 'DATEDIFF':
+ $expression
+ ->setName('')
+ ->setConjunction('-')
+ ->iterateParts(function ($p) {
+ if (is_string($p)) {
+ $p = ['value' => [$p => 'literal'], 'type' => null];
+ } else {
+ $p['value'] = [$p['value']];
+ }
+
+ return new FunctionExpression('DATE', $p['value'], [$p['type']]);
+ });
+ break;
+ case 'CURRENT_DATE':
+ $time = new FunctionExpression('LOCALTIMESTAMP', [' 0 ' => 'literal']);
+ $expression->setName('CAST')->setConjunction(' AS ')->add([$time, 'date' => 'literal']);
+ break;
+ case 'CURRENT_TIME':
+ $time = new FunctionExpression('LOCALTIMESTAMP', [' 0 ' => 'literal']);
+ $expression->setName('CAST')->setConjunction(' AS ')->add([$time, 'time' => 'literal']);
+ break;
+ case 'NOW':
+ $expression->setName('LOCALTIMESTAMP')->add([' 0 ' => 'literal']);
+ break;
+ case 'RAND':
+ $expression->setName('RANDOM');
+ break;
+ case 'DATE_ADD':
+ $expression
+ ->setName('')
+ ->setConjunction(' + INTERVAL')
+ ->iterateParts(function ($p, $key) {
+ if ($key === 1) {
+ $p = sprintf("'%s'", $p);
+ }
+
+ return $p;
+ });
+ break;
+ case 'DAYOFWEEK':
+ $expression
+ ->setName('EXTRACT')
+ ->setConjunction(' ')
+ ->add(['DOW FROM' => 'literal'], [], true)
+ ->add([') + (1' => 'literal']); // Postgres starts on index 0 but Sunday should be 1
+ break;
+ }
+ }
+
+ /**
+ * Changes string expression into postgresql format.
+ *
+ * @param \Cake\Database\Expression\StringExpression $expression The string expression to tranform.
+ * @return void
+ */
+ protected function _transformStringExpression(StringExpression $expression): void
+ {
+ // use trim() to work around expression being transformed multiple times
+ $expression->setCollation('"' . trim($expression->getCollation(), '"') . '"');
+ }
+
/**
* {@inheritDoc}
*
diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/SqlDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Driver/SqlDialectTrait.php
new file mode 100644
index 000000000..03827321d
--- /dev/null
+++ b/app/vendor/cakephp/cakephp/src/Database/Driver/SqlDialectTrait.php
@@ -0,0 +1,308 @@
+_startQuote . $identifier . $this->_endQuote;
+ }
+
+ // string.string
+ if (preg_match('/^[\w-]+\.[^ \*]*$/u', $identifier)) {
+ $items = explode('.', $identifier);
+
+ return $this->_startQuote . implode($this->_endQuote . '.' . $this->_startQuote, $items) . $this->_endQuote;
+ }
+
+ // string.*
+ if (preg_match('/^[\w-]+\.\*$/u', $identifier)) {
+ return $this->_startQuote . str_replace('.*', $this->_endQuote . '.*', $identifier);
+ }
+
+ // Functions
+ if (preg_match('/^([\w-]+)\((.*)\)$/', $identifier, $matches)) {
+ return $matches[1] . '(' . $this->quoteIdentifier($matches[2]) . ')';
+ }
+
+ // Alias.field AS thing
+ if (preg_match('/^([\w-]+(\.[\w\s-]+|\(.*\))*)\s+AS\s*([\w-]+)$/ui', $identifier, $matches)) {
+ return $this->quoteIdentifier($matches[1]) . ' AS ' . $this->quoteIdentifier($matches[3]);
+ }
+
+ // string.string with spaces
+ if (preg_match('/^([\w-]+\.[\w][\w\s\-]*[\w])(.*)/u', $identifier, $matches)) {
+ $items = explode('.', $matches[1]);
+ $field = implode($this->_endQuote . '.' . $this->_startQuote, $items);
+
+ return $this->_startQuote . $field . $this->_endQuote . $matches[2];
+ }
+
+ if (preg_match('/^[\w_\s-]*[\w_-]+/u', $identifier)) {
+ return $this->_startQuote . $identifier . $this->_endQuote;
+ }
+
+ return $identifier;
+ }
+
+ /**
+ * Returns a callable function that will be used to transform a passed Query object.
+ * This function, in turn, will return an instance of a Query object that has been
+ * transformed to accommodate any specificities of the SQL dialect in use.
+ *
+ * @param string $type the type of query to be transformed
+ * (select, insert, update, delete)
+ * @return \Closure
+ */
+ public function queryTranslator(string $type): Closure
+ {
+ return function ($query) use ($type) {
+ if ($this->isAutoQuotingEnabled()) {
+ $query = (new IdentifierQuoter($this))->quote($query);
+ }
+
+ /** @var \Cake\ORM\Query $query */
+ $query = $this->{'_' . $type . 'QueryTranslator'}($query);
+ $translators = $this->_expressionTranslators();
+ if (!$translators) {
+ return $query;
+ }
+
+ $query->traverseExpressions(function ($expression) use ($translators, $query): void {
+ foreach ($translators as $class => $method) {
+ if ($expression instanceof $class) {
+ $this->{$method}($expression, $query);
+ }
+ }
+ });
+
+ return $query;
+ };
+ }
+
+ /**
+ * Returns an associative array of methods that will transform Expression
+ * objects to conform with the specific SQL dialect. Keys are class names
+ * and values a method in this class.
+ *
+ * @psalm-return array';
$e .= '_templates['js']['context'] = '_templates['js']['context'] .= 'style="display: none;">{:context}';
$this->_templates['js']['code'] = '_templates['html']['error'] = $e;
- $this->_templates['html']['context'] = '
Context ';
+ $this->_templates['html']['context'] = '
Context ';
$this->_templates['html']['context'] .= '';
}
@@ -182,7 +218,7 @@ public static function getInstance(?string $class = null)
* @param mixed|null $value The value to set.
* @param bool $merge Whether to recursively merge or overwrite existing config, defaults to true.
* @return mixed Config value being read, or the object itself on write operations.
- * @throws \Cake\Core\Exception\Exception When trying to set a key that is invalid.
+ * @throws \Cake\Core\Exception\CakeException When trying to set a key that is invalid.
*/
public static function configInstance($key = null, $value = null, bool $merge = true)
{
@@ -223,18 +259,78 @@ public static function setOutputMask(array $value, bool $merge = true): void
static::configInstance('outputMask', $value, $merge);
}
+ /**
+ * Add an editor link format
+ *
+ * Template strings can use the `{file}` and `{line}` placeholders.
+ * Closures templates must return a string, and accept two parameters:
+ * The file and line.
+ *
+ * @param string $name The name of the editor.
+ * @param string|\Closure $template The string template or closure
+ * @return void
+ */
+ public static function addEditor(string $name, $template): void
+ {
+ $instance = static::getInstance();
+ if (!is_string($template) && !($template instanceof Closure)) {
+ $type = getTypeName($template);
+ throw new RuntimeException("Invalid editor type of `{$type}`. Expected string or Closure.");
+ }
+ $instance->editors[$name] = $template;
+ }
+
+ /**
+ * Choose the editor link style you want to use.
+ *
+ * @param string $name The editor name.
+ * @return void
+ */
+ public static function setEditor(string $name): void
+ {
+ $instance = static::getInstance();
+ if (!isset($instance->editors[$name])) {
+ $known = implode(', ', array_keys($instance->editors));
+ throw new RuntimeException("Unknown editor `{$name}`. Known editors are {$known}");
+ }
+ $instance->setConfig('editor', $name);
+ }
+
+ /**
+ * Get a formatted URL for the active editor.
+ *
+ * @param string $file The file to create a link for.
+ * @param int $line The line number to create a link for.
+ * @return string The formatted URL.
+ */
+ public static function editorUrl(string $file, int $line): string
+ {
+ $instance = static::getInstance();
+ $editor = $instance->getConfig('editor');
+ if (!isset($instance->editors[$editor])) {
+ throw new RuntimeException("Cannot format editor URL `{$editor}` is not a known editor.");
+ }
+
+ $template = $instance->editors[$editor];
+ if (is_string($template)) {
+ return str_replace(['{file}', '{line}'], [$file, (string)$line], $template);
+ }
+
+ return $template($file, $line);
+ }
+
/**
* Recursively formats and outputs the contents of the supplied variable.
*
* @param mixed $var The variable to dump.
- * @param int $depth The depth to output to. Defaults to 3.
+ * @param int $maxDepth The depth to output to. Defaults to 3.
* @return void
* @see \Cake\Error\Debugger::exportVar()
* @link https://book.cakephp.org/4/en/development/debugging.html#outputting-values
*/
- public static function dump($var, int $depth = 3): void
+ public static function dump($var, int $maxDepth = 3): void
{
- pr(static::exportVar($var, $depth));
+ pr(static::exportVar($var, $maxDepth));
}
/**
@@ -243,16 +339,16 @@ public static function dump($var, int $depth = 3): void
*
* @param mixed $var Variable or content to log.
* @param int|string $level Type of log to use. Defaults to 'debug'.
- * @param int $depth The depth to output to. Defaults to 3.
+ * @param int $maxDepth The depth to output to. Defaults to 3.
* @return void
*/
- public static function log($var, $level = 'debug', int $depth = 3): void
+ public static function log($var, $level = 'debug', int $maxDepth = 3): void
{
/** @var string $source */
$source = static::trace(['start' => 1]);
$source .= "\n";
- Log::write($level, "\n" . $source . static::exportVar($var, $depth));
+ Log::write($level, "\n" . $source . static::exportVar($var, $maxDepth));
}
/**
@@ -364,6 +460,7 @@ public static function formatTrace($backtrace, array $options = [])
return $back;
}
+ /** @psalm-suppress InvalidArgument */
return implode("\n", $back);
}
@@ -471,6 +568,36 @@ protected static function _highlight(string $str): string
return $highlight;
}
+ /**
+ * Get the configured export formatter or infer one based on the environment.
+ *
+ * @return \Cake\Error\Debug\FormatterInterface
+ * @unstable This method is not stable and may change in the future.
+ * @since 4.1.0
+ */
+ public function getExportFormatter(): FormatterInterface
+ {
+ $instance = static::getInstance();
+ $class = $instance->getConfig('exportFormatter');
+ if (!$class) {
+ if (ConsoleFormatter::environmentMatches()) {
+ $class = ConsoleFormatter::class;
+ } elseif (HtmlFormatter::environmentMatches()) {
+ $class = HtmlFormatter::class;
+ } else {
+ $class = TextFormatter::class;
+ }
+ }
+ $instance = new $class();
+ if (!$instance instanceof FormatterInterface) {
+ throw new RuntimeException(
+ "The `{$class}` formatter does not implement " . FormatterInterface::class
+ );
+ }
+
+ return $instance;
+ }
+
/**
* Converts a variable to a string for debug output.
*
@@ -489,47 +616,59 @@ protected static function _highlight(string $str): string
* shown in an error message if CakePHP is deployed in development mode.
*
* @param mixed $var Variable to convert.
- * @param int $depth The depth to output to. Defaults to 3.
+ * @param int $maxDepth The depth to output to. Defaults to 3.
* @return string Variable as a formatted string
*/
- public static function exportVar($var, int $depth = 3): string
+ public static function exportVar($var, int $maxDepth = 3): string
{
- return static::_export($var, $depth, 0);
+ $context = new DebugContext($maxDepth);
+ $node = static::export($var, $context);
+
+ return static::getInstance()->getExportFormatter()->dump($node);
+ }
+
+ /**
+ * Convert the variable to the internal node tree.
+ *
+ * The node tree can be manipulated and serialized more easily
+ * than many object graphs can.
+ *
+ * @param mixed $var Variable to convert.
+ * @param int $maxDepth The depth to generate nodes to. Defaults to 3.
+ * @return \Cake\Error\Debug\NodeInterface The root node of the tree.
+ */
+ public static function exportVarAsNodes($var, int $maxDepth = 3): NodeInterface
+ {
+ return static::export($var, new DebugContext($maxDepth));
}
/**
* Protected export function used to keep track of indentation and recursion.
*
* @param mixed $var The variable to dump.
- * @param int $depth The remaining depth.
- * @param int $indent The current indentation level.
- * @return string The dumped variable.
+ * @param \Cake\Error\Debug\DebugContext $context Dump context
+ * @return \Cake\Error\Debug\NodeInterface The dumped variable.
*/
- protected static function _export($var, int $depth, int $indent): string
+ protected static function export($var, DebugContext $context): NodeInterface
{
- switch (static::getType($var)) {
- case 'boolean':
- return $var ? 'true' : 'false';
- case 'integer':
- return '(int) ' . $var;
+ $type = static::getType($var);
+ switch ($type) {
case 'float':
- return '(float) ' . $var;
case 'string':
- if (trim($var) === '' && ctype_space($var) === false) {
- return "''";
- }
-
- return "'" . $var . "'";
- case 'array':
- return static::_array($var, $depth - 1, $indent + 1);
case 'resource':
- return strtolower(gettype($var));
+ case 'resource (closed)':
case 'null':
- return 'null';
+ return new ScalarNode($type, $var);
+ case 'boolean':
+ return new ScalarNode('bool', $var);
+ case 'integer':
+ return new ScalarNode('int', $var);
+ case 'array':
+ return static::exportArray($var, $context->withAddedDepth());
case 'unknown':
- return 'unknown';
+ return new SpecialNode('(unknown)');
default:
- return static::_object($var, $depth - 1, $indent + 1);
+ return static::exportObject($var, $context->withAddedDepth());
}
}
@@ -547,81 +686,81 @@ protected static function _export($var, int $depth, int $indent): string
* - schema
*
* @param array $var The array to export.
- * @param int $depth The current depth, used for recursion tracking.
- * @param int $indent The current indentation level.
- * @return string Exported array.
+ * @param \Cake\Error\Debug\DebugContext $context The current dump context.
+ * @return \Cake\Error\Debug\ArrayNode Exported array.
*/
- protected static function _array(array $var, int $depth, int $indent): string
+ protected static function exportArray(array $var, DebugContext $context): ArrayNode
{
- $out = '[';
- $break = $end = '';
- if (!empty($var)) {
- $break = "\n" . str_repeat("\t", $indent);
- $end = "\n" . str_repeat("\t", $indent - 1);
- }
- $vars = [];
+ $items = [];
- if ($depth >= 0) {
- $outputMask = (array)static::outputMask();
+ $remaining = $context->remainingDepth();
+ if ($remaining >= 0) {
+ $outputMask = static::outputMask();
foreach ($var as $key => $val) {
- // Sniff for globals as !== explodes in < 5.4
- if ($key === 'GLOBALS' && is_array($val) && isset($val['GLOBALS'])) {
- $val = '[recursion]';
- } elseif (array_key_exists($key, $outputMask)) {
- $val = (string)$outputMask[$key];
+ if (array_key_exists($key, $outputMask)) {
+ $node = new ScalarNode('string', $outputMask[$key]);
} elseif ($val !== $var) {
- $val = static::_export($val, $depth, $indent);
+ // Dump all the items without increasing depth.
+ $node = static::export($val, $context);
+ } else {
+ // Likely recursion, so we increase depth.
+ $node = static::export($val, $context->withAddedDepth());
}
- $vars[] = $break . static::exportVar($key) .
- ' => ' .
- $val;
+ $items[] = new ArrayItemNode(static::export($key, $context), $node);
}
} else {
- $vars[] = $break . '[maximum depth reached]';
+ $items[] = new ArrayItemNode(
+ new ScalarNode('string', ''),
+ new SpecialNode('[maximum depth reached]')
+ );
}
- return $out . implode(',', $vars) . $end . ']';
+ return new ArrayNode($items);
}
/**
- * Handles object to string conversion.
+ * Handles object to node conversion.
*
* @param object $var Object to convert.
- * @param int $depth The current depth, used for tracking recursion.
- * @param int $indent The current indentation level.
- * @return string
+ * @param \Cake\Error\Debug\DebugContext $context The dump context.
+ * @return \Cake\Error\Debug\NodeInterface
* @see \Cake\Error\Debugger::exportVar()
*/
- protected static function _object(object $var, int $depth, int $indent): string
+ protected static function exportObject(object $var, DebugContext $context): NodeInterface
{
- $out = '';
- $props = [];
+ $isRef = $context->hasReference($var);
+ $refNum = $context->getReferenceId($var);
$className = get_class($var);
- $out .= 'object(' . $className . ') {';
- $break = "\n" . str_repeat("\t", $indent);
- $end = "\n" . str_repeat("\t", $indent - 1);
-
- if ($depth > 0 && method_exists($var, '__debugInfo')) {
- try {
- return $out . "\n" .
- substr(static::_array($var->__debugInfo(), $depth - 1, $indent), 1, -1) .
- $end . '}';
- } catch (Exception $e) {
- $message = $e->getMessage();
-
- return $out . "\n(unable to export object: $message)\n }";
- }
+ if ($isRef) {
+ return new ReferenceNode($className, $refNum);
}
+ $node = new ClassNode($className, $refNum);
+
+ $remaining = $context->remainingDepth();
+ if ($remaining > 0) {
+ if (method_exists($var, '__debugInfo')) {
+ try {
+ foreach ($var->__debugInfo() as $key => $val) {
+ $node->addProperty(new PropertyNode("'{$key}'", null, static::export($val, $context)));
+ }
- if ($depth > 0) {
- $outputMask = (array)static::outputMask();
+ return $node;
+ } catch (Exception $e) {
+ return new SpecialNode("(unable to export object: {$e->getMessage()})");
+ }
+ }
+
+ $outputMask = static::outputMask();
$objectVars = get_object_vars($var);
foreach ($objectVars as $key => $value) {
- $value = array_key_exists($key, $outputMask)
- ? $outputMask[$key]
- : static::_export($value, $depth - 1, $indent);
- $props[] = "$key => " . $value;
+ if (array_key_exists($key, $outputMask)) {
+ $value = $outputMask[$key];
+ }
+ /** @psalm-suppress RedundantCast */
+ $node->addProperty(
+ new PropertyNode((string)$key, 'public', static::export($value, $context->withAddedDepth()))
+ );
}
$ref = new ReflectionObject($var);
@@ -633,36 +772,28 @@ protected static function _object(object $var, int $depth, int $indent): string
foreach ($filters as $filter => $visibility) {
$reflectionProperties = $ref->getProperties($filter);
foreach ($reflectionProperties as $reflectionProperty) {
- $value = null;
$reflectionProperty->setAccessible(true);
if (
method_exists($reflectionProperty, 'isInitialized') &&
!$reflectionProperty->isInitialized($var)
) {
- $value = '[uninitialized]';
+ $value = new SpecialNode('[uninitialized]');
+ } else {
+ $value = static::export($reflectionProperty->getValue($var), $context->withAddedDepth());
}
-
- if ($value === null) {
- $property = $reflectionProperty->getValue($var);
- $value = static::_export($property, $depth - 1, $indent);
- }
-
- $key = $reflectionProperty->name;
- $props[] = sprintf(
- '[%s] %s => %s',
- $visibility,
- $key,
- array_key_exists($key, $outputMask) ? $outputMask[$key] : $value
+ $node->addProperty(
+ new PropertyNode(
+ $reflectionProperty->getName(),
+ $visibility,
+ $value
+ )
);
}
}
-
- $out .= $break . implode($break, $props) . $end;
}
- $out .= '}';
- return $out;
+ return $node;
}
/**
@@ -713,7 +844,7 @@ public static function setOutputFormat(string $format): void
* Gets the following templates: `id`, `context`
* - 'links' - An array of HTML links that are used for creating links to other resources.
* Typically this is used to create javascript links to open other sections.
- * Link keys, are: `code`, `context`, `help`. See the js output format for an
+ * Link keys, are: `code`, `context`, `help`. See the JS output format for an
* example.
* - 'traceLine' - Used for creating lines in the stacktrace. Gets the following
* template variables: `reference`, `path`, `line`
@@ -817,7 +948,6 @@ public function outputError(array $data): void
}
if (!empty($tpl['escapeContext'])) {
- $context = h($context);
$data['description'] = h($data['description']);
}
@@ -834,7 +964,7 @@ public function outputError(array $data): void
$links = implode(' ', $links);
if (isset($tpl['callback']) && is_callable($tpl['callback'])) {
- call_user_func($tpl['callback'], $data, compact('links', 'info'));
+ $tpl['callback']($data, compact('links', 'info'));
return;
}
@@ -850,32 +980,21 @@ public function outputError(array $data): void
*/
public static function getType($var): string
{
- if (is_object($var)) {
- return get_class($var);
- }
- if ($var === null) {
+ $type = getTypeName($var);
+
+ if ($type === 'NULL') {
return 'null';
}
- if (is_string($var)) {
- return 'string';
- }
- if (is_array($var)) {
- return 'array';
- }
- if (is_int($var)) {
- return 'integer';
- }
- if (is_bool($var)) {
- return 'boolean';
- }
- if (is_float($var)) {
+
+ if ($type === 'double') {
return 'float';
}
- if (is_resource($var)) {
- return 'resource';
+
+ if ($type === 'unknown type') {
+ return 'unknown';
}
- return 'unknown';
+ return $type;
}
/**
@@ -885,59 +1004,31 @@ public static function getType($var): string
* @param array $location If contains keys "file" and "line" their values will
* be used to show location info.
* @param bool|null $showHtml If set to true, the method prints the debug
- * data in a browser-friendly way.
+ * data encoded as HTML. If false, plain text formatting will be used.
+ * If null, the format will be chosen based on the configured exportFormatter, or
+ * environment conditions.
* @return void
*/
public static function printVar($var, array $location = [], ?bool $showHtml = null): void
{
$location += ['file' => null, 'line' => null];
- $file = $location['file'];
- $line = $location['line'];
- $lineInfo = '';
- if ($file) {
- $search = [];
- if (defined('ROOT')) {
- $search = [ROOT];
- }
- if (defined('CAKE_CORE_INCLUDE_PATH')) {
- array_unshift($search, CAKE_CORE_INCLUDE_PATH);
- }
- $file = str_replace($search, '', $file);
- }
- $html = <<
-%s
-
-%s
-
-
-HTML;
- $text = <<
The passed context was:
--= Debugger::exportVar($attributes['context']); ?> -- -
| Template | Defaults | Options | %s | %s | %s | ', - h($other->template), - h(Debugger::exportVar($other->defaults)), - h(Debugger::exportVar($other->options)) - ); - echo ''; - ?> + +
|---|---|---|
| = h($other->template) ?> | += Debugger::exportVar($other->defaults) ?> |
+ = Debugger::exportVar($other->options) ?> |
+
The passed context was:
--= h(Debugger::exportVar($attributes['context'])); ?> -+
| Template | Defaults | Options | %s | %s | %s | ', - h($route->template), - h(Debugger::exportVar($route->defaults)), - h(Debugger::exportVar($route->options)) - ); - echo ''; -endforeach; -?> + +
|---|---|---|
| = h($route->template) ?> | += Debugger::exportVar($route->defaults) ?> |
+ = Debugger::exportVar($route->options) ?> |
+
This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:
\Cake\Http\Response
- $this->redirect(['action' => 'index'])
- $partType
@@ -19,16 +11,10 @@
string
- $this->_pluginPaths
$this->_composerPaths
+ $this->_pluginPaths
$name
- self::$_timers
$type
- $pos
@@ -66,17 +47,12 @@
$request
new $class($connection->configName())
- $pluginName
- $vendorName
$return['plugins']
$return['vendor']
+ $vendorName
$pluginName
- $vendorName
$return['plugins']
$return['vendor']
+ $vendorName
!$connection instanceof ConnectionInterface
+ genericInstances
$item
- $item
- $item
- $item
- $row->id
env('HTTP_HOST')
- $url === false
- makeNeatArray
+ new HtmlFormatter()
+ dump
+ $currentAncestors
$value
+ $values
= __d('debug_kit', 'No previous requests logged.') ?>
++ = __d('debug_kit', 'No requests logged.') ?> + +
-= count($requests) ?> = __d('debug_kit', 'previous requests available') ?>
++ = count($requests) ?> = __d('debug_kit', 'requests available') ?> + +
' . __d('debug_kit', 'No querystring data.') . '
'; else: - echo $this->Toolbar->makeNeatArray($query); + echo $this->Toolbar->dump($query); endif; ?>= __d('debug_kit', 'No Cookie data.') ?>
= $this->Toolbar->makeNeatArray(['template' => $matchedRoute]) ?>
+= $this->Toolbar->dump(['template' => $matchedRoute]) ?>
diff --git a/app/vendor/cakephp/debug_kit/templates/element/session_panel.php b/app/vendor/cakephp/debug_kit/templates/element/session_panel.php index 6490df3f6..c9dcb34cb 100644 --- a/app/vendor/cakephp/debug_kit/templates/element/session_panel.php +++ b/app/vendor/cakephp/debug_kit/templates/element/session_panel.php @@ -17,4 +17,4 @@ * @var array $content */ ?> -= $this->Toolbar->makeNeatArray($content); += $this->Toolbar->dump($content); diff --git a/app/vendor/cakephp/debug_kit/templates/element/variables_panel.php b/app/vendor/cakephp/debug_kit/templates/element/variables_panel.php index a15423473..10cc33dfb 100644 --- a/app/vendor/cakephp/debug_kit/templates/element/variables_panel.php +++ b/app/vendor/cakephp/debug_kit/templates/element/variables_panel.php @@ -11,26 +11,34 @@ * @since DebugKit 0.1 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ - /** * @var \DebugKit\View\AjaxView $this * @var string $error * @var bool $sort + * @var array $variables * @var array $content * @var array $errors */ -if (isset($error)): +if (isset($error)) : printf('%s
', $error); endif; -if (!empty($content)): +// Backwards compatibility for old debug kit data. +if (!empty($content)) : + printf('', $sort ? ' checked="checked"' : '', __d('debug_kit', 'Sort variables by name')); + $this->Toolbar->setSort($sort); + echo $this->Toolbar->dump($content); +endif; + +// New node based data. +if (!empty($variables)) : printf('', $sort ? ' checked="checked"' : '', __d('debug_kit', 'Sort variables by name')); $this->Toolbar->setSort($sort); - echo $this->Toolbar->makeNeatArray($content); + echo $this->Toolbar->dumpNodes($variables); endif; -if (!empty($errors)): +if (!empty($errors)) : echo '