diff --git a/app/composer.json b/app/composer.json
index 9e9749ec0..f2a068261 100644
--- a/app/composer.json
+++ b/app/composer.json
@@ -11,7 +11,7 @@
"cakephp/migrations": "^3.2",
"cakephp/plugin-installer": "^1.3",
"components/jquery": "~3.6.0",
- "doctrine/dbal": "^3.1",
+ "doctrine/dbal": "^3.3",
"mobiledetect/mobiledetectlib": "^2.8",
"twbs/bootstrap": "^5.1"
},
diff --git a/app/composer.lock b/app/composer.lock
index e54f836a8..80709d094 100644
--- a/app/composer.lock
+++ b/app/composer.lock
@@ -4,24 +4,24 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "1e7cc0aca27ab16a55c780d3a2233b68",
+ "content-hash": "92408d4bbf04ae329283fcc70388603a",
"packages": [
{
"name": "adodb/adodb-php",
- "version": "v5.21.3",
+ "version": "v5.22.1",
"source": {
"type": "git",
"url": "https://github.com/ADOdb/ADOdb.git",
- "reference": "c5415722049f36c446a4034d15f1d17943f11458"
+ "reference": "64cfc1a65648e4d1245c724ca0c347c9c5eaf2f6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ADOdb/ADOdb/zipball/c5415722049f36c446a4034d15f1d17943f11458",
- "reference": "c5415722049f36c446a4034d15f1d17943f11458",
+ "url": "https://api.github.com/repos/ADOdb/ADOdb/zipball/64cfc1a65648e4d1245c724ca0c347c9c5eaf2f6",
+ "reference": "64cfc1a65648e4d1245c724ca0c347c9c5eaf2f6",
"shasum": ""
},
"require": {
- "php": "^5.5.9 || ^7.0 || ^8.0"
+ "php": "^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5"
@@ -65,20 +65,20 @@
"issues": "https://github.com/ADOdb/ADOdb/issues",
"source": "https://github.com/ADOdb/ADOdb"
},
- "time": "2021-10-31T14:56:48+00:00"
+ "time": "2022-03-30T08:49:08+00:00"
},
{
"name": "cakephp/cakephp",
- "version": "4.3.1",
+ "version": "4.3.8",
"source": {
"type": "git",
"url": "https://github.com/cakephp/cakephp.git",
- "reference": "6b1cf0e74bbfbb73ecdb1e8a5d0fd36230930931"
+ "reference": "34aae68e91e6834aa6711c3e435a3f220bf56c0b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/cakephp/zipball/6b1cf0e74bbfbb73ecdb1e8a5d0fd36230930931",
- "reference": "6b1cf0e74bbfbb73ecdb1e8a5d0fd36230930931",
+ "url": "https://api.github.com/repos/cakephp/cakephp/zipball/34aae68e91e6834aa6711c3e435a3f220bf56c0b",
+ "reference": "34aae68e91e6834aa6711c3e435a3f220bf56c0b",
"shasum": ""
},
"require": {
@@ -89,14 +89,14 @@
"ext-mbstring": "*",
"laminas/laminas-diactoros": "^2.2.2",
"laminas/laminas-httphandlerrunner": "^1.1",
- "league/container": "^4.1.1",
+ "league/container": "^4.2.0",
"php": ">=7.2.0",
- "psr/container": "^2.0",
+ "psr/container": "^1.1 || ^2.0",
"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"
+ "psr/log": "^1.0 || ^2.0",
+ "psr/simple-cache": "^1.0 || ^2.0"
},
"replace": {
"cakephp/cache": "self.version",
@@ -129,16 +129,16 @@
},
"type": "library",
"autoload": {
- "psr-4": {
- "Cake\\": "src/"
- },
"files": [
"src/Core/functions.php",
"src/Collection/functions.php",
"src/I18n/functions.php",
"src/Routing/functions.php",
"src/Utility/bootstrap.php"
- ]
+ ],
+ "psr-4": {
+ "Cake\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -169,7 +169,7 @@
"issues": "https://github.com/cakephp/cakephp/issues",
"source": "https://github.com/cakephp/cakephp"
},
- "time": "2021-11-06T15:39:56+00:00"
+ "time": "2022-04-23T01:23:23+00:00"
},
{
"name": "cakephp/chronos",
@@ -194,12 +194,12 @@
},
"type": "library",
"autoload": {
- "psr-4": {
- "Cake\\Chronos\\": "src/"
- },
"files": [
"src/carbon_compat.php"
- ]
+ ],
+ "psr-4": {
+ "Cake\\Chronos\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -232,16 +232,16 @@
},
{
"name": "cakephp/migrations",
- "version": "3.3.0",
+ "version": "3.5.1",
"source": {
"type": "git",
"url": "https://github.com/cakephp/migrations.git",
- "reference": "e0ee5fb22f21ee18f85d2fc554a22c3a5d119dea"
+ "reference": "6b03a44bef94b99a24ab7d4c44cb292bb6f275c2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/migrations/zipball/e0ee5fb22f21ee18f85d2fc554a22c3a5d119dea",
- "reference": "e0ee5fb22f21ee18f85d2fc554a22c3a5d119dea",
+ "url": "https://api.github.com/repos/cakephp/migrations/zipball/6b03a44bef94b99a24ab7d4c44cb292bb6f275c2",
+ "reference": "6b03a44bef94b99a24ab7d4c44cb292bb6f275c2",
"shasum": ""
},
"require": {
@@ -288,7 +288,7 @@
"issues": "https://github.com/cakephp/migrations/issues",
"source": "https://github.com/cakephp/migrations"
},
- "time": "2021-10-30T03:48:47+00:00"
+ "time": "2022-03-14T14:26:38+00:00"
},
{
"name": "cakephp/plugin-installer",
@@ -464,79 +464,6 @@
],
"time": "2021-10-28T20:44:15+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": [
- {
- "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-13T08:41:34+00:00"
- },
{
"name": "doctrine/cache",
"version": "2.1.1",
@@ -638,36 +565,38 @@
},
{
"name": "doctrine/dbal",
- "version": "3.1.4",
+ "version": "3.3.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "821b4f01a36ce63ed36c090ea74767b72db367e9"
+ "reference": "719663b15983278227669c8595151586a2ff3327"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/821b4f01a36ce63ed36c090ea74767b72db367e9",
- "reference": "821b4f01a36ce63ed36c090ea74767b72db367e9",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/719663b15983278227669c8595151586a2ff3327",
+ "reference": "719663b15983278227669c8595151586a2ff3327",
"shasum": ""
},
"require": {
- "composer/package-versions-deprecated": "^1.11.99",
- "doctrine/cache": "^1.0|^2.0",
+ "composer-runtime-api": "^2",
+ "doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3",
"doctrine/event-manager": "^1.0",
- "php": "^7.3 || ^8.0"
+ "php": "^7.3 || ^8.0",
+ "psr/cache": "^1|^2|^3",
+ "psr/log": "^1|^2|^3"
},
"require-dev": {
"doctrine/coding-standard": "9.0.0",
"jetbrains/phpstorm-stubs": "2021.1",
- "phpstan/phpstan": "1.1.1",
- "phpstan/phpstan-strict-rules": "^1",
- "phpunit/phpunit": "9.5.10",
+ "phpstan/phpstan": "1.5.3",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "phpunit/phpunit": "9.5.16",
"psalm/plugin-phpunit": "0.16.1",
- "squizlabs/php_codesniffer": "3.6.1",
+ "squizlabs/php_codesniffer": "3.6.2",
"symfony/cache": "^5.2|^6.0",
- "symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0",
- "vimeo/psalm": "4.12.0"
+ "symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0",
+ "vimeo/psalm": "4.22.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -727,7 +656,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.1.4"
+ "source": "https://github.com/doctrine/dbal/tree/3.3.5"
},
"funding": [
{
@@ -743,7 +672,7 @@
"type": "tidelift"
}
],
- "time": "2021-11-15T16:44:33+00:00"
+ "time": "2022-04-05T09:50:18+00:00"
},
{
"name": "doctrine/deprecations",
@@ -884,16 +813,16 @@
},
{
"name": "laminas/laminas-diactoros",
- "version": "2.8.0",
+ "version": "2.9.2",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-diactoros.git",
- "reference": "0c26ef1d95b6d7e6e3943a243ba3dc0797227199"
+ "reference": "07475df6b4bf6277ae8b9cbbc94d0ac6fee5e726"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/0c26ef1d95b6d7e6e3943a243ba3dc0797227199",
- "reference": "0c26ef1d95b6d7e6e3943a243ba3dc0797227199",
+ "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/07475df6b4bf6277ae8b9cbbc94d0ac6fee5e726",
+ "reference": "07475df6b4bf6277ae8b9cbbc94d0ac6fee5e726",
"shasum": ""
},
"require": {
@@ -979,7 +908,7 @@
"type": "community_bridge"
}
],
- "time": "2021-09-22T03:54:36+00:00"
+ "time": "2022-04-06T17:37:15+00:00"
},
{
"name": "laminas/laminas-httphandlerrunner",
@@ -1054,26 +983,26 @@
},
{
"name": "laminas/laminas-zendframework-bridge",
- "version": "1.4.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
- "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf"
+ "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
- "reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
+ "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/7f049390b756d34ba5940a8fb47634fbb51f79ab",
+ "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab",
"shasum": ""
},
"require": {
- "php": "^7.3 || ~8.0.0 || ~8.1.0"
+ "php": ">=7.4, <8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3",
- "psalm/plugin-phpunit": "^0.15.1",
- "squizlabs/php_codesniffer": "^3.5",
- "vimeo/psalm": "^4.6"
+ "phpunit/phpunit": "^9.5.14",
+ "psalm/plugin-phpunit": "^0.15.2",
+ "squizlabs/php_codesniffer": "^3.6.2",
+ "vimeo/psalm": "^4.21.0"
},
"type": "library",
"extra": {
@@ -1112,7 +1041,7 @@
"type": "community_bridge"
}
],
- "time": "2021-09-03T17:53:30+00:00"
+ "time": "2022-02-22T22:17:01+00:00"
},
{
"name": "league/container",
@@ -1198,16 +1127,16 @@
},
{
"name": "mobiledetect/mobiledetectlib",
- "version": "2.8.37",
+ "version": "2.8.39",
"source": {
"type": "git",
"url": "https://github.com/serbanghita/Mobile-Detect.git",
- "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7"
+ "reference": "0fd6753003fc870f6e229bae869cc1337c99bc45"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/9841e3c46f5bd0739b53aed8ac677fa712943df7",
- "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7",
+ "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/0fd6753003fc870f6e229bae869cc1337c99bc45",
+ "reference": "0fd6753003fc870f6e229bae869cc1337c99bc45",
"shasum": ""
},
"require": {
@@ -1218,12 +1147,12 @@
},
"type": "library",
"autoload": {
- "classmap": [
- "Mobile_Detect.php"
- ],
"psr-0": {
"Detection": "namespaced/"
- }
+ },
+ "classmap": [
+ "Mobile_Detect.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1248,15 +1177,58 @@
],
"support": {
"issues": "https://github.com/serbanghita/Mobile-Detect/issues",
- "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.37"
+ "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.39"
},
- "funding": [
+ "time": "2022-02-17T19:24:25+00:00"
+ },
+ {
+ "name": "psr/cache",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/cache.git",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
{
- "url": "https://github.com/serbanghita",
- "type": "github"
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
}
],
- "time": "2021-02-19T21:22:57+00:00"
+ "description": "Common interface for caching libraries",
+ "keywords": [
+ "cache",
+ "psr",
+ "psr-6"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/cache/tree/master"
+ },
+ "time": "2016-08-06T20:24:11+00:00"
},
{
"name": "psr/container",
@@ -1688,24 +1660,24 @@
},
{
"name": "robmorgan/phinx",
- "version": "0.12.9",
+ "version": "0.12.10",
"source": {
"type": "git",
"url": "https://github.com/cakephp/phinx.git",
- "reference": "5a0146a74c1bc195d1f5da86afa3b68badf7d90e"
+ "reference": "ad056cff354fc67fedf9bf96c441c2b428afad0c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/phinx/zipball/5a0146a74c1bc195d1f5da86afa3b68badf7d90e",
- "reference": "5a0146a74c1bc195d1f5da86afa3b68badf7d90e",
+ "url": "https://api.github.com/repos/cakephp/phinx/zipball/ad056cff354fc67fedf9bf96c441c2b428afad0c",
+ "reference": "ad056cff354fc67fedf9bf96c441c2b428afad0c",
"shasum": ""
},
"require": {
"cakephp/database": "^4.0",
"php": ">=7.2",
"psr/container": "^1.0 || ^2.0",
- "symfony/config": "^3.4|^4.0|^5.0",
- "symfony/console": "^3.4|^4.0|^5.0"
+ "symfony/config": "^3.4|^4.0|^5.0|^6.0",
+ "symfony/console": "^3.4|^4.0|^5.0|^6.0"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "^4.0",
@@ -1768,28 +1740,28 @@
],
"support": {
"issues": "https://github.com/cakephp/phinx/issues",
- "source": "https://github.com/cakephp/phinx/tree/0.12.9"
+ "source": "https://github.com/cakephp/phinx/tree/0.12.10"
},
- "time": "2021-10-12T10:49:25+00:00"
+ "time": "2022-01-21T19:53:14+00:00"
},
{
"name": "symfony/config",
- "version": "v5.3.10",
+ "version": "v5.4.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4"
+ "reference": "05624c386afa1b4ccc1357463d830fade8d9d404"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/ac23c2f24d5634966d665d836c3933d54347e5d4",
- "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4",
+ "url": "https://api.github.com/repos/symfony/config/zipball/05624c386afa1b4ccc1357463d830fade8d9d404",
+ "reference": "05624c386afa1b4ccc1357463d830fade8d9d404",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
- "symfony/filesystem": "^4.4|^5.0",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/filesystem": "^4.4|^5.0|^6.0",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-php80": "^1.16",
"symfony/polyfill-php81": "^1.22"
@@ -1798,11 +1770,11 @@
"symfony/finder": "<4.4"
},
"require-dev": {
- "symfony/event-dispatcher": "^4.4|^5.0",
- "symfony/finder": "^4.4|^5.0",
- "symfony/messenger": "^4.4|^5.0",
- "symfony/service-contracts": "^1.1|^2",
- "symfony/yaml": "^4.4|^5.0"
+ "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
+ "symfony/finder": "^4.4|^5.0|^6.0",
+ "symfony/messenger": "^4.4|^5.0|^6.0",
+ "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/yaml": "^4.4|^5.0|^6.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
@@ -1833,7 +1805,7 @@
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/config/tree/v5.3.10"
+ "source": "https://github.com/symfony/config/tree/v5.4.7"
},
"funding": [
{
@@ -1849,41 +1821,50 @@
"type": "tidelift"
}
],
- "time": "2021-10-22T09:06:52+00:00"
+ "time": "2022-03-21T13:42:03+00:00"
},
{
"name": "symfony/console",
- "version": "v3.4.47",
+ "version": "v5.4.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81"
+ "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81",
- "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81",
+ "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6",
+ "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6",
"shasum": ""
},
"require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/debug": "~2.8|~3.0|~4.0",
- "symfony/polyfill-mbstring": "~1.0"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.9",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/string": "^5.1|^6.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.4",
- "symfony/process": "<3.3"
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
+ "symfony/event-dispatcher": "<4.4",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<4.4"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "~3.3|~4.0",
- "symfony/dependency-injection": "~3.4|~4.0",
- "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
- "symfony/lock": "~3.4|~4.0",
- "symfony/process": "~3.3|~4.0"
+ "psr/log": "^1|^2",
+ "symfony/config": "^4.4|^5.0|^6.0",
+ "symfony/dependency-injection": "^4.4|^5.0|^6.0",
+ "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
+ "symfony/lock": "^4.4|^5.0|^6.0",
+ "symfony/process": "^4.4|^5.0|^6.0",
+ "symfony/var-dumper": "^4.4|^5.0|^6.0"
},
"suggest": {
"psr/log": "For using the console logger",
@@ -1914,10 +1895,16 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Console Component",
+ "description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
+ "keywords": [
+ "cli",
+ "command line",
+ "console",
+ "terminal"
+ ],
"support": {
- "source": "https://github.com/symfony/console/tree/v3.4.47"
+ "source": "https://github.com/symfony/console/tree/v5.4.7"
},
"funding": [
{
@@ -1933,36 +1920,99 @@
"type": "tidelift"
}
],
- "time": "2020-10-24T10:57:07+00:00"
+ "time": "2022-03-31T17:09:19+00:00"
},
{
- "name": "symfony/debug",
- "version": "v4.4.31",
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.5.1",
"source": {
"type": "git",
- "url": "https://github.com/symfony/debug.git",
- "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0"
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/43ede438d4cb52cd589ae5dc070e9323866ba8e0",
- "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"shasum": ""
},
"require": {
- "php": ">=7.1.3",
- "psr/log": "^1|^2|^3"
+ "php": ">=7.1"
},
- "conflict": {
- "symfony/http-kernel": "<3.4"
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
},
- "require-dev": {
- "symfony/http-kernel": "^3.4|^4.0|^5.0"
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-01-02T09:53:40+00:00"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v5.4.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/3a4442138d80c9f7b600fb297534ac718b61d37f",
+ "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.8",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
"psr-4": {
- "Symfony\\Component\\Debug\\": ""
+ "Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
@@ -1982,10 +2032,10 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Provides tools to ease debugging PHP code",
+ "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.31"
+ "source": "https://github.com/symfony/filesystem/tree/v5.4.7"
},
"funding": [
{
@@ -2001,39 +2051,48 @@
"type": "tidelift"
}
],
- "time": "2021-09-24T13:30:14+00:00"
+ "time": "2022-04-01T12:33:59+00:00"
},
{
- "name": "symfony/deprecation-contracts",
- "version": "v2.4.0",
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
- "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
+ "provide": {
+ "ext-ctype": "*"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "2.4-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
- "function.php"
- ]
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2041,18 +2100,24 @@
],
"authors": [
{
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "A generic function and convention to trigger deprecation notices",
+ "description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
"support": {
- "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
},
"funding": [
{
@@ -2068,35 +2133,45 @@
"type": "tidelift"
}
],
- "time": "2021-03-23T23:28:01+00:00"
+ "time": "2021-10-20T20:35:02+00:00"
},
{
- "name": "symfony/filesystem",
- "version": "v5.3.4",
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/filesystem.git",
- "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32"
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "81b86b50cf841a64252b439e738e97f4a34e2783"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32",
- "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783",
+ "reference": "81b86b50cf841a64252b439e738e97f4a34e2783",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-php80": "^1.16"
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
- "Symfony\\Component\\Filesystem\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2104,18 +2179,26 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Provides basic utilities for the filesystem",
+ "description": "Symfony polyfill for intl's grapheme_* functions",
"homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "grapheme",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v5.3.4"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0"
},
"funding": [
{
@@ -2131,27 +2214,27 @@
"type": "tidelift"
}
],
- "time": "2021-07-21T12:40:44+00:00"
+ "time": "2021-11-23T21:10:46+00:00"
},
{
- "name": "symfony/polyfill-ctype",
- "version": "v1.23.0",
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
- "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
+ "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
- "ext-ctype": "For best performance"
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
@@ -2164,11 +2247,14 @@
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- },
"files": [
"bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -2177,24 +2263,26 @@
],
"authors": [
{
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for ctype functions",
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "ctype",
+ "intl",
+ "normalizer",
"polyfill",
- "portable"
+ "portable",
+ "shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0"
},
"funding": [
{
@@ -2214,21 +2302,24 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.23.1",
+ "version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
+ "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
- "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
+ "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
+ "provide": {
+ "ext-mbstring": "*"
+ },
"suggest": {
"ext-mbstring": "For best performance"
},
@@ -2243,11 +2334,91 @@
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-11-30T18:21:41+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "v1.25.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
+ "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
"files": [
"bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -2264,17 +2435,16 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0"
},
"funding": [
{
@@ -2290,20 +2460,20 @@
"type": "tidelift"
}
],
- "time": "2021-05-27T12:26:48+00:00"
+ "time": "2021-06-05T21:20:04+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.23.1",
+ "version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
+ "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
- "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
+ "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
"shasum": ""
},
"require": {
@@ -2320,12 +2490,95 @@
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-03-04T08:16:47+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.25.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f",
+ "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
"files": [
"bootstrap.php"
],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
"classmap": [
"Resources/stubs"
]
@@ -2335,10 +2588,6 @@
"MIT"
],
"authors": [
- {
- "name": "Ion Bazan",
- "email": "ion.bazan@gmail.com"
- },
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
@@ -2348,69 +2597,135 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-09-13T13:58:11+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v1.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0",
+ "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3"
+ },
+ "suggest": {
+ "psr/container": "",
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
"homepage": "https://symfony.com",
"keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
+ "source": "https://github.com/symfony/service-contracts/tree/v1.1.2"
},
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-07-28T13:41:28+00:00"
+ "time": "2019-05-28T07:50:59+00:00"
},
{
- "name": "symfony/polyfill-php81",
- "version": "v1.23.0",
+ "name": "symfony/string",
+ "version": "v5.4.3",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-php81.git",
- "reference": "e66119f3de95efc359483f810c4c3e6436279436"
+ "url": "https://github.com/symfony/string.git",
+ "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436",
- "reference": "e66119f3de95efc359483f810c4c3e6436279436",
+ "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10",
+ "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "~1.15"
},
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.23-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
+ "conflict": {
+ "symfony/translation-contracts": ">=3.0"
},
+ "require-dev": {
+ "symfony/error-handler": "^4.4|^5.0|^6.0",
+ "symfony/http-client": "^4.4|^5.0|^6.0",
+ "symfony/translation-contracts": "^1.1|^2",
+ "symfony/var-exporter": "^4.4|^5.0|^6.0"
+ },
+ "type": "library",
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php81\\": ""
- },
"files": [
- "bootstrap.php"
+ "Resources/functions.php"
],
- "classmap": [
- "Resources/stubs"
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -2427,16 +2742,18 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
"homepage": "https://symfony.com",
"keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0"
+ "source": "https://github.com/symfony/string/tree/v5.4.3"
},
"funding": [
{
@@ -2452,7 +2769,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-21T13:25:03+00:00"
+ "time": "2022-01-02T09:53:40+00:00"
},
{
"name": "twbs/bootstrap",
@@ -2551,16 +2868,16 @@
},
{
"name": "cakephp/bake",
- "version": "2.6.1",
+ "version": "2.7.0",
"source": {
"type": "git",
"url": "https://github.com/cakephp/bake.git",
- "reference": "e559b5f19d78b93609d89aac677cf289090d0742"
+ "reference": "3933caa0941b2f75f3e53c5456efdbf588917584"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/bake/zipball/e559b5f19d78b93609d89aac677cf289090d0742",
- "reference": "e559b5f19d78b93609d89aac677cf289090d0742",
+ "url": "https://api.github.com/repos/cakephp/bake/zipball/3933caa0941b2f75f3e53c5456efdbf588917584",
+ "reference": "3933caa0941b2f75f3e53c5456efdbf588917584",
"shasum": ""
},
"require": {
@@ -2603,7 +2920,7 @@
"issues": "https://github.com/cakephp/bake/issues",
"source": "https://github.com/cakephp/bake"
},
- "time": "2021-11-01T05:09:32+00:00"
+ "time": "2022-04-14T08:50:07+00:00"
},
{
"name": "cakephp/cakephp-codesniffer",
@@ -2659,16 +2976,16 @@
},
{
"name": "cakephp/debug_kit",
- "version": "4.5.0",
+ "version": "4.7.1",
"source": {
"type": "git",
"url": "https://github.com/cakephp/debug_kit.git",
- "reference": "518887795e583796fc7ec5926cb89874416bc97a"
+ "reference": "ce564bacca4ebf471c34a886741672b54328b382"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/518887795e583796fc7ec5926cb89874416bc97a",
- "reference": "518887795e583796fc7ec5926cb89874416bc97a",
+ "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/ce564bacca4ebf471c34a886741672b54328b382",
+ "reference": "ce564bacca4ebf471c34a886741672b54328b382",
"shasum": ""
},
"require": {
@@ -2721,7 +3038,7 @@
"issues": "https://github.com/cakephp/debug_kit/issues",
"source": "https://github.com/cakephp/debug_kit"
},
- "time": "2021-10-24T01:45:50+00:00"
+ "time": "2022-01-20T02:44:41+00:00"
},
{
"name": "cakephp/repl",
@@ -2748,12 +3065,12 @@
},
"type": "cakephp-plugin",
"autoload": {
- "psr-4": {
- "Cake\\Repl\\": "src/"
- },
"files": [
"src/functions.php"
- ]
+ ],
+ "psr-4": {
+ "Cake\\Repl\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2845,38 +3162,45 @@
},
{
"name": "composer/composer",
- "version": "2.1.12",
+ "version": "2.3.5",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
- "reference": "6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0"
+ "reference": "50c47b1f907cfcdb8f072b88164d22b527557ae1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/composer/zipball/6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0",
- "reference": "6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0",
+ "url": "https://api.github.com/repos/composer/composer/zipball/50c47b1f907cfcdb8f072b88164d22b527557ae1",
+ "reference": "50c47b1f907cfcdb8f072b88164d22b527557ae1",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
"composer/metadata-minifier": "^1.0",
+ "composer/pcre": "^2 || ^3",
"composer/semver": "^3.0",
"composer/spdx-licenses": "^1.2",
- "composer/xdebug-handler": "^2.0",
+ "composer/xdebug-handler": "^2.0.2 || ^3.0.3",
"justinrainbow/json-schema": "^5.2.11",
- "php": "^5.3.2 || ^7.0 || ^8.0",
- "psr/log": "^1.0 || ^2.0",
- "react/promise": "^1.2 || ^2.7",
+ "php": "^7.2.5 || ^8.0",
+ "psr/log": "^1.0 || ^2.0 || ^3.0",
+ "react/promise": "^2.8",
"seld/jsonlint": "^1.4",
- "seld/phar-utils": "^1.0",
- "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"
+ "seld/phar-utils": "^1.2",
+ "symfony/console": "^5.4.1 || ^6.0",
+ "symfony/filesystem": "^5.4 || ^6.0",
+ "symfony/finder": "^5.4 || ^6.0",
+ "symfony/polyfill-php73": "^1.24",
+ "symfony/polyfill-php80": "^1.24",
+ "symfony/process": "^5.4 || ^6.0"
},
"require-dev": {
- "phpspec/prophecy": "^1.10",
- "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
+ "phpstan/phpstan": "^1.4.1",
+ "phpstan/phpstan-deprecation-rules": "^1",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1",
+ "phpstan/phpstan-symfony": "^1.1",
+ "symfony/phpunit-bridge": "^6.0"
},
"suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -2889,7 +3213,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "2.1-dev"
+ "dev-main": "2.3-dev"
}
},
"autoload": {
@@ -2923,7 +3247,7 @@
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/composer/issues",
- "source": "https://github.com/composer/composer/tree/2.1.12"
+ "source": "https://github.com/composer/composer/tree/2.3.5"
},
"funding": [
{
@@ -2939,7 +3263,7 @@
"type": "tidelift"
}
],
- "time": "2021-11-09T15:02:04+00:00"
+ "time": "2022-04-13T14:43:00+00:00"
},
{
"name": "composer/metadata-minifier",
@@ -3010,25 +3334,96 @@
],
"time": "2021-04-07T13:37:33+00:00"
},
+ {
+ "name": "composer/pcre",
+ "version": "3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/pcre.git",
+ "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd",
+ "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.3",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "keywords": [
+ "PCRE",
+ "preg",
+ "regex",
+ "regular expression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/pcre/issues",
+ "source": "https://github.com/composer/pcre/tree/3.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-02-25T20:21:48+00:00"
+ },
{
"name": "composer/semver",
- "version": "3.2.6",
+ "version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
- "reference": "83e511e247de329283478496f7a1e114c9517506"
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506",
- "reference": "83e511e247de329283478496f7a1e114c9517506",
+ "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpstan/phpstan": "^0.12.54",
+ "phpstan/phpstan": "^1.4",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
@@ -3073,7 +3468,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
- "source": "https://github.com/composer/semver/tree/3.2.6"
+ "source": "https://github.com/composer/semver/tree/3.3.2"
},
"funding": [
{
@@ -3089,27 +3484,28 @@
"type": "tidelift"
}
],
- "time": "2021-10-25T11:34:17+00:00"
+ "time": "2022-04-01T19:23:25+00:00"
},
{
"name": "composer/spdx-licenses",
- "version": "1.5.5",
+ "version": "1.5.6",
"source": {
"type": "git",
"url": "https://github.com/composer/spdx-licenses.git",
- "reference": "de30328a7af8680efdc03e396aad24befd513200"
+ "reference": "a30d487169d799745ca7280bc90fdfa693536901"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200",
- "reference": "de30328a7af8680efdc03e396aad24befd513200",
+ "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/a30d487169d799745ca7280bc90fdfa693536901",
+ "reference": "a30d487169d799745ca7280bc90fdfa693536901",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7"
+ "phpstan/phpstan": "^0.12.55",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
@@ -3152,7 +3548,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/spdx-licenses/issues",
- "source": "https://github.com/composer/spdx-licenses/tree/1.5.5"
+ "source": "https://github.com/composer/spdx-licenses/tree/1.5.6"
},
"funding": [
{
@@ -3168,29 +3564,31 @@
"type": "tidelift"
}
],
- "time": "2020-12-03T16:04:16+00:00"
+ "time": "2021-11-18T10:14:14+00:00"
},
{
"name": "composer/xdebug-handler",
- "version": "2.0.2",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
- "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
+ "reference": "ced299686f41dce890debac69273b47ffe98a40c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
- "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c",
+ "reference": "ced299686f41dce890debac69273b47ffe98a40c",
"shasum": ""
},
"require": {
- "php": "^5.3.2 || ^7.0 || ^8.0",
+ "composer/pcre": "^1 || ^2 || ^3",
+ "php": "^7.2.5 || ^8.0",
"psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
- "phpstan/phpstan": "^0.12.55",
- "symfony/phpunit-bridge": "^4.2 || ^5"
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^6.0"
},
"type": "library",
"autoload": {
@@ -3216,7 +3614,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
- "source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
+ "source": "https://github.com/composer/xdebug-handler/tree/3.0.3"
},
"funding": [
{
@@ -3232,31 +3630,31 @@
"type": "tidelift"
}
],
- "time": "2021-07-31T17:03:58+00:00"
+ "time": "2022-02-25T21:32:43+00:00"
},
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
- "version": "v0.7.1",
+ "version": "v0.7.2",
"source": {
"type": "git",
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
- "reference": "fe390591e0241955f22eb9ba327d137e501c771c"
+ "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c",
- "reference": "fe390591e0241955f22eb9ba327d137e501c771c",
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
+ "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0 || ^2.0",
"php": ">=5.3",
- "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0"
+ "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
},
"require-dev": {
"composer/composer": "*",
- "phpcompatibility/php-compatibility": "^9.0",
- "sensiolabs/security-checker": "^4.1.0"
+ "php-parallel-lint/php-parallel-lint": "^1.3.1",
+ "phpcompatibility/php-compatibility": "^9.0"
},
"type": "composer-plugin",
"extra": {
@@ -3277,6 +3675,10 @@
"email": "franck.nijhof@dealerdirect.com",
"homepage": "http://www.frenck.nl",
"role": "Developer / IT Manager"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
@@ -3288,6 +3690,7 @@
"codesniffer",
"composer",
"installer",
+ "phpcbf",
"phpcs",
"plugin",
"qa",
@@ -3302,33 +3705,34 @@
"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"
+ "time": "2022-02-04T12:51:07+00:00"
},
{
"name": "doctrine/instantiator",
- "version": "1.4.0",
+ "version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
+ "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
- "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
+ "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/coding-standard": "^8.0",
+ "doctrine/coding-standard": "^9",
"ext-pdo": "*",
"ext-phar": "*",
- "phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
- "phpstan/phpstan": "^0.12",
- "phpstan/phpstan-phpunit": "^0.12",
- "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
+ "phpbench/phpbench": "^0.16 || ^1",
+ "phpstan/phpstan": "^1.4",
+ "phpstan/phpstan-phpunit": "^1",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.22"
},
"type": "library",
"autoload": {
@@ -3355,7 +3759,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.4.0"
+ "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
},
"funding": [
{
@@ -3371,7 +3775,7 @@
"type": "tidelift"
}
],
- "time": "2020-11-10T18:47:58+00:00"
+ "time": "2022-03-03T08:28:38+00:00"
},
{
"name": "jasny/twig-extensions",
@@ -3550,16 +3954,16 @@
},
{
"name": "justinrainbow/json-schema",
- "version": "5.2.11",
+ "version": "5.2.12",
"source": {
"type": "git",
"url": "https://github.com/justinrainbow/json-schema.git",
- "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa"
+ "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa",
- "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa",
+ "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60",
+ "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60",
"shasum": ""
},
"require": {
@@ -3614,9 +4018,9 @@
],
"support": {
"issues": "https://github.com/justinrainbow/json-schema/issues",
- "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11"
+ "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12"
},
- "time": "2021-07-22T09:24:00+00:00"
+ "time": "2022-04-13T08:02:27+00:00"
},
{
"name": "m1/env",
@@ -3682,37 +4086,38 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.10.2",
+ "version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
+ "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
- "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
+ "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
- "replace": {
- "myclabs/deep-copy": "self.version"
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3,<3.2.2"
},
"require-dev": {
- "doctrine/collections": "^1.0",
- "doctrine/common": "^2.6",
- "phpunit/phpunit": "^7.1"
+ "doctrine/collections": "^1.6.8",
+ "doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
- },
"files": [
"src/DeepCopy/deep_copy.php"
- ]
+ ],
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -3728,7 +4133,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
},
"funding": [
{
@@ -3736,20 +4141,20 @@
"type": "tidelift"
}
],
- "time": "2020-11-13T09:40:50+00:00"
+ "time": "2022-03-03T13:19:32+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v4.13.1",
+ "version": "v4.13.2",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd"
+ "reference": "210577fe3cf7badcc5814d99455df46564f3c077"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd",
- "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077",
+ "reference": "210577fe3cf7badcc5814d99455df46564f3c077",
"shasum": ""
},
"require": {
@@ -3790,9 +4195,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2"
},
- "time": "2021-11-03T20:52:16+00:00"
+ "time": "2021-11-30T19:35:32+00:00"
},
{
"name": "phar-io/manifest",
@@ -3856,16 +4261,16 @@
},
{
"name": "phar-io/version",
- "version": "3.1.0",
+ "version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
- "reference": "bae7c545bef187884426f042434e561ab1ddb182"
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182",
- "reference": "bae7c545bef187884426f042434e561ab1ddb182",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": ""
},
"require": {
@@ -3901,9 +4306,9 @@
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
- "source": "https://github.com/phar-io/version/tree/3.1.0"
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
},
- "time": "2021-02-23T14:00:09+00:00"
+ "time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@@ -4017,16 +4422,16 @@
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.5.1",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
+ "reference": "77a32518733312af16a44300404e945338981de3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
- "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
+ "reference": "77a32518733312af16a44300404e945338981de3",
"shasum": ""
},
"require": {
@@ -4061,22 +4466,22 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
},
- "time": "2021-10-02T14:08:47+00:00"
+ "time": "2022-03-15T21:29:03+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "1.14.0",
+ "version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e"
+ "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
- "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
+ "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"shasum": ""
},
"require": {
@@ -4128,41 +4533,36 @@
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
- "source": "https://github.com/phpspec/prophecy/tree/1.14.0"
+ "source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
},
- "time": "2021-09-10T09:02:12+00:00"
+ "time": "2021-12-08T12:19:24+00:00"
},
{
"name": "phpstan/phpdoc-parser",
- "version": "1.2.0",
+ "version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e"
+ "reference": "129a63b3bc7caeb593c224c41f420675e63cfefc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/dbc093d7af60eff5cd575d2ed761b15ed40bd08e",
- "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/129a63b3bc7caeb593c224c41f420675e63cfefc",
+ "reference": "129a63b3bc7caeb593c224c41f420675e63cfefc",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0"
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
- "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan": "^1.5",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^9.5",
"symfony/process": "^5.2"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"psr-4": {
"PHPStan\\PhpDocParser\\": [
@@ -4177,9 +4577,9 @@
"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/1.2.0"
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/1.4.5"
},
- "time": "2021-09-16T20:46:02+00:00"
+ "time": "2022-04-22T11:11:01+00:00"
},
{
"name": "phpstan/phpstan",
@@ -4247,16 +4647,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.8",
+ "version": "9.2.15",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e"
+ "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
- "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
+ "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"shasum": ""
},
"require": {
@@ -4312,7 +4712,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15"
},
"funding": [
{
@@ -4320,20 +4720,20 @@
"type": "github"
}
],
- "time": "2021-10-30T08:01:38+00:00"
+ "time": "2022-03-07T09:28:20+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "3.0.5",
+ "version": "3.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
- "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"shasum": ""
},
"require": {
@@ -4372,7 +4772,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5"
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
},
"funding": [
{
@@ -4380,7 +4780,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:57:25+00:00"
+ "time": "2021-12-02T12:48:52+00:00"
},
{
"name": "phpunit/php-invoker",
@@ -4565,16 +4965,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.5.10",
+ "version": "9.5.20",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a"
+ "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a",
- "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba",
+ "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba",
"shasum": ""
},
"require": {
@@ -4590,7 +4990,7 @@
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
- "phpunit/php-code-coverage": "^9.2.7",
+ "phpunit/php-code-coverage": "^9.2.13",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@@ -4604,7 +5004,7 @@
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^2.3.4",
+ "sebastian/type": "^3.0",
"sebastian/version": "^3.0.2"
},
"require-dev": {
@@ -4625,11 +5025,11 @@
}
},
"autoload": {
- "classmap": [
- "src/"
- ],
"files": [
"src/Framework/Assert/Functions.php"
+ ],
+ "classmap": [
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -4652,11 +5052,11 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20"
},
"funding": [
{
- "url": "https://phpunit.de/donate.html",
+ "url": "https://phpunit.de/sponsors.html",
"type": "custom"
},
{
@@ -4664,33 +5064,36 @@
"type": "github"
}
],
- "time": "2021-09-25T07:38:51+00:00"
+ "time": "2022-04-01T12:37:26+00:00"
},
{
"name": "psy/psysh",
- "version": "v0.10.9",
+ "version": "v0.11.2",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
- "reference": "01281336c4ae557fe4a994544f30d3a1bc204375"
+ "reference": "7f7da640d68b9c9fec819caae7c744a213df6514"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bobthecow/psysh/zipball/01281336c4ae557fe4a994544f30d3a1bc204375",
- "reference": "01281336c4ae557fe4a994544f30d3a1bc204375",
+ "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7f7da640d68b9c9fec819caae7c744a213df6514",
+ "reference": "7f7da640d68b9c9fec819caae7c744a213df6514",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-tokenizer": "*",
- "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3",
- "php": "^8.0 || ^7.0 || ^5.5.9",
- "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10",
- "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7"
+ "nikic/php-parser": "^4.0 || ^3.1",
+ "php": "^8.0 || ^7.0.8",
+ "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4",
+ "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4"
+ },
+ "conflict": {
+ "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.2",
- "hoa/console": "3.17.*"
+ "hoa/console": "3.17.05.02"
},
"suggest": {
"ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
@@ -4705,7 +5108,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "0.10.x-dev"
+ "dev-main": "0.11.x-dev"
}
},
"autoload": {
@@ -4737,38 +5140,38 @@
],
"support": {
"issues": "https://github.com/bobthecow/psysh/issues",
- "source": "https://github.com/bobthecow/psysh/tree/v0.10.9"
+ "source": "https://github.com/bobthecow/psysh/tree/v0.11.2"
},
- "time": "2021-10-10T13:37:39+00:00"
+ "time": "2022-02-28T15:28:54+00:00"
},
{
"name": "react/promise",
- "version": "v2.8.0",
+ "version": "v2.9.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
- "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4"
+ "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4",
- "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910",
+ "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
- "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36"
+ "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36"
},
"type": "library",
"autoload": {
- "psr-4": {
- "React\\Promise\\": "src/"
- },
"files": [
"src/functions_include.php"
- ]
+ ],
+ "psr-4": {
+ "React\\Promise\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -4777,7 +5180,23 @@
"authors": [
{
"name": "Jan Sorgalla",
- "email": "jsorgalla@gmail.com"
+ "email": "jsorgalla@gmail.com",
+ "homepage": "https://sorgalla.com/"
+ },
+ {
+ "name": "Christian Lück",
+ "email": "christian@clue.engineering",
+ "homepage": "https://clue.engineering/"
+ },
+ {
+ "name": "Cees-Jan Kiewiet",
+ "email": "reactphp@ceesjankiewiet.nl",
+ "homepage": "https://wyrihaximus.net/"
+ },
+ {
+ "name": "Chris Boden",
+ "email": "cboden@gmail.com",
+ "homepage": "https://cboden.dev/"
}
],
"description": "A lightweight implementation of CommonJS Promises/A for PHP",
@@ -4787,9 +5206,19 @@
],
"support": {
"issues": "https://github.com/reactphp/promise/issues",
- "source": "https://github.com/reactphp/promise/tree/v2.8.0"
+ "source": "https://github.com/reactphp/promise/tree/v2.9.0"
},
- "time": "2020-05-12T15:16:56+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/WyriHaximus",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/clue",
+ "type": "github"
+ }
+ ],
+ "time": "2022-02-11T10:27:51+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -5157,16 +5586,16 @@
},
{
"name": "sebastian/environment",
- "version": "5.1.3",
+ "version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
+ "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
+ "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"shasum": ""
},
"require": {
@@ -5208,7 +5637,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
},
"funding": [
{
@@ -5216,7 +5645,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:52:38+00:00"
+ "time": "2022-04-03T09:37:03+00:00"
},
{
"name": "sebastian/exporter",
@@ -5297,16 +5726,16 @@
},
{
"name": "sebastian/global-state",
- "version": "5.0.3",
+ "version": "5.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49"
+ "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49",
- "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
+ "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"shasum": ""
},
"require": {
@@ -5349,7 +5778,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
},
"funding": [
{
@@ -5357,7 +5786,7 @@
"type": "github"
}
],
- "time": "2021-06-11T13:31:12+00:00"
+ "time": "2022-02-14T08:28:10+00:00"
},
{
"name": "sebastian/lines-of-code",
@@ -5648,28 +6077,28 @@
},
{
"name": "sebastian/type",
- "version": "2.3.4",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914"
+ "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914",
- "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
+ "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.3-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -5692,7 +6121,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/2.3.4"
+ "source": "https://github.com/sebastianbergmann/type/tree/3.0.0"
},
"funding": [
{
@@ -5700,7 +6129,7 @@
"type": "github"
}
],
- "time": "2021-06-15T12:49:02+00:00"
+ "time": "2022-03-15T09:54:48+00:00"
},
{
"name": "sebastian/version",
@@ -5757,23 +6186,24 @@
},
{
"name": "seld/jsonlint",
- "version": "1.8.3",
+ "version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/jsonlint.git",
- "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57"
+ "reference": "4211420d25eba80712bff236a98960ef68b866b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57",
- "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57",
+ "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7",
+ "reference": "4211420d25eba80712bff236a98960ef68b866b7",
"shasum": ""
},
"require": {
"php": "^5.3 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "phpstan/phpstan": "^1.5",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13"
},
"bin": [
"bin/jsonlint"
@@ -5804,7 +6234,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/jsonlint/issues",
- "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3"
+ "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0"
},
"funding": [
{
@@ -5816,20 +6246,20 @@
"type": "tidelift"
}
],
- "time": "2020-11-11T09:19:24+00:00"
+ "time": "2022-04-01T13:37:23+00:00"
},
{
"name": "seld/phar-utils",
- "version": "1.1.2",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/phar-utils.git",
- "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0"
+ "reference": "9f3452c93ff423469c0d56450431562ca423dcee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0",
- "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0",
+ "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9f3452c93ff423469c0d56450431562ca423dcee",
+ "reference": "9f3452c93ff423469c0d56450431562ca423dcee",
"shasum": ""
},
"require": {
@@ -5862,38 +6292,38 @@
],
"support": {
"issues": "https://github.com/Seldaek/phar-utils/issues",
- "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2"
+ "source": "https://github.com/Seldaek/phar-utils/tree/1.2.0"
},
- "time": "2021-08-19T21:01:38+00:00"
+ "time": "2021-12-10T11:20:11+00:00"
},
{
"name": "slevomat/coding-standard",
- "version": "7.0.16",
+ "version": "7.1",
"source": {
"type": "git",
"url": "https://github.com/slevomat/coding-standard.git",
- "reference": "14c324b2f2f0072933036c2f3abaeda16a56dcd3"
+ "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/14c324b2f2f0072933036c2f3abaeda16a56dcd3",
- "reference": "14c324b2f2f0072933036c2f3abaeda16a56dcd3",
+ "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b521bd358b5f7a7d69e9637fd139e036d8adeb6f",
+ "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
- "php": "^7.1 || ^8.0",
- "phpstan/phpdoc-parser": "^1.0.0",
- "squizlabs/php_codesniffer": "^3.6.1"
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpdoc-parser": "^1.4.1",
+ "squizlabs/php_codesniffer": "^3.6.2"
},
"require-dev": {
- "phing/phing": "2.17.0",
- "php-parallel-lint/php-parallel-lint": "1.3.1",
- "phpstan/phpstan": "0.12.99",
- "phpstan/phpstan-deprecation-rules": "0.12.6",
- "phpstan/phpstan-phpunit": "0.12.22",
- "phpstan/phpstan-strict-rules": "0.12.11",
- "phpunit/phpunit": "7.5.20|8.5.5|9.5.10"
+ "phing/phing": "2.17.2",
+ "php-parallel-lint/php-parallel-lint": "1.3.2",
+ "phpstan/phpstan": "1.4.10|1.5.2",
+ "phpstan/phpstan-deprecation-rules": "1.0.0",
+ "phpstan/phpstan-phpunit": "1.0.0|1.1.0",
+ "phpstan/phpstan-strict-rules": "1.1.0",
+ "phpunit/phpunit": "7.5.20|8.5.21|9.5.19"
},
"type": "phpcodesniffer-standard",
"extra": {
@@ -5913,7 +6343,7 @@
"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/7.0.16"
+ "source": "https://github.com/slevomat/coding-standard/tree/7.1"
},
"funding": [
{
@@ -5925,20 +6355,20 @@
"type": "tidelift"
}
],
- "time": "2021-10-22T06:56:51+00:00"
+ "time": "2022-03-29T12:44:16+00:00"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.6.1",
+ "version": "3.6.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e"
+ "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e",
- "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a",
+ "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a",
"shasum": ""
},
"require": {
@@ -5981,24 +6411,25 @@
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
- "time": "2021-10-11T04:00:11+00:00"
+ "time": "2021-12-12T21:44:58+00:00"
},
{
"name": "symfony/finder",
- "version": "v5.3.7",
+ "version": "v5.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93"
+ "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93",
- "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d",
+ "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"type": "library",
@@ -6027,83 +6458,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v5.3.7"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-08-04T21:20:46+00:00"
- },
- {
- "name": "symfony/polyfill-php72",
- "version": "v1.23.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
- "reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.23-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php72\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0"
+ "source": "https://github.com/symfony/finder/tree/v5.4.3"
},
"funding": [
{
@@ -6119,20 +6474,20 @@
"type": "tidelift"
}
],
- "time": "2021-05-27T09:17:38+00:00"
+ "time": "2022-01-26T16:34:36+00:00"
},
{
"name": "symfony/process",
- "version": "v5.3.7",
+ "version": "v5.4.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967"
+ "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967",
- "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967",
+ "url": "https://api.github.com/repos/symfony/process/zipball/38a44b2517b470a436e1c944bf9b9ba3961137fb",
+ "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb",
"shasum": ""
},
"require": {
@@ -6165,7 +6520,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v5.3.7"
+ "source": "https://github.com/symfony/process/tree/v5.4.7"
},
"funding": [
{
@@ -6181,37 +6536,37 @@
"type": "tidelift"
}
],
- "time": "2021-08-04T21:20:46+00:00"
+ "time": "2022-03-18T16:18:52+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v4.4.33",
+ "version": "v5.4.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee"
+ "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/50286e2b7189bfb4f419c0731e86632cddf7c5ee",
- "reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/294e9da6e2e0dd404e983daa5aa74253d92c05d0",
+ "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0",
"shasum": ""
},
"require": {
- "php": ">=7.1.3",
+ "php": ">=7.2.5",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php72": "~1.5",
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
- "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
- "symfony/console": "<3.4"
+ "phpunit/phpunit": "<5.4.3",
+ "symfony/console": "<4.4"
},
"require-dev": {
"ext-iconv": "*",
- "symfony/console": "^3.4|^4.0|^5.0",
- "symfony/process": "^4.4|^5.0",
- "twig/twig": "^1.43|^2.13|^3.0.4"
+ "symfony/console": "^4.4|^5.0|^6.0",
+ "symfony/process": "^4.4|^5.0|^6.0",
+ "symfony/uid": "^5.1|^6.0",
+ "twig/twig": "^2.13|^3.0.4"
},
"suggest": {
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
@@ -6254,7 +6609,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v4.4.33"
+ "source": "https://github.com/symfony/var-dumper/tree/v5.4.6"
},
"funding": [
{
@@ -6270,7 +6625,7 @@
"type": "tidelift"
}
],
- "time": "2021-10-25T20:24:58+00:00"
+ "time": "2022-03-02T12:42:23+00:00"
},
{
"name": "theseer/tokenizer",
@@ -6324,25 +6679,25 @@
},
{
"name": "twig/markdown-extra",
- "version": "v3.3.3",
+ "version": "v3.3.8",
"source": {
"type": "git",
"url": "https://github.com/twigphp/markdown-extra.git",
- "reference": "725a4ef89d93bb80fc63c67cf261bf7512649290"
+ "reference": "25ed505b6ffd3b00f922ca682489dfbaf44eb1f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/725a4ef89d93bb80fc63c67cf261bf7512649290",
- "reference": "725a4ef89d93bb80fc63c67cf261bf7512649290",
+ "url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/25ed505b6ffd3b00f922ca682489dfbaf44eb1f7",
+ "reference": "25ed505b6ffd3b00f922ca682489dfbaf44eb1f7",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
- "twig/twig": "^2.4|^3.0"
+ "twig/twig": "^2.7|^3.0"
},
"require-dev": {
"erusev/parsedown": "^1.7",
- "league/commonmark": "^1.0",
+ "league/commonmark": "^1.0|^2.0",
"league/html-to-markdown": "^4.8|^5.0",
"michelf/php-markdown": "^1.8",
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
@@ -6381,7 +6736,7 @@
"twig"
],
"support": {
- "source": "https://github.com/twigphp/markdown-extra/tree/v3.3.3"
+ "source": "https://github.com/twigphp/markdown-extra/tree/v3.3.8"
},
"funding": [
{
@@ -6393,20 +6748,20 @@
"type": "tidelift"
}
],
- "time": "2021-07-07T07:08:18+00:00"
+ "time": "2022-01-29T15:34:05+00:00"
},
{
"name": "twig/twig",
- "version": "v3.3.3",
+ "version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "a27fa056df8a6384316288ca8b0fa3a35fdeb569"
+ "reference": "8442df056c51b706793adf80a9fd363406dd3674"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/a27fa056df8a6384316288ca8b0fa3a35fdeb569",
- "reference": "a27fa056df8a6384316288ca8b0fa3a35fdeb569",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674",
+ "reference": "8442df056c51b706793adf80a9fd363406dd3674",
"shasum": ""
},
"require": {
@@ -6457,7 +6812,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
- "source": "https://github.com/twigphp/Twig/tree/v3.3.3"
+ "source": "https://github.com/twigphp/Twig/tree/v3.3.10"
},
"funding": [
{
@@ -6469,7 +6824,7 @@
"type": "tidelift"
}
],
- "time": "2021-09-17T08:44:23+00:00"
+ "time": "2022-04-06T06:47:41+00:00"
},
{
"name": "webmozart/assert",
diff --git a/app/vendor/adodb/adodb-php/.editorconfig b/app/vendor/adodb/adodb-php/.editorconfig
new file mode 100644
index 000000000..5dad2ea1f
--- /dev/null
+++ b/app/vendor/adodb/adodb-php/.editorconfig
@@ -0,0 +1,22 @@
+# EditorConfig file for ADOdb
+# https://editorconfig.org/
+
+root = true
+
+# Default file settings
+[*]
+indent_style = tab
+indent_size = 4
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
+charset = utf-8
+
+# Python build scripts
+[*.py]
+indent_style = space
+
+# Markdown files
+[*.md]
+indent_style = space
+trim_trailing_whitespace = false
diff --git a/app/vendor/adodb/adodb-php/README.md b/app/vendor/adodb/adodb-php/README.md
index e432b2fb0..96ac67b29 100644
--- a/app/vendor/adodb/adodb-php/README.md
+++ b/app/vendor/adodb/adodb-php/README.md
@@ -1,8 +1,9 @@
ADOdb Library for PHP
======================
-[](https://gitter.im/adodb/adodb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[](https://sourceforge.net/projects/adodb/files/latest/download)
+[](https://gitter.im/adodb/adodb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[](https://sourceforge.net/projects/adodb/files/latest/download)
+[](https://packagist.org/packages/adodb/adodb-php)
(c) 2000-2013 John Lim (jlim@natsoft.com)
(c) 2014 Damien Regad, Mark Newnham and the
diff --git a/app/vendor/adodb/adodb-php/SECURITY.md b/app/vendor/adodb/adodb-php/SECURITY.md
new file mode 100644
index 000000000..00670f244
--- /dev/null
+++ b/app/vendor/adodb/adodb-php/SECURITY.md
@@ -0,0 +1,45 @@
+# ADOdb Security Policy
+
+## Supported Versions
+
+The following releases of the library are currently being supported with
+security updates. Please refer to the [project's home page](https://adodb.org)
+for actual version numbers.
+
+- Stable
+- Legacy
+- Development (Git *master* branch)
+
+Older releases are no longer supported.
+
+
+## Reporting a Vulnerability
+
+If you discover a vulnerability in ADOdb, please contact
+the [project's maintainer](https://github.com/dregad)
+
+- by e-mail (look for it in the Git history)
+- via private chat on [Gitter](https://gitter.im/dregad)
+
+Kindly provide the following information in your report:
+
+- Affected ADOdb version(s) or Git revision
+- A clear and detailed description of the issue, including if possible a code
+ snippet to demonstrate or reproduce the vulnerability
+- A patch for the issue if you have one, preferably in *Git diff* format
+
+### CVE handling
+
+To ensure a comprehensive and detailed declaration of the issue, we generally
+prefer requesting CVE IDs ourselves, which usually happens after our analysis
+confirms the vulnerability.
+
+In case you have already obtained a CVE ID, do not forget to reference it in
+your report.
+
+### Credits
+
+Let us know if and how you wish to be credited for the finding.
+
+Your name, e-mail, company, etc. will be included as specified in the CVE
+report, as well as in the Git commit message patching the issue.
diff --git a/app/vendor/adodb/adodb-php/adodb-active-record.inc.php b/app/vendor/adodb/adodb-php/adodb-active-record.inc.php
index 8f3b00538..ad40640a3 100644
--- a/app/vendor/adodb/adodb-php/adodb-active-record.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-active-record.inc.php
@@ -281,7 +281,7 @@ static function ClassBelongsTo($class, $foreignRef, $foreignKey=false, $parentKe
static function TableBelongsTo($table, $foreignRef, $foreignKey=false, $parentKey='', $parentClass = 'ADODB_Active_Record')
{
- $ar = new ADOdb_Active_Record($table);
+ $ar = new ADODB_Active_Record($table);
$ar->belongsTo($foreignRef, $foreignKey, $parentKey, $parentClass);
}
@@ -290,7 +290,7 @@ static function TableKeyBelongsTo($table, $tablePKey, $foreignRef, $foreignKey=f
if (!is_array($tablePKey)) {
$tablePKey = array($tablePKey);
}
- $ar = new ADOdb_Active_Record($table, $tablePKey);
+ $ar = new ADODB_Active_Record($table, $tablePKey);
$ar->belongsTo($foreignRef, $foreignKey, $parentKey, $parentClass);
}
diff --git a/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php b/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php
index c81254bfc..77e63bfb0 100644
--- a/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-csvlib.inc.php
@@ -29,11 +29,13 @@
$ADODB_INCLUDED_CSV = 1;
/**
- * convert a recordset into special format
+ * Convert a recordset into special format
*
- * @param rs the recordset
+ * @param ADORecordSet $rs the recordset
+ * @param ADOConnection $conn
+ * @param string $sql
*
- * @return the CSV formatted data
+ * @return string the CSV formatted data
*/
function _rs2serialize(&$rs,$conn=false,$sql='')
{
@@ -74,7 +76,7 @@ function _rs2serialize(&$rs,$conn=false,$sql='')
$savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode;
$class = $rs->connection->arrayClass;
- $rs2 = new $class();
+ $rs2 = new $class(-1); // Dummy query Id
$rs2->timeCreated = $rs->timeCreated; # memcache fix
$rs2->sql = $rs->sql;
$rs2->oldProvider = $rs->dataProvider;
@@ -83,19 +85,19 @@ function _rs2serialize(&$rs,$conn=false,$sql='')
return $line.serialize($rs2);
}
-
-/**
-* Open CSV file and convert it into Data.
-*
-* @param url file/ftp/http url
-* @param err returns the error message
-* @param timeout dispose if recordset has been alive for $timeout secs
-*
-* @return recordset, or false if error occurred. If no
-* error occurred in sql INSERT/UPDATE/DELETE,
-* empty recordset is returned
-*/
- function csv2rs($url,&$err,$timeout=0, $rsclass='ADORecordSet_array')
+ /**
+ * Open CSV file and convert it into Data.
+ *
+ * @param string $url file/ftp/http url
+ * @param string &$err returns the error message
+ * @param int $timeout dispose if recordset has been alive for $timeout secs
+ * @param string $rsclass RecordSet class to return
+ *
+ * @return ADORecordSet|false recordset, or false if error occurred.
+ * If no error occurred in sql INSERT/UPDATE/DELETE,
+ * empty recordset is returned.
+ */
+ function csv2rs($url, &$err, $timeout=0, $rsclass='ADORecordSet_array')
{
$false = false;
$err = false;
diff --git a/app/vendor/adodb/adodb-php/adodb-datadict.inc.php b/app/vendor/adodb/adodb-php/adodb-datadict.inc.php
index dbed95da7..9dfa07a6f 100644
--- a/app/vendor/adodb/adodb-php/adodb-datadict.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-datadict.inc.php
@@ -353,7 +353,7 @@ function metaType($t,$len=-1,$fieldobj=false)
function nameQuote($name = NULL,$allowBrackets=false)
{
if (!is_string($name)) {
- return FALSE;
+ return false;
}
$name = trim($name);
@@ -427,6 +427,15 @@ function executeSQLArray($sql, $continueOnError = true)
function actualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
return $meta;
}
@@ -498,7 +507,7 @@ function addColumnSQL($tabname, $flds)
* @param string $tabname table-name
* @param string $flds column-name and type for the changed column
* @param string $tableflds='' complete definition of the new table, eg. for postgres, default ''
- * @param array/string $tableoptions='' options for the new table see createTableSQL, default ''
+ * @param array|string $tableoptions='' options for the new table see createTableSQL, default ''
* @return array with SQL strings
*/
function alterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
@@ -553,7 +562,7 @@ function renameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='')
* @param string $tabname table-name
* @param string $flds column-name and type for the changed column
* @param string $tableflds='' complete definition of the new table, eg. for postgres, default ''
- * @param array/string $tableoptions='' options for the new table see createTableSQL, default ''
+ * @param array|string $tableoptions='' options for the new table see createTableSQL, default ''
* @return array with SQL strings
*/
function dropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
@@ -695,16 +704,25 @@ function _genFields($flds,$widespacing=false)
case '0':
case 'NAME': $fname = $v; break;
case '1':
- case 'TYPE': $ty = $v; $ftype = $this->actualType(strtoupper($v)); break;
+ case 'TYPE':
+
+ $ty = $v;
+ $ftype = $this->actualType(strtoupper($v));
+ break;
case 'SIZE':
- $dotat = strpos($v,'.'); if ($dotat === false) $dotat = strpos($v,',');
- if ($dotat === false) $fsize = $v;
- else {
- $fsize = substr($v,0,$dotat);
- $fprec = substr($v,$dotat+1);
- }
- break;
+ $dotat = strpos($v,'.');
+ if ($dotat === false)
+ $dotat = strpos($v,',');
+ if ($dotat === false)
+ $fsize = $v;
+ else {
+
+ $fsize = substr($v,0,$dotat);
+ $fprec = substr($v,$dotat+1);
+
+ }
+ break;
case 'UNSIGNED': $funsigned = true; break;
case 'AUTOINCREMENT':
case 'AUTO': $fautoinc = true; $fnotnull = true; break;
diff --git a/app/vendor/adodb/adodb-php/adodb-exceptions.inc.php b/app/vendor/adodb/adodb-php/adodb-exceptions.inc.php
index 9f1176f0f..560286a18 100644
--- a/app/vendor/adodb/adodb-php/adodb-exceptions.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-exceptions.inc.php
@@ -45,6 +45,9 @@ function __construct($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)
$s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)";
break;
default:
+ //Prevent PHP warning if $p1 or $p2 are arrays.
+ $p1 = ( is_array($p1) ) ? 'Array' : $p1;
+ $p2 = ( is_array($p2) ) ? 'Array' : $p2;
$s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)";
break;
}
diff --git a/app/vendor/adodb/adodb-php/adodb-loadbalancer.inc.php b/app/vendor/adodb/adodb-php/adodb-loadbalancer.inc.php
index 2e4f3928d..88f5d0fdc 100644
--- a/app/vendor/adodb/adodb-php/adodb-loadbalancer.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-loadbalancer.inc.php
@@ -174,7 +174,7 @@ public function removeConnection($i)
* @param string $type Type of database connection, either: 'write' capable or 'readonly'
* @return bool|int|string
*/
- private function getConnectionByWeight($type)
+ public function getConnectionByWeight($type)
{
if ($type == 'readonly') {
$total_weight = $this->total_connection_weights['all'];
@@ -233,7 +233,7 @@ public function getLoadBalancedConnection($type)
* @return bool|ADOConnection
* @throws Exception
*/
- private function _getConnection($connection_id)
+ public function getConnectionById($connection_id)
{
if (isset($this->connections[$connection_id])) {
$connection_obj = $this->connections[$connection_id];
@@ -261,6 +261,15 @@ private function _getConnection($connection_id)
throw $e; // No connections left, reThrow exception so application can catch it.
}
+ // Check to see if a connection test callback was defined, and if so execute it.
+ // This is useful for testing replication lag and such to ensure the connection is suitable to be used.
+ $test_connection_callback = $connection_obj->getConnectionTestCallback();
+ if (is_callable($test_connection_callback)
+ && $test_connection_callback($connection_obj, $adodb_obj) !== TRUE
+ ) {
+ return false;
+ }
+
if (is_array($this->user_defined_session_init_sql)) {
foreach ($this->user_defined_session_init_sql as $session_init_sql) {
$adodb_obj->Execute($session_init_sql);
@@ -298,9 +307,12 @@ public function getConnection($type = 'write', $pin_connection = null)
if ($connection_id !== false) {
try {
- $adodb_obj = $this->_getConnection($connection_id);
- // $connection_obj = $this->connections[$connection_id];
- break;
+ $adodb_obj = $this->getConnectionById($connection_id);
+ if (is_object($adodb_obj)) {
+ break; //Found valid connection, continue with it.
+ } else {
+ throw new Exception('ADODB Connection Object does not exist. Perhaps LoadBalancer Database Connection Test Failed?');
+ }
} catch (Exception $e) {
// Connection error, see if there are other connections to try still.
$this->removeConnection($connection_id);
@@ -315,6 +327,10 @@ public function getConnection($type = 'write', $pin_connection = null)
}
}
+ if (!isset($connection_id)) {
+ throw new Exception('No connection available to use at this time! Type: ' . $type);
+ }
+
$this->last_connection_id[$type] = $connection_id;
if ($pin_connection === true) {
@@ -432,7 +448,7 @@ public function clusterExecute(
&& $connection_obj->getADOdbObject()->_connectionID !== false
)
) {
- $adodb_obj = $this->_getConnection($key);
+ $adodb_obj = $this->getConnectionById($key);
if (is_object($adodb_obj)) {
$result_arr[] = $adodb_obj->Execute($sql, $inputarr);
}
@@ -595,6 +611,7 @@ public function __call($method, $args)
case 'binddate':
case 'bindtimestamp':
case 'setfetchmode':
+ case 'setcustommetatype':
$type = false; // No connection necessary.
break;
@@ -686,6 +703,11 @@ class ADOdbLoadBalancerConnection
*/
protected $adodb_obj = false;
+ /**
+ * @var callable Closure
+ */
+ protected $connection_test_callback = NULL;
+
/**
* @var string Type of connection, either 'write' capable or 'readonly'
*/
@@ -761,6 +783,24 @@ public function __construct(
return true;
}
+ /**
+ * Anonymous function that is called and must return TRUE for the connection to be usable.*
+ * The first argument is the type of connection to test.
+ * Useful to check things like replication lag.
+ * @param callable $callback
+ * @return void
+ */
+ function setConnectionTestCallback($callback) {
+ $this->connection_test_callback = $callback;
+ }
+
+ /**
+ * @return callable|null
+ */
+ function getConnectionTestCallback() {
+ return $this->connection_test_callback;
+ }
+
/**
* Returns the ADODB object for this connection.
*
diff --git a/app/vendor/adodb/adodb-php/adodb-memcache.lib.inc.php b/app/vendor/adodb/adodb-php/adodb-memcache.lib.inc.php
index 7f110e749..a251c9c32 100644
--- a/app/vendor/adodb/adodb-php/adodb-memcache.lib.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-memcache.lib.inc.php
@@ -17,6 +17,8 @@
*
* @copyright 2000-2013 John Lim
* @copyright 2014 Damien Regad, Mark Newnham and the ADOdb community
+ *
+ * @noinspection PhpUnused
*/
// security - hide paths
@@ -26,183 +28,393 @@
$ADODB_INCLUDED_MEMCACHE = 1;
global $ADODB_INCLUDED_CSV;
-if (empty($ADODB_INCLUDED_CSV)) include_once(ADODB_DIR.'/adodb-csvlib.inc.php');
-
- class ADODB_Cache_MemCache {
- var $createdir = false; // create caching directory structure?
-
- // $library will be populated with the proper library on connect
- // and is used later when there are differences in specific calls
- // between memcache and memcached
- var $library = false;
-
- //-----------------------------
- // memcache specific variables
-
- var $hosts; // array of hosts
- var $port = 11211;
- var $compress = false; // memcache compression with zlib
-
- var $_connected = false;
- var $_memcache = false;
-
- function __construct(&$obj)
- {
- $this->hosts = $obj->memCacheHost;
- $this->port = $obj->memCachePort;
- $this->compress = $obj->memCacheCompress;
- }
-
- // implement as lazy connection. The connection only occurs on CacheExecute call
- function connect(&$err)
- {
- // do we have memcache or memcached?
- if (class_exists('Memcache')) {
- $this->library='Memcache';
- $memcache = new MemCache;
- } elseif (class_exists('Memcached')) {
- $this->library='Memcached';
- $memcache = new MemCached;
- } else {
- $err = 'Neither the Memcache nor Memcached PECL extensions were found!';
- return false;
- }
+if (empty($ADODB_INCLUDED_CSV)) {
+ include_once(ADODB_DIR . '/adodb-csvlib.inc.php');
+}
- if (!is_array($this->hosts)) $this->hosts = array($this->hosts);
+class ADODB_Cache_MemCache
+{
+ /**
+ * @var bool Prevents parent class calling non-existant function
+ */
+ public $createdir = false;
- $failcnt = 0;
- foreach($this->hosts as $host) {
- if (!@$memcache->addServer($host,$this->port)) {
- $failcnt += 1;
- }
- }
- if ($failcnt == sizeof($this->hosts)) {
- $err = 'Can\'t connect to any memcache server';
+ /**
+ * @var array of hosts
+ */
+ private $hosts;
+
+ /**
+ * @var int Connection Port, uses default
+ */
+ private $port;
+
+ /**
+ * @var bool memcache compression with zlib
+ */
+ private $compress;
+
+ /**
+ * @var array of options for memcached only
+ */
+ private $options;
+
+ /**
+ * @var bool Internal flag indicating successful connection
+ */
+ private $isConnected = false;
+
+ /**
+ * @var Memcache|Memcached Handle for the Memcache library
+ *
+ * Populated with the proper library on connect, used later when
+ * there are differences in specific calls between memcache and memcached
+ */
+ private $memcacheLibrary = false;
+
+ /**
+ * @var array New server feature controller lists available servers
+ */
+ private $serverControllers = array();
+
+ /**
+ * @var array New server feature template uses granular server controller
+ */
+ private $serverControllerTemplate = array(
+ 'host' => '',
+ 'port' => 11211,
+ 'weight' => 0,
+ );
+
+ /**
+ * An integer index into the libraries
+ * @see $libraries
+ */
+ const MCLIB = 1;
+ const MCLIBD = 2;
+
+ /**
+ * @var array Xrefs the library flag to the actual class name
+ */
+ private $libraries = array(
+ self::MCLIB => 'Memcache',
+ self::MCLIBD => 'Memcached'
+ );
+
+ /**
+ * @var int An indicator of which library we are using
+ */
+ private $libraryFlag;
+
+ /**
+ * Class Constructor.
+ *
+ * @param ADOConnection $db
+ */
+ public function __construct($db)
+ {
+ $this->hosts = $db->memCacheHost;
+ $this->port = $this->serverControllerTemplate['port'] = $db->memCachePort;
+ $this->compress = $db->memCacheCompress;
+ $this->options = $db->memCacheOptions;
+ }
+
+ /**
+ * Return true if the current library is Memcached.
+ * @return bool
+ */
+ public function isLibMemcached(): bool
+ {
+ return $this->libraryFlag == self::MCLIBD;
+ }
+
+ /**
+ * Lazy connection.
+ *
+ * The connection only occurs on CacheExecute call.
+ *
+ * @param string $err
+ *
+ * @return bool success of connecting to a server
+ */
+ public function connect(&$err)
+ {
+ // do we have memcache or memcached? see the note at adodb.org on memcache
+ if (class_exists('Memcache')) {
+ $this->libraryFlag = self::MCLIB;
+ } elseif (class_exists('Memcached')) {
+ $this->libraryFlag = self::MCLIBD;
+ } else {
+ $err = 'Neither the Memcache nor Memcached PECL extensions were found!';
+ return false;
+ }
+
+ $usedLibrary = $this->libraries[$this->libraryFlag];
+
+ /** @var Memcache|Memcached $memCache */
+ $memCache = new $usedLibrary;
+ if (!$memCache) {
+ $err = 'Memcache library failed to initialize';
+ return false;
+ }
+
+ // Convert simple compression flag for memcached
+ if ($this->isLibMemcached()) {
+ $this->options[Memcached::OPT_COMPRESSION] = $this->compress;
+ }
+
+ // Are there any options available for memcached
+ if ($this->isLibMemcached() && count($this->options) > 0) {
+ $optionSuccess = $memCache->setOptions($this->options);
+ if (!$optionSuccess) {
+ $err = 'Invalid option parameters passed to Memcached';
return false;
}
- $this->_connected = true;
- $this->_memcache = $memcache;
- return true;
}
- // returns true or false. true if successful save
- function writecache($filename, $contents, $debug, $secs2cache)
- {
- if (!$this->_connected) {
- $err = '';
- if (!$this->connect($err) && $debug) ADOConnection::outp($err);
- }
- if (!$this->_memcache) return false;
+ // Have we passed a controller array
+ if (!is_array($this->hosts)) {
+ $this->hosts = array($this->hosts);
+ }
- $failed=false;
- switch ($this->library) {
- case 'Memcache':
- if (!$this->_memcache->set($filename, $contents, $this->compress ? MEMCACHE_COMPRESSED : 0, $secs2cache)) {
- $failed=true;
- }
- break;
- case 'Memcached':
- if (!$this->_memcache->set($filename, $contents, $secs2cache)) {
- $failed=true;
- }
- break;
- default:
- $failed=true;
- break;
+ if (!is_array($this->hosts[0])) {
+ // Old way, convert to controller
+ foreach ($this->hosts as $ipAddress) {
+ $connector = $this->serverControllerTemplate;
+ $connector['host'] = $ipAddress;
+ $connector['port'] = $this->port;
+
+ $this->serverControllers[] = $connector;
}
+ } else {
+ // New way, must validate port, etc
+ foreach ($this->hosts as $controller) {
+ $connector = array_merge($this->serverControllerTemplate, $controller);
+ if ($this->isLibMemcached()) {
+ $connector['weight'] = (int)$connector['weight'];
+ } else {
+ // Cannot use weight in memcache, simply discard
+ $connector['weight'] = 0;
+ }
- if($failed) {
- if ($debug) ADOConnection::outp(" Failed to save data at the memcache server! \n");
- return false;
+ $this->serverControllers[] = $connector;
}
+ }
+ // Checks for existing connections ( but only for memcached )
+ if ($this->isLibMemcached() && !empty($memCache->getServerList())) {
+ // Use the existing configuration
+ $this->isConnected = true;
+ $this->memcacheLibrary = $memCache;
return true;
}
- // returns a recordset
- function readcache($filename, &$err, $secs2cache, $rsClass)
- {
- $false = false;
- if (!$this->_connected) $this->connect($err);
- if (!$this->_memcache) return $false;
-
- $rs = $this->_memcache->get($filename);
- if (!$rs) {
- $err = 'Item with such key doesn\'t exist on the memcache server.';
- return $false;
+ $failcnt = 0;
+ foreach ($this->serverControllers as $controller) {
+ if ($this->isLibMemcached()) {
+ if (!@$memCache->addServer($controller['host'], $controller['port'], $controller['weight'])) {
+ $failcnt++;
+ }
+ } else {
+ if (!@$memCache->addServer($controller['host'], $controller['port'])) {
+ $failcnt++;
+ }
}
+ }
+ if ($failcnt == sizeof($this->serverControllers)) {
+ $err = 'Can\'t connect to any memcache server';
+ return false;
+ }
+
+ $this->memcacheLibrary = $memCache;
- // hack, should actually use _csv2rs
- $rs = explode("\n", $rs);
- unset($rs[0]);
- $rs = join("\n", $rs);
- $rs = unserialize($rs);
- if (! is_object($rs)) {
- $err = 'Unable to unserialize $rs';
- return $false;
+ // A valid memcache connection is available
+ $this->isConnected = true;
+ return true;
+ }
+
+ /**
+ * Writes a cached query to the server
+ *
+ * @param string $filename The MD5 of the query to cache
+ * @param string $contents The query results
+ * @param bool $debug
+ * @param int $secs2cache
+ *
+ * @return bool true or false. true if successful save
+ */
+ public function writeCache($filename, $contents, $debug, $secs2cache)
+ {
+ $err = '';
+ if (!$this->isConnected && $debug) {
+ // Call to writeCache() before connect(), try to connect
+ if (!$this->connect($err)) {
+ ADOConnection::outp($err);
}
- if ($rs->timeCreated == 0) return $rs; // apparently have been reports that timeCreated was set to 0 somewhere
-
- $tdiff = intval($rs->timeCreated+$secs2cache - time());
- if ($tdiff <= 2) {
- switch($tdiff) {
- case 2:
- if ((rand() & 15) == 0) {
- $err = "Timeout 2";
- return $false;
- }
- break;
- case 1:
- if ((rand() & 3) == 0) {
- $err = "Timeout 1";
- return $false;
- }
- break;
- default:
- $err = "Timeout 0";
- return $false;
- }
+ } else {
+ if (!$this->isConnected) {
+ $this->connect($err);
}
- return $rs;
}
- function flushall($debug=false)
- {
- if (!$this->_connected) {
- $err = '';
- if (!$this->connect($err) && $debug) ADOConnection::outp($err);
+ if (!$this->memcacheLibrary) {
+ return false;
+ }
+
+ $failed = false;
+ switch ($this->libraryFlag) {
+ case self::MCLIB:
+ if (!$this->memcacheLibrary->set($filename, $contents, $this->compress ? MEMCACHE_COMPRESSED : 0,
+ $secs2cache)) {
+ $failed = true;
+ }
+ break;
+ case self::MCLIBD:
+ if (!$this->memcacheLibrary->set($filename, $contents, $secs2cache)) {
+ $failed = true;
+ }
+ break;
+ default:
+ $failed = true;
+ break;
+ }
+
+ if ($failed) {
+ if ($debug) {
+ ADOConnection::outp(" Failed to save data at the memcache server! \n");
}
- if (!$this->_memcache) return false;
+ return false;
+ }
- $del = $this->_memcache->flush();
+ return true;
+ }
- if ($debug)
- if (!$del) ADOConnection::outp("flushall: failed! \n");
- else ADOConnection::outp("flushall: succeeded! \n");
+ /**
+ * Reads a cached query from the server.
+ *
+ * @param string $filename The MD5 of the query to read
+ * @param string $err The query results
+ * @param int $secs2cache
+ * @param object $rsClass **UNUSED**
+ *
+ * @return object|bool record or false.
+ *
+ * @noinspection PhpUnusedParameterInspection
+ */
+ public function readCache($filename, &$err, $secs2cache, $rsClass)
+ {
+ if (!$this->isConnected) {
+ $this->connect($err);
+ }
+ if (!$this->memcacheLibrary) {
+ return false;
+ }
+
+ $rs = $this->memcacheLibrary->get($filename);
+ if (!$rs) {
+ $err = 'Item with such key doesn\'t exist on the memcache server.';
+ return false;
+ }
+
+ // hack, should actually use _csv2rs
+ $rs = explode("\n", $rs);
+ unset($rs[0]);
+ $rs = join("\n", $rs);
+ $rs = unserialize($rs);
+ if (!is_object($rs)) {
+ $err = 'Unable to unserialize $rs';
+ return false;
+ }
+ if ($rs->timeCreated == 0) {
+ return $rs;
+ } // apparently have been reports that timeCreated was set to 0 somewhere
- return $del;
+ $tdiff = intval($rs->timeCreated + $secs2cache - time());
+ if ($tdiff <= 2) {
+ switch ($tdiff) {
+ case 2:
+ if ((rand() & 15) == 0) {
+ $err = "Timeout 2";
+ return false;
+ }
+ break;
+ case 1:
+ if ((rand() & 3) == 0) {
+ $err = "Timeout 1";
+ return false;
+ }
+ break;
+ default:
+ $err = "Timeout 0";
+ return false;
+ }
}
+ return $rs;
+ }
- function flushcache($filename, $debug=false)
- {
- if (!$this->_connected) {
- $err = '';
- if (!$this->connect($err) && $debug) ADOConnection::outp($err);
+ /**
+ * Flushes all of the stored memcache data
+ *
+ * @param bool $debug
+ *
+ * @return bool The response from the memcache server
+ */
+ public function flushAll($debug = false)
+ {
+ if (!$this->isConnected) {
+ $err = '';
+ if (!$this->connect($err) && $debug) {
+ ADOConnection::outp($err);
}
- if (!$this->_memcache) return false;
+ }
+ if (!$this->memcacheLibrary) {
+ return false;
+ }
- $del = $this->_memcache->delete($filename);
+ $del = $this->memcacheLibrary->flush();
+
+ if ($debug) {
+ if (!$del) {
+ ADOConnection::outp("flushall: failed! \n");
+ } else {
+ ADOConnection::outp("flushall: succeeded! \n");
+ }
+ }
- if ($debug)
- if (!$del) ADOConnection::outp("flushcache: $key entry doesn't exist on memcache server! \n");
- else ADOConnection::outp("flushcache: $key entry flushed from memcache server! \n");
+ return $del;
+ }
- return $del;
+ /**
+ * Flushes the contents of a specified query
+ *
+ * @param string $filename The MD5 of the query to flush
+ * @param bool $debug
+ *
+ * @return bool The response from the memcache server
+ */
+ public function flushCache($filename, $debug = false)
+ {
+ if (!$this->isConnected) {
+ $err = '';
+ if (!$this->connect($err) && $debug) {
+ ADOConnection::outp($err);
+ }
+ }
+ if (!$this->memcacheLibrary) {
+ return false;
}
- // not used for memcache
- function createdir($dir, $hash)
- {
- return true;
+ $del = $this->memcacheLibrary->delete($filename);
+
+ if ($debug) {
+ if (!$del) {
+ ADOConnection::outp("flushcache: $filename entry doesn't exist on memcache server! \n");
+ } else {
+ ADOConnection::outp("flushcache: $filename entry flushed from memcache server! \n");
+ }
}
+
+ return $del;
}
+
+}
diff --git a/app/vendor/adodb/adodb-php/adodb-xmlschema.inc.php b/app/vendor/adodb/adodb-php/adodb-xmlschema.inc.php
index 58e3affd6..32b8afa1e 100644
--- a/app/vendor/adodb/adodb-php/adodb-xmlschema.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-xmlschema.inc.php
@@ -26,133 +26,119 @@
* @author Dan Cech
*/
-function _file_get_contents($file)
-{
- if (function_exists('file_get_contents')) return file_get_contents($file);
-
- $f = fopen($file,'r');
- if (!$f) return '';
- $t = '';
-
- while ($s = fread($f,100000)) $t .= $s;
- fclose($f);
- return $t;
-}
-
-
/**
-* Debug on or off
-*/
+ * Debug on or off
+ */
if( !defined( 'XMLS_DEBUG' ) ) {
define( 'XMLS_DEBUG', FALSE );
}
/**
-* Default prefix key
-*/
+ * Default prefix key
+ */
if( !defined( 'XMLS_PREFIX' ) ) {
define( 'XMLS_PREFIX', '%%P' );
}
/**
-* Maximum length allowed for object prefix
-*/
+ * Maximum length allowed for object prefix
+ */
if( !defined( 'XMLS_PREFIX_MAXLEN' ) ) {
define( 'XMLS_PREFIX_MAXLEN', 10 );
}
/**
-* Execute SQL inline as it is generated
-*/
+ * Execute SQL inline as it is generated
+ */
if( !defined( 'XMLS_EXECUTE_INLINE' ) ) {
define( 'XMLS_EXECUTE_INLINE', FALSE );
}
/**
-* Continue SQL Execution if an error occurs?
-*/
+ * Continue SQL Execution if an error occurs?
+ */
if( !defined( 'XMLS_CONTINUE_ON_ERROR' ) ) {
define( 'XMLS_CONTINUE_ON_ERROR', FALSE );
}
/**
-* Current Schema Version
-*/
+ * Current Schema Version
+ */
if( !defined( 'XMLS_SCHEMA_VERSION' ) ) {
define( 'XMLS_SCHEMA_VERSION', '0.2' );
}
/**
-* Default Schema Version. Used for Schemas without an explicit version set.
-*/
+ * Default Schema Version. Used for Schemas without an explicit version set.
+ */
if( !defined( 'XMLS_DEFAULT_SCHEMA_VERSION' ) ) {
define( 'XMLS_DEFAULT_SCHEMA_VERSION', '0.1' );
}
/**
-* Default Schema Version. Used for Schemas without an explicit version set.
-*/
+ * Default Schema Version. Used for Schemas without an explicit version set.
+ */
if( !defined( 'XMLS_DEFAULT_UPGRADE_METHOD' ) ) {
define( 'XMLS_DEFAULT_UPGRADE_METHOD', 'ALTER' );
}
/**
-* Include the main ADODB library
-*/
+ * Include the main ADODB library
+ */
if( !defined( '_ADODB_LAYER' ) ) {
require( 'adodb.inc.php' );
require( 'adodb-datadict.inc.php' );
}
/**
-* Abstract DB Object. This class provides basic methods for database objects, such
-* as tables and indexes.
-*
-* @package axmls
-* @access private
-*/
+ * Abstract DB Object. This class provides basic methods for database objects, such
+ * as tables and indexes.
+ *
+ * @package axmls
+ * @access private
+ */
class dbObject {
/**
- * var object Parent
- */
+ * var object Parent
+ */
var $parent;
/**
- * var string current element
- */
+ * var string current element
+ */
var $currentElement;
/**
- * NOP
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * NOP
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
}
/**
- * XML Callback to process start elements
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * @access private
+ */
function _tag_open( &$parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * @access private
+ */
function _tag_cdata( &$parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( &$parser, $tag ) {
}
@@ -162,110 +148,110 @@ function create(&$xmls) {
}
/**
- * Destroys the object
- */
+ * Destroys the object
+ */
function destroy() {
}
/**
- * Checks whether the specified RDBMS is supported by the current
- * database object or its ranking ancestor.
- *
- * @param string $platform RDBMS platform name (from ADODB platform list).
- * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE.
- */
+ * Checks whether the specified RDBMS is supported by the current
+ * database object or its ranking ancestor.
+ *
+ * @param string $platform RDBMS platform name (from ADODB platform list).
+ * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE.
+ */
function supportedPlatform( $platform = NULL ) {
return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE;
}
/**
- * Returns the prefix set by the ranking ancestor of the database object.
- *
- * @param string $name Prefix string.
- * @return string Prefix.
- */
+ * Returns the prefix set by the ranking ancestor of the database object.
+ *
+ * @param string $name Prefix string.
+ * @return string Prefix.
+ */
function prefix( $name = '' ) {
return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name;
}
/**
- * Extracts a field ID from the specified field.
- *
- * @param string $field Field.
- * @return string Field ID.
- */
+ * Extracts a field ID from the specified field.
+ *
+ * @param string $field Field.
+ * @return string Field ID.
+ */
function FieldID( $field ) {
return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) );
}
}
/**
-* Creates a table object in ADOdb's datadict format
-*
-* This class stores information about a database table. As charactaristics
-* of the table are loaded from the external source, methods and properties
-* of this class are used to build up the table description in ADOdb's
-* datadict format.
-*
-* @package axmls
-* @access private
-*/
+ * Creates a table object in ADOdb's datadict format
+ *
+ * This class stores information about a database table. As charactaristics
+ * of the table are loaded from the external source, methods and properties
+ * of this class are used to build up the table description in ADOdb's
+ * datadict format.
+ *
+ * @package axmls
+ * @access private
+ */
class dbTable extends dbObject {
/**
- * @var string Table name
- */
+ * @var string Table name
+ */
var $name;
/**
- * @var array Field specifier: Meta-information about each field
- */
+ * @var array Field specifier: Meta-information about each field
+ */
var $fields = array();
/**
- * @var array List of table indexes.
- */
+ * @var array List of table indexes.
+ */
var $indexes = array();
/**
- * @var array Table options: Table-level options
- */
+ * @var array Table options: Table-level options
+ */
var $opts = array();
/**
- * @var string Field index: Keeps track of which field is currently being processed
- */
+ * @var string Field index: Keeps track of which field is currently being processed
+ */
var $current_field;
/**
- * @var boolean Mark table for destruction
- * @access private
- */
+ * @var boolean Mark table for destruction
+ * @access private
+ */
var $drop_table;
/**
- * @var boolean Mark field for destruction (not yet implemented)
- * @access private
- */
+ * @var boolean Mark field for destruction (not yet implemented)
+ * @access private
+ */
var $drop_field = array();
/**
- * Iniitializes a new table object.
- *
- * @param string $prefix DB Object prefix
- * @param array $attributes Array of table attributes.
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Iniitializes a new table object.
+ *
+ * @param string $prefix DB Object prefix
+ * @param array $attributes Array of table attributes.
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
$this->name = $this->prefix($attributes['NAME']);
}
/**
- * XML Callback to process start elements. Elements currently
- * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT.
- *
- * @access private
- */
+ * XML Callback to process start elements. Elements currently
+ * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT.
+ *
+ * @access private
+ */
function _tag_open( &$parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -321,10 +307,10 @@ function _tag_open( &$parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * @access private
+ */
function _tag_cdata( &$parser, $cdata ) {
switch( $this->currentElement ) {
// Table constraint
@@ -345,10 +331,10 @@ function _tag_cdata( &$parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( &$parser, $tag ) {
$this->currentElement = '';
@@ -366,11 +352,11 @@ function _tag_close( &$parser, $tag ) {
}
/**
- * Adds an index to a table object
- *
- * @param array $attributes Index attributes
- * @return object dbIndex object
- */
+ * Adds an index to a table object
+ *
+ * @param array $attributes Index attributes
+ * @return object dbIndex object
+ */
function addIndex( $attributes ) {
$name = strtoupper( $attributes['NAME'] );
$this->indexes[$name] = new dbIndex( $this, $attributes );
@@ -378,11 +364,11 @@ function addIndex( $attributes ) {
}
/**
- * Adds data to a table object
- *
- * @param array $attributes Data attributes
- * @return object dbData object
- */
+ * Adds data to a table object
+ *
+ * @param array $attributes Data attributes
+ * @return object dbData object
+ */
function addData( $attributes ) {
if( !isset( $this->data ) ) {
$this->data = new dbData( $this, $attributes );
@@ -391,34 +377,34 @@ function addData( $attributes ) {
}
/**
- * Adds a field to a table object
- *
- * $name is the name of the table to which the field should be added.
- * $type is an ADODB datadict field type. The following field types
- * are supported as of ADODB 3.40:
- * - C: varchar
- * - X: CLOB (character large object) or largest varchar size
- * if CLOB is not supported
- * - C2: Multibyte varchar
- * - X2: Multibyte CLOB
- * - B: BLOB (binary large object)
- * - D: Date (some databases do not support this, and we return a datetime type)
- * - T: Datetime or Timestamp
- * - L: Integer field suitable for storing booleans (0 or 1)
- * - I: Integer (mapped to I4)
- * - I1: 1-byte integer
- * - I2: 2-byte integer
- * - I4: 4-byte integer
- * - I8: 8-byte integer
- * - F: Floating point number
- * - N: Numeric or decimal number
- *
- * @param string $name Name of the table to which the field will be added.
- * @param string $type ADODB datadict field type.
- * @param string $size Field size
- * @param array $opts Field options array
- * @return array Field specifier array
- */
+ * Adds a field to a table object
+ *
+ * $name is the name of the table to which the field should be added.
+ * $type is an ADODB datadict field type. The following field types
+ * are supported as of ADODB 3.40:
+ * - C: varchar
+ * - X: CLOB (character large object) or largest varchar size
+ * if CLOB is not supported
+ * - C2: Multibyte varchar
+ * - X2: Multibyte CLOB
+ * - B: BLOB (binary large object)
+ * - D: Date (some databases do not support this, and we return a datetime type)
+ * - T: Datetime or Timestamp
+ * - L: Integer field suitable for storing booleans (0 or 1)
+ * - I: Integer (mapped to I4)
+ * - I1: 1-byte integer
+ * - I2: 2-byte integer
+ * - I4: 4-byte integer
+ * - I8: 8-byte integer
+ * - F: Floating point number
+ * - N: Numeric or decimal number
+ *
+ * @param string $name Name of the table to which the field will be added.
+ * @param string $type ADODB datadict field type.
+ * @param string $size Field size
+ * @param array $opts Field options array
+ * @return array Field specifier array
+ */
function addField( $name, $type, $size = NULL, $opts = NULL ) {
$field_id = $this->FieldID( $name );
@@ -443,16 +429,16 @@ function addField( $name, $type, $size = NULL, $opts = NULL ) {
}
/**
- * Adds a field option to the current field specifier
- *
- * This method adds a field option allowed by the ADOdb datadict
- * and appends it to the given field.
- *
- * @param string $field Field name
- * @param string $opt ADOdb field option
- * @param mixed $value Field option value
- * @return array Field specifier array
- */
+ * Adds a field option to the current field specifier
+ *
+ * This method adds a field option allowed by the ADOdb datadict
+ * and appends it to the given field.
+ *
+ * @param string $field Field name
+ * @param string $opt ADOdb field option
+ * @param mixed $value Field option value
+ * @return array Field specifier array
+ */
function addFieldOpt( $field, $opt, $value = NULL ) {
if( !isset( $value ) ) {
$this->fields[$this->FieldID( $field )]['OPTS'][] = $opt;
@@ -463,14 +449,14 @@ function addFieldOpt( $field, $opt, $value = NULL ) {
}
/**
- * Adds an option to the table
- *
- * This method takes a comma-separated list of table-level options
- * and appends them to the table object.
- *
- * @param string $opt Table option
- * @return array Options
- */
+ * Adds an option to the table
+ *
+ * This method takes a comma-separated list of table-level options
+ * and appends them to the table object.
+ *
+ * @param string $opt Table option
+ * @return array Options
+ */
function addTableOpt( $opt ) {
if(isset($this->currentPlatform)) {
$this->opts[$this->parent->db->databaseType] = $opt;
@@ -480,11 +466,11 @@ function addTableOpt( $opt ) {
/**
- * Generates the SQL that will create the table in the database
- *
- * @param object $xmls adoSchema object
- * @return array Array containing table creation SQL
- */
+ * Generates the SQL that will create the table in the database
+ *
+ * @param object $xmls adoSchema object
+ * @return array Array containing table creation SQL
+ */
function create( &$xmls ) {
$sql = array();
@@ -592,8 +578,8 @@ function create( &$xmls ) {
}
/**
- * Marks a field or table for destruction
- */
+ * Marks a field or table for destruction
+ */
function drop() {
if( isset( $this->current_field ) ) {
// Drop the current field
@@ -610,61 +596,61 @@ function drop() {
}
/**
-* Creates an index object in ADOdb's datadict format
-*
-* This class stores information about a database index. As charactaristics
-* of the index are loaded from the external source, methods and properties
-* of this class are used to build up the index description in ADOdb's
-* datadict format.
-*
-* @package axmls
-* @access private
-*/
+ * Creates an index object in ADOdb's datadict format
+ *
+ * This class stores information about a database index. As charactaristics
+ * of the index are loaded from the external source, methods and properties
+ * of this class are used to build up the index description in ADOdb's
+ * datadict format.
+ *
+ * @package axmls
+ * @access private
+ */
class dbIndex extends dbObject {
/**
- * @var string Index name
- */
+ * @var string Index name
+ */
var $name;
/**
- * @var array Index options: Index-level options
- */
+ * @var array Index options: Index-level options
+ */
var $opts = array();
/**
- * @var array Indexed fields: Table columns included in this index
- */
+ * @var array Indexed fields: Table columns included in this index
+ */
var $columns = array();
/**
- * @var boolean Mark index for destruction
- * @access private
- */
+ * @var boolean Mark index for destruction
+ * @access private
+ */
var $drop = FALSE;
/**
- * Initializes the new dbIndex object.
- *
- * @param object $parent Parent object
- * @param array $attributes Attributes
- *
- * @internal
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Initializes the new dbIndex object.
+ *
+ * @param object $parent Parent object
+ * @param array $attributes Attributes
+ *
+ * @internal
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
$this->name = $this->prefix ($attributes['NAME']);
}
/**
- * XML Callback to process start elements
- *
- * Processes XML opening tags.
- * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH.
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * Processes XML opening tags.
+ * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH.
+ *
+ * @access private
+ */
function _tag_open( &$parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -686,12 +672,12 @@ function _tag_open( &$parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * Processes XML cdata.
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * Processes XML cdata.
+ *
+ * @access private
+ */
function _tag_cdata( &$parser, $cdata ) {
switch( $this->currentElement ) {
// Index field name
@@ -704,10 +690,10 @@ function _tag_cdata( &$parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( &$parser, $tag ) {
$this->currentElement = '';
@@ -719,11 +705,11 @@ function _tag_close( &$parser, $tag ) {
}
/**
- * Adds a field to the index
- *
- * @param string $name Field name
- * @return string Field list
- */
+ * Adds a field to the index
+ *
+ * @param string $name Field name
+ * @return string Field list
+ */
function addField( $name ) {
$this->columns[$this->FieldID( $name )] = $name;
@@ -732,11 +718,11 @@ function addField( $name ) {
}
/**
- * Adds options to the index
- *
- * @param string $opt Comma-separated list of index options.
- * @return string Option list
- */
+ * Adds options to the index
+ *
+ * @param string $opt Comma-separated list of index options.
+ * @return string Option list
+ */
function addIndexOpt( $opt ) {
$this->opts[] = $opt;
@@ -745,11 +731,11 @@ function addIndexOpt( $opt ) {
}
/**
- * Generates the SQL that will create the index in the database
- *
- * @param object $xmls adoSchema object
- * @return array Array containing index creation SQL
- */
+ * Generates the SQL that will create the index in the database
+ *
+ * @param object $xmls adoSchema object
+ * @return array Array containing index creation SQL
+ */
function create( &$xmls ) {
if( $this->drop ) {
return NULL;
@@ -766,21 +752,21 @@ function create( &$xmls ) {
}
/**
- * Marks an index for destruction
- */
+ * Marks an index for destruction
+ */
function drop() {
$this->drop = TRUE;
}
}
/**
-* Creates a data object in ADOdb's datadict format
-*
-* This class stores information about table data.
-*
-* @package axmls
-* @access private
-*/
+ * Creates a data object in ADOdb's datadict format
+ *
+ * This class stores information about table data.
+ *
+ * @package axmls
+ * @access private
+ */
class dbData extends dbObject {
var $data = array();
@@ -788,25 +774,25 @@ class dbData extends dbObject {
var $row;
/**
- * Initializes the new dbIndex object.
- *
- * @param object $parent Parent object
- * @param array $attributes Attributes
- *
- * @internal
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Initializes the new dbIndex object.
+ *
+ * @param object $parent Parent object
+ * @param array $attributes Attributes
+ *
+ * @internal
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
}
/**
- * XML Callback to process start elements
- *
- * Processes XML opening tags.
- * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH.
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * Processes XML opening tags.
+ * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH.
+ *
+ * @access private
+ */
function _tag_open( &$parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -823,12 +809,12 @@ function _tag_open( &$parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * Processes XML cdata.
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * Processes XML cdata.
+ *
+ * @access private
+ */
function _tag_cdata( &$parser, $cdata ) {
switch( $this->currentElement ) {
// Index field name
@@ -841,10 +827,10 @@ function _tag_cdata( &$parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( &$parser, $tag ) {
$this->currentElement = '';
@@ -856,11 +842,11 @@ function _tag_close( &$parser, $tag ) {
}
/**
- * Adds a field to the index
- *
- * @param string $name Field name
- * @return string Field list
- */
+ * Adds a field to the index
+ *
+ * @param string $name Field name
+ * @return string Field list
+ */
function addField( $attributes ) {
if( isset( $attributes['NAME'] ) ) {
$name = $attributes['NAME'];
@@ -873,11 +859,11 @@ function addField( $attributes ) {
}
/**
- * Adds options to the index
- *
- * @param string $opt Comma-separated list of index options.
- * @return string Option list
- */
+ * Adds options to the index
+ *
+ * @param string $opt Comma-separated list of index options.
+ * @return string Option list
+ */
function addData( $cdata ) {
if( !isset( $this->data[$this->row] ) ) {
$this->data[$this->row] = array();
@@ -891,11 +877,11 @@ function addData( $cdata ) {
}
/**
- * Generates the SQL that will create the index in the database
- *
- * @param object $xmls adoSchema object
- * @return array Array containing index creation SQL
- */
+ * Generates the SQL that will create the index in the database
+ *
+ * @param object $xmls adoSchema object
+ * @return array Array containing index creation SQL
+ */
function create( &$xmls ) {
$table = $xmls->dict->TableName($this->parent->name);
$table_field_count = count($this->parent->fields);
@@ -909,7 +895,8 @@ function create( &$xmls ) {
foreach( $row as $field_id => $field_data ) {
if( !array_key_exists( $field_id, $table_fields ) ) {
if( is_numeric( $field_id ) ) {
- $field_id = reset( array_keys( $table_fields ) );
+ $keys = array_keys($table_fields);
+ $field_id = reset($keys);
} else {
continue;
}
@@ -961,40 +948,40 @@ function create( &$xmls ) {
}
/**
-* Creates the SQL to execute a list of provided SQL queries
-*
-* @package axmls
-* @access private
-*/
+ * Creates the SQL to execute a list of provided SQL queries
+ *
+ * @package axmls
+ * @access private
+ */
class dbQuerySet extends dbObject {
/**
- * @var array List of SQL queries
- */
+ * @var array List of SQL queries
+ */
var $queries = array();
/**
- * @var string String used to build of a query line by line
- */
+ * @var string String used to build of a query line by line
+ */
var $query;
/**
- * @var string Query prefix key
- */
+ * @var string Query prefix key
+ */
var $prefixKey = '';
/**
- * @var boolean Auto prefix enable (TRUE)
- */
+ * @var boolean Auto prefix enable (TRUE)
+ */
var $prefixMethod = 'AUTO';
/**
- * Initializes the query set.
- *
- * @param object $parent Parent object
- * @param array $attributes Attributes
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Initializes the query set.
+ *
+ * @param object $parent Parent object
+ * @param array $attributes Attributes
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
// Overrides the manual prefix key
@@ -1019,11 +1006,11 @@ function __construct( &$parent, $attributes = NULL ) {
}
/**
- * XML Callback to process start elements. Elements currently
- * processed are: QUERY.
- *
- * @access private
- */
+ * XML Callback to process start elements. Elements currently
+ * processed are: QUERY.
+ *
+ * @access private
+ */
function _tag_open( &$parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -1044,8 +1031,8 @@ function _tag_open( &$parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- */
+ * XML Callback to process CDATA elements
+ */
function _tag_cdata( &$parser, $cdata ) {
switch( $this->currentElement ) {
// Line of queryset SQL data
@@ -1058,10 +1045,10 @@ function _tag_cdata( &$parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( &$parser, $tag ) {
$this->currentElement = '';
@@ -1081,10 +1068,10 @@ function _tag_close( &$parser, $tag ) {
}
/**
- * Re-initializes the query.
- *
- * @return boolean TRUE
- */
+ * Re-initializes the query.
+ *
+ * @return boolean TRUE
+ */
function newQuery() {
$this->query = '';
@@ -1092,10 +1079,10 @@ function newQuery() {
}
/**
- * Discards the existing query.
- *
- * @return boolean TRUE
- */
+ * Discards the existing query.
+ *
+ * @return boolean TRUE
+ */
function discardQuery() {
unset( $this->query );
@@ -1103,11 +1090,11 @@ function discardQuery() {
}
/**
- * Appends a line to a query that is being built line by line
- *
- * @param string $data Line of SQL data or NULL to initialize a new query
- * @return string SQL query string.
- */
+ * Appends a line to a query that is being built line by line
+ *
+ * @param string $data Line of SQL data or NULL to initialize a new query
+ * @return string SQL query string.
+ */
function buildQuery( $sql = NULL ) {
if( !isset( $this->query ) OR empty( $sql ) ) {
return FALSE;
@@ -1119,10 +1106,10 @@ function buildQuery( $sql = NULL ) {
}
/**
- * Adds a completed query to the query list
- *
- * @return string SQL of added query
- */
+ * Adds a completed query to the query list
+ *
+ * @return string SQL of added query
+ */
function addQuery() {
if( !isset( $this->query ) ) {
return FALSE;
@@ -1136,11 +1123,11 @@ function addQuery() {
}
/**
- * Creates and returns the current query set
- *
- * @param object $xmls adoSchema object
- * @return array Query set
- */
+ * Creates and returns the current query set
+ *
+ * @param object $xmls adoSchema object
+ * @return array Query set
+ */
function create( &$xmls ) {
foreach( $this->queries as $id => $query ) {
switch( $this->prefixMethod ) {
@@ -1176,13 +1163,13 @@ function create( &$xmls ) {
}
/**
- * Rebuilds the query with the prefix attached to any objects
- *
- * @param string $regex Regex used to add prefix
- * @param string $query SQL query string
- * @param string $prefix Prefix to be appended to tables, indices, etc.
- * @return string Prefixed SQL query string.
- */
+ * Rebuilds the query with the prefix attached to any objects
+ *
+ * @param string $regex Regex used to add prefix
+ * @param string $query SQL query string
+ * @param string $prefix Prefix to be appended to tables, indices, etc.
+ * @return string Prefixed SQL query string.
+ */
function prefixQuery( $regex, $query, $prefix = NULL ) {
if( !isset( $prefix ) ) {
return $query;
@@ -1212,98 +1199,98 @@ function prefixQuery( $regex, $query, $prefix = NULL ) {
}
/**
-* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements
-*
-* This class is used to load and parse the XML file, to create an array of SQL statements
-* that can be used to build a database, and to build the database using the SQL array.
-*
-* @tutorial getting_started.pkg
-*
-* @author Richard Tango-Lowy & Dan Cech
-* @version $Revision: 1.12 $
-*
-* @package axmls
-*/
+ * Loads and parses an XML file, creating an array of "ready-to-run" SQL statements
+ *
+ * This class is used to load and parse the XML file, to create an array of SQL statements
+ * that can be used to build a database, and to build the database using the SQL array.
+ *
+ * @tutorial getting_started.pkg
+ *
+ * @author Richard Tango-Lowy & Dan Cech
+ * @version 1.12
+ *
+ * @package axmls
+ */
class adoSchema {
/**
- * @var array Array containing SQL queries to generate all objects
- * @access private
- */
+ * @var array Array containing SQL queries to generate all objects
+ * @access private
+ */
var $sqlArray;
/**
- * @var object ADOdb connection object
- * @access private
- */
+ * @var object ADOdb connection object
+ * @access private
+ */
var $db;
/**
- * @var object ADOdb Data Dictionary
- * @access private
- */
+ * @var object ADOdb Data Dictionary
+ * @access private
+ */
var $dict;
/**
- * @var string Current XML element
- * @access private
- */
+ * @var string Current XML element
+ * @access private
+ */
var $currentElement = '';
/**
- * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database
- * @access private
- */
+ * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database
+ * @access private
+ */
var $upgrade = '';
/**
- * @var string Optional object prefix
- * @access private
- */
+ * @var string Optional object prefix
+ * @access private
+ */
var $objectPrefix = '';
/**
- * @var long System debug
- * @access private
- */
+ * @var long System debug
+ * @access private
+ */
var $debug;
/**
- * @var string Regular expression to find schema version
- * @access private
- */
+ * @var string Regular expression to find schema version
+ * @access private
+ */
var $versionRegex = '//';
/**
- * @var string Current schema version
- * @access private
- */
+ * @var string Current schema version
+ * @access private
+ */
var $schemaVersion;
/**
- * @var int Success of last Schema execution
- */
+ * @var int Success of last Schema execution
+ */
var $success;
/**
- * @var bool Execute SQL inline as it is generated
- */
+ * @var bool Execute SQL inline as it is generated
+ */
var $executeInline;
/**
- * @var bool Continue SQL execution if errors occur
- */
+ * @var bool Continue SQL execution if errors occur
+ */
var $continueOnError;
/**
- * Creates an adoSchema object
- *
- * Creating an adoSchema object is the first step in processing an XML schema.
- * The only parameter is an ADOdb database connection object, which must already
- * have been created.
- *
- * @param object $db ADOdb database connection object.
- */
+ * Creates an adoSchema object
+ *
+ * Creating an adoSchema object is the first step in processing an XML schema.
+ * The only parameter is an ADOdb database connection object, which must already
+ * have been created.
+ *
+ * @param object $db ADOdb database connection object.
+ */
function __construct( $db ) {
$this->db = $db;
$this->debug = $this->db->debug;
@@ -1316,21 +1303,21 @@ function __construct( $db ) {
}
/**
- * Sets the method to be used for upgrading an existing database
- *
- * Use this method to specify how existing database objects should be upgraded.
- * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to
- * alter each database object directly, REPLACE attempts to rebuild each object
- * from scratch, BEST attempts to determine the best upgrade method for each
- * object, and NONE disables upgrading.
- *
- * This method is not yet used by AXMLS, but exists for backward compatibility.
- * The ALTER method is automatically assumed when the adoSchema object is
- * instantiated; other upgrade methods are not currently supported.
- *
- * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE)
- * @returns string Upgrade method used
- */
+ * Sets the method to be used for upgrading an existing database
+ *
+ * Use this method to specify how existing database objects should be upgraded.
+ * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to
+ * alter each database object directly, REPLACE attempts to rebuild each object
+ * from scratch, BEST attempts to determine the best upgrade method for each
+ * object, and NONE disables upgrading.
+ *
+ * This method is not yet used by AXMLS, but exists for backward compatibility.
+ * The ALTER method is automatically assumed when the adoSchema object is
+ * instantiated; other upgrade methods are not currently supported.
+ *
+ * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE)
+ * @returns string Upgrade method used
+ */
function SetUpgradeMethod( $method = '' ) {
if( !is_string( $method ) ) {
return FALSE;
@@ -1361,18 +1348,19 @@ function SetUpgradeMethod( $method = '' ) {
}
/**
- * Enables/disables inline SQL execution.
- *
- * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution),
- * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode
- * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema()
- * to apply the schema to the database.
- *
- * @param bool $mode execute
- * @return bool current execution mode
- *
- * @see ParseSchema(), ExecuteSchema()
- */
+ * Enables/disables inline SQL execution.
+ *
+ * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution),
+ * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode
+ * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema()
+ * to apply the schema to the database.
+ *
+ * @param bool $mode execute
+ * @return bool current execution mode
+ *
+ * @see ParseSchema()
+ * @see ExecuteSchema()
+ */
function ExecuteInline( $mode = NULL ) {
if( is_bool( $mode ) ) {
$this->executeInline = $mode;
@@ -1382,18 +1370,19 @@ function ExecuteInline( $mode = NULL ) {
}
/**
- * Enables/disables SQL continue on error.
- *
- * Call this method to enable or disable continuation of SQL execution if an error occurs.
- * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs.
- * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing
- * of the schema will continue.
- *
- * @param bool $mode execute
- * @return bool current continueOnError mode
- *
- * @see addSQL(), ExecuteSchema()
- */
+ * Enables/disables SQL continue on error.
+ *
+ * Call this method to enable or disable continuation of SQL execution if an error occurs.
+ * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs.
+ * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing
+ * of the schema will continue.
+ *
+ * @param bool $mode execute
+ * @return bool current continueOnError mode
+ *
+ * @see addSQL()
+ * @see ExecuteSchema()
+ */
function ContinueOnError( $mode = NULL ) {
if( is_bool( $mode ) ) {
$this->continueOnError = $mode;
@@ -1403,33 +1392,34 @@ function ContinueOnError( $mode = NULL ) {
}
/**
- * Loads an XML schema from a file and converts it to SQL.
- *
- * Call this method to load the specified schema (see the DTD for the proper format) from
- * the filesystem and generate the SQL necessary to create the database described.
- * @see ParseSchemaString()
- *
- * @param string $file Name of XML schema file.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute
- */
+ * Loads an XML schema from a file and converts it to SQL.
+ *
+ * Call this method to load the specified schema (see the DTD for the proper format) from
+ * the filesystem and generate the SQL necessary to create the database described.
+ * @see ParseSchemaString()
+ *
+ * @param string $file Name of XML schema file.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute
+ */
function ParseSchema( $filename, $returnSchema = FALSE ) {
return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema );
}
/**
- * Loads an XML schema from a file and converts it to SQL.
- *
- * Call this method to load the specified schema from a file (see the DTD for the proper format)
- * and generate the SQL necessary to create the database described by the schema.
- *
- * @param string $file Name of XML schema file.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute.
- *
- * @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString()
- * @see ParseSchema(), ParseSchemaString()
- */
+ * Loads an XML schema from a file and converts it to SQL.
+ *
+ * Call this method to load the specified schema from a file (see the DTD for the proper format)
+ * and generate the SQL necessary to create the database described by the schema.
+ *
+ * @param string $file Name of XML schema file.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute.
+ *
+ * @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString()
+ * @see ParseSchema()
+ * @see ParseSchemaString()
+ */
function ParseSchemaFile( $filename, $returnSchema = FALSE ) {
// Open the file
if( !($fp = fopen( $filename, 'r' )) ) {
@@ -1472,16 +1462,16 @@ function ParseSchemaFile( $filename, $returnSchema = FALSE ) {
}
/**
- * Converts an XML schema string to SQL.
- *
- * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
- * and generate the SQL necessary to create the database described by the schema.
- * @see ParseSchema()
- *
- * @param string $xmlstring XML schema string.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute.
- */
+ * Converts an XML schema string to SQL.
+ *
+ * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+ * and generate the SQL necessary to create the database described by the schema.
+ * @see ParseSchema()
+ *
+ * @param string $xmlstring XML schema string.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute.
+ */
function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) {
if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
return FALSE;
@@ -1515,31 +1505,31 @@ function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) {
}
/**
- * Loads an XML schema from a file and converts it to uninstallation SQL.
- *
- * Call this method to load the specified schema (see the DTD for the proper format) from
- * the filesystem and generate the SQL necessary to remove the database described.
- * @see RemoveSchemaString()
- *
- * @param string $file Name of XML schema file.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute
- */
+ * Loads an XML schema from a file and converts it to uninstallation SQL.
+ *
+ * Call this method to load the specified schema (see the DTD for the proper format) from
+ * the filesystem and generate the SQL necessary to remove the database described.
+ * @see RemoveSchemaString()
+ *
+ * @param string $file Name of XML schema file.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute
+ */
function RemoveSchema( $filename, $returnSchema = FALSE ) {
return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema );
}
/**
- * Converts an XML schema string to uninstallation SQL.
- *
- * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
- * and generate the SQL necessary to uninstall the database described by the schema.
- * @see RemoveSchema()
- *
- * @param string $schema XML schema string.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute.
- */
+ * Converts an XML schema string to uninstallation SQL.
+ *
+ * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+ * and generate the SQL necessary to uninstall the database described by the schema.
+ * @see RemoveSchema()
+ *
+ * @param string $schema XML schema string.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute.
+ */
function RemoveSchemaString( $schema, $returnSchema = FALSE ) {
// grab current version
@@ -1551,18 +1541,20 @@ function RemoveSchemaString( $schema, $returnSchema = FALSE ) {
}
/**
- * Applies the current XML schema to the database (post execution).
- *
- * Call this method to apply the current schema (generally created by calling
- * ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes,
- * and executing other SQL specified in the schema) after parsing.
- * @see ParseSchema(), ParseSchemaString(), ExecuteInline()
- *
- * @param array $sqlArray Array of SQL statements that will be applied rather than
- * the current schema.
- * @param boolean $continueOnErr Continue to apply the schema even if an error occurs.
- * @returns integer 0 if failure, 1 if errors, 2 if successful.
- */
+ * Applies the current XML schema to the database (post execution).
+ *
+ * Call this method to apply the current schema (generally created by calling
+ * ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes,
+ * and executing other SQL specified in the schema) after parsing.
+ * @see ParseSchema()
+ * @see ParseSchemaString()
+ * @see ExecuteInline()
+ *
+ * @param array $sqlArray Array of SQL statements that will be applied rather than
+ * the current schema.
+ * @param boolean $continueOnErr Continue to apply the schema even if an error occurs.
+ * @returns integer 0 if failure, 1 if errors, 2 if successful.
+ */
function ExecuteSchema( $sqlArray = NULL, $continueOnErr = NULL ) {
if( !is_bool( $continueOnErr ) ) {
$continueOnErr = $this->ContinueOnError();
@@ -1582,28 +1574,28 @@ function ExecuteSchema( $sqlArray = NULL, $continueOnErr = NULL ) {
}
/**
- * Returns the current SQL array.
- *
- * Call this method to fetch the array of SQL queries resulting from
- * ParseSchema() or ParseSchemaString().
- *
- * @param string $format Format: HTML, TEXT, or NONE (PHP array)
- * @return array Array of SQL statements or FALSE if an error occurs
- */
+ * Returns the current SQL array.
+ *
+ * Call this method to fetch the array of SQL queries resulting from
+ * ParseSchema() or ParseSchemaString().
+ *
+ * @param string $format Format: HTML, TEXT, or NONE (PHP array)
+ * @return array Array of SQL statements or FALSE if an error occurs
+ */
function PrintSQL( $format = 'NONE' ) {
$sqlArray = null;
return $this->getSQL( $format, $sqlArray );
}
/**
- * Saves the current SQL array to the local filesystem as a list of SQL queries.
- *
- * Call this method to save the array of SQL queries (generally resulting from a
- * parsed XML schema) to the filesystem.
- *
- * @param string $filename Path and name where the file should be saved.
- * @return boolean TRUE if save is successful, else FALSE.
- */
+ * Saves the current SQL array to the local filesystem as a list of SQL queries.
+ *
+ * Call this method to save the array of SQL queries (generally resulting from a
+ * parsed XML schema) to the filesystem.
+ *
+ * @param string $filename Path and name where the file should be saved.
+ * @return boolean TRUE if save is successful, else FALSE.
+ */
function SaveSQL( $filename = './schema.sql' ) {
if( !isset( $sqlArray ) ) {
@@ -1622,12 +1614,12 @@ function SaveSQL( $filename = './schema.sql' ) {
}
/**
- * Create an xml parser
- *
- * @return object PHP XML parser object
- *
- * @access private
- */
+ * Create an xml parser
+ *
+ * @return object PHP XML parser object
+ *
+ * @access private
+ */
function create_parser() {
// Create the parser
$xmlParser = xml_parser_create();
@@ -1641,10 +1633,10 @@ function create_parser() {
}
/**
- * XML Callback to process start elements
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * @access private
+ */
function _tag_open( &$parser, $tag, $attributes ) {
switch( strtoupper( $tag ) ) {
case 'TABLE':
@@ -1664,39 +1656,39 @@ function _tag_open( &$parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * @access private
+ */
function _tag_cdata( &$parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- * @internal
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ * @internal
+ */
function _tag_close( &$parser, $tag ) {
}
/**
- * Converts an XML schema string to the specified DTD version.
- *
- * Call this method to convert a string containing an XML schema to a different AXMLS
- * DTD version. For instance, to convert a schema created for an pre-1.0 version for
- * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
- * parameter is specified, the schema will be converted to the current DTD version.
- * If the newFile parameter is provided, the converted schema will be written to the specified
- * file.
- * @see ConvertSchemaFile()
- *
- * @param string $schema String containing XML schema that will be converted.
- * @param string $newVersion DTD version to convert to.
- * @param string $newFile File name of (converted) output file.
- * @return string Converted XML schema or FALSE if an error occurs.
- */
+ * Converts an XML schema string to the specified DTD version.
+ *
+ * Call this method to convert a string containing an XML schema to a different AXMLS
+ * DTD version. For instance, to convert a schema created for an pre-1.0 version for
+ * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
+ * parameter is specified, the schema will be converted to the current DTD version.
+ * If the newFile parameter is provided, the converted schema will be written to the specified
+ * file.
+ * @see ConvertSchemaFile()
+ *
+ * @param string $schema String containing XML schema that will be converted.
+ * @param string $newVersion DTD version to convert to.
+ * @param string $newFile File name of (converted) output file.
+ * @return string Converted XML schema or FALSE if an error occurs.
+ */
function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) {
// grab current version
@@ -1722,29 +1714,22 @@ function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) {
return $result;
}
- // compat for pre-4.3 - jlim
- function _file_get_contents($path)
- {
- if (function_exists('file_get_contents')) return file_get_contents($path);
- return join('',file($path));
- }
-
- /**
- * Converts an XML schema file to the specified DTD version.
- *
- * Call this method to convert the specified XML schema file to a different AXMLS
- * DTD version. For instance, to convert a schema created for an pre-1.0 version for
- * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
- * parameter is specified, the schema will be converted to the current DTD version.
- * If the newFile parameter is provided, the converted schema will be written to the specified
- * file.
- * @see ConvertSchemaString()
- *
- * @param string $filename Name of XML schema file that will be converted.
- * @param string $newVersion DTD version to convert to.
- * @param string $newFile File name of (converted) output file.
- * @return string Converted XML schema or FALSE if an error occurs.
- */
+ /**
+ * Converts an XML schema file to the specified DTD version.
+ *
+ * Call this method to convert the specified XML schema file to a different AXMLS
+ * DTD version. For instance, to convert a schema created for an pre-1.0 version for
+ * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
+ * parameter is specified, the schema will be converted to the current DTD version.
+ * If the newFile parameter is provided, the converted schema will be written to the specified
+ * file.
+ * @see ConvertSchemaString()
+ *
+ * @param string $filename Name of XML schema file that will be converted.
+ * @param string $newVersion DTD version to convert to.
+ * @param string $newFile File name of (converted) output file.
+ * @return string Converted XML schema or FALSE if an error occurs.
+ */
function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) {
// grab current version
@@ -1757,7 +1742,7 @@ function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) {
}
if( $version == $newVersion ) {
- $result = _file_get_contents( $filename );
+ $result = file_get_contents( $filename );
// remove unicode BOM if present
if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) {
@@ -1796,7 +1781,7 @@ function TransformSchema( $schema, $xsl, $schematype='string' )
return FALSE;
}
- $schema = _file_get_contents( $schema );
+ $schema = file_get_contents( $schema );
break;
case 'string':
default:
@@ -1807,14 +1792,14 @@ function TransformSchema( $schema, $xsl, $schematype='string' )
$arguments = array (
'/_xml' => $schema,
- '/_xsl' => _file_get_contents( $xsl_file )
+ '/_xsl' => file_get_contents( $xsl_file )
);
// create an XSLT processor
$xh = xslt_create ();
// set error handler
- xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler'));
+ xslt_set_error_handler ($xh, array ($this, 'xslt_error_handler'));
// process the schema
$result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);
@@ -1825,15 +1810,15 @@ function TransformSchema( $schema, $xsl, $schematype='string' )
}
/**
- * Processes XSLT transformation errors
- *
- * @param object $parser XML parser object
- * @param integer $errno Error number
- * @param integer $level Error level
- * @param array $fields Error information fields
- *
- * @access private
- */
+ * Processes XSLT transformation errors
+ *
+ * @param object $parser XML parser object
+ * @param integer $errno Error number
+ * @param integer $level Error level
+ * @param array $fields Error information fields
+ *
+ * @access private
+ */
function xslt_error_handler( $parser, $errno, $level, $fields ) {
if( is_array( $fields ) ) {
$msg = array(
@@ -1878,14 +1863,14 @@ function xslt_error_handler( $parser, $errno, $level, $fields ) {
}
/**
- * Returns the AXMLS Schema Version of the requested XML schema file.
- *
- * Call this method to obtain the AXMLS DTD version of the requested XML schema file.
- * @see SchemaStringVersion()
- *
- * @param string $filename AXMLS schema file
- * @return string Schema version number or FALSE on error
- */
+ * Returns the AXMLS Schema Version of the requested XML schema file.
+ *
+ * Call this method to obtain the AXMLS DTD version of the requested XML schema file.
+ * @see SchemaStringVersion()
+ *
+ * @param string $filename AXMLS schema file
+ * @return string Schema version number or FALSE on error
+ */
function SchemaFileVersion( $filename ) {
// Open the file
if( !($fp = fopen( $filename, 'r' )) ) {
@@ -1904,14 +1889,14 @@ function SchemaFileVersion( $filename ) {
}
/**
- * Returns the AXMLS Schema Version of the provided XML schema string.
- *
- * Call this method to obtain the AXMLS DTD version of the provided XML schema string.
- * @see SchemaFileVersion()
- *
- * @param string $xmlstring XML schema string
- * @return string Schema version number or FALSE on error
- */
+ * Returns the AXMLS Schema Version of the provided XML schema string.
+ *
+ * Call this method to obtain the AXMLS DTD version of the provided XML schema string.
+ * @see SchemaFileVersion()
+ *
+ * @param string $xmlstring XML schema string
+ * @return string Schema version number or FALSE on error
+ */
function SchemaStringVersion( $xmlstring ) {
if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
return FALSE;
@@ -1925,15 +1910,15 @@ function SchemaStringVersion( $xmlstring ) {
}
/**
- * Extracts an XML schema from an existing database.
- *
- * Call this method to create an XML schema string from an existing database.
- * If the data parameter is set to TRUE, AXMLS will include the data from the database
- * in the schema.
- *
- * @param boolean $data Include data in schema dump
- * @return string Generated XML schema
- */
+ * Extracts an XML schema from an existing database.
+ *
+ * Call this method to create an XML schema string from an existing database.
+ * If the data parameter is set to TRUE, AXMLS will include the data from the database
+ * in the schema.
+ *
+ * @param boolean $data Include data in schema dump
+ * @return string Generated XML schema
+ */
function ExtractSchema( $data = FALSE ) {
$old_mode = $this->db->SetFetchMode( ADODB_FETCH_NUM );
@@ -2032,15 +2017,15 @@ function ExtractSchema( $data = FALSE ) {
}
/**
- * Sets a prefix for database objects
- *
- * Call this method to set a standard prefix that will be prepended to all database tables
- * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix.
- *
- * @param string $prefix Prefix that will be prepended.
- * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix.
- * @return boolean TRUE if successful, else FALSE
- */
+ * Sets a prefix for database objects
+ *
+ * Call this method to set a standard prefix that will be prepended to all database tables
+ * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix.
+ *
+ * @param string $prefix Prefix that will be prepended.
+ * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix.
+ * @return boolean TRUE if successful, else FALSE
+ */
function SetPrefix( $prefix = '', $underscore = TRUE ) {
switch( TRUE ) {
// clear prefix
@@ -2067,13 +2052,13 @@ function SetPrefix( $prefix = '', $underscore = TRUE ) {
}
/**
- * Returns an object name with the current prefix prepended.
- *
- * @param string $name Name
- * @return string Prefixed name
- *
- * @access private
- */
+ * Returns an object name with the current prefix prepended.
+ *
+ * @param string $name Name
+ * @return string Prefixed name
+ *
+ * @access private
+ */
function prefix( $name = '' ) {
// if prefix is set
if( !empty( $this->objectPrefix ) ) {
@@ -2087,13 +2072,13 @@ function prefix( $name = '' ) {
}
/**
- * Checks if element references a specific platform
- *
- * @param string $platform Requested platform
- * @returns boolean TRUE if platform check succeeds
- *
- * @access private
- */
+ * Checks if element references a specific platform
+ *
+ * @param string $platform Requested platform
+ * @returns boolean TRUE if platform check succeeds
+ *
+ * @access private
+ */
function supportedPlatform( $platform = NULL ) {
$regex = '/^(\w*\|)*' . $this->db->databaseType . '(\|\w*)*$/';
@@ -2107,22 +2092,22 @@ function supportedPlatform( $platform = NULL ) {
}
/**
- * Clears the array of generated SQL.
- *
- * @access private
- */
+ * Clears the array of generated SQL.
+ *
+ * @access private
+ */
function clearSQL() {
$this->sqlArray = array();
}
/**
- * Adds SQL into the SQL array.
- *
- * @param mixed $sql SQL to Add
- * @return boolean TRUE if successful, else FALSE.
- *
- * @access private
- */
+ * Adds SQL into the SQL array.
+ *
+ * @param mixed $sql SQL to Add
+ * @return boolean TRUE if successful, else FALSE.
+ *
+ * @access private
+ */
function addSQL( $sql = NULL ) {
if( is_array( $sql ) ) {
foreach( $sql as $line ) {
@@ -2158,13 +2143,13 @@ function addSQL( $sql = NULL ) {
}
/**
- * Gets the SQL array in the specified format.
- *
- * @param string $format Format
- * @return mixed SQL
- *
- * @access private
- */
+ * Gets the SQL array in the specified format.
+ *
+ * @param string $format Format
+ * @return mixed SQL
+ *
+ * @access private
+ */
function getSQL( $format = NULL, $sqlArray = NULL ) {
if( !is_array( $sqlArray ) ) {
$sqlArray = $this->sqlArray;
@@ -2186,19 +2171,19 @@ function getSQL( $format = NULL, $sqlArray = NULL ) {
}
/**
- * Destroys an adoSchema object.
- *
- * Call this method to clean up after an adoSchema object that is no longer in use.
- * @deprecated adoSchema now cleans up automatically.
- */
+ * Destroys an adoSchema object.
+ *
+ * Call this method to clean up after an adoSchema object that is no longer in use.
+ * @deprecated adoSchema now cleans up automatically.
+ */
function Destroy() {}
}
/**
-* Message logging function
-*
-* @access private
-*/
+ * Message logging function
+ *
+ * @access private
+ */
function logMsg( $msg, $title = NULL, $force = FALSE ) {
if( XMLS_DEBUG or $force ) {
echo '
';
diff --git a/app/vendor/adodb/adodb-php/adodb-xmlschema03.inc.php b/app/vendor/adodb/adodb-php/adodb-xmlschema03.inc.php
index de1ea26c7..a03386b3c 100644
--- a/app/vendor/adodb/adodb-php/adodb-xmlschema03.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb-xmlschema03.inc.php
@@ -26,74 +26,60 @@
* @author Dan Cech
*/
-function _file_get_contents($file)
-{
- if (function_exists('file_get_contents')) return file_get_contents($file);
-
- $f = fopen($file,'r');
- if (!$f) return '';
- $t = '';
-
- while ($s = fread($f,100000)) $t .= $s;
- fclose($f);
- return $t;
-}
-
-
/**
-* Debug on or off
-*/
+ * Debug on or off
+ */
if( !defined( 'XMLS_DEBUG' ) ) {
define( 'XMLS_DEBUG', FALSE );
}
/**
-* Default prefix key
-*/
+ * Default prefix key
+ */
if( !defined( 'XMLS_PREFIX' ) ) {
define( 'XMLS_PREFIX', '%%P' );
}
/**
-* Maximum length allowed for object prefix
-*/
+ * Maximum length allowed for object prefix
+ */
if( !defined( 'XMLS_PREFIX_MAXLEN' ) ) {
define( 'XMLS_PREFIX_MAXLEN', 10 );
}
/**
-* Execute SQL inline as it is generated
-*/
+ * Execute SQL inline as it is generated
+ */
if( !defined( 'XMLS_EXECUTE_INLINE' ) ) {
define( 'XMLS_EXECUTE_INLINE', FALSE );
}
/**
-* Continue SQL Execution if an error occurs?
-*/
+ * Continue SQL Execution if an error occurs?
+ */
if( !defined( 'XMLS_CONTINUE_ON_ERROR' ) ) {
define( 'XMLS_CONTINUE_ON_ERROR', FALSE );
}
/**
-* Current Schema Version
-*/
+ * Current Schema Version
+ */
if( !defined( 'XMLS_SCHEMA_VERSION' ) ) {
define( 'XMLS_SCHEMA_VERSION', '0.3' );
}
/**
-* Default Schema Version. Used for Schemas without an explicit version set.
-*/
+ * Default Schema Version. Used for Schemas without an explicit version set.
+ */
if( !defined( 'XMLS_DEFAULT_SCHEMA_VERSION' ) ) {
define( 'XMLS_DEFAULT_SCHEMA_VERSION', '0.1' );
}
/**
-* How to handle data rows that already exist in a database during and upgrade.
-* Options are INSERT (attempts to insert duplicate rows), UPDATE (updates existing
-* rows) and IGNORE (ignores existing rows).
-*/
+ * How to handle data rows that already exist in a database during and upgrade.
+ * Options are INSERT (attempts to insert duplicate rows), UPDATE (updates existing
+ * rows) and IGNORE (ignores existing rows).
+ */
if( !defined( 'XMLS_MODE_INSERT' ) ) {
define( 'XMLS_MODE_INSERT', 0 );
}
@@ -108,69 +94,69 @@ function _file_get_contents($file)
}
/**
-* Default Schema Version. Used for Schemas without an explicit version set.
-*/
+ * Default Schema Version. Used for Schemas without an explicit version set.
+ */
if( !defined( 'XMLS_DEFAULT_UPGRADE_METHOD' ) ) {
define( 'XMLS_DEFAULT_UPGRADE_METHOD', 'ALTER' );
}
/**
-* Include the main ADODB library
-*/
+ * Include the main ADODB library
+ */
if( !defined( '_ADODB_LAYER' ) ) {
require( 'adodb.inc.php' );
require( 'adodb-datadict.inc.php' );
}
/**
-* Abstract DB Object. This class provides basic methods for database objects, such
-* as tables and indexes.
-*
-* @package axmls
-* @access private
-*/
+ * Abstract DB Object. This class provides basic methods for database objects, such
+ * as tables and indexes.
+ *
+ * @package axmls
+ * @access private
+ */
class dbObject {
/**
- * var object Parent
- */
+ * var object Parent
+ */
var $parent;
/**
- * var string current element
- */
+ * var string current element
+ */
var $currentElement;
/**
- * NOP
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * NOP
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
}
/**
- * XML Callback to process start elements
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * @access private
+ */
function _tag_open( $parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * @access private
+ */
function _tag_cdata( $parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( $parser, $tag ) {
}
@@ -180,117 +166,117 @@ function create(&$xmls) {
}
/**
- * Destroys the object
- */
+ * Destroys the object
+ */
function destroy() {
}
/**
- * Checks whether the specified RDBMS is supported by the current
- * database object or its ranking ancestor.
- *
- * @param string $platform RDBMS platform name (from ADODB platform list).
- * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE.
- */
+ * Checks whether the specified RDBMS is supported by the current
+ * database object or its ranking ancestor.
+ *
+ * @param string $platform RDBMS platform name (from ADODB platform list).
+ * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE.
+ */
function supportedPlatform( $platform = NULL ) {
return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE;
}
/**
- * Returns the prefix set by the ranking ancestor of the database object.
- *
- * @param string $name Prefix string.
- * @return string Prefix.
- */
+ * Returns the prefix set by the ranking ancestor of the database object.
+ *
+ * @param string $name Prefix string.
+ * @return string Prefix.
+ */
function prefix( $name = '' ) {
return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name;
}
/**
- * Extracts a field ID from the specified field.
- *
- * @param string $field Field.
- * @return string Field ID.
- */
+ * Extracts a field ID from the specified field.
+ *
+ * @param string $field Field.
+ * @return string Field ID.
+ */
function fieldID( $field ) {
return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) );
}
}
/**
-* Creates a table object in ADOdb's datadict format
-*
-* This class stores information about a database table. As charactaristics
-* of the table are loaded from the external source, methods and properties
-* of this class are used to build up the table description in ADOdb's
-* datadict format.
-*
-* @package axmls
-* @access private
-*/
+ * Creates a table object in ADOdb's datadict format
+ *
+ * This class stores information about a database table. As charactaristics
+ * of the table are loaded from the external source, methods and properties
+ * of this class are used to build up the table description in ADOdb's
+ * datadict format.
+ *
+ * @package axmls
+ * @access private
+ */
class dbTable extends dbObject {
/**
- * @var string Table name
- */
+ * @var string Table name
+ */
var $name;
/**
- * @var array Field specifier: Meta-information about each field
- */
+ * @var array Field specifier: Meta-information about each field
+ */
var $fields = array();
/**
- * @var array List of table indexes.
- */
+ * @var array List of table indexes.
+ */
var $indexes = array();
/**
- * @var array Table options: Table-level options
- */
+ * @var array Table options: Table-level options
+ */
var $opts = array();
/**
- * @var string Field index: Keeps track of which field is currently being processed
- */
+ * @var string Field index: Keeps track of which field is currently being processed
+ */
var $current_field;
/**
- * @var boolean Mark table for destruction
- * @access private
- */
+ * @var boolean Mark table for destruction
+ * @access private
+ */
var $drop_table;
/**
- * @var boolean Mark field for destruction (not yet implemented)
- * @access private
- */
+ * @var boolean Mark field for destruction (not yet implemented)
+ * @access private
+ */
var $drop_field = array();
/**
- * @var array Platform-specific options
- * @access private
- */
+ * @var array Platform-specific options
+ * @access private
+ */
var $currentPlatform = true;
/**
- * Iniitializes a new table object.
- *
- * @param string $prefix DB Object prefix
- * @param array $attributes Array of table attributes.
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Iniitializes a new table object.
+ *
+ * @param string $prefix DB Object prefix
+ * @param array $attributes Array of table attributes.
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
$this->name = $this->prefix($attributes['NAME']);
}
/**
- * XML Callback to process start elements. Elements currently
- * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT.
- *
- * @access private
- */
+ * XML Callback to process start elements. Elements currently
+ * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT.
+ *
+ * @access private
+ */
function _tag_open( $parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -349,10 +335,10 @@ function _tag_open( $parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * @access private
+ */
function _tag_cdata( $parser, $cdata ) {
switch( $this->currentElement ) {
// Table or field comment
@@ -385,10 +371,10 @@ function _tag_cdata( $parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( $parser, $tag ) {
$this->currentElement = '';
@@ -411,11 +397,11 @@ function _tag_close( $parser, $tag ) {
}
/**
- * Adds an index to a table object
- *
- * @param array $attributes Index attributes
- * @return object dbIndex object
- */
+ * Adds an index to a table object
+ *
+ * @param array $attributes Index attributes
+ * @return object dbIndex object
+ */
function addIndex( $attributes ) {
$name = strtoupper( $attributes['NAME'] );
$this->indexes[$name] = new dbIndex( $this, $attributes );
@@ -423,11 +409,11 @@ function addIndex( $attributes ) {
}
/**
- * Adds data to a table object
- *
- * @param array $attributes Data attributes
- * @return object dbData object
- */
+ * Adds data to a table object
+ *
+ * @param array $attributes Data attributes
+ * @return object dbData object
+ */
function addData( $attributes ) {
if( !isset( $this->data ) ) {
$this->data = new dbData( $this, $attributes );
@@ -436,34 +422,34 @@ function addData( $attributes ) {
}
/**
- * Adds a field to a table object
- *
- * $name is the name of the table to which the field should be added.
- * $type is an ADODB datadict field type. The following field types
- * are supported as of ADODB 3.40:
- * - C: varchar
- * - X: CLOB (character large object) or largest varchar size
- * if CLOB is not supported
- * - C2: Multibyte varchar
- * - X2: Multibyte CLOB
- * - B: BLOB (binary large object)
- * - D: Date (some databases do not support this, and we return a datetime type)
- * - T: Datetime or Timestamp
- * - L: Integer field suitable for storing booleans (0 or 1)
- * - I: Integer (mapped to I4)
- * - I1: 1-byte integer
- * - I2: 2-byte integer
- * - I4: 4-byte integer
- * - I8: 8-byte integer
- * - F: Floating point number
- * - N: Numeric or decimal number
- *
- * @param string $name Name of the table to which the field will be added.
- * @param string $type ADODB datadict field type.
- * @param string $size Field size
- * @param array $opts Field options array
- * @return array Field specifier array
- */
+ * Adds a field to a table object
+ *
+ * $name is the name of the table to which the field should be added.
+ * $type is an ADODB datadict field type. The following field types
+ * are supported as of ADODB 3.40:
+ * - C: varchar
+ * - X: CLOB (character large object) or largest varchar size
+ * if CLOB is not supported
+ * - C2: Multibyte varchar
+ * - X2: Multibyte CLOB
+ * - B: BLOB (binary large object)
+ * - D: Date (some databases do not support this, and we return a datetime type)
+ * - T: Datetime or Timestamp
+ * - L: Integer field suitable for storing booleans (0 or 1)
+ * - I: Integer (mapped to I4)
+ * - I1: 1-byte integer
+ * - I2: 2-byte integer
+ * - I4: 4-byte integer
+ * - I8: 8-byte integer
+ * - F: Floating point number
+ * - N: Numeric or decimal number
+ *
+ * @param string $name Name of the table to which the field will be added.
+ * @param string $type ADODB datadict field type.
+ * @param string $size Field size
+ * @param array $opts Field options array
+ * @return array Field specifier array
+ */
function addField( $name, $type, $size = NULL, $opts = NULL ) {
$field_id = $this->fieldID( $name );
@@ -490,16 +476,16 @@ function addField( $name, $type, $size = NULL, $opts = NULL ) {
}
/**
- * Adds a field option to the current field specifier
- *
- * This method adds a field option allowed by the ADOdb datadict
- * and appends it to the given field.
- *
- * @param string $field Field name
- * @param string $opt ADOdb field option
- * @param mixed $value Field option value
- * @return array Field specifier array
- */
+ * Adds a field option to the current field specifier
+ *
+ * This method adds a field option allowed by the ADOdb datadict
+ * and appends it to the given field.
+ *
+ * @param string $field Field name
+ * @param string $opt ADOdb field option
+ * @param mixed $value Field option value
+ * @return array Field specifier array
+ */
function addFieldOpt( $field, $opt, $value = NULL ) {
if( $this->currentPlatform ) {
if( !isset( $value ) ) {
@@ -512,14 +498,14 @@ function addFieldOpt( $field, $opt, $value = NULL ) {
}
/**
- * Adds an option to the table
- *
- * This method takes a comma-separated list of table-level options
- * and appends them to the table object.
- *
- * @param string $opt Table option
- * @return array Options
- */
+ * Adds an option to the table
+ *
+ * This method takes a comma-separated list of table-level options
+ * and appends them to the table object.
+ *
+ * @param string $opt Table option
+ * @return array Options
+ */
function addTableOpt( $opt ) {
if(isset($this->currentPlatform)) {
$this->opts[$this->parent->db->dataProvider] = $opt;
@@ -533,11 +519,11 @@ function addTableComment( $opt ) {
}
/**
- * Generates the SQL that will create the table in the database
- *
- * @param object $xmls adoSchema object
- * @return array Array containing table creation SQL
- */
+ * Generates the SQL that will create the table in the database
+ *
+ * @param object $xmls adoSchema object
+ * @return array Array containing table creation SQL
+ */
function create( &$xmls ) {
$sql = array();
@@ -599,8 +585,11 @@ function create( &$xmls ) {
// Option has an argument.
if( is_array( $opt ) ) {
$key = key( $opt );
- $value = $opt[key( $opt )];
- @$fldarray[$field_id][$key] .= $value;
+ $value = $opt[$key];
+ if(!isset($fldarray[$field_id][$key])) {
+ $fldarray[$field_id][$key] = "";
+ }
+ $fldarray[$field_id][$key] .= $value;
// Option doesn't have arguments
} else {
$fldarray[$field_id][$opt] = $opt;
@@ -645,8 +634,8 @@ function create( &$xmls ) {
}
/**
- * Marks a field or table for destruction
- */
+ * Marks a field or table for destruction
+ */
function drop() {
if( isset( $this->current_field ) ) {
// Drop the current field
@@ -663,61 +652,61 @@ function drop() {
}
/**
-* Creates an index object in ADOdb's datadict format
-*
-* This class stores information about a database index. As charactaristics
-* of the index are loaded from the external source, methods and properties
-* of this class are used to build up the index description in ADOdb's
-* datadict format.
-*
-* @package axmls
-* @access private
-*/
+ * Creates an index object in ADOdb's datadict format
+ *
+ * This class stores information about a database index. As charactaristics
+ * of the index are loaded from the external source, methods and properties
+ * of this class are used to build up the index description in ADOdb's
+ * datadict format.
+ *
+ * @package axmls
+ * @access private
+ */
class dbIndex extends dbObject {
/**
- * @var string Index name
- */
+ * @var string Index name
+ */
var $name;
/**
- * @var array Index options: Index-level options
- */
+ * @var array Index options: Index-level options
+ */
var $opts = array();
/**
- * @var array Indexed fields: Table columns included in this index
- */
+ * @var array Indexed fields: Table columns included in this index
+ */
var $columns = array();
/**
- * @var boolean Mark index for destruction
- * @access private
- */
+ * @var boolean Mark index for destruction
+ * @access private
+ */
var $drop = FALSE;
/**
- * Initializes the new dbIndex object.
- *
- * @param object $parent Parent object
- * @param array $attributes Attributes
- *
- * @internal
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Initializes the new dbIndex object.
+ *
+ * @param object $parent Parent object
+ * @param array $attributes Attributes
+ *
+ * @internal
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
$this->name = $this->prefix ($attributes['NAME']);
}
/**
- * XML Callback to process start elements
- *
- * Processes XML opening tags.
- * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH.
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * Processes XML opening tags.
+ * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH.
+ *
+ * @access private
+ */
function _tag_open( $parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -739,12 +728,12 @@ function _tag_open( $parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * Processes XML cdata.
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * Processes XML cdata.
+ *
+ * @access private
+ */
function _tag_cdata( $parser, $cdata ) {
switch( $this->currentElement ) {
// Index field name
@@ -757,10 +746,10 @@ function _tag_cdata( $parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( $parser, $tag ) {
$this->currentElement = '';
@@ -772,11 +761,11 @@ function _tag_close( $parser, $tag ) {
}
/**
- * Adds a field to the index
- *
- * @param string $name Field name
- * @return string Field list
- */
+ * Adds a field to the index
+ *
+ * @param string $name Field name
+ * @return string Field list
+ */
function addField( $name ) {
$this->columns[$this->fieldID( $name )] = $name;
@@ -785,11 +774,11 @@ function addField( $name ) {
}
/**
- * Adds options to the index
- *
- * @param string $opt Comma-separated list of index options.
- * @return string Option list
- */
+ * Adds options to the index
+ *
+ * @param string $opt Comma-separated list of index options.
+ * @return string Option list
+ */
function addIndexOpt( $opt ) {
$this->opts[] = $opt;
@@ -798,11 +787,11 @@ function addIndexOpt( $opt ) {
}
/**
- * Generates the SQL that will create the index in the database
- *
- * @param object $xmls adoSchema object
- * @return array Array containing index creation SQL
- */
+ * Generates the SQL that will create the index in the database
+ *
+ * @param object $xmls adoSchema object
+ * @return array Array containing index creation SQL
+ */
function create( &$xmls ) {
if( $this->drop ) {
return NULL;
@@ -819,22 +808,22 @@ function create( &$xmls ) {
}
/**
- * Marks an index for destruction
- */
+ * Marks an index for destruction
+ */
function drop() {
$this->drop = TRUE;
}
}
/**
-* Creates a data object in ADOdb's datadict format
-*
-* This class stores information about table data, and is called
-* when we need to load field data into a table.
-*
-* @package axmls
-* @access private
-*/
+ * Creates a data object in ADOdb's datadict format
+ *
+ * This class stores information about table data, and is called
+ * when we need to load field data into a table.
+ *
+ * @package axmls
+ * @access private
+ */
class dbData extends dbObject {
var $data = array();
@@ -842,25 +831,25 @@ class dbData extends dbObject {
var $row;
/**
- * Initializes the new dbData object.
- *
- * @param object $parent Parent object
- * @param array $attributes Attributes
- *
- * @internal
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Initializes the new dbData object.
+ *
+ * @param object $parent Parent object
+ * @param array $attributes Attributes
+ *
+ * @internal
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
}
/**
- * XML Callback to process start elements
- *
- * Processes XML opening tags.
- * Elements currently processed are: ROW and F (field).
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * Processes XML opening tags.
+ * Elements currently processed are: ROW and F (field).
+ *
+ * @access private
+ */
function _tag_open( $parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -877,12 +866,12 @@ function _tag_open( $parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * Processes XML cdata.
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * Processes XML cdata.
+ *
+ * @access private
+ */
function _tag_cdata( $parser, $cdata ) {
switch( $this->currentElement ) {
// Index field name
@@ -895,10 +884,10 @@ function _tag_cdata( $parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( $parser, $tag ) {
$this->currentElement = '';
@@ -910,11 +899,11 @@ function _tag_close( $parser, $tag ) {
}
/**
- * Adds a field to the insert
- *
- * @param string $name Field name
- * @return string Field list
- */
+ * Adds a field to the insert
+ *
+ * @param string $name Field name
+ * @return string Field list
+ */
function addField( $attributes ) {
// check we're in a valid row
if( !isset( $this->row ) || !isset( $this->data[$this->row] ) ) {
@@ -935,11 +924,11 @@ function addField( $attributes ) {
}
/**
- * Adds options to the index
- *
- * @param string $opt Comma-separated list of index options.
- * @return string Option list
- */
+ * Adds options to the index
+ *
+ * @param string $opt Comma-separated list of index options.
+ * @return string Option list
+ */
function addData( $cdata ) {
// check we're in a valid field
if ( isset( $this->data[$this->row][$this->current_field] ) ) {
@@ -949,11 +938,11 @@ function addData( $cdata ) {
}
/**
- * Generates the SQL that will add/update the data in the database
- *
- * @param object $xmls adoSchema object
- * @return array Array containing index creation SQL
- */
+ * Generates the SQL that will add/update the data in the database
+ *
+ * @param object $xmls adoSchema object
+ * @return array Array containing index creation SQL
+ */
function create( &$xmls ) {
$table = $xmls->dict->tableName($this->parent->name);
$table_field_count = count($this->parent->fields);
@@ -976,7 +965,8 @@ function create( &$xmls ) {
foreach( $row as $field_id => $field_data ) {
if( !array_key_exists( $field_id, $table_fields ) ) {
if( is_numeric( $field_id ) ) {
- $field_id = reset( array_keys( $table_fields ) );
+ $keys = array_keys($table_fields);
+ $field_id = reset($keys);
} else {
continue;
}
@@ -1072,40 +1062,40 @@ function create( &$xmls ) {
}
/**
-* Creates the SQL to execute a list of provided SQL queries
-*
-* @package axmls
-* @access private
-*/
+ * Creates the SQL to execute a list of provided SQL queries
+ *
+ * @package axmls
+ * @access private
+ */
class dbQuerySet extends dbObject {
/**
- * @var array List of SQL queries
- */
+ * @var array List of SQL queries
+ */
var $queries = array();
/**
- * @var string String used to build of a query line by line
- */
+ * @var string String used to build of a query line by line
+ */
var $query;
/**
- * @var string Query prefix key
- */
+ * @var string Query prefix key
+ */
var $prefixKey = '';
/**
- * @var boolean Auto prefix enable (TRUE)
- */
+ * @var boolean Auto prefix enable (TRUE)
+ */
var $prefixMethod = 'AUTO';
/**
- * Initializes the query set.
- *
- * @param object $parent Parent object
- * @param array $attributes Attributes
- */
- function __construct( &$parent, $attributes = NULL ) {
+ * Initializes the query set.
+ *
+ * @param object $parent Parent object
+ * @param array $attributes Attributes
+ */
+ function __construct( $parent, $attributes = NULL ) {
$this->parent = $parent;
// Overrides the manual prefix key
@@ -1130,11 +1120,11 @@ function __construct( &$parent, $attributes = NULL ) {
}
/**
- * XML Callback to process start elements. Elements currently
- * processed are: QUERY.
- *
- * @access private
- */
+ * XML Callback to process start elements. Elements currently
+ * processed are: QUERY.
+ *
+ * @access private
+ */
function _tag_open( $parser, $tag, $attributes ) {
$this->currentElement = strtoupper( $tag );
@@ -1155,8 +1145,8 @@ function _tag_open( $parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- */
+ * XML Callback to process CDATA elements
+ */
function _tag_cdata( $parser, $cdata ) {
switch( $this->currentElement ) {
// Line of queryset SQL data
@@ -1169,10 +1159,10 @@ function _tag_cdata( $parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ */
function _tag_close( $parser, $tag ) {
$this->currentElement = '';
@@ -1192,10 +1182,10 @@ function _tag_close( $parser, $tag ) {
}
/**
- * Re-initializes the query.
- *
- * @return boolean TRUE
- */
+ * Re-initializes the query.
+ *
+ * @return boolean TRUE
+ */
function newQuery() {
$this->query = '';
@@ -1203,10 +1193,10 @@ function newQuery() {
}
/**
- * Discards the existing query.
- *
- * @return boolean TRUE
- */
+ * Discards the existing query.
+ *
+ * @return boolean TRUE
+ */
function discardQuery() {
unset( $this->query );
@@ -1214,11 +1204,11 @@ function discardQuery() {
}
/**
- * Appends a line to a query that is being built line by line
- *
- * @param string $data Line of SQL data or NULL to initialize a new query
- * @return string SQL query string.
- */
+ * Appends a line to a query that is being built line by line
+ *
+ * @param string $data Line of SQL data or NULL to initialize a new query
+ * @return string SQL query string.
+ */
function buildQuery( $sql = NULL ) {
if( !isset( $this->query ) OR empty( $sql ) ) {
return FALSE;
@@ -1230,10 +1220,10 @@ function buildQuery( $sql = NULL ) {
}
/**
- * Adds a completed query to the query list
- *
- * @return string SQL of added query
- */
+ * Adds a completed query to the query list
+ *
+ * @return string SQL of added query
+ */
function addQuery() {
if( !isset( $this->query ) ) {
return FALSE;
@@ -1247,11 +1237,11 @@ function addQuery() {
}
/**
- * Creates and returns the current query set
- *
- * @param object $xmls adoSchema object
- * @return array Query set
- */
+ * Creates and returns the current query set
+ *
+ * @param object $xmls adoSchema object
+ * @return array Query set
+ */
function create( &$xmls ) {
foreach( $this->queries as $id => $query ) {
switch( $this->prefixMethod ) {
@@ -1287,13 +1277,13 @@ function create( &$xmls ) {
}
/**
- * Rebuilds the query with the prefix attached to any objects
- *
- * @param string $regex Regex used to add prefix
- * @param string $query SQL query string
- * @param string $prefix Prefix to be appended to tables, indices, etc.
- * @return string Prefixed SQL query string.
- */
+ * Rebuilds the query with the prefix attached to any objects
+ *
+ * @param string $regex Regex used to add prefix
+ * @param string $query SQL query string
+ * @param string $prefix Prefix to be appended to tables, indices, etc.
+ * @return string Prefixed SQL query string.
+ */
function prefixQuery( $regex, $query, $prefix = NULL ) {
if( !isset( $prefix ) ) {
return $query;
@@ -1323,103 +1313,103 @@ function prefixQuery( $regex, $query, $prefix = NULL ) {
}
/**
-* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements
-*
-* This class is used to load and parse the XML file, to create an array of SQL statements
-* that can be used to build a database, and to build the database using the SQL array.
-*
-* @tutorial getting_started.pkg
-*
-* @author Richard Tango-Lowy & Dan Cech
-* @version $Revision: 1.62 $
-*
-* @package axmls
-*/
+ * Loads and parses an XML file, creating an array of "ready-to-run" SQL statements
+ *
+ * This class is used to load and parse the XML file, to create an array of SQL statements
+ * that can be used to build a database, and to build the database using the SQL array.
+ *
+ * @tutorial getting_started.pkg
+ *
+ * @author Richard Tango-Lowy & Dan Cech
+ * @version 1.62
+ *
+ * @package axmls
+ */
class adoSchema {
/**
- * @var array Array containing SQL queries to generate all objects
- * @access private
- */
+ * @var array Array containing SQL queries to generate all objects
+ * @access private
+ */
var $sqlArray;
/**
- * @var object ADOdb connection object
- * @access private
- */
+ * @var object ADOdb connection object
+ * @access private
+ */
var $db;
/**
- * @var object ADOdb Data Dictionary
- * @access private
- */
+ * @var object ADOdb Data Dictionary
+ * @access private
+ */
var $dict;
/**
- * @var string Current XML element
- * @access private
- */
+ * @var string Current XML element
+ * @access private
+ */
var $currentElement = '';
/**
- * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database
- * @access private
- */
+ * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database
+ * @access private
+ */
var $upgrade = '';
/**
- * @var string Optional object prefix
- * @access private
- */
+ * @var string Optional object prefix
+ * @access private
+ */
var $objectPrefix = '';
/**
- * @var long System debug
- * @access private
- */
+ * @var long System debug
+ * @access private
+ */
var $debug;
/**
- * @var string Regular expression to find schema version
- * @access private
- */
+ * @var string Regular expression to find schema version
+ * @access private
+ */
var $versionRegex = '//';
/**
- * @var string Current schema version
- * @access private
- */
+ * @var string Current schema version
+ * @access private
+ */
var $schemaVersion;
/**
- * @var int Success of last Schema execution
- */
+ * @var int Success of last Schema execution
+ */
var $success;
/**
- * @var bool Execute SQL inline as it is generated
- */
+ * @var bool Execute SQL inline as it is generated
+ */
var $executeInline;
/**
- * @var bool Continue SQL execution if errors occur
- */
+ * @var bool Continue SQL execution if errors occur
+ */
var $continueOnError;
/**
- * @var int How to handle existing data rows (insert, update, or ignore)
- */
+ * @var int How to handle existing data rows (insert, update, or ignore)
+ */
var $existingData;
/**
- * Creates an adoSchema object
- *
- * Creating an adoSchema object is the first step in processing an XML schema.
- * The only parameter is an ADOdb database connection object, which must already
- * have been created.
- *
- * @param object $db ADOdb database connection object.
- */
+ * Creates an adoSchema object
+ *
+ * Creating an adoSchema object is the first step in processing an XML schema.
+ * The only parameter is an ADOdb database connection object, which must already
+ * have been created.
+ *
+ * @param object $db ADOdb database connection object.
+ */
function __construct( $db ) {
$this->db = $db;
$this->debug = $this->db->debug;
@@ -1433,21 +1423,21 @@ function __construct( $db ) {
}
/**
- * Sets the method to be used for upgrading an existing database
- *
- * Use this method to specify how existing database objects should be upgraded.
- * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to
- * alter each database object directly, REPLACE attempts to rebuild each object
- * from scratch, BEST attempts to determine the best upgrade method for each
- * object, and NONE disables upgrading.
- *
- * This method is not yet used by AXMLS, but exists for backward compatibility.
- * The ALTER method is automatically assumed when the adoSchema object is
- * instantiated; other upgrade methods are not currently supported.
- *
- * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE)
- * @returns string Upgrade method used
- */
+ * Sets the method to be used for upgrading an existing database
+ *
+ * Use this method to specify how existing database objects should be upgraded.
+ * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to
+ * alter each database object directly, REPLACE attempts to rebuild each object
+ * from scratch, BEST attempts to determine the best upgrade method for each
+ * object, and NONE disables upgrading.
+ *
+ * This method is not yet used by AXMLS, but exists for backward compatibility.
+ * The ALTER method is automatically assumed when the adoSchema object is
+ * instantiated; other upgrade methods are not currently supported.
+ *
+ * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE)
+ * @returns string Upgrade method used
+ */
function setUpgradeMethod( $method = '' ) {
if( !is_string( $method ) ) {
return FALSE;
@@ -1478,24 +1468,24 @@ function setUpgradeMethod( $method = '' ) {
}
/**
- * Specifies how to handle existing data row when there is a unique key conflict.
- *
- * The existingData setting specifies how the parser should handle existing rows
- * when a unique key violation occurs during the insert. This can happen when inserting
- * data into an existing table with one or more primary keys or unique indexes.
- * The existingData method takes one of three options: XMLS_MODE_INSERT attempts
- * to always insert the data as a new row. In the event of a unique key violation,
- * the database will generate an error. XMLS_MODE_UPDATE attempts to update the
- * any existing rows with the new data based upon primary or unique key fields in
- * the schema. If the data row in the schema specifies no unique fields, the row
- * data will be inserted as a new row. XMLS_MODE_IGNORE specifies that any data rows
- * that would result in a unique key violation be ignored; no inserts or updates will
- * take place. For backward compatibility, the default setting is XMLS_MODE_INSERT,
- * but XMLS_MODE_UPDATE will generally be the most appropriate setting.
- *
- * @param int $mode XMLS_MODE_INSERT, XMLS_MODE_UPDATE, or XMLS_MODE_IGNORE
- * @return int current mode
- */
+ * Specifies how to handle existing data row when there is a unique key conflict.
+ *
+ * The existingData setting specifies how the parser should handle existing rows
+ * when a unique key violation occurs during the insert. This can happen when inserting
+ * data into an existing table with one or more primary keys or unique indexes.
+ * The existingData method takes one of three options: XMLS_MODE_INSERT attempts
+ * to always insert the data as a new row. In the event of a unique key violation,
+ * the database will generate an error. XMLS_MODE_UPDATE attempts to update the
+ * any existing rows with the new data based upon primary or unique key fields in
+ * the schema. If the data row in the schema specifies no unique fields, the row
+ * data will be inserted as a new row. XMLS_MODE_IGNORE specifies that any data rows
+ * that would result in a unique key violation be ignored; no inserts or updates will
+ * take place. For backward compatibility, the default setting is XMLS_MODE_INSERT,
+ * but XMLS_MODE_UPDATE will generally be the most appropriate setting.
+ *
+ * @param int $mode XMLS_MODE_INSERT, XMLS_MODE_UPDATE, or XMLS_MODE_IGNORE
+ * @return int current mode
+ */
function existingData( $mode = NULL ) {
if( is_int( $mode ) ) {
switch( $mode ) {
@@ -1519,18 +1509,19 @@ function existingData( $mode = NULL ) {
}
/**
- * Enables/disables inline SQL execution.
- *
- * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution),
- * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode
- * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema()
- * to apply the schema to the database.
- *
- * @param bool $mode execute
- * @return bool current execution mode
- *
- * @see ParseSchema(), ExecuteSchema()
- */
+ * Enables/disables inline SQL execution.
+ *
+ * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution),
+ * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode
+ * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema()
+ * to apply the schema to the database.
+ *
+ * @param bool $mode execute
+ * @return bool current execution mode
+ *
+ * @see ParseSchema()
+ * @see ExecuteSchema()
+ */
function executeInline( $mode = NULL ) {
if( is_bool( $mode ) ) {
$this->executeInline = $mode;
@@ -1540,18 +1531,19 @@ function executeInline( $mode = NULL ) {
}
/**
- * Enables/disables SQL continue on error.
- *
- * Call this method to enable or disable continuation of SQL execution if an error occurs.
- * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs.
- * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing
- * of the schema will continue.
- *
- * @param bool $mode execute
- * @return bool current continueOnError mode
- *
- * @see addSQL(), ExecuteSchema()
- */
+ * Enables/disables SQL continue on error.
+ *
+ * Call this method to enable or disable continuation of SQL execution if an error occurs.
+ * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs.
+ * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing
+ * of the schema will continue.
+ *
+ * @param bool $mode execute
+ * @return bool current continueOnError mode
+ *
+ * @see addSQL()
+ * @see ExecuteSchema()
+ */
function continueOnError( $mode = NULL ) {
if( is_bool( $mode ) ) {
$this->continueOnError = $mode;
@@ -1561,43 +1553,44 @@ function continueOnError( $mode = NULL ) {
}
/**
- * Loads an XML schema from a file and converts it to SQL.
- *
- * Call this method to load the specified schema (see the DTD for the proper format) from
- * the filesystem and generate the SQL necessary to create the database
- * described. This method automatically converts the schema to the latest
- * axmls schema version.
- * @see ParseSchemaString()
- *
- * @param string $file Name of XML schema file.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute
- */
+ * Loads an XML schema from a file and converts it to SQL.
+ *
+ * Call this method to load the specified schema (see the DTD for the proper format) from
+ * the filesystem and generate the SQL necessary to create the database
+ * described. This method automatically converts the schema to the latest
+ * axmls schema version.
+ * @see ParseSchemaString()
+ *
+ * @param string $file Name of XML schema file.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute
+ */
function parseSchema( $filename, $returnSchema = FALSE ) {
return $this->parseSchemaString( $this->convertSchemaFile( $filename ), $returnSchema );
}
/**
- * Loads an XML schema from a file and converts it to SQL.
- *
- * Call this method to load the specified schema directly from a file (see
- * the DTD for the proper format) and generate the SQL necessary to create
- * the database described by the schema. Use this method when you are dealing
- * with large schema files. Otherwise, parseSchema() is faster.
- * This method does not automatically convert the schema to the latest axmls
- * schema version. You must convert the schema manually using either the
- * convertSchemaFile() or convertSchemaString() method.
- * @see parseSchema()
- * @see convertSchemaFile()
- * @see convertSchemaString()
- *
- * @param string $file Name of XML schema file.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute.
- *
- * @deprecated Replaced by adoSchema::parseSchema() and adoSchema::parseSchemaString()
- * @see parseSchema(), parseSchemaString()
- */
+ * Loads an XML schema from a file and converts it to SQL.
+ *
+ * Call this method to load the specified schema directly from a file (see
+ * the DTD for the proper format) and generate the SQL necessary to create
+ * the database described by the schema. Use this method when you are dealing
+ * with large schema files. Otherwise, parseSchema() is faster.
+ * This method does not automatically convert the schema to the latest axmls
+ * schema version. You must convert the schema manually using either the
+ * convertSchemaFile() or convertSchemaString() method.
+ * @see parseSchema()
+ * @see convertSchemaFile()
+ * @see convertSchemaString()
+ *
+ * @param string $file Name of XML schema file.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute.
+ *
+ * @deprecated Replaced by adoSchema::parseSchema() and adoSchema::parseSchemaString()
+ * @see parseSchema()
+ * @see parseSchemaString()
+ */
function parseSchemaFile( $filename, $returnSchema = FALSE ) {
// Open the file
if( !($fp = fopen( $filename, 'r' )) ) {
@@ -1640,16 +1633,16 @@ function parseSchemaFile( $filename, $returnSchema = FALSE ) {
}
/**
- * Converts an XML schema string to SQL.
- *
- * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
- * and generate the SQL necessary to create the database described by the schema.
- * @see parseSchema()
- *
- * @param string $xmlstring XML schema string.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute.
- */
+ * Converts an XML schema string to SQL.
+ *
+ * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+ * and generate the SQL necessary to create the database described by the schema.
+ * @see parseSchema()
+ *
+ * @param string $xmlstring XML schema string.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute.
+ */
function parseSchemaString( $xmlstring, $returnSchema = FALSE ) {
if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
logMsg( 'Empty or Invalid Schema' );
@@ -1684,31 +1677,31 @@ function parseSchemaString( $xmlstring, $returnSchema = FALSE ) {
}
/**
- * Loads an XML schema from a file and converts it to uninstallation SQL.
- *
- * Call this method to load the specified schema (see the DTD for the proper format) from
- * the filesystem and generate the SQL necessary to remove the database described.
- * @see RemoveSchemaString()
- *
- * @param string $file Name of XML schema file.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute
- */
+ * Loads an XML schema from a file and converts it to uninstallation SQL.
+ *
+ * Call this method to load the specified schema (see the DTD for the proper format) from
+ * the filesystem and generate the SQL necessary to remove the database described.
+ * @see RemoveSchemaString()
+ *
+ * @param string $file Name of XML schema file.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute
+ */
function removeSchema( $filename, $returnSchema = FALSE ) {
return $this->removeSchemaString( $this->convertSchemaFile( $filename ), $returnSchema );
}
/**
- * Converts an XML schema string to uninstallation SQL.
- *
- * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
- * and generate the SQL necessary to uninstall the database described by the schema.
- * @see removeSchema()
- *
- * @param string $schema XML schema string.
- * @param bool $returnSchema Return schema rather than parsing.
- * @return array Array of SQL queries, ready to execute.
- */
+ * Converts an XML schema string to uninstallation SQL.
+ *
+ * Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+ * and generate the SQL necessary to uninstall the database described by the schema.
+ * @see removeSchema()
+ *
+ * @param string $schema XML schema string.
+ * @param bool $returnSchema Return schema rather than parsing.
+ * @return array Array of SQL queries, ready to execute.
+ */
function removeSchemaString( $schema, $returnSchema = FALSE ) {
// grab current version
@@ -1720,18 +1713,20 @@ function removeSchemaString( $schema, $returnSchema = FALSE ) {
}
/**
- * Applies the current XML schema to the database (post execution).
- *
- * Call this method to apply the current schema (generally created by calling
- * parseSchema() or parseSchemaString() ) to the database (creating the tables, indexes,
- * and executing other SQL specified in the schema) after parsing.
- * @see parseSchema(), parseSchemaString(), executeInline()
- *
- * @param array $sqlArray Array of SQL statements that will be applied rather than
- * the current schema.
- * @param boolean $continueOnErr Continue to apply the schema even if an error occurs.
- * @returns integer 0 if failure, 1 if errors, 2 if successful.
- */
+ * Applies the current XML schema to the database (post execution).
+ *
+ * Call this method to apply the current schema (generally created by calling
+ * parseSchema() or parseSchemaString() ) to the database (creating the tables, indexes,
+ * and executing other SQL specified in the schema) after parsing.
+ * @see parseSchema()
+ * @see parseSchemaString()
+ * @see executeInline()
+ *
+ * @param array $sqlArray Array of SQL statements that will be applied rather than
+ * the current schema.
+ * @param boolean $continueOnErr Continue to apply the schema even if an error occurs.
+ * @returns integer 0 if failure, 1 if errors, 2 if successful.
+ */
function executeSchema( $sqlArray = NULL, $continueOnErr = NULL ) {
if( !is_bool( $continueOnErr ) ) {
$continueOnErr = $this->continueOnError();
@@ -1751,28 +1746,28 @@ function executeSchema( $sqlArray = NULL, $continueOnErr = NULL ) {
}
/**
- * Returns the current SQL array.
- *
- * Call this method to fetch the array of SQL queries resulting from
- * parseSchema() or parseSchemaString().
- *
- * @param string $format Format: HTML, TEXT, or NONE (PHP array)
- * @return array Array of SQL statements or FALSE if an error occurs
- */
+ * Returns the current SQL array.
+ *
+ * Call this method to fetch the array of SQL queries resulting from
+ * parseSchema() or parseSchemaString().
+ *
+ * @param string $format Format: HTML, TEXT, or NONE (PHP array)
+ * @return array Array of SQL statements or FALSE if an error occurs
+ */
function printSQL( $format = 'NONE' ) {
$sqlArray = null;
return $this->getSQL( $format, $sqlArray );
}
/**
- * Saves the current SQL array to the local filesystem as a list of SQL queries.
- *
- * Call this method to save the array of SQL queries (generally resulting from a
- * parsed XML schema) to the filesystem.
- *
- * @param string $filename Path and name where the file should be saved.
- * @return boolean TRUE if save is successful, else FALSE.
- */
+ * Saves the current SQL array to the local filesystem as a list of SQL queries.
+ *
+ * Call this method to save the array of SQL queries (generally resulting from a
+ * parsed XML schema) to the filesystem.
+ *
+ * @param string $filename Path and name where the file should be saved.
+ * @return boolean TRUE if save is successful, else FALSE.
+ */
function saveSQL( $filename = './schema.sql' ) {
if( !isset( $sqlArray ) ) {
@@ -1791,12 +1786,12 @@ function saveSQL( $filename = './schema.sql' ) {
}
/**
- * Create an xml parser
- *
- * @return object PHP XML parser object
- *
- * @access private
- */
+ * Create an xml parser
+ *
+ * @return object PHP XML parser object
+ *
+ * @access private
+ */
function create_parser() {
// Create the parser
$xmlParser = xml_parser_create();
@@ -1810,10 +1805,10 @@ function create_parser() {
}
/**
- * XML Callback to process start elements
- *
- * @access private
- */
+ * XML Callback to process start elements
+ *
+ * @access private
+ */
function _tag_open( $parser, $tag, $attributes ) {
switch( strtoupper( $tag ) ) {
case 'TABLE':
@@ -1835,39 +1830,39 @@ function _tag_open( $parser, $tag, $attributes ) {
}
/**
- * XML Callback to process CDATA elements
- *
- * @access private
- */
+ * XML Callback to process CDATA elements
+ *
+ * @access private
+ */
function _tag_cdata( $parser, $cdata ) {
}
/**
- * XML Callback to process end elements
- *
- * @access private
- * @internal
- */
+ * XML Callback to process end elements
+ *
+ * @access private
+ * @internal
+ */
function _tag_close( $parser, $tag ) {
}
/**
- * Converts an XML schema string to the specified DTD version.
- *
- * Call this method to convert a string containing an XML schema to a different AXMLS
- * DTD version. For instance, to convert a schema created for an pre-1.0 version for
- * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
- * parameter is specified, the schema will be converted to the current DTD version.
- * If the newFile parameter is provided, the converted schema will be written to the specified
- * file.
- * @see convertSchemaFile()
- *
- * @param string $schema String containing XML schema that will be converted.
- * @param string $newVersion DTD version to convert to.
- * @param string $newFile File name of (converted) output file.
- * @return string Converted XML schema or FALSE if an error occurs.
- */
+ * Converts an XML schema string to the specified DTD version.
+ *
+ * Call this method to convert a string containing an XML schema to a different AXMLS
+ * DTD version. For instance, to convert a schema created for an pre-1.0 version for
+ * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
+ * parameter is specified, the schema will be converted to the current DTD version.
+ * If the newFile parameter is provided, the converted schema will be written to the specified
+ * file.
+ * @see convertSchemaFile()
+ *
+ * @param string $schema String containing XML schema that will be converted.
+ * @param string $newVersion DTD version to convert to.
+ * @param string $newFile File name of (converted) output file.
+ * @return string Converted XML schema or FALSE if an error occurs.
+ */
function convertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) {
// grab current version
@@ -1893,30 +1888,22 @@ function convertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) {
return $result;
}
- /*
- // compat for pre-4.3 - jlim
- function _file_get_contents($path)
- {
- if (function_exists('file_get_contents')) return file_get_contents($path);
- return join('',file($path));
- }*/
-
- /**
- * Converts an XML schema file to the specified DTD version.
- *
- * Call this method to convert the specified XML schema file to a different AXMLS
- * DTD version. For instance, to convert a schema created for an pre-1.0 version for
- * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
- * parameter is specified, the schema will be converted to the current DTD version.
- * If the newFile parameter is provided, the converted schema will be written to the specified
- * file.
- * @see convertSchemaString()
- *
- * @param string $filename Name of XML schema file that will be converted.
- * @param string $newVersion DTD version to convert to.
- * @param string $newFile File name of (converted) output file.
- * @return string Converted XML schema or FALSE if an error occurs.
- */
+ /**
+ * Converts an XML schema file to the specified DTD version.
+ *
+ * Call this method to convert the specified XML schema file to a different AXMLS
+ * DTD version. For instance, to convert a schema created for an pre-1.0 version for
+ * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version
+ * parameter is specified, the schema will be converted to the current DTD version.
+ * If the newFile parameter is provided, the converted schema will be written to the specified
+ * file.
+ * @see convertSchemaString()
+ *
+ * @param string $filename Name of XML schema file that will be converted.
+ * @param string $newVersion DTD version to convert to.
+ * @param string $newFile File name of (converted) output file.
+ * @return string Converted XML schema or FALSE if an error occurs.
+ */
function convertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) {
// grab current version
@@ -1929,7 +1916,7 @@ function convertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) {
}
if( $version == $newVersion ) {
- $result = _file_get_contents( $filename );
+ $result = file_get_contents( $filename );
// remove unicode BOM if present
if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) {
@@ -1968,7 +1955,7 @@ function transformSchema( $schema, $xsl, $schematype='string' )
return FALSE;
}
- $schema = _file_get_contents( $schema );
+ $schema = file_get_contents( $schema );
break;
case 'string':
default:
@@ -1979,14 +1966,14 @@ function transformSchema( $schema, $xsl, $schematype='string' )
$arguments = array (
'/_xml' => $schema,
- '/_xsl' => _file_get_contents( $xsl_file )
+ '/_xsl' => file_get_contents( $xsl_file )
);
// create an XSLT processor
$xh = xslt_create ();
// set error handler
- xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler'));
+ xslt_set_error_handler ($xh, array ($this, 'xslt_error_handler'));
// process the schema
$result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);
@@ -1997,15 +1984,15 @@ function transformSchema( $schema, $xsl, $schematype='string' )
}
/**
- * Processes XSLT transformation errors
- *
- * @param object $parser XML parser object
- * @param integer $errno Error number
- * @param integer $level Error level
- * @param array $fields Error information fields
- *
- * @access private
- */
+ * Processes XSLT transformation errors
+ *
+ * @param object $parser XML parser object
+ * @param integer $errno Error number
+ * @param integer $level Error level
+ * @param array $fields Error information fields
+ *
+ * @access private
+ */
function xslt_error_handler( $parser, $errno, $level, $fields ) {
if( is_array( $fields ) ) {
$msg = array(
@@ -2050,14 +2037,14 @@ function xslt_error_handler( $parser, $errno, $level, $fields ) {
}
/**
- * Returns the AXMLS Schema Version of the requested XML schema file.
- *
- * Call this method to obtain the AXMLS DTD version of the requested XML schema file.
- * @see SchemaStringVersion()
- *
- * @param string $filename AXMLS schema file
- * @return string Schema version number or FALSE on error
- */
+ * Returns the AXMLS Schema Version of the requested XML schema file.
+ *
+ * Call this method to obtain the AXMLS DTD version of the requested XML schema file.
+ * @see SchemaStringVersion()
+ *
+ * @param string $filename AXMLS schema file
+ * @return string Schema version number or FALSE on error
+ */
function schemaFileVersion( $filename ) {
// Open the file
if( !($fp = fopen( $filename, 'r' )) ) {
@@ -2076,14 +2063,14 @@ function schemaFileVersion( $filename ) {
}
/**
- * Returns the AXMLS Schema Version of the provided XML schema string.
- *
- * Call this method to obtain the AXMLS DTD version of the provided XML schema string.
- * @see SchemaFileVersion()
- *
- * @param string $xmlstring XML schema string
- * @return string Schema version number or FALSE on error
- */
+ * Returns the AXMLS Schema Version of the provided XML schema string.
+ *
+ * Call this method to obtain the AXMLS DTD version of the provided XML schema string.
+ * @see SchemaFileVersion()
+ *
+ * @param string $xmlstring XML schema string
+ * @return string Schema version number or FALSE on error
+ */
function schemaStringVersion( $xmlstring ) {
if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
return FALSE;
@@ -2097,18 +2084,18 @@ function schemaStringVersion( $xmlstring ) {
}
/**
- * Extracts an XML schema from an existing database.
- *
- * Call this method to create an XML schema string from an existing database.
- * If the data parameter is set to TRUE, AXMLS will include the data from the database
- * tables in the schema.
- *
- * @param boolean $data include data in schema dump
- * @param string $indent indentation to use
- * @param string $prefix extract only tables with given prefix
- * @param boolean $stripprefix strip prefix string when storing in XML schema
- * @return string Generated XML schema
- */
+ * Extracts an XML schema from an existing database.
+ *
+ * Call this method to create an XML schema string from an existing database.
+ * If the data parameter is set to TRUE, AXMLS will include the data from the database
+ * tables in the schema.
+ *
+ * @param boolean $data include data in schema dump
+ * @param string $indent indentation to use
+ * @param string $prefix extract only tables with given prefix
+ * @param boolean $stripprefix strip prefix string when storing in XML schema
+ * @return string Generated XML schema
+ */
function extractSchema( $data = FALSE, $indent = ' ', $prefix = '' , $stripprefix=false) {
$old_mode = $this->db->setFetchMode( ADODB_FETCH_NUM );
@@ -2217,15 +2204,15 @@ function extractSchema( $data = FALSE, $indent = ' ', $prefix = '' , $strippref
}
/**
- * Sets a prefix for database objects
- *
- * Call this method to set a standard prefix that will be prepended to all database tables
- * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix.
- *
- * @param string $prefix Prefix that will be prepended.
- * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix.
- * @return boolean TRUE if successful, else FALSE
- */
+ * Sets a prefix for database objects
+ *
+ * Call this method to set a standard prefix that will be prepended to all database tables
+ * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix.
+ *
+ * @param string $prefix Prefix that will be prepended.
+ * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix.
+ * @return boolean TRUE if successful, else FALSE
+ */
function setPrefix( $prefix = '', $underscore = TRUE ) {
switch( TRUE ) {
// clear prefix
@@ -2252,13 +2239,13 @@ function setPrefix( $prefix = '', $underscore = TRUE ) {
}
/**
- * Returns an object name with the current prefix prepended.
- *
- * @param string $name Name
- * @return string Prefixed name
- *
- * @access private
- */
+ * Returns an object name with the current prefix prepended.
+ *
+ * @param string $name Name
+ * @return string Prefixed name
+ *
+ * @access private
+ */
function prefix( $name = '' ) {
// if prefix is set
if( !empty( $this->objectPrefix ) ) {
@@ -2272,13 +2259,13 @@ function prefix( $name = '' ) {
}
/**
- * Checks if element references a specific platform
- *
- * @param string $platform Requested platform
- * @returns boolean TRUE if platform check succeeds
- *
- * @access private
- */
+ * Checks if element references a specific platform
+ *
+ * @param string $platform Requested platform
+ * @returns boolean TRUE if platform check succeeds
+ *
+ * @access private
+ */
function supportedPlatform( $platform = NULL ) {
if( !empty( $platform ) ) {
$regex = '/(^|\|)' . $this->db->databaseType . '(\||$)/i';
@@ -2301,22 +2288,22 @@ function supportedPlatform( $platform = NULL ) {
}
/**
- * Clears the array of generated SQL.
- *
- * @access private
- */
+ * Clears the array of generated SQL.
+ *
+ * @access private
+ */
function clearSQL() {
$this->sqlArray = array();
}
/**
- * Adds SQL into the SQL array.
- *
- * @param mixed $sql SQL to Add
- * @return boolean TRUE if successful, else FALSE.
- *
- * @access private
- */
+ * Adds SQL into the SQL array.
+ *
+ * @param mixed $sql SQL to Add
+ * @return boolean TRUE if successful, else FALSE.
+ *
+ * @access private
+ */
function addSQL( $sql = NULL ) {
if( is_array( $sql ) ) {
foreach( $sql as $line ) {
@@ -2352,13 +2339,13 @@ function addSQL( $sql = NULL ) {
}
/**
- * Gets the SQL array in the specified format.
- *
- * @param string $format Format
- * @return mixed SQL
- *
- * @access private
- */
+ * Gets the SQL array in the specified format.
+ *
+ * @param string $format Format
+ * @return mixed SQL
+ *
+ * @access private
+ */
function getSQL( $format = NULL, $sqlArray = NULL ) {
if( !is_array( $sqlArray ) ) {
$sqlArray = $this->sqlArray;
@@ -2380,20 +2367,20 @@ function getSQL( $format = NULL, $sqlArray = NULL ) {
}
/**
- * Destroys an adoSchema object.
- *
- * Call this method to clean up after an adoSchema object that is no longer in use.
- * @deprecated adoSchema now cleans up automatically.
- */
+ * Destroys an adoSchema object.
+ *
+ * Call this method to clean up after an adoSchema object that is no longer in use.
+ * @deprecated adoSchema now cleans up automatically.
+ */
function destroy() {
}
}
/**
-* Message logging function
-*
-* @access private
-*/
+ * Message logging function
+ *
+ * @access private
+ */
function logMsg( $msg, $title = NULL, $force = FALSE ) {
if( XMLS_DEBUG or $force ) {
echo '
';
diff --git a/app/vendor/adodb/adodb-php/adodb.inc.php b/app/vendor/adodb/adodb-php/adodb.inc.php
index 703c2f9fc..142e3ebe9 100644
--- a/app/vendor/adodb/adodb-php/adodb.inc.php
+++ b/app/vendor/adodb/adodb-php/adodb.inc.php
@@ -70,19 +70,19 @@
//==============================================================================================
/*********************************************************
- * Controls $ADODB_FORCE_TYPE mode. Default is ADODB_FORCE_VALUE (3).
- * Used in GetUpdateSql and GetInsertSql functions. Thx to Niko, nuko#mbnet.fi
- * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:adodb_force_type
- *
- * 0 = ignore empty fields. All empty fields in array are ignored.
- * 1 = force null. All empty, php null and string 'null' fields are
- * changed to sql NULL values.
- * 2 = force empty. All empty, php null and string 'null' fields are
- * changed to sql empty '' or 0 values.
- * 3 = force value. Value is left as it is. Php null and string 'null'
- * are set to sql NULL values and empty fields '' are set to empty '' sql values.
- * 4 = force value. Like 1 but numeric empty fields are set to zero.
- */
+ * Controls $ADODB_FORCE_TYPE mode. Default is ADODB_FORCE_VALUE (3).
+ * Used in GetUpdateSql and GetInsertSql functions. Thx to Niko, nuko#mbnet.fi
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:adodb_force_type
+ *
+ * 0 = ignore empty fields. All empty fields in array are ignored.
+ * 1 = force null. All empty, php null and string 'null' fields are
+ * changed to sql NULL values.
+ * 2 = force empty. All empty, php null and string 'null' fields are
+ * changed to sql empty '' or 0 values.
+ * 3 = force value. Value is left as it is. Php null and string 'null'
+ * are set to sql NULL values and empty fields '' are set to empty '' sql values.
+ * 4 = force value. Like 1 but numeric empty fields are set to zero.
+ */
define('ADODB_FORCE_IGNORE',0);
define('ADODB_FORCE_NULL',1);
define('ADODB_FORCE_EMPTY',2);
@@ -99,10 +99,10 @@
define ('ADODB_STRINGMAX_NOLIMIT',-2);
/*
- * Defines the the default meta type returned
- * when ADOdb encounters a type that it is not
- * defined in the metaTypes.
- */
+ * Defines the the default meta type returned
+ * when ADOdb encounters a type that it is not
+ * defined in the metaTypes.
+ */
if (!defined('ADODB_DEFAULT_METATYPE'))
define ('ADODB_DEFAULT_METATYPE','N');
@@ -198,7 +198,7 @@ function ADODB_Setup() {
/**
* ADODB version as a string.
*/
- $ADODB_vers = 'v5.21.3 2021-10-31';
+ $ADODB_vers = 'v5.22.1 2022-03-30';
/**
* Determines whether recordset->RecordCount() is used.
@@ -240,12 +240,25 @@ class ADOFieldObject {
}
+ /**
+ * Parse date string to prevent injection attack.
+ *
+ * @param string $s
+ *
+ * @return string
+ */
function _adodb_safedate($s) {
return str_replace(array("'", '\\'), '', $s);
}
- // parse date string to prevent injection attack
- // date string will have one quote at beginning e.g. '3434343'
+ /**
+ * Parse date string to prevent injection attack.
+ * Date string will have one quote at beginning e.g. '3434343'
+ *
+ * @param string $s
+ *
+ * @return string
+ */
function _adodb_safedateq($s) {
$len = strlen($s);
if ($s[0] !== "'") {
@@ -269,9 +282,17 @@ function _adodb_safedateq($s) {
return strlen($s2) == 0 ? 'null' : $s2;
}
-
- // for transaction handling
-
+ /**
+ * For transaction handling.
+ *
+ * @param $dbms
+ * @param $fn
+ * @param $errno
+ * @param $errmsg
+ * @param $p1
+ * @param $p2
+ * @param $thisConnection
+ */
function ADODB_TransMonitor($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection) {
//print "Errorno ($fn errno=$errno m=$errmsg) ";
$thisConnection->_transOK = false;
@@ -281,8 +302,9 @@ function ADODB_TransMonitor($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnect
}
}
- //------------------
- // class for caching
+ /**
+ * Class ADODB_Cache_File
+ */
class ADODB_Cache_File {
var $createdir = true; // requires creation of temp dirs
@@ -294,18 +316,42 @@ function __construct() {
}
}
- // write serialised recordset to cache item/file
- function writecache($filename, $contents, $debug, $secs2cache) {
+ /**
+ * Write serialised RecordSet to cache item/file.
+ *
+ * @param $filename
+ * @param $contents
+ * @param $debug
+ * @param $secs2cache
+ *
+ * @return bool|int
+ */
+ function writecache($filename, $contents, $debug, $secs2cache) {
return adodb_write_file($filename, $contents,$debug);
}
- // load serialised recordset and unserialise it
+ /**
+ * load serialised RecordSet and unserialise it
+ *
+ * @param $filename
+ * @param $err
+ * @param $secs2cache
+ * @param $rsClass
+ *
+ * @return ADORecordSet
+ */
function &readcache($filename, &$err, $secs2cache, $rsClass) {
$rs = csv2rs($filename,$err,$secs2cache,$rsClass);
return $rs;
}
- // flush all items in cache
+ /**
+ * Flush all items in cache.
+ *
+ * @param bool $debug
+ *
+ * @return bool|void
+ */
function flushall($debug=false) {
global $ADODB_CACHE_DIR;
@@ -320,7 +366,12 @@ function flushall($debug=false) {
return $rez;
}
- // flush one file in cache
+ /**
+ * Flush one file in cache.
+ *
+ * @param string $f
+ * @param bool $debug
+ */
function flushcache($f, $debug=false) {
if (!@unlink($f)) {
if ($debug) {
@@ -329,6 +380,11 @@ function flushcache($f, $debug=false) {
}
}
+ /**
+ * @param string $hash
+ *
+ * @return string
+ */
function getdirname($hash) {
global $ADODB_CACHE_DIR;
if (!isset($this->notSafeMode)) {
@@ -337,7 +393,14 @@ function getdirname($hash) {
return ($this->notSafeMode) ? $ADODB_CACHE_DIR.'/'.substr($hash,0,2) : $ADODB_CACHE_DIR;
}
- // create temp directories
+ /**
+ * Create temp directories.
+ *
+ * @param string $hash
+ * @param bool $debug
+ *
+ * @return string
+ */
function createdir($hash, $debug) {
global $ADODB_CACHE_PERMS;
@@ -396,6 +459,12 @@ abstract class ADOConnection {
var $dataProvider = 'native';
var $databaseType = ''; /// RDBMS currently in use, eg. odbc, mysql, mssql
var $database = ''; /// Name of database to be used.
+
+ /**
+ * @var string If the driver is PDO, then the dsnType is e.g. sqlsrv, otherwise empty
+ */
+ public $dsnType = '';
+
var $host = ''; /// The hostname of the database server
var $port = ''; /// The port of the database server
var $user = ''; /// The username which is used to connect to the database server.
@@ -440,11 +509,47 @@ abstract class ADOConnection {
var $isoDates = false; /// accepts dates in ISO format
var $cacheSecs = 3600; /// cache for 1 hour
- // memcache
- var $memCache = false; /// should we use memCache instead of caching in files
- var $memCacheHost; /// memCache host
- var $memCachePort = 11211; /// memCache port
- var $memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib, not supported w/memcached library)
+ /*****************************************
+ * memcached server options
+ ******************************************/
+
+ /**
+ * Use memCache library instead of caching in files.
+ * @var bool $memCache
+ */
+ public $memCache = false;
+
+ /**
+ * The memcache server(s) to connect to. Can be defined as:
+ * - a single host name/ip address
+ * - a list of hosts/ip addresses
+ * - an array of server connection data (weighted server groups).
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:userguide:memcached
+ * @var string|array $memCacheHost
+ */
+ public $memCacheHost;
+
+ /**
+ * Default port number.
+ * The default port can be overridden if memcache server connection data
+ * is provided as an array {@see $memCacheHost}.
+ * @var int $memCachePort
+ */
+ public $memCachePort = 11211;
+
+ /**
+ * Enable compression of stored items.
+ * @var bool $memCacheCompress
+ */
+ public $memCacheCompress = false;
+
+ /**
+ * An array of memcached options.
+ * Only used with memcached; memcache ignores this setting.
+ * @link https://www.php.net/manual/en/memcached.constants.php
+ * @var array $memCacheOptions
+ */
+ public $memCacheOptions = array();
var $sysDate = false; /// name of function that returns the current date
var $sysTimeStamp = false; /// name of function that returns the current timestamp
@@ -512,6 +617,23 @@ abstract class ADOConnection {
*/
protected $connectionParameters = array();
+ /*
+ * A simple associative array of user-defined custom actual/meta types
+ */
+ public $customActualTypes = array();
+
+ /*
+ * An array of user-defined custom meta/actual types.
+ * $this->customMetaTypes[$meta] = array(
+ * 'actual'=>'',
+ * 'dictionary'=>'',
+ * 'handler'=>'',
+ * 'callback'=>''
+ * );
+ */
+ public $customMetaTypes = array();
+
+
/**
* Default Constructor.
* We define it even though it does not actually do anything. This avoids
@@ -572,11 +694,54 @@ static function Version() {
return $matches[1];
}
+ /**
+ * Set a custom meta type with a corresponding actual
+ *
+ * @param string $metaType The Custom ADOdb metatype
+ * @param string $dictionaryType The database dictionary type
+ * @param string $actualType The database actual type
+ * @param bool $handleAsType handle like an existing Metatype
+ * @param mixed $callBack A pre-processing function
+ *
+ * @return bool success if the actual exists
+ */
+ final public function setCustomMetaType(
+ $metaType,
+ $dictionaryType,
+ $actualType,
+ $handleAsType=false,
+ $callback=false){
+
+ $this->customMetaTypes[strtoupper($metaType)] = array(
+ 'actual'=>$actualType,
+ 'dictionary'=>strtoupper($dictionaryType),
+ 'handler'=>$handleAsType,
+ 'callback'=>$callback
+ );
+
+ /*
+ * Create a reverse lookup for the actualType
+ */
+ $this->customActualTypes[$actualType] = $metaType;
+
+ return true;
+ }
+
+ /**
+ * Get a list of custom meta types.
+ *
+ * @return string[]
+ */
+ final public function getCustomMetaTypes()
+ {
+ return $this->customMetaTypes;
+ }
+
+
/**
* Get server version info.
*
- * @return string[] An array with 2 elements: $arr['string'] is the description string,
- * and $arr[version] is the version (also a string).
+ * @return string[] Array with 2 string elements: version and description
*/
function ServerInfo() {
return array('description' => '', 'version' => '');
@@ -591,6 +756,13 @@ function IsConnected() {
return !empty($this->_connectionID);
}
+ /**
+ * Find version string.
+ *
+ * @param string $str
+ *
+ * @return string
+ */
function _findvers($str) {
if (preg_match('/([0-9]+\.([0-9\.])+)/',$str, $arr)) {
return $arr[1];
@@ -729,6 +901,16 @@ function Connect($argHostname = "", $argUsername = "", $argPassword = "", $argDa
return false;
}
+ /**
+ * Always force a new connection to database.
+ *
+ * @param string $argHostname Host to connect to
+ * @param string $argUsername Userid to login
+ * @param string $argPassword Associated password
+ * @param string $argDatabaseName Database name
+ *
+ * @return bool
+ */
function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) {
return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName);
}
@@ -807,7 +989,13 @@ function PConnect($argHostname = "", $argUsername = "", $argPassword = "", $argD
return $ret;
}
- function outp_throw($msg,$src='WARN',$sql='') {
+ /**
+ * Throw an exception if the handler is defined or prints the message if not.
+ * @param string $msg Message
+ * @param string $src the name of the calling function (in uppercase)
+ * @param string $sql Optional offending SQL statement
+ */
+ function outp_throw($msg, $src='WARN', $sql='') {
if (defined('ADODB_ERROR_HANDLER') && ADODB_ERROR_HANDLER == 'adodb_throw') {
adodb_throw($this->databaseType,$src,-9999,$msg,$sql,false,$this);
return;
@@ -843,6 +1031,8 @@ function _CreateCache() {
*
* @param string $fmt Format string
* @param string $col Date column; use system date if not specified.
+ *
+ * @return string
*/
function SQLDate($fmt, $col = '') {
if (!$col) {
@@ -852,14 +1042,14 @@ function SQLDate($fmt, $col = '') {
}
/**
- * Prepare an sql statement and return the statement resource.
+ * Prepare an SQL statement and return the statement resource.
*
- * For databases that do not support this, we return the $sql. To ensure
- * compatibility with databases that do not support prepare:
+ * For databases that do not support prepared statements, we return the
+ * provided SQL statement as-is, to ensure compatibility:
*
- * $stmt = $db->Prepare("insert into table (id, name) values (?,?)");
- * $db->Execute($stmt,array(1,'Jill')) or die('insert failed');
- * $db->Execute($stmt,array(2,'Joe')) or die('insert failed');
+ * $stmt = $db->prepare("insert into table (id, name) values (?,?)");
+ * $db->execute($stmt, array(1,'Jill')) or die('insert failed');
+ * $db->execute($stmt, array(2,'Joe')) or die('insert failed');
*
* @param string $sql SQL to send to database
*
@@ -870,6 +1060,17 @@ function Prepare($sql) {
return $sql;
}
+ /**
+ * Releases a previously prepared statement.
+ *
+ * @param mixed $stmt Statement resource, as returned by {@see prepare()}
+ *
+ * @return bool
+ */
+ function releaseStatement(&$stmt) {
+ return true;
+ }
+
/**
* Prepare a Stored Procedure and return the statement resource.
*
@@ -897,6 +1098,12 @@ function Quote($s) {
return $this->qstr($s);
}
+ /**
+ * Quotes a string so that all strings are escaped.
+ * Wrapper for qstr with magic_quotes = false.
+ *
+ * @param string &$s
+ */
function q(&$s) {
//if (!empty($this->qNull && $s == 'null') {
// return $s;
@@ -905,8 +1112,9 @@ function q(&$s) {
}
/**
- * PEAR DB Compat - do not use internally.
- */
+ * PEAR DB Compat - do not use internally.
+ * @return int
+ */
function ErrorNative() {
return $this->ErrorNo();
}
@@ -914,18 +1122,23 @@ function ErrorNative() {
/**
* PEAR DB Compat - do not use internally.
+ * @param string $seq_name
+ * @return int
*/
function nextId($seq_name) {
return $this->GenID($seq_name);
}
/**
- * Lock a row, will escalate and lock the table if row locking not supported
- * will normally free the lock at the end of the transaction
+ * Lock a row.
+ * Will escalate and lock the table if row locking is not supported.
+ * Will normally free the lock at the end of the transaction.
+ *
+ * @param string $table name of table to lock
+ * @param string $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock
+ * @param string $col
*
- * @param string $table name of table to lock
- * @param string $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock
- * @param string $col
+ * @return bool
*/
function RowLock($table,$where,$col='1 as adodbignore') {
return false;
@@ -948,15 +1161,15 @@ function RollbackLock($table) {
}
/**
- * PEAR DB Compat - do not use internally.
- *
- * The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical
- * for easy porting :-)
- *
- * @param int $mode The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM
- *
- * @return int Previous fetch mode
- */
+ * PEAR DB Compat - do not use internally.
+ *
+ * The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical
+ * for easy porting :-)
+ *
+ * @param int $mode The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM
+ *
+ * @return int Previous fetch mode
+ */
function SetFetchMode($mode) {
$old = $this->fetchMode;
$this->fetchMode = $mode;
@@ -968,15 +1181,14 @@ function SetFetchMode($mode) {
return $old;
}
-
/**
- * PEAR DB Compat - do not use internally.
+ * PEAR DB Compat - do not use internally.
*
* @param string $sql
* @param array|bool $inputarr
*
* @return ADORecordSet|bool
- */
+ */
function Query($sql, $inputarr=false) {
$rs = $this->Execute($sql, $inputarr);
if (!$rs && defined('ADODB_PEAR')) {
@@ -985,7 +1197,6 @@ function Query($sql, $inputarr=false) {
return $rs;
}
-
/**
* PEAR DB Compat - do not use internally
*/
@@ -1026,36 +1237,54 @@ function Param($name,$type='C') {
return '?';
}
- /*
- InParameter and OutParameter are self-documenting versions of Parameter().
- */
- function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) {
+ /**
+ * Self-documenting version of Parameter().
+ *
+ * @param $stmt
+ * @param &$var
+ * @param $name
+ * @param int $maxLen
+ * @param bool $type
+ *
+ * @return bool
+ */
+ function InParameter(&$stmt, &$var, $name, $maxLen=4000, $type=false) {
return $this->Parameter($stmt,$var,$name,false,$maxLen,$type);
}
- /*
- */
+ /**
+ * Self-documenting version of Parameter().
+ *
+ * @param $stmt
+ * @param $var
+ * @param $name
+ * @param int $maxLen
+ * @param bool $type
+ *
+ * @return bool
+ */
function OutParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) {
return $this->Parameter($stmt,$var,$name,true,$maxLen,$type);
}
-
- /*
- Usage in oracle
- $stmt = $db->Prepare('select * from table where id =:myid and group=:group');
- $db->Parameter($stmt,$id,'myid');
- $db->Parameter($stmt,$group,'group',64);
- $db->Execute();
-
- @param $stmt Statement returned by Prepare() or PrepareSP().
- @param $var PHP variable to bind to
- @param $name Name of stored procedure variable name to bind to.
- @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8.
- @param [$maxLen] Holds an maximum length of the variable.
- @param [$type] The data type of $var. Legal values depend on driver.
-
- */
+ /**
+ *
+ * Usage in oracle
+ * $stmt = $db->Prepare('select * from table where id =:myid and group=:group');
+ * $db->Parameter($stmt,$id,'myid');
+ * $db->Parameter($stmt,$group,'group',64);
+ * $db->Execute();
+ *
+ * @param mixed &$stmt Statement returned by Prepare() or PrepareSP().
+ * @param mixed &$var PHP variable to bind to
+ * @param string $name Name of stored procedure variable name to bind to.
+ * @param int|bool $isOutput Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8.
+ * @param int $maxLen Holds an maximum length of the variable.
+ * @param mixed $type The data type of $var. Legal values depend on driver.
+ *
+ * @return bool
+ */
function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) {
return false;
}
@@ -1102,13 +1331,16 @@ function StartTrans($errfn = 'ADODB_TransMonitor') {
/**
- Used together with StartTrans() to end a transaction. Monitors connection
- for sql errors, and will commit or rollback as appropriate.
-
- @autoComplete if true, monitor sql errors and commit and rollback as appropriate,
- and if set to false force rollback even if no SQL error detected.
- @returns true on commit, false on rollback.
- */
+ * Complete a transation.
+ *
+ * Used together with StartTrans() to end a transaction. Monitors connection
+ * for sql errors, and will commit or rollback as appropriate.
+ *
+ * @param bool autoComplete if true, monitor sql errors and commit and
+ * rollback as appropriate, and if set to false
+ * force rollback even if no SQL error detected.
+ * @returns true on commit, false on rollback.
+ */
function CompleteTrans($autoComplete = true) {
if ($this->transOff > 1) {
$this->transOff -= 1;
@@ -1132,16 +1364,16 @@ function CompleteTrans($autoComplete = true) {
$this->_transOK = false;
$this->RollbackTrans();
if ($this->debug) {
- ADOCOnnection::outp("Smart Rollback occurred");
+ ADOConnection::outp("Smart Rollback occurred");
}
}
return $this->_transOK;
}
- /*
- At the end of a StartTrans/CompleteTrans block, perform a rollback.
- */
+ /**
+ * At the end of a StartTrans/CompleteTrans block, perform a rollback.
+ */
function FailTrans() {
if ($this->debug)
if ($this->transOff == 0) {
@@ -1154,8 +1386,8 @@ function FailTrans() {
}
/**
- Check if transaction has failed, only for Smart Transactions.
- */
+ * Check if transaction has failed, only for Smart Transactions.
+ */
function HasFailedTrans() {
if ($this->transOff > 0) {
return $this->_transOK == false;
@@ -1496,8 +1728,8 @@ function PO_Insert_ID($table="", $id="") {
}
/**
- * @return # rows affected by UPDATE/DELETE
- */
+ * @return int|false Number of rows affected by UPDATE/DELETE
+ */
function Affected_Rows() {
if ($this->hasAffectedRows) {
if ($this->fnExecute === 'adodb_log_sql') {
@@ -1572,11 +1804,24 @@ function MetaPrimaryKeys($table, $owner=false) {
}
/**
- * @returns assoc array where keys are tables, and values are foreign keys
+ * Returns a list of Foreign Keys associated with a specific table.
+ *
+ * If there are no foreign keys then the function returns false.
+ *
+ * @param string $table The name of the table to get the foreign keys for.
+ * @param string $owner Table owner/schema.
+ * @param bool $upper If true, only matches the table with the uppercase name.
+ * @param bool $associative Returns the result in associative mode;
+ * if ADODB_FETCH_MODE is already associative, then
+ * this parameter is discarded.
+ *
+ * @return string[]|false An array where keys are tables, and values are foreign keys;
+ * false if no foreign keys could be found.
*/
- function MetaForeignKeys($table, $owner=false, $upper=false) {
+ function metaForeignKeys($table, $owner = '', $upper = false, $associative = false) {
return false;
}
+
/**
* Choose a database to connect to. Many databases do not support this.
*
@@ -1693,12 +1938,12 @@ function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) {
}
/**
- * Create serializable recordset. Breaks rs link to connection.
- *
- * @param ADORecordSet $rs the recordset to serialize
+ * Create serializable recordset. Breaks rs link to connection.
*
- * @return ADORecordSet_array|bool the new recordset
- */
+ * @param ADORecordSet $rs the recordset to serialize
+ *
+ * @return ADORecordSet_array|bool the new recordset
+ */
function SerializableRS(&$rs) {
$rs2 = $this->_rs2rs($rs);
$ignore = false;
@@ -1708,17 +1953,17 @@ function SerializableRS(&$rs) {
}
/**
- * Convert a database recordset to an array recordset.
+ * Convert a database recordset to an array recordset.
+ *
+ * Input recordset's cursor should be at beginning, and old $rs will be closed.
*
- * Input recordset's cursor should be at beginning, and old $rs will be closed.
- *
* @param ADORecordSet $rs the recordset to copy
* @param int $nrows number of rows to retrieve (optional)
* @param int $offset offset by number of rows (optional)
* @param bool $close
*
* @return ADORecordSet_array|ADORecordSet|bool the new recordset
- */
+ */
function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) {
if (! $rs) {
$ret = false;
@@ -1747,7 +1992,7 @@ function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) {
$arrayClass = $this->arrayClass;
- $rs2 = new $arrayClass();
+ $rs2 = new $arrayClass($fakeQueryId=1);
$rs2->connection = $this;
$rs2->sql = $rs->sql;
$rs2->dataProvider = $this->dataProvider;
@@ -1756,7 +2001,7 @@ function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) {
return $rs2;
}
- /*
+ /**
* Return all rows.
*
* Compat with PEAR DB.
@@ -1765,9 +2010,9 @@ function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) {
* @param array|bool $inputarr Input bind array
*
* @return array|false
- */
+ */
function GetAll($sql, $inputarr=false) {
- return $this->GetArray($sql,$inputarr);
+ return $this->GetArray($sql,$inputarr);
}
/**
@@ -1941,23 +2186,17 @@ function CacheGetCol($secs, $sql = false, $inputarr = false,$trim=false) {
return $rv;
}
- function Transpose(&$rs,$addfieldnames=true) {
- $rs2 = $this->_rs2rs($rs);
- if (!$rs2) {
- return false;
- }
-
- $rs2->_transpose($addfieldnames);
- return $rs2;
- }
-
- /*
- Calculate the offset of a date for a particular database and generate
- appropriate SQL. Useful for calculating future/past dates and storing
- in a database.
-
- If dayFraction=1.5 means 1.5 days from now, 1.0/24 for 1 hour.
- */
+ /**
+ * Calculate the offset of a date for a particular database
+ * and generate appropriate SQL.
+ *
+ * Useful for calculating future/past dates and storing in a database.
+ *
+ * @param double $dayFraction 1.5 means 1.5 days from now, 1.0/24 for 1 hour
+ * @param string|false $date Reference date, false for system time
+ *
+ * @return string
+ */
function OffsetDate($dayFraction,$date=false) {
if (!$date) {
$date = $this->sysDate;
@@ -2029,14 +2268,14 @@ function GetRandRow($sql, $arr= false) {
}
/**
- * Return one row of sql statement. Recordset is disposed for you.
- * Note that SelectLimit should not be called.
- *
- * @param string $sql SQL statement
- * @param array|bool $inputarr input bind array
+ * Return one row of sql statement. Recordset is disposed for you.
+ * Note that SelectLimit should not be called.
*
- * @return array|false Array containing the first row of the query
- */
+ * @param string $sql SQL statement
+ * @param array|bool $inputarr input bind array
+ *
+ * @return array|false Array containing the first row of the query
+ */
function GetRow($sql,$inputarr=false) {
global $ADODB_COUNTRECS;
@@ -2083,24 +2322,24 @@ function CacheGetRow($secs2cache,$sql=false,$inputarr=false) {
}
/**
- * Insert or replace a single record. Note: this is not the same as MySQL's replace.
- * ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL.
- * Also note that no table locking is done currently, so it is possible that the
- * record be inserted twice by two programs...
- *
- * $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname');
- *
- * $table table name
- * $fieldArray associative array of data (you must quote strings yourself).
- * $keyCol the primary key field name or if compound key, array of field names
- * autoQuote set to true to use a heuristic to quote strings. Works with nulls and numbers
- * but does not work with dates nor SQL functions.
- * has_autoinc the primary key is an auto-inc field, so skip in insert.
- *
- * Currently blob replace not supported
- *
- * returns 0 = fail, 1 = update, 2 = insert
- */
+ * Insert or replace a single record. Note: this is not the same as MySQL's replace.
+ * ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL.
+ * Also note that no table locking is done currently, so it is possible that the
+ * record be inserted twice by two programs...
+ *
+ * $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname');
+ *
+ * $table table name
+ * $fieldArray associative array of data (you must quote strings yourself).
+ * $keyCol the primary key field name or if compound key, array of field names
+ * autoQuote set to true to use a heuristic to quote strings. Works with nulls and numbers
+ * but does not work with dates nor SQL functions.
+ * has_autoinc the primary key is an auto-inc field, so skip in insert.
+ *
+ * Currently blob replace not supported
+ *
+ * returns 0 = fail, 1 = update, 2 = insert
+ */
function Replace($table, $fieldArray, $keyCol, $autoQuote=false, $has_autoinc=false) {
global $ADODB_INCLUDED_LIB;
@@ -2457,37 +2696,47 @@ function GetInsertSQL(&$rs, $arrFields, $magic_quotes=false, $force=null) {
/**
- * Update a blob column, given a where clause. There are more sophisticated
- * blob handling functions that we could have implemented, but all require
- * a very complex API. Instead we have chosen something that is extremely
- * simple to understand and use.
- *
- * Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course.
- *
- * Usage to update a $blobvalue which has a primary key blob_id=1 into a
- * field blobtable.blobcolumn:
- *
- * UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1');
- *
- * Insert example:
- *
- * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
- * $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
- */
- function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') {
+ * Update a BLOB column, given a where clause.
+ *
+ * There are more sophisticated blob handling functions that we could have
+ * implemented, but all require a very complex API. Instead we have chosen
+ * something that is extremely simple to understand and use.
+ *
+ * Sample usage:
+ * - update a BLOB in field table.blob_col with value $blobValue, for a
+ * record having primary key id=1
+ * $conn->updateBlob('table', 'blob_col', $blobValue, 'id=1');
+ * - insert example:
+ * $conn->execute('INSERT INTO table (id, blob_col) VALUES (1, null)');
+ * $conn->updateBlob('table', 'blob_col', $blobValue, 'id=1');
+ *
+ * @param string $table
+ * @param string $column
+ * @param string $val Filename containing blob data
+ * @param mixed $where {@see updateBlob()}
+ * @param string $blobtype supports 'BLOB' (default) and 'CLOB'
+ *
+ * @return bool success
+ */
+ function updateBlob($table, $column, $val, $where, $blobtype='BLOB') {
return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false;
}
/**
- * Usage:
- * UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1');
- *
- * $blobtype supports 'BLOB' and 'CLOB'
- *
- * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
- * $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1');
- */
- function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') {
+ * Update a BLOB from a file.
+ *
+ * Usage example:
+ * $conn->updateBlobFile('table', 'blob_col', '/path/to/file', 'id=1');
+ *
+ * @param string $table
+ * @param string $column
+ * @param string $path Filename containing blob data
+ * @param mixed $where {@see updateBlob()}
+ * @param string $blobtype supports 'BLOB' and 'CLOB'
+ *
+ * @return bool success
+ */
+ function updateBlobFile($table, $column, $path, $where, $blobtype='BLOB') {
$fd = fopen($path,'rb');
if ($fd === false) {
return false;
@@ -2551,12 +2800,12 @@ function LogSQL($enable=true) {
}
/**
- * Usage:
- * UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB');
- *
- * $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)');
- * $conn->UpdateClob('clobtable','clobcol',$clob,'id=1');
- */
+ * Usage:
+ * UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB');
+ *
+ * $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)');
+ * $conn->UpdateClob('clobtable','clobcol',$clob,'id=1');
+ */
function UpdateClob($table,$column,$val,$where) {
return $this->UpdateBlob($table,$column,$val,$where,'CLOB');
}
@@ -2575,9 +2824,9 @@ function MetaType($t,$len=-1,$fieldobj=false) {
/**
- * Change the SQL connection locale to a specified locale.
- * This is used to get the date formats written depending on the client locale.
- */
+ * Change the SQL connection locale to a specified locale.
+ * This is used to get the date formats written depending on the client locale.
+ */
function SetDateLocale($locale = 'En') {
$this->locale = $locale;
switch (strtoupper($locale))
@@ -2656,7 +2905,9 @@ function Close() {
}
/**
- * Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
+ * Begin a Transaction.
+ *
+ * Must be followed by CommitTrans() or RollbackTrans().
*
* @return bool true if succeeded or false if database does not support transactions
*/
@@ -2718,11 +2969,14 @@ function MetaTransaction($mode,$db) {
}
/**
- * If database does not support transactions, always return true as data always committed
+ * Commits a transaction.
*
- * @param bool $ok set to false to rollback transaction, true to commit
+ * If database does not support transactions, return true as data is
+ * always committed.
*
- * @return true/false.
+ * @param bool $ok True to commit, false to rollback the transaction.
+ *
+ * @return bool true if successful
*/
function CommitTrans($ok=true) {
return true;
@@ -2730,9 +2984,12 @@ function CommitTrans($ok=true) {
/**
- * If database does not support transactions, rollbacks always fail, so return false
+ * Rolls back a transaction.
*
- * @return bool
+ * If database does not support transactions, return false as rollbacks
+ * always fail.
+ *
+ * @return bool true if successful
*/
function RollbackTrans() {
return false;
@@ -3269,17 +3526,17 @@ function PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) {
/**
- * Will select the supplied $page number from a recordset, given that it is paginated in pages of
- * $nrows rows per page. It also saves two boolean values saying if the given page is the first
- * and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
- *
- * @param int $secs2cache seconds to cache data, set to 0 to force query
- * @param string $sql
- * @param int $nrows is the number of rows per page to get
- * @param int $page is the page number to get (1-based)
- * @param mixed[]|bool $inputarr array of bind variables
- * @return mixed the recordset ($rs->databaseType == 'array')
- */
+ * Will select the supplied $page number from a recordset, given that it is paginated in pages of
+ * $nrows rows per page. It also saves two boolean values saying if the given page is the first
+ * and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
+ *
+ * @param int $secs2cache seconds to cache data, set to 0 to force query
+ * @param string $sql
+ * @param int $nrows is the number of rows per page to get
+ * @param int $page is the page number to get (1-based)
+ * @param mixed[]|bool $inputarr array of bind variables
+ * @return mixed the recordset ($rs->databaseType == 'array')
+ */
function CachePageExecute($secs2cache, $sql, $nrows, $page,$inputarr=false) {
/*switch($this->dataProvider) {
case 'postgres':
@@ -3291,37 +3548,37 @@ function CachePageExecute($secs2cache, $sql, $nrows, $page,$inputarr=false) {
}
/**
- * Returns the maximum size of a MetaType C field. If the method
- * is not defined in the driver returns ADODB_STRINGMAX_NOTSET
- *
- * @return int
- */
+ * Returns the maximum size of a MetaType C field. If the method
+ * is not defined in the driver returns ADODB_STRINGMAX_NOTSET
+ *
+ * @return int
+ */
function charMax() {
return ADODB_STRINGMAX_NOTSET;
}
/**
- * Returns the maximum size of a MetaType X field. If the method
- * is not defined in the driver returns ADODB_STRINGMAX_NOTSET
- *
- * @return int
- */
+ * Returns the maximum size of a MetaType X field. If the method
+ * is not defined in the driver returns ADODB_STRINGMAX_NOTSET
+ *
+ * @return int
+ */
function textMax() {
return ADODB_STRINGMAX_NOTSET;
}
/**
- * Returns a substring of a varchar type field
- *
- * Some databases have variations of the parameters, which is why
- * we have an ADOdb function for it
- *
- * @param string $fld The field to sub-string
- * @param int $start The start point
- * @param int $length An optional length
- *
- * @return string The SQL text
- */
+ * Returns a substring of a varchar type field
+ *
+ * Some databases have variations of the parameters, which is why
+ * we have an ADOdb function for it
+ *
+ * @param string $fld The field to sub-string
+ * @param int $start The start point
+ * @param int $length An optional length
+ *
+ * @return string The SQL text
+ */
function substr($fld,$start,$length=0) {
$text = "{$this->substr}($fld,$start";
if ($length > 0)
@@ -3426,15 +3683,14 @@ protected function getChangedErrorMsg($old = null) {
//==============================================================================================
/**
- * Internal placeholder for record objects. Used by ADORecordSet->FetchObj().
- */
+ * Internal placeholder for record objects. Used by ADORecordSet->FetchObj().
+ */
class ADOFetchObj {
};
- //==============================================================================================
- // CLASS ADORecordSet_empty
- //==============================================================================================
-
+ /**
+ * Class ADODB_Iterator_empty
+ */
class ADODB_Iterator_empty implements Iterator {
private $rs;
@@ -3443,26 +3699,32 @@ function __construct($rs) {
$this->rs = $rs;
}
+ #[\ReturnTypeWillChange]
function rewind() {}
+ #[\ReturnTypeWillChange]
function valid() {
return !$this->rs->EOF;
}
+ #[\ReturnTypeWillChange]
function key() {
return false;
}
+ #[\ReturnTypeWillChange]
function current() {
return false;
}
+ #[\ReturnTypeWillChange]
function next() {}
function __call($func, $params) {
return call_user_func_array(array($this->rs, $func), $params);
}
+ #[\ReturnTypeWillChange]
function hasMore() {
return false;
}
@@ -3471,8 +3733,8 @@ function hasMore() {
/**
- * Lightweight recordset when there are no records to be returned
- */
+ * Lightweight recordset when there are no records to be returned
+ */
class ADORecordSet_empty implements IteratorAggregate
{
var $dataProvider = 'empty';
@@ -3509,6 +3771,7 @@ function FieldCount() {
function Init() {}
+ #[\ReturnTypeWillChange]
function getIterator() {
return new ADODB_Iterator_empty($this);
}
@@ -3557,10 +3820,9 @@ function NumCols() {
include_once(ADODB_DIR.'/adodb-time.inc.php');
}
- //==============================================================================================
- // CLASS ADORecordSet
- //==============================================================================================
-
+ /**
+ * Class ADODB_Iterator
+ */
class ADODB_Iterator implements Iterator {
private $rs;
@@ -3569,22 +3831,27 @@ function __construct($rs) {
$this->rs = $rs;
}
+ #[\ReturnTypeWillChange]
function rewind() {
$this->rs->MoveFirst();
}
+ #[\ReturnTypeWillChange]
function valid() {
return !$this->rs->EOF;
}
+ #[\ReturnTypeWillChange]
function key() {
return $this->rs->_currentRow;
}
+ #[\ReturnTypeWillChange]
function current() {
return $this->rs->fields;
}
+ #[\ReturnTypeWillChange]
function next() {
$this->rs->MoveNext();
}
@@ -3600,13 +3867,14 @@ function hasMore() {
}
- /**
- * RecordSet class that represents the dataset returned by the database.
- * To keep memory overhead low, this class holds only the current row in memory.
- * No prefetching of data is done, so the RecordCount() can return -1 ( which
- * means recordcount not known).
- */
- class ADORecordSet implements IteratorAggregate {
+/**
+ * RecordSet class that represents the dataset returned by the database.
+ *
+ * To keep memory overhead low, this class holds only the current row in memory.
+ * No prefetching of data is done, so the RecordCount() can return -1 (which
+ * means recordcount not known).
+ */
+class ADORecordSet implements IteratorAggregate {
/**
* public variables
@@ -3627,8 +3895,8 @@ class ADORecordSet implements IteratorAggregate {
var $bind = false; /// used by Fields() to hold array - should be private?
var $fetchMode; /// default fetch mode
- var $connection = false; /// the parent connection
-
+ /** @var ADOConnection The parent connection */
+ var $connection = false;
/**
* private variables
*/
@@ -3649,6 +3917,10 @@ class ADORecordSet implements IteratorAggregate {
var $_maxRecordCount = 0;
var $datetime = false;
+ public $customActualTypes;
+ public $customMetaTypes;
+
+
/**
* @var ADOFieldObject[] Field metadata cache
* @see fieldTypesArray()
@@ -3658,10 +3930,10 @@ class ADORecordSet implements IteratorAggregate {
/**
* Constructor
*
- * @param resource|int queryID this is the queryID returned by ADOConnection->_query()
- *
+ * @param resource|int $queryID Query ID returned by ADOConnection->_query()
+ * @param int|bool $mode The ADODB_FETCH_MODE value
*/
- function __construct($queryID) {
+ function __construct($queryID,$mode=false) {
$this->_queryID = $queryID;
}
@@ -3669,6 +3941,7 @@ function __destruct() {
$this->Close();
}
+ #[\ReturnTypeWillChange]
function getIterator() {
return new ADODB_Iterator($this);
}
@@ -3685,7 +3958,7 @@ function Init() {
}
$this->_inited = true;
if ($this->_queryID) {
- @$this->_initrs();
+ @$this->_initRS();
} else {
$this->_numOfRows = 0;
$this->_numOfFields = 0;
@@ -3700,6 +3973,16 @@ function Init() {
}
}
+ /**
+ * Recordset initialization stub
+ */
+ protected function _initRS() {}
+
+ /**
+ * Row fetch stub
+ * @return bool
+ */
+ protected function _fetch() {}
/**
* Generate a SELECT tag from a recordset, and return the HTML markup.
@@ -3838,24 +4121,28 @@ function GetAll($nRows = -1) {
return $this->GetArray($nRows);
}
- /*
- * Some databases allow multiple recordsets to be returned. This function
- * will return true if there is a next recordset, or false if no more.
- */
+ /**
+ * Checks if there is another available recordset.
+ *
+ * Some databases allow multiple recordsets to be returned.
+ *
+ * @return boolean true if there is a next recordset, or false if no more
+ */
function NextRecordSet() {
return false;
}
/**
- * return recordset as a 2-dimensional array.
+ * Return recordset as a 2-dimensional array.
+ *
* Helper function for ADOConnection->SelectLimit()
*
- * @param offset is the row to start calculations from (1-based)
- * @param [nrows] is the number of rows to return
+ * @param int $nrows Number of rows to return
+ * @param int $offset Starting row (1-based)
*
* @return array an array indexed by the rows (0-based) from the recordset
*/
- function GetArrayLimit($nrows,$offset=-1) {
+ function getArrayLimit($nrows, $offset=-1) {
if ($offset <= 0) {
return $this->GetArray($nrows);
}
@@ -3876,11 +4163,11 @@ function GetArrayLimit($nrows,$offset=-1) {
/**
* Synonym for GetArray() for compatibility with ADO.
*
- * @param [nRows] is the number of rows to return. -1 means every row.
+ * @param int $nRows Number of rows to return. -1 means every row.
*
* @return array an array indexed by the rows (0-based) from the recordset
*/
- function GetRows($nRows = -1) {
+ function getRows($nRows = -1) {
return $this->GetArray($nRows);
}
@@ -4093,8 +4380,8 @@ static function UnixTimeStamp($v) {
/**
- * PEAR DB Compat - do not use internally
- */
+ * PEAR DB Compat - do not use internally
+ */
function Free() {
return $this->Close();
}
@@ -4139,13 +4426,13 @@ function FetchRow() {
/**
- * Fetch a row, returning PEAR_Error if no more rows.
- * This is PEAR DB compat mode.
- *
- * @param mixed[]|false $arr
- *
- * @return mixed DB_OK or error object
- */
+ * Fetch a row, returning PEAR_Error if no more rows.
+ * This is PEAR DB compat mode.
+ *
+ * @param mixed[]|false $arr
+ *
+ * @return mixed DB_OK or error object
+ */
function FetchInto(&$arr) {
if ($this->EOF) {
return (defined('PEAR_ERROR_RETURN')) ? new PEAR_Error('EOF',-1): false;
@@ -4268,6 +4555,14 @@ function Move($rowNumber = 0) {
return false;
}
+ /**
+ * Adjusts the result pointer to an arbitrary row in the result.
+ *
+ * @param int $row The row to seek to.
+ *
+ * @return bool False if the recordset contains no rows, otherwise true.
+ */
+ function _seek($row) {}
/**
* Get the value of a field in the current row by column name.
@@ -4341,8 +4636,9 @@ function GetAssocKeys($upper = ADODB_ASSOC_CASE) {
* Use associative array to get fields array for databases that do not support
* associative arrays. Submitted by Paolo S. Asioli paolo.asioli#libero.it
*
- * @param int [$upper] Case for the array keys, defaults to uppercase
+ * @param int $upper Case for the array keys, defaults to uppercase
* (see ADODB_ASSOC_CASE_xxx constants)
+ * @return array
*/
function GetRowAssoc($upper = ADODB_ASSOC_CASE) {
$record = array();
@@ -4378,15 +4674,14 @@ function Close() {
}
/**
- * Synonyms RecordCount and RowCount
+ * Number of rows in recordset.
*
* @return int Number of rows or -1 if this is not supported
*/
- function RecordCount() {
+ function recordCount() {
return $this->_numOfRows;
}
-
/**
* If we are using PageExecute(), this will return the maximum possible rows
* that can be returned when paging a recordset.
@@ -4394,26 +4689,32 @@ function RecordCount() {
* @return int
*/
function MaxRecordCount() {
- return ($this->_maxRecordCount) ? $this->_maxRecordCount : $this->RecordCount();
+ return ($this->_maxRecordCount) ? $this->_maxRecordCount : $this->recordCount();
}
/**
- * synonyms RecordCount and RowCount
+ * Number of rows in recordset.
+ * Alias for {@see recordCount()}
*
- * @return the number of rows or -1 if this is not supported
+ * @return int Number of rows or -1 if this is not supported
*/
- function RowCount() {
- return $this->_numOfRows;
+ function rowCount() {
+ return $this->recordCount();
}
-
- /**
- * Portable RecordCount. Pablo Roca
+ /**
+ * Portable RecordCount.
*
- * @return the number of records from a previous SELECT. All databases support this.
+ * Be aware of possible problems in multiuser environments.
+ * For better speed the table must be indexed by the condition.
+ * Heavy test this before deploying.
+ *
+ * @param string $table
+ * @param string $condition
*
- * But aware possible problems in multiuser environments. For better speed the table
- * must be indexed by the condition. Heavy test this before deploying.
+ * @return int Number of records from a previous SELECT. All databases support this.
+ *
+ * @author Pablo Roca
*/
function PO_RecordCount($table="", $condition="") {
@@ -4487,24 +4788,24 @@ function fieldTypesArray() {
}
/**
- * Return the fields array of the current row as an object for convenience.
- * The default case is lowercase field names.
- *
- * @return the object with the properties set to the fields of the current row
- */
+ * Return the fields array of the current row as an object for convenience.
+ * The default case is lowercase field names.
+ *
+ * @return the object with the properties set to the fields of the current row
+ */
function FetchObj() {
return $this->FetchObject(false);
}
/**
- * Return the fields array of the current row as an object for convenience.
- * The default case is uppercase.
- *
- * @param $isupper to set the object property names to uppercase
- *
- * @return the object with the properties set to the fields of the current row
- */
- function FetchObject($isupper=true) {
+ * Return the fields array of the current row as an object for convenience.
+ * The default case is uppercase.
+ *
+ * @param bool $isUpper to set the object property names to uppercase
+ *
+ * @return ADOFetchObj The object with properties set to the fields of the current row
+ */
+ function FetchObject($isUpper=true) {
if (empty($this->_obj)) {
$this->_obj = new ADOFetchObj();
$this->_names = array();
@@ -4513,12 +4814,11 @@ function FetchObject($isupper=true) {
$this->_names[] = $f->name;
}
}
- $i = 0;
$o = clone($this->_obj);
for ($i=0; $i <$this->_numOfFields; $i++) {
$name = $this->_names[$i];
- if ($isupper) {
+ if ($isUpper) {
$n = strtoupper($name);
} else {
$n = $name;
@@ -4530,34 +4830,34 @@ function FetchObject($isupper=true) {
}
/**
- * Return the fields array of the current row as an object for convenience.
- * The default is lower-case field names.
- *
- * @return the object with the properties set to the fields of the current row,
- * or false if EOF
- *
- * Fixed bug reported by tim@orotech.net
- */
+ * Return the fields array of the current row as an object for convenience.
+ * The default is lower-case field names.
+ *
+ * @return ADOFetchObj|false The object with properties set to the fields of the current row
+ * or false if EOF.
+ *
+ * Fixed bug reported by tim@orotech.net
+ */
function FetchNextObj() {
return $this->FetchNextObject(false);
}
/**
- * Return the fields array of the current row as an object for convenience.
- * The default is upper case field names.
- *
- * @param $isupper to set the object property names to uppercase
- *
- * @return the object with the properties set to the fields of the current row,
- * or false if EOF
- *
- * Fixed bug reported by tim@orotech.net
- */
- function FetchNextObject($isupper=true) {
+ * Return the fields array of the current row as an object for convenience.
+ * The default is upper case field names.
+ *
+ * @param bool $isUpper to set the object property names to uppercase
+ *
+ * @return ADOFetchObj|false The object with properties set to the fields of the current row
+ * or false if EOF.
+ *
+ * Fixed bug reported by tim@orotech.net
+ */
+ function FetchNextObject($isUpper=true) {
$o = false;
if ($this->_numOfRows != 0 && !$this->EOF) {
- $o = $this->FetchObject($isupper);
+ $o = $this->FetchObject($isUpper);
$this->_currentRow++;
if ($this->_fetch()) {
return $o;
@@ -4568,37 +4868,29 @@ function FetchNextObject($isupper=true) {
}
/**
- * Get the metatype of the column. This is used for formatting. This is because
- * many databases use different names for the same type, so we transform the original
- * type to our standardised version which uses 1 character codes:
+ * Get the ADOdb metatype.
*
- * @param t is the type passed in. Normally is ADOFieldObject->type.
- * @param len is the maximum length of that field. This is because we treat character
- * fields bigger than a certain size as a 'B' (blob).
- * @param fieldobj is the field object returned by the database driver. Can hold
- * additional info (eg. primary_key for mysql).
+ * Many databases use different names for the same type, so we transform
+ * the native type to our standardised one, which uses 1 character codes.
+ * @see https://adodb.org/dokuwiki/doku.php?id=v5:dictionary:dictionary_index#portable_data_types
*
- * @return the general type of the data:
- * C for character < 250 chars
- * X for teXt (>= 250 chars)
- * B for Binary
- * N for numeric or floating point
- * D for date
- * T for timestamp
- * L for logical/Boolean
- * I for integer
- * R for autoincrement counter/integer
+ * @param string|ADOFieldObject $t Native type (usually ADOFieldObject->type)
+ * It is also possible to provide an
+ * ADOFieldObject here.
+ * @param int $len The field's maximum length. This is because we treat
+ * character fields bigger than a certain size as a 'B' (blob).
+ * @param ADOFieldObject $fieldObj Field object returned by the database driver;
+ * can hold additional info (eg. primary_key for mysql).
*
- *
- */
- function MetaType($t,$len=-1,$fieldobj=false) {
- if (is_object($t)) {
- $fieldobj = $t;
- $t = $fieldobj->type;
- $len = $fieldobj->max_length;
+ * @return string The ADOdb Standard type
+ */
+ function metaType($t, $len = -1, $fieldObj = false) {
+ if ($t instanceof ADOFieldObject) {
+ $fieldObj = $t;
+ $t = $fieldObj->type;
+ $len = $fieldObj->max_length;
}
-
// changed in 2.32 to hashing instead of switch stmt for speed...
static $typeMap = array(
'VARCHAR' => 'C',
@@ -4705,8 +4997,6 @@ function MetaType($t,$len=-1,$fieldobj=false) {
"SQLBOOL" => 'L'
);
-
- $tmap = false;
$t = strtoupper($t);
$tmap = (isset($typeMap[$t])) ? $typeMap[$t] : ADODB_DEFAULT_METATYPE;
switch ($tmap) {
@@ -4722,7 +5012,7 @@ function MetaType($t,$len=-1,$fieldobj=false) {
return 'C';
case 'I':
- if (!empty($fieldobj->primary_key)) {
+ if (!empty($fieldObj->primary_key)) {
return 'R';
}
return 'I';
@@ -4731,8 +5021,8 @@ function MetaType($t,$len=-1,$fieldobj=false) {
return 'N';
case 'B':
- if (isset($fieldobj->binary)) {
- return ($fieldobj->binary) ? 'B' : 'X';
+ if (isset($fieldObj->binary)) {
+ return ($fieldObj->binary) ? 'B' : 'X';
}
return 'B';
@@ -4783,8 +5073,10 @@ function _close() {}
/**
* set/returns the current recordset page when paginating
+ * @param int $page
+ * @return int
*/
- function AbsolutePage($page=-1) {
+ function absolutePage($page=-1) {
if ($page != -1) {
$this->_currentPage = $page;
}
@@ -4793,6 +5085,8 @@ function AbsolutePage($page=-1) {
/**
* set/returns the status of the atFirstPage flag when paginating
+ * @param bool $status
+ * @return bool
*/
function AtFirstPage($status=false) {
if ($status != false) {
@@ -4801,6 +5095,10 @@ function AtFirstPage($status=false) {
return $this->_atFirstPage;
}
+ /**
+ * @param bool $page
+ * @return bool
+ */
function LastPageNo($page = false) {
if ($page != false) {
$this->_lastPageNo = $page;
@@ -4810,6 +5108,8 @@ function LastPageNo($page = false) {
/**
* set/returns the status of the atLastPage flag when paginating
+ * @param bool $status
+ * @return bool
*/
function AtLastPage($status=false) {
if ($status != false) {
@@ -4847,48 +5147,22 @@ class ADORecordSet_array extends ADORecordSet
/**
* Constructor
+ *
+ * The parameters passed to this recordset are always fake because
+ * this class does not use the queryID
+ *
+ * @param resource|int $queryID Ignored
+ * @param int|bool $mode The ADODB_FETCH_MODE value
*/
- function __construct($fakeid=1) {
+ function __construct($queryID, $mode=false) {
global $ADODB_FETCH_MODE,$ADODB_COMPAT_FETCH;
// fetch() on EOF does not delete $this->fields
$this->compat = !empty($ADODB_COMPAT_FETCH);
- parent::__construct($fakeid); // fake queryID
+ parent::__construct($queryID); // fake queryID
$this->fetchMode = $ADODB_FETCH_MODE;
}
- function _transpose($addfieldnames=true) {
- global $ADODB_INCLUDED_LIB;
-
- if (empty($ADODB_INCLUDED_LIB)) {
- include_once(ADODB_DIR.'/adodb-lib.inc.php');
- }
- $hdr = true;
-
- $fobjs = $addfieldnames ? $this->_fieldobjects : false;
- adodb_transpose($this->_array, $newarr, $hdr, $fobjs);
- //adodb_pr($newarr);
-
- $this->_skiprow1 = false;
- $this->_array = $newarr;
- $this->_colnames = $hdr;
-
- adodb_probetypes($newarr,$this->_types);
-
- $this->_fieldobjects = array();
-
- foreach($hdr as $k => $name) {
- $f = new ADOFieldObject();
- $f->name = $name;
- $f->type = $this->_types[$k];
- $f->max_length = -1;
- $this->_fieldobjects[] = $f;
- }
- $this->fields = reset($this->_array);
-
- $this->_initrs();
-
- }
/**
* Setup the array.
@@ -5102,12 +5376,8 @@ function ADOLoadCode($dbType) {
break;
case 'mysql':
- // mysql driver deprecated since 5.5, removed in 7.0
- // automatically switch to mysqli
- if(version_compare(PHP_VERSION, '7.0.0', '>=')) {
- $db = 'mysqli';
- }
- $class = $db;
+ // mysql extension removed in PHP 7.0 - automatically switch to mysqli
+ $class = $db = 'mysqli';
break;
default:
@@ -5484,9 +5754,9 @@ function newDataDictionary(&$conn, $drivername='') {
return $dict;
}
- /*
- Perform a print_r, with pre tags for better formatting.
- */
+ /**
+ * Perform a print_r, with pre tags for better formatting.
+ */
function adodb_pr($var,$as_string=false) {
if ($as_string) {
ob_start();
@@ -5505,12 +5775,15 @@ function adodb_pr($var,$as_string=false) {
}
}
- /*
- Perform a stack-crawl and pretty print it.
-
- @param printOrArr Pass in a boolean to indicate print, or an $exception->trace array (assumes that print is true then).
- @param levels Number of levels to display
- */
+ /**
+ * Perform a stack-crawl and pretty print it.
+ *
+ * @param bool $printOrArr Pass in a boolean to indicate print, or an $exception->trace array (assumes that print is true then).
+ * @param int $levels Number of levels to display
+ * @param mixed $ishtml
+ *
+ * @return string
+ */
function adodb_backtrace($printOrArr=true,$levels=9999,$ishtml=null) {
global $ADODB_INCLUDED_LIB;
if (empty($ADODB_INCLUDED_LIB)) {
diff --git a/app/vendor/adodb/adodb-php/composer.json b/app/vendor/adodb/adodb-php/composer.json
index 807866b67..cd97e9d72 100644
--- a/app/vendor/adodb/adodb-php/composer.json
+++ b/app/vendor/adodb/adodb-php/composer.json
@@ -27,7 +27,7 @@
},
"require" : {
- "php" : "^5.5.9 || ^7.0 || ^8.0"
+ "php" : "^7.0 || ^8.0"
},
"require-dev" : {
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-access.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-access.inc.php
index 7a7d4cbbd..b3f9fad0a 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-access.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-access.inc.php
@@ -30,6 +30,15 @@ class ADODB2_access extends ADODB_DataDict {
function ActualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch($meta) {
case 'C': return 'TEXT';
case 'XL':
@@ -41,18 +50,19 @@ function ActualType($meta)
case 'B': return 'BINARY';
case 'TS':
- case 'D': return 'DATETIME';
+ case 'D':
+ return 'DATETIME';
case 'T': return 'DATETIME';
- case 'L': return 'BYTE';
- case 'I': return 'INTEGER';
+ case 'L': return 'BYTE';
+ case 'I': return 'INTEGER';
case 'I1': return 'BYTE';
case 'I2': return 'SMALLINT';
case 'I4': return 'INTEGER';
case 'I8': return 'INTEGER';
- case 'F': return 'DOUBLE';
- case 'N': return 'NUMERIC';
+ case 'F': return 'DOUBLE';
+ case 'N': return 'NUMERIC';
default:
return $meta;
}
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-db2.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-db2.inc.php
index c5dda09fb..9ac106bbb 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-db2.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-db2.inc.php
@@ -34,6 +34,15 @@ class ADODB2_db2 extends ADODB_DataDict {
function ActualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch($meta) {
case 'C': return 'VARCHAR';
case 'XL': return 'CLOB';
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-firebird.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-firebird.inc.php
index 0020a0ae0..79d0a8f5c 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-firebird.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-firebird.inc.php
@@ -22,8 +22,8 @@
// security - hide paths
if (!defined('ADODB_DIR')) die();
-class ADODB2_firebird extends ADODB_DataDict {
-
+class ADODB2_firebird extends ADODB_DataDict
+{
var $databaseType = 'firebird';
var $seqField = false;
var $seqPrefix = 's_';
@@ -32,69 +32,92 @@ class ADODB2_firebird extends ADODB_DataDict {
var $alterCol = ' ALTER';
var $dropCol = ' DROP';
- function ActualType($meta)
+ function actualType($meta)
{
- switch($meta) {
- case 'C': return 'VARCHAR';
- case 'XL':
- case 'X': return 'BLOB SUB_TYPE TEXT';
-
- case 'C2': return 'VARCHAR(32765)'; // up to 32K
- case 'X2': return 'VARCHAR(4096)';
-
- case 'V': return 'CHAR';
- case 'C1': return 'CHAR(1)';
- case 'B': return 'BLOB';
+ $meta = strtoupper($meta);
- case 'D': return 'DATE';
- case 'TS':
- case 'T': return 'TIMESTAMP';
-
- case 'L': return 'SMALLINT';
- case 'I': return 'INTEGER';
- case 'I1': return 'SMALLINT';
- case 'I2': return 'SMALLINT';
- case 'I4': return 'INTEGER';
- case 'I8': return 'BIGINT';
+ // Add support for custom meta types.
+ // We do this first, that allows us to override existing types
+ if (isset($this->connection->customMetaTypes[$meta])) {
+ return $this->connection->customMetaTypes[$meta]['actual'];
+ }
- case 'F': return 'DOUBLE PRECISION';
- case 'N': return 'DECIMAL';
- default:
- return $meta;
+ switch($meta) {
+ case 'C':
+ return 'VARCHAR';
+ case 'XL':
+ return 'BLOB SUB_TYPE BINARY';
+ case 'X':
+ return 'BLOB SUB_TYPE TEXT';
+
+ case 'C2':
+ return 'VARCHAR(32765)'; // up to 32K
+ case 'X2':
+ return 'VARCHAR(4096)';
+
+ case 'V':
+ return 'CHAR';
+ case 'C1':
+ return 'CHAR(1)';
+
+ case 'B':
+ return 'BLOB';
+
+ case 'D':
+ return 'DATE';
+ case 'TS':
+ case 'T':
+ return 'TIMESTAMP';
+
+ case 'L':
+ case 'I1':
+ case 'I2':
+ return 'SMALLINT';
+ case 'I':
+ case 'I4':
+ return 'INTEGER';
+ case 'I8':
+ return 'BIGINT';
+
+ case 'F':
+ return 'DOUBLE PRECISION';
+ case 'N':
+ return 'DECIMAL';
+ default:
+ return $meta;
}
}
- function NameQuote($name = NULL,$allowBrackets=false)
+ function nameQuote($name = null, $allowBrackets = false)
{
if (!is_string($name)) {
- return FALSE;
+ return false;
}
$name = trim($name);
- if ( !is_object($this->connection) ) {
+ if (!is_object($this->connection)) {
return $name;
}
$quote = $this->connection->nameQuote;
// if name is of the form `name`, quote it
- if ( preg_match('/^`(.+)`$/', $name, $matches) ) {
+ if (preg_match('/^`(.+)`$/', $name, $matches)) {
return $quote . $matches[1] . $quote;
}
// if name contains special characters, quote it
- if ( !preg_match('/^[' . $this->nameRegex . ']+$/', $name) ) {
+ if (!preg_match('/^[' . $this->nameRegex . ']+$/', $name)) {
return $quote . $name . $quote;
}
return $quote . $name . $quote;
}
- function CreateDatabase($dbname, $options=false)
+ function createDatabase($dbname, $options = false)
{
- $options = $this->_Options($options);
$sql = array();
$sql[] = "DECLARE EXTERNAL FUNCTION LOWER CSTRING(80) RETURNS CSTRING(80) FREE_IT ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf'";
@@ -102,50 +125,62 @@ function CreateDatabase($dbname, $options=false)
return $sql;
}
- function _DropAutoIncrement($t)
+ function _dropAutoIncrement($tabname)
{
- if (strpos($t,'.') !== false) {
- $tarr = explode('.',$t);
- return 'DROP GENERATOR '.$tarr[0].'."s_'.$tarr[1].'"';
+ if (strpos($tabname, '.') !== false) {
+ $tarr = explode('.', $tabname);
+ return 'DROP SEQUENCE ' . $tarr[0] . '."s_' . $tarr[1] . '"';
}
- return 'DROP GENERATOR s_'.$t;
+ return 'DROP SEQUENCE s_' . $tabname;
}
- function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
+ function _createSuffix($fname, &$ftype, $fnotnull, $fdefault, $fautoinc, $fconstraint, $funsigned)
{
$suffix = '';
- if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
- if ($fnotnull) $suffix .= ' NOT NULL';
- if ($fautoinc) $this->seqField = $fname;
+ if (strlen($fdefault)) {
+ $suffix .= " DEFAULT $fdefault";
+ }
+ if ($fnotnull) {
+ $suffix .= ' NOT NULL';
+ }
+ if ($fautoinc) {
+ $this->seqField = $fname;
+ }
$fconstraint = preg_replace("/``/", "\"", $fconstraint);
- if ($fconstraint) $suffix .= ' '.$fconstraint;
+ if ($fconstraint) {
+ $suffix .= ' ' . $fconstraint;
+ }
return $suffix;
}
/**
- Generate the SQL to create table. Returns an array of sql strings.
- */
- function CreateTableSQL($tabname, $flds, $tableoptions=array())
+ * Generate the SQL to create table. Returns an array of sql strings.
+ */
+ function createTableSQL($tabname, $flds, $tableoptions = array())
{
- list($lines,$pkey,$idxs) = $this->_GenFields($flds, true);
+ list($lines, $pkey, $idxs) = $this->_GenFields($flds, true);
// genfields can return FALSE at times
- if ($lines == null) $lines = array();
+ if ($lines == null) {
+ $lines = array();
+ }
$taboptions = $this->_Options($tableoptions);
- $tabname = $this->TableName ($tabname);
- $sql = $this->_TableSQL($tabname,$lines,$pkey,$taboptions);
+ $tabname = $this->TableName($tabname);
+ $sql = $this->_TableSQL($tabname, $lines, $pkey, $taboptions);
- if ($this->autoIncrement && !isset($taboptions['DROP']))
- { $tsql = $this->_Triggers($tabname,$taboptions);
- foreach($tsql as $s) $sql[] = $s;
+ if ($this->autoIncrement && !isset($taboptions['DROP'])) {
+ $tsql = $this->_Triggers($tabname, $taboptions);
+ foreach ($tsql as $s) {
+ $sql[] = $s;
+ }
}
if (is_array($idxs)) {
- foreach($idxs as $idx => $idxdef) {
- $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']);
+ foreach ($idxs as $idx => $idxdef) {
+ $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']);
$sql = array_merge($sql, $sql_idxs);
}
}
@@ -154,44 +189,47 @@ function CreateTableSQL($tabname, $flds, $tableoptions=array())
}
-/*
-CREATE or replace TRIGGER jaddress_insert
-before insert on jaddress
-for each row
-begin
-IF ( NEW."seqField" IS NULL OR NEW."seqField" = 0 ) THEN
- NEW."seqField" = GEN_ID("GEN_tabname", 1);
-end;
-*/
- function _Triggers($tabname,$tableoptions)
+ /*
+ CREATE or replace TRIGGER jaddress_insert
+ before insert on jaddress
+ for each row
+ begin
+ IF ( NEW."seqField" IS NULL OR NEW."seqField" = 0 ) THEN
+ NEW."seqField" = GEN_ID("GEN_tabname", 1);
+ end;
+ */
+ function _triggers($tabname, $taboptions)
{
- if (!$this->seqField) return array();
+ if (!$this->seqField) {
+ return array();
+ }
- $tab1 = preg_replace( '/"/', '', $tabname );
+ $tab1 = preg_replace('/"/', '', $tabname);
if ($this->schema) {
- $t = strpos($tab1,'.');
- if ($t !== false) $tab = substr($tab1,$t+1);
- else $tab = $tab1;
+ $t = strpos($tab1, '.');
+ if ($t !== false) {
+ $tab = substr($tab1, $t + 1);
+ } else {
+ $tab = $tab1;
+ }
$seqField = $this->seqField;
- $seqname = $this->schema.'.'.$this->seqPrefix.$tab;
- $trigname = $this->schema.'.t_'.$this->seqPrefix.$tab;
+ $seqname = $this->schema . '.' . $this->seqPrefix . $tab;
+ $trigname = $this->schema . '.t_' . $this->seqPrefix . $tab;
} else {
$seqField = $this->seqField;
- $seqname = $this->seqPrefix.$tab1;
- $trigname = 't_'.$seqname;
+ $seqname = $this->seqPrefix . $tab1;
+ $trigname = 't_' . $seqname;
}
- if (isset($tableoptions['DROP']))
- { $sql[] = "DROP GENERATOR $seqname";
- }
- elseif (isset($tableoptions['REPLACE']))
- { $sql[] = "DROP GENERATOR \"$seqname\"";
- $sql[] = "CREATE GENERATOR \"$seqname\"";
- $sql[] = "ALTER TRIGGER \"$trigname\" BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END";
- }
- else
- { $sql[] = "CREATE GENERATOR $seqname";
- $sql[] = "CREATE TRIGGER $trigname FOR $tabname BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID($seqname, 1); END";
+ if (isset($taboptions['DROP'])) {
+ $sql[] = "DROP SEQUENCE $seqname";
+ } elseif (isset($taboptions['REPLACE'])) {
+ $sql[] = "DROP SEQUENCE \"$seqname\"";
+ $sql[] = "CREATE SEQUENCE \"$seqname\"";
+ $sql[] = "ALTER TRIGGER \"$trigname\" BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END";
+ } else {
+ $sql[] = "CREATE SEQUENCE $seqname";
+ $sql[] = "CREATE TRIGGER $trigname FOR $tabname BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID($seqname, 1); END";
}
$this->seqField = false;
@@ -201,27 +239,39 @@ function _Triggers($tabname,$tableoptions)
/**
* Change the definition of one column
*
- * As some DBM's can't do that on there own, you need to supply the complete definition of the new table,
- * to allow, recreating the table and copying the content over to the new table
* @param string $tabname table-name
* @param string $flds column-name and type for the changed column
- * @param string $tableflds='' complete definition of the new table, eg. for postgres, default ''
- * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default ''
+ * @param string $tableflds Unused
+ * @param array|string $tableoptions Unused
+ *
* @return array with SQL strings
*/
- function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
+ public function alterColumnSQL($tabname, $flds, $tableflds = '', $tableoptions = '')
{
- $tabname = $this->TableName ($tabname);
+ $tabname = $this->TableName($tabname);
$sql = array();
- list($lines,$pkey,$idxs) = $this->_GenFields($flds);
+ list($lines, , $idxs) = $this->_GenFields($flds);
// genfields can return FALSE at times
- if ($lines == null) $lines = array();
+
+ if ($lines == null) {
+ $lines = array();
+ }
+
$alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' ';
- foreach($lines as $v) {
+
+ foreach ($lines as $v) {
+ /*
+ * The type must be preceded by the keyword 'TYPE'
+ */
+ $vExplode = explode(' ', $v);
+ $vExplode = array_filter($vExplode);
+ array_splice($vExplode, 1, 0, array('TYPE'));
+ $v = implode(' ', $vExplode);
$sql[] = $alter . $v;
}
+
if (is_array($idxs)) {
- foreach($idxs as $idx => $idxdef) {
+ foreach ($idxs as $idx => $idxdef) {
$sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']);
$sql = array_merge($sql, $sql_idxs);
}
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-generic.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-generic.inc.php
index c9c8dee87..1a60dbc24 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-generic.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-generic.inc.php
@@ -28,8 +28,19 @@ class ADODB2_generic extends ADODB_DataDict {
var $seqField = false;
+
function ActualType($meta)
{
+
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch($meta) {
case 'C': return 'VARCHAR';
case 'XL':
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-ibase.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-ibase.inc.php
index 5f58880ff..4310ded4b 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-ibase.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-ibase.inc.php
@@ -30,6 +30,15 @@ class ADODB2_ibase extends ADODB_DataDict {
function ActualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch($meta) {
case 'C': return 'VARCHAR';
case 'XL':
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-informix.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-informix.inc.php
index acb5ba74c..9e151633f 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-informix.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-informix.inc.php
@@ -30,6 +30,15 @@ class ADODB2_informix extends ADODB_DataDict {
function ActualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch($meta) {
case 'C': return 'VARCHAR';// 255
case 'XL':
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-mssql.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-mssql.inc.php
index 1bcb27da1..17df9e396 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-mssql.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-mssql.inc.php
@@ -68,9 +68,14 @@ function MetaType($t,$len=-1,$fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
$len = -1; // mysql max_length is not accurate
- switch (strtoupper($t)) {
+ switch ($t) {
case 'R':
case 'INT':
case 'INTEGER': return 'I';
@@ -87,6 +92,16 @@ function MetaType($t,$len=-1,$fieldobj=false)
function ActualType($meta)
{
+
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch(strtoupper($meta)) {
case 'C': return 'VARCHAR';
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-mssqlnative.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-mssqlnative.inc.php
index b53dcd97b..59228cbe3 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-mssqlnative.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-mssqlnative.inc.php
@@ -71,7 +71,13 @@ function MetaType($t,$len=-1,$fieldobj=false)
$fieldobj = $t;
$t = $fieldobj->type;
}
-
+
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
$_typeConversion = array(
-155 => 'D',
93 => 'D',
@@ -115,7 +121,15 @@ function MetaType($t,$len=-1,$fieldobj=false)
function ActualType($meta)
{
$DATE_TYPE = 'DATETIME';
-
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch(strtoupper($meta)) {
case 'C': return 'VARCHAR';
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-mysql.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-mysql.inc.php
index a1ee950a6..9efbba1f3 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-mysql.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-mysql.inc.php
@@ -33,7 +33,7 @@ class ADODB2_mysql extends ADODB_DataDict {
public $blobAllowsNotNull = true;
- function MetaType($t,$len=-1,$fieldobj=false)
+ function metaType($t,$len=-1,$fieldobj=false)
{
if (is_object($t)) {
@@ -44,7 +44,14 @@ function MetaType($t,$len=-1,$fieldobj=false)
$is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->auto_increment;
$len = -1; // mysql max_length is not accurate
- switch (strtoupper($t)) {
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
+ switch ($t) {
+
case 'STRING':
case 'CHAR':
case 'VARCHAR':
@@ -84,13 +91,27 @@ function MetaType($t,$len=-1,$fieldobj=false)
case 'SMALLINT': return $is_serial ? 'R' : 'I2';
case 'MEDIUMINT': return $is_serial ? 'R' : 'I4';
case 'BIGINT': return $is_serial ? 'R' : 'I8';
- default: return ADODB_DEFAULT_METATYPE;
+ default:
+
+ return ADODB_DEFAULT_METATYPE;
}
}
function ActualType($meta)
{
- switch(strtoupper($meta)) {
+
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
+ switch($meta)
+ {
+
case 'C': return 'VARCHAR';
case 'XL':return 'LONGTEXT';
case 'X': return 'TEXT';
@@ -114,7 +135,9 @@ function ActualType($meta)
case 'F': return 'DOUBLE';
case 'N': return 'NUMERIC';
+
default:
+
return $meta;
}
}
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-oci8.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-oci8.inc.php
index 9a239095c..6d2cd244f 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-oci8.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-oci8.inc.php
@@ -50,7 +50,13 @@ function metaType($t, $len=-1, $fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
- switch (strtoupper($t)) {
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
+ switch ($t) {
case 'VARCHAR':
case 'VARCHAR2':
case 'CHAR':
@@ -92,6 +98,15 @@ function metaType($t, $len=-1, $fieldobj=false)
function ActualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch($meta) {
case 'C': return 'VARCHAR';
case 'X': return $this->typeX;
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-postgres.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-postgres.inc.php
index 17627c44c..d403cee30 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-postgres.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-postgres.inc.php
@@ -34,7 +34,7 @@ class ADODB2_postgres extends ADODB_DataDict
public $blobAllowsDefaultValue = true;
public $blobAllowsNotNull = true;
-
+
function metaType($t, $len=-1, $fieldobj=false)
{
if (is_object($t)) {
@@ -42,16 +42,23 @@ function metaType($t, $len=-1, $fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
$is_serial = is_object($fieldobj) && !empty($fieldobj->primary_key) && !empty($fieldobj->unique) &&
!empty($fieldobj->has_default) && substr($fieldobj->default_value,0,8) == 'nextval(';
- switch (strtoupper($t)) {
+ switch ($t) {
+
case 'INTERVAL':
case 'CHAR':
case 'CHARACTER':
case 'VARCHAR':
case 'NAME':
- case 'BPCHAR':
+ case 'BPCHAR':
if ($len <= $this->blobSize) return 'C';
case 'TEXT':
@@ -94,13 +101,22 @@ function metaType($t, $len=-1, $fieldobj=false)
case 'REAL':
return 'F';
- default:
- return ADODB_DEFAULT_METATYPE;
+ default:
+ return ADODB_DEFAULT_METATYPE;
}
}
- function actualType($meta)
+ function actualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch ($meta) {
case 'C': return 'VARCHAR';
case 'XL':
@@ -152,7 +168,7 @@ function addColumnSQL($tabname, $flds)
if (preg_match('/^([^ ]+) .*DEFAULT (\'[^\']+\'|\"[^\"]+\"|[^ ]+)/',$v,$matches)) {
list(,$colname,$default) = $matches;
$sql[] = $alter . str_replace('DEFAULT '.$default,'',$v);
- $sql[] = 'UPDATE '.$tabname.' SET '.$colname.'='.$default;
+ $sql[] = 'UPDATE '.$tabname.' SET '.$colname.'='.$default.' WHERE '.$colname.' IS NULL ';
$sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT ' . $default;
} else {
$sql[] = $alter . $v;
@@ -168,18 +184,21 @@ function addColumnSQL($tabname, $flds)
function dropIndexSQL($idxname, $tabname = NULL)
{
- return array(sprintf($this->dropIndex, $this->tableName($idxname), $this->tableName($tabname)));
+ return array(sprintf($this->dropIndex, $this->tableName($idxname), $this->tableName($tabname)));
}
/**
* Change the definition of one column
*
- * Postgres can't do that on it's own, you need to supply the complete definition of the new table,
- * to allow, recreating the table and copying the content over to the new table
- * @param string $tabname table-name
- * @param string $flds column-name and type for the changed column
- * @param string $tableflds complete definition of the new table, eg. for postgres, default ''
- * @param array/ $tableoptions options for the new table see CreateTableSQL, default ''
+ * Postgres can't do that on its own, you need to supply the complete
+ * definition of the new table, to allow recreating the table and copying
+ * the content over to the new table.
+ *
+ * @param string $tabname table-name
+ * @param string $flds column-name and type for the changed column
+ * @param string $tableflds complete definition of the new table, e.g. for postgres, default ''
+ * @param array $tableoptions options for the new table {@see CreateTableSQL()}, default ''
+ *
* @return array with SQL strings
*/
function alterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
@@ -197,9 +216,9 @@ function alterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
if ($not_null = preg_match('/NOT NULL/i',$v)) {
$v = preg_replace('/NOT NULL/i','',$v);
}
- // this next block doesn't work - there is no way that I can see to
- // explicitly ask a column to be null using $flds
- else if ($set_null = preg_match('/NULL/i',$v)) {
+ // this next block doesn't work - there is no way that I can see to
+ // explicitly ask a column to be null using $flds
+ elseif ($set_null = preg_match('/NULL/i',$v)) {
// if they didn't specify not null, see if they explicitly asked for null
// Lookbehind pattern covers the case 'fieldname NULL datatype DEFAULT NULL'
// only the first NULL should be removed, not the one specifying
@@ -278,7 +297,7 @@ function alterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
* @param string $tabname table-name
* @param string $flds column-name and type for the changed column
* @param string $tableflds complete definition of the new table, eg. for postgres, default ''
- * @param array/ $tableoptions options for the new table see CreateTableSQL, default ''
+ * @param array $tableoptions options for the new table {@see CreateTableSQL}, default []
* @return array with SQL strings
*/
function dropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
@@ -305,7 +324,7 @@ function dropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
* @param string $tabname table-name
* @param string $dropflds column-names to drop
* @param string $tableflds complete definition of the new table, eg. for postgres
- * @param array/string $tableoptions options for the new table see CreateTableSQL, default ''
+ * @param array|string $tableoptions options for the new table see CreateTableSQL, default ''
* @return array with SQL strings
*/
function _recreate_copy_table($tabname, $dropflds, $tableflds, $tableoptions='')
@@ -477,11 +496,11 @@ function _indexSQL($idxname, $tabname, $flds, $idxoptions)
if (isset($idxoptions['HASH'])) {
$s .= 'USING HASH ';
}
-
+
if (isset($idxoptions[$this->upperName])) {
$s .= $idxoptions[$this->upperName];
}
-
+
if (is_array($flds)) {
$flds = implode(', ', $flds);
}
@@ -514,7 +533,7 @@ function _getSize($ftype, $ty, $fsize, $fprec, $options=false)
}
return $ftype;
}
-
+
function changeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=false)
{
global $ADODB_FETCH_MODE;
@@ -524,18 +543,18 @@ function changeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=f
if ($this->connection->fetchMode !== false) {
$savem = $this->connection->setFetchMode(false);
}
-
+
// check table exists
$save_handler = $this->connection->raiseErrorFn;
$this->connection->raiseErrorFn = '';
$cols = $this->metaColumns($tablename);
$this->connection->raiseErrorFn = $save_handler;
-
+
if (isset($savem)) {
$this->connection->setFetchMode($savem);
}
$ADODB_FETCH_MODE = $save;
-
+
$sqlResult=array();
if ( empty($cols)) {
$sqlResult=$this->createTableSQL($tablename, $flds, $tableoptions);
@@ -543,7 +562,7 @@ function changeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=f
$sqlResultAdd = $this->addColumnSQL($tablename, $flds);
$sqlResultAlter = $this->alterColumnSQL($tablename, $flds, '', $tableoptions);
$sqlResult = array_merge((array)$sqlResultAdd, (array)$sqlResultAlter);
-
+
if ($dropOldFlds) {
// already exists, alter table instead
list($lines,$pkey,$idxs) = $this->_genFields($flds);
@@ -558,7 +577,7 @@ function changeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=f
}
}
}
-
+
}
return $sqlResult;
}
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-sapdb.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-sapdb.inc.php
index 20c16aa6c..c469800f2 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-sapdb.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-sapdb.inc.php
@@ -30,6 +30,15 @@ class ADODB2_sapdb extends ADODB_DataDict {
function ActualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch($meta) {
case 'C': return 'VARCHAR';
case 'XL':
@@ -65,6 +74,12 @@ function MetaType($t,$len=-1,$fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
static $maxdb_type2adodb = array(
'VARCHAR' => 'C',
'CHARACTER' => 'C',
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-sqlite.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-sqlite.inc.php
index 942927f8a..d565f8877 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-sqlite.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-sqlite.inc.php
@@ -35,6 +35,16 @@ class ADODB2_sqlite extends ADODB_DataDict {
function ActualType($meta)
{
+
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch(strtoupper($meta)) {
case 'C': return 'VARCHAR'; // TEXT , TEXT affinity
case 'XL':return 'LONGTEXT'; // TEXT , TEXT affinity
diff --git a/app/vendor/adodb/adodb-php/datadict/datadict-sybase.inc.php b/app/vendor/adodb/adodb-php/datadict/datadict-sybase.inc.php
index e565f8e21..d6573dfa3 100644
--- a/app/vendor/adodb/adodb-php/datadict/datadict-sybase.inc.php
+++ b/app/vendor/adodb/adodb-php/datadict/datadict-sybase.inc.php
@@ -35,8 +35,15 @@ function MetaType($t,$len=-1,$fieldobj=false)
$len = $fieldobj->max_length;
}
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
$len = -1; // mysql max_length is not accurate
- switch (strtoupper($t)) {
+
+ switch ($t) {
+
case 'INT':
case 'INTEGER': return 'I';
@@ -53,6 +60,15 @@ function MetaType($t,$len=-1,$fieldobj=false)
function ActualType($meta)
{
+ $meta = strtoupper($meta);
+
+ /*
+ * Add support for custom meta types. We do this
+ * first, that allows us to override existing types
+ */
+ if (isset($this->connection->customMetaTypes[$meta]))
+ return $this->connection->customMetaTypes[$meta]['actual'];
+
switch(strtoupper($meta)) {
case 'C': return 'VARCHAR';
case 'XL':
diff --git a/app/vendor/adodb/adodb-php/docs/changelog.md b/app/vendor/adodb/adodb-php/docs/changelog.md
index 17664a955..ec8375756 100644
--- a/app/vendor/adodb/adodb-php/docs/changelog.md
+++ b/app/vendor/adodb/adodb-php/docs/changelog.md
@@ -14,6 +14,142 @@ Older changelogs:
--------------------------------------------------------------------------------
+## [5.22.1] - 2022-03-30
+
+### Removed
+
+- Legacy mysql, mysqlpo and mysqlt drivers
+ [#804](https://github.com/ADOdb/ADOdb/issues/804)
+
+### Fixed
+
+- firebird: undefined offset PHP notice in _fetchField()
+ [#808](https://github.com/ADOdb/ADOdb/issues/808)
+- firebird: PHP deprecation warning in _blobDecode()
+ [#811](https://github.com/ADOdb/ADOdb/issues/811)
+- firebird: PHP notice when executing query with empty array
+ [#812](https://github.com/ADOdb/ADOdb/issues/812)
+- firebird: undefined array key with uppercase columns
+ [#813](https://github.com/ADOdb/ADOdb/issues/813)
+- mysqli: regression on setConnectionParameter()
+ [#803](https://github.com/ADOdb/ADOdb/issues/803)
+- mysqli: regression on bulk binding
+ [#806](https://github.com/ADOdb/ADOdb/issues/806)
+- mysqli: Affected_Rows() not returning correct value
+ [#820](https://github.com/ADOdb/ADOdb/issues/820)
+- oci8: fix PHP 8.1 array deprecation warning
+ [#817](https://github.com/ADOdb/ADOdb/issues/817)
+- memcache: weighted servers not connecting
+ [#807](https://github.com/ADOdb/ADOdb/issues/807)
+- memcache: $memCacheCompress option ignored by memcached
+ [#823](https://github.com/ADOdb/ADOdb/issues/823)
+- memcache: use default port in server controller template
+ [#824](https://github.com/ADOdb/ADOdb/issues/824)
+- xml PHP Notice in dbData::create()
+ [#822](https://github.com/ADOdb/ADOdb/issues/822)
+
+
+## [5.22.0] - 2022-02-08
+
+### Added
+
+- Support for custom MetaTypes, e.g. JSON or GEOMETRY
+ [#602](https://github.com/ADOdb/ADOdb/issues/602)
+ [#626](https://github.com/ADOdb/ADOdb/issues/626)
+ [#649](https://github.com/ADOdb/ADOdb/issues/649)
+- Use of weighted server groups with Memcached
+ [#676](https://github.com/ADOdb/ADOdb/issues/676)
+- mssql: implement offsetDate() method
+ [#698](https://github.com/ADOdb/ADOdb/issues/698)
+- oci8: new ADOConnection::releaseStatement() method
+ [#770](https://github.com/ADOdb/ADOdb/issues/770)
+- sqlite3 performance monitor stub
+ [#661](https://github.com/ADOdb/ADOdb/issues/661)
+- sqlite: support blob handling
+ [#702](https://github.com/ADOdb/ADOdb/issues/702)
+
+### Changed
+
+- firebird: complete overhaul to support latest PHP drivers
+ [#710](https://github.com/ADOdb/ADOdb/issues/710)
+- mssql: Refactor _fetchField() method
+ [#725](https://github.com/ADOdb/ADOdb/issues/725)
+- mysql: Support bound variable statements
+ [#655](https://github.com/ADOdb/ADOdb/issues/655)
+- pgsql: missing standard datatypes
+ [#782](https://github.com/ADOdb/ADOdb/issues/782)
+- xml: add field comments
+ [#732](https://github.com/ADOdb/ADOdb/issues/732)
+- loadbalancer: support calling a function upon connection
+ [#784](https://github.com/ADOdb/ADOdb/issues/784)
+- Code cleanup: PHPDoc, code style, whitespace, PHPStan errors, etc.
+ [#774](https://github.com/ADOdb/ADOdb/issues/774)
+
+### Deprecated
+
+- Compatibility with PHP < 7.2
+ [#797](https://github.com/ADOdb/ADOdb/issues/797)
+- Database Replication add-on
+ [#780](https://github.com/ADOdb/ADOdb/issues/780)
+
+### Removed
+
+- Compatibility with PHP 5.x
+ [#797](https://github.com/ADOdb/ADOdb/issues/797)
+- Transpose() function and assorted sub-functions
+ [#586](https://github.com/ADOdb/ADOdb/issues/586)
+- "proxy" server and client scripts
+ [#680](https://github.com/ADOdb/ADOdb/issues/680)
+
+### Fixed
+
+- metaIndexes does not return primary key correctly
+ [#656](https://github.com/ADOdb/ADOdb/issues/656)
+- Uniformize ADOrecordSet::__construct() parameters
+ [#772](https://github.com/ADOdb/ADOdb/issues/772)
+- Prevent PHP warning when throwing exception with P1 or P2 parameter as array
+ [#783](https://github.com/ADOdb/ADOdb/issues/783)
+- $dsnType property not defined before use
+ [#789](https://github.com/ADOdb/ADOdb/issues/789)
+- mysql: Update socket and client flags for ssl
+ [#622](https://github.com/ADOdb/ADOdb/issues/622)
+- mysql: Handle tables that are reserved words
+- [#759](https://github.com/ADOdb/ADOdb/issues/759)
+- pgsql: prevent AddColumnSQL() from updating existing values when default is changed
+ [#635](https://github.com/ADOdb/ADOdb/issues/635)
+- pgsql: Refactored _fixblobs() and replaced it with new _prepFields() method
+ [#767](https://github.com/ADOdb/ADOdb/issues/767)
+- pgsql: Incorrect pg_execute() api calls
+ [#768](https://github.com/ADOdb/ADOdb/issues/768)
+- pgsql: blobDelete() could silently fail with multiple connections
+ [#769](https://github.com/ADOdb/ADOdb/issues/769)
+- pdo: ensure bound statements are correctly formatted
+ [#695](https://github.com/ADOdb/ADOdb/issues/695)
+- perf: fix invalid SQL
+ [#753](https://github.com/ADOdb/ADOdb/issues/753)
+- sqlite: driver returns incorrect time when using $sysTimeStamp
+ [#697](https://github.com/ADOdb/ADOdb/issues/697)
+- sqlite: undeclared connection property
+ [#713](https://github.com/ADOdb/ADOdb/issues/713)
+- xml: Undefined array key error
+ [#775](https://github.com/ADOdb/ADOdb/issues/775)
+- memcache: library does not initialize correctly
+ [#788](https://github.com/ADOdb/ADOdb/issues/788)
+
+
+## [5.21.4] and [5.20.21] - 2022-01-22
+
+### Fixed
+
+- Methods return E_DEPRECATED with PHP8.1
+ [#771](https://github.com/ADOdb/ADOdb/issues/771)
+
+### Security
+
+- pgsql: authentication bypass in connect functions (CVE-2021-3850)
+ [#793](https://github.com/ADOdb/ADOdb/issues/793)
+
+
## [5.21.3] - 2021-10-31
### Fixed
@@ -58,6 +194,8 @@ Older changelogs:
[#715](https://github.com/ADOdb/ADOdb/issues/715)
- Incorrect handling of $ADODB_QUOTE_FIELDNAMES = true
[#721](https://github.com/ADOdb/ADOdb/issues/721)
+- array to string conversion in adodb_debug_execute()
+ [#737](https://github.com/ADOdb/ADOdb/issues/737)
- db2: fix columns always returned in lowercase
[#719](https://github.com/ADOdb/ADOdb/issues/719)
- PDO: Bind parameters fail if sent in associative array
@@ -1129,8 +1267,10 @@ Released together with [v4.95](changelog_v4.x.md#495---17-may-2007)
- Adodb5 version,more error checking code now will use exceptions if available.
-[Unreleased]: https://github.com/adodb/adodb/compare/v5.21.3...master
+[5.22.1]: https://github.com/adodb/adodb/compare/v5.22.0...v5.22.1
+[5.22.0]: https://github.com/adodb/adodb/compare/v5.21.4...v5.22.0
+[5.21.4]: https://github.com/adodb/adodb/compare/v5.21.3...v5.21.4
[5.21.3]: https://github.com/adodb/adodb/compare/v5.21.2...v5.21.3
[5.21.2]: https://github.com/adodb/adodb/compare/v5.21.1...v5.21.2
[5.21.1]: https://github.com/adodb/adodb/compare/v5.21.0...v5.21.1
@@ -1138,6 +1278,7 @@ Released together with [v4.95](changelog_v4.x.md#495---17-may-2007)
[5.21.0-rc.1]: https://github.com/adodb/adodb/compare/v5.21.0-beta.1...v5.21.0-rc.1
[5.21.0-beta.1]: https://github.com/adodb/adodb/compare/v5.20.20...v5.21.0-beta.1
+[5.20.21]: https://github.com/adodb/adodb/compare/v5.20.20...v5.20.21
[5.20.20]: https://github.com/adodb/adodb/compare/v5.20.19...v5.20.20
[5.20.19]: https://github.com/adodb/adodb/compare/v5.20.18...v5.20.19
[5.20.18]: https://github.com/adodb/adodb/compare/v5.20.17...v5.20.18
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-ado.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-ado.inc.php
index 67a032d72..fc000cecb 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-ado.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-ado.inc.php
@@ -504,6 +504,9 @@ function MetaType($t,$len=-1,$fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
if (!is_numeric($t)) return $t;
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-ado5.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-ado5.inc.php
index f673d0929..36f9c3b8d 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-ado5.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-ado5.inc.php
@@ -545,8 +545,14 @@ function MetaType($t,$len=-1,$fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
-
- if (!is_numeric($t)) return $t;
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
+ if (!is_numeric($t))
+ return $t;
switch ($t) {
case 0:
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-db2.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-db2.inc.php
index 8f616fa6f..16c4054f1 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-db2.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-db2.inc.php
@@ -113,8 +113,7 @@ public function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename)
private function doDB2Connect($argDSN, $argUsername, $argPassword, $argDatabasename, $persistent=false)
{
- global $php_errormsg;
-
+
if (!function_exists('db2_connect')) {
ADOConnection::outp("DB2 extension not installed.");
return null;
@@ -185,8 +184,7 @@ private function doDB2Connect($argDSN, $argUsername, $argPassword, $argDatabasen
null,
$db2Options);
- $php_errormsg = '';
-
+
$this->_errorMsg = @db2_conn_errormsg();
if ($this->_connectionID && $this->connectStmt)
@@ -209,8 +207,7 @@ private function doDB2Connect($argDSN, $argUsername, $argPassword, $argDatabasen
private function unpackParameters($argDSN, $argUsername, $argPassword, $argDatabasename)
{
- global $php_errormsg;
-
+
$connectionParameters = array('dsn'=>'',
'uid'=>'',
'pwd'=>'',
@@ -260,7 +257,7 @@ private function unpackParameters($argDSN, $argUsername, $argPassword, $argDatab
$errorMessage = 'Supply uncatalogued connection parameters ';
$errorMessage.= 'in either the database or DSN arguments, ';
$errorMessage.= 'but not both';
- $php_errormsg = $errorMessage;
+
if ($this->debug)
ADOConnection::outp($errorMessage);
return null;
@@ -285,7 +282,7 @@ private function unpackParameters($argDSN, $argUsername, $argPassword, $argDatab
{
$errorMessage = 'For uncatalogued connections, provide ';
$errorMessage.= 'both UID and PWD in the connection string';
- $php_errormsg = $errorMessage;
+
if ($this->debug)
ADOConnection::outp($errorMessage);
return null;
@@ -320,7 +317,7 @@ private function unpackParameters($argDSN, $argUsername, $argPassword, $argDatab
{
$errorMessage = 'Uncatalogued connection parameters ';
$errorMessage.= 'must contain a database= argument';
- $php_errormsg = $errorMessage;
+
if ($this->debug)
ADOConnection::outp($errorMessage);
return null;
@@ -684,16 +681,17 @@ public function metaPrimaryKeys($table,$owner=false)
}
/**
- * returns assoc array where keys are tables, and values are foreign keys
+ * Returns a list of Foreign Keys associated with a specific table.
*
- * @param string $table
- * @param string $owner [optional][discarded]
- * @param bool $upper [optional][discarded]
- * @param bool $associative[optional][discarded]
+ * @param string $table
+ * @param string $owner discarded
+ * @param bool $upper discarded
+ * @param bool $associative discarded
*
- * @return mixed[] Array of foreign key information
+ * @return string[]|false An array where keys are tables, and values are foreign keys;
+ * false if no foreign keys could be found.
*/
- public function metaForeignKeys($table, $owner = FALSE, $upper = FALSE, $asociative = FALSE )
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
global $ADODB_FETCH_MODE;
@@ -1583,10 +1581,6 @@ function prepare($sql)
function _query(&$sql,$inputarr=false)
{
- GLOBAL $php_errormsg;
-
- if (isset($php_errormsg))
- $php_errormsg = '';
$this->_error = '';
$db2Options = array();
@@ -1622,7 +1616,12 @@ function _query(&$sql,$inputarr=false)
if ($stmtid == false)
{
- $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+ $this->_errorMsg = @db2_stmt_errormsg();
+ $this->_errorCode = @db2_stmt_error();
+
+ if ($this->debug)
+ ADOConnection::outp($this->_errorMsg);
+
return false;
}
}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-fbsql.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-fbsql.inc.php
index 0fb895a1d..a4255eb97 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-fbsql.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-fbsql.inc.php
@@ -232,8 +232,15 @@ function MetaType($t,$len=-1,$fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
$len = -1; // fbsql max_length is not accurate
- switch (strtoupper($t)) {
+
+ switch ($t) {
case 'CHARACTER':
case 'CHARACTER VARYING':
case 'BLOB':
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-firebird.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-firebird.inc.php
index 2fafbe4fc..135b72c64 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-firebird.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-firebird.inc.php
@@ -19,6 +19,10 @@
*
* @copyright 2000-2013 John Lim
* @copyright 2014 Damien Regad, Mark Newnham and the ADOdb community
+ *
+ * Driver was cloned from Interbase, so there's quite a lot of duplicated code
+ * @noinspection DuplicatedCode
+ * @noinspection PhpUnused
*/
// security - hide paths
@@ -35,39 +39,113 @@ class ADODB_firebird extends ADOConnection {
var $fmtTimeStamp = "'Y-m-d, H:i:s'";
var $concat_operator='||';
var $_transactionID;
- var $metaTablesSQL = "select lower(rdb\$relation_name) from rdb\$relations where rdb\$relation_name not like 'RDB\$%'";
+
+ public $metaTablesSQL = "SELECT LOWER(rdb\$relation_name) FROM rdb\$relations";
//OPN STUFF start
+
var $metaColumnsSQL = "select lower(a.rdb\$field_name), a.rdb\$null_flag, a.rdb\$default_source, b.rdb\$field_length, b.rdb\$field_scale, b.rdb\$field_sub_type, b.rdb\$field_precision, b.rdb\$field_type from rdb\$relation_fields a, rdb\$fields b where a.rdb\$field_source = b.rdb\$field_name and a.rdb\$relation_name = '%s' order by a.rdb\$field_position asc";
//OPN STUFF end
- var $ibasetrans;
+
+ public $_genSeqSQL = "CREATE SEQUENCE %s START WITH %s";
+
+ public $_dropSeqSQL = "DROP SEQUENCE %s";
+
var $hasGenID = true;
var $_bindInputArray = true;
- var $buffers = 0;
- var $dialect = 3;
var $sysDate = "cast('TODAY' as timestamp)";
var $sysTimeStamp = "CURRENT_TIMESTAMP"; //"cast('NOW' as timestamp)";
var $ansiOuter = true;
var $hasAffectedRows = true;
var $poorAffectedRows = false;
var $blobEncodeType = 'C';
- var $role = false;
+ /*
+ * firebird custom optionally specifies the user role
+ */
+ public $role = false;
+ /*
+ * firebird custom optionally specifies the connection buffers
+ */
+ public $buffers = 0;
+
+ /*
+ * firebird custom optionally specifies database dialect
+ */
+ public $dialect = 3;
+
var $nameQuote = ''; /// string to use to quote identifiers and names
function __construct()
{
- // Ignore IBASE_DEFAULT we want a more practical transaction!
- // if (defined('IBASE_DEFAULT')) $this->ibasetrans = IBASE_DEFAULT;
- // else
- $this->ibasetrans = IBASE_WAIT | IBASE_REC_VERSION | IBASE_COMMITTED;
+ parent::__construct();
+ $this->setTransactionMode('');
}
+ /**
+ * Sets the isolation level of a transaction.
+ *
+ * The default behavior is a more practical IBASE_WAIT | IBASE_REC_VERSION | IBASE_COMMITTED
+ * instead of IBASE_DEFAULT
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:settransactionmode
+ *
+ * @param string $transaction_mode The transaction mode to set.
+ *
+ * @return void
+ */
+ public function setTransactionMode($transaction_mode)
+ {
+ $this->_transmode = $transaction_mode;
+
+ if (empty($transaction_mode)) {
+ $this->_transmode = IBASE_WAIT | IBASE_REC_VERSION | IBASE_COMMITTED;
+ }
- // returns true or false
- function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$persist=false)
+ }
+
+ /**
+ * Connect to a database.
+ *
+ * @todo add: parameter int $port, parameter string $socket
+ *
+ * @param string|null $argHostname (Optional) The host to connect to.
+ * @param string|null $argUsername (Optional) The username to connect as.
+ * @param string|null $argPassword (Optional) The password to connect with.
+ * @param string|null $argDatabasename (Optional) The name of the database to start in when connected.
+ * @param bool $persist (Optional) Whether or not to use a persistent connection.
+ *
+ * @return bool|null True if connected successfully, false if connection failed, or null if the mysqli extension
+ * isn't currently loaded.
+ */
+ public function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$persist=false)
{
- if (!function_exists('fbird_pconnect')) return null;
- if ($argDatabasename) $argHostname .= ':'.$argDatabasename;
+ if (!function_exists('fbird_pconnect'))
+ return null;
+
+ if ($argDatabasename)
+ $argHostname .= ':'.$argDatabasename;
+
$fn = ($persist) ? 'fbird_pconnect':'fbird_connect';
+
+ /*
+ * Now merge in the standard connection parameters setting
+ */
+ foreach ($this->connectionParameters as $options)
+ {
+ foreach($options as $k=>$v)
+ {
+ switch($k){
+ case 'role':
+ $this->role = $v;
+ break;
+ case 'dialect':
+ $this->dialect = $v;
+ break;
+ case 'buffers':
+ $this->buffers = $v;
+ }
+ }
+ }
+
if ($this->role)
$this->_connectionID = $fn($argHostname,$argUsername,$argPassword,
$this->charSet,$this->buffers,$this->dialect,$this->role);
@@ -75,40 +153,39 @@ function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$pe
$this->_connectionID = $fn($argHostname,$argUsername,$argPassword,
$this->charSet,$this->buffers,$this->dialect);
- if ($this->dialect != 1) { // http://www.ibphoenix.com/ibp_60_del_id_ds.html
- $this->replaceQuote = "''";
+ if ($this->dialect == 1) { // http://www.ibphoenix.com/ibp_60_del_id_ds.html
+ $this->replaceQuote = "";
}
if ($this->_connectionID === false) {
- $this->_handleerror();
+ $this->_handleError();
return false;
}
- // PHP5 change.
- if (function_exists('fbird_timefmt')) {
- fbird_timefmt($this->fbird_datefmt,fbird_DATE );
- if ($this->dialect == 1) {
- fbird_timefmt($this->fbird_datefmt,fbird_TIMESTAMP );
- } else {
- fbird_timefmt($this->fbird_timestampfmt,fbird_TIMESTAMP );
- }
- fbird_timefmt($this->fbird_timefmt,fbird_TIME );
+ ini_set("ibase.timestampformat", $this->fbird_timestampfmt);
+ ini_set("ibase.dateformat", $this->fbird_datefmt);
+ ini_set("ibase.timeformat", $this->fbird_timefmt);
- } else {
- ini_set("ibase.timestampformat", $this->fbird_timestampfmt);
- ini_set("ibase.dateformat", $this->fbird_datefmt);
- ini_set("ibase.timeformat", $this->fbird_timefmt);
- }
return true;
}
- // returns true or false
+ /**
+ * Connect to a database with a persistent connection.
+ *
+ * @param string|null $argHostname The host to connect to.
+ * @param string|null $argUsername The username to connect as.
+ * @param string|null $argPassword The password to connect with.
+ * @param string|null $argDatabasename The name of the database to start in when connected.
+ *
+ * @return bool|null True if connected successfully, false if connection failed, or null if the mysqli extension
+ * isn't currently loaded.
+ */
function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
{
return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,true);
}
- function MetaPrimaryKeys($table,$owner_notused=false,$internalKey=false)
+ public function metaPrimaryKeys($table,$owner_notused=false,$internalKey=false)
{
if ($internalKey) {
return array('RDB$DB_KEY');
@@ -126,31 +203,58 @@ function MetaPrimaryKeys($table,$owner_notused=false,$internalKey=false)
return false;
}
- function ServerInfo()
+ /**
+ * Get information about the current Firebird server.
+ *
+ * @return array
+ */
+ public function serverInfo()
{
$arr['dialect'] = $this->dialect;
switch($arr['dialect']) {
- case '':
- case '1': $s = 'Firebird Dialect 1'; break;
- case '2': $s = 'Firebird Dialect 2'; break;
- default:
- case '3': $s = 'Firebird Dialect 3'; break;
+ case '':
+ case '1':
+ $s = 'Firebird Dialect 1';
+ break;
+ case '2':
+ $s = 'Firebird Dialect 2';
+ break;
+ default:
+ case '3':
+ $s = 'Firebird Dialect 3';
+ break;
}
$arr['version'] = ADOConnection::_findvers($s);
$arr['description'] = $s;
return $arr;
}
- function BeginTrans()
+ /**
+ * Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
+ *
+ * @return bool true if succeeded or false if database does not support transactions
+ */
+ public function beginTrans()
{
if ($this->transOff) return true;
$this->transCnt += 1;
$this->autoCommit = false;
- $this->_transactionID = fbird_trans( $this->ibasetrans, $this->_connectionID );
+ /*
+ * We manage the transaction mode via fbird_trans
+ */
+ $this->_transactionID = fbird_trans( $this->_transmode, $this->_connectionID );
return $this->_transactionID;
}
- function CommitTrans($ok=true)
+
+ /**
+ * Commits a transaction.
+ *
+ * @param bool $ok false to rollback transaction, true to commit
+ *
+ * @return bool
+ */
+ public function commitTrans($ok=true)
{
if (!$ok) {
return $this->RollbackTrans();
@@ -164,7 +268,6 @@ function CommitTrans($ok=true)
$ret = false;
$this->autoCommit = true;
if ($this->_transactionID) {
- //print ' commit ';
$ret = fbird_commit($this->_transactionID);
}
$this->_transactionID = false;
@@ -173,31 +276,26 @@ function CommitTrans($ok=true)
function _affectedrows()
{
- return fbird_affected_rows( $this->_transactionID ? $this->_transactionID : $this->_connectionID );
- }
-
- // there are some compat problems with ADODB_COUNTRECS=false and $this->_logsql currently.
- // it appears that ibase extension cannot support multiple concurrent queryid's
- function _Execute($sql,$inputarr=false) {
- global $ADODB_COUNTRECS;
-
- if ($this->_logsql) {
- $savecrecs = $ADODB_COUNTRECS;
- $ADODB_COUNTRECS = true; // force countrecs
- $ret =& ADOConnection::_Execute($sql,$inputarr);
- $ADODB_COUNTRECS = $savecrecs;
- } else {
- $ret = ADOConnection::_Execute($sql,$inputarr);
- }
- return $ret;
+ return fbird_affected_rows($this->_transactionID ?: $this->_connectionID);
}
- function RollbackTrans()
+ /**
+ * Rollback a smart transaction.
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:rollbacktrans
+ *
+ * @return bool
+ */
+ public function rollbackTrans()
{
- if ($this->transOff) return true;
- if ($this->transCnt) $this->transCnt -= 1;
+ if ($this->transOff)
+ return true;
+ if ($this->transCnt)
+ $this->transCnt -= 1;
+
$ret = false;
$this->autoCommit = true;
+
if ($this->_transactionID) {
$ret = fbird_rollback($this->_transactionID);
}
@@ -206,16 +304,26 @@ function RollbackTrans()
return $ret;
}
- function &MetaIndexes ($table, $primary = FALSE, $owner=false)
+ /**
+ * Get a list of indexes on the specified table.
+ *
+ * @param string $table The name of the table to get indexes for.
+ * @param bool $primary (Optional) Whether or not to include the primary key.
+ * @param bool $owner (Optional) Unused.
+ *
+ * @return array|bool An array of the indexes, or false if the query to get the indexes failed.
+ */
+ public function metaIndexes($table, $primary = false, $owner = false)
{
// save old fetch mode
global $ADODB_FETCH_MODE;
- $false = false;
$save = $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+
if ($this->fetchMode !== FALSE) {
$savem = $this->SetFetchMode(FALSE);
}
+
$table = strtoupper($table);
$sql = "SELECT * FROM RDB\$INDICES WHERE RDB\$RELATION_NAME = '".$table."'";
if (!$primary) {
@@ -224,19 +332,19 @@ function &MetaIndexes ($table, $primary = FALSE, $owner=false)
$sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$FOREIGN%'";
}
// get index details
- $rs = $this->Execute($sql);
+ $rs = $this->execute($sql);
if (!is_object($rs)) {
// restore fetchmode
if (isset($savem)) {
$this->SetFetchMode($savem);
}
$ADODB_FETCH_MODE = $save;
- return $false;
+ return false;
}
-
$indexes = array();
while ($row = $rs->FetchRow()) {
- $index = $row[0];
+
+ $index = trim($row[0]);
if (!isset($indexes[$index])) {
if (is_null($row[3])) {
$row[3] = 0;
@@ -246,12 +354,13 @@ function &MetaIndexes ($table, $primary = FALSE, $owner=false)
'columns' => array()
);
}
- $sql = "SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '".$index."' ORDER BY RDB\$FIELD_POSITION ASC";
- $rs1 = $this->Execute($sql);
+ $sql = sprintf("SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '%s' ORDER BY RDB\$FIELD_POSITION ASC",$index);
+ $rs1 = $this->execute($sql);
while ($row1 = $rs1->FetchRow()) {
- $indexes[$index]['columns'][$row1[2]] = $row1[1];
+ $indexes[$index]['columns'][$row1[2]] = trim($row1[1]);
}
}
+
// restore fetchmode
if (isset($savem)) {
$this->SetFetchMode($savem);
@@ -261,38 +370,60 @@ function &MetaIndexes ($table, $primary = FALSE, $owner=false)
return $indexes;
}
-
- // See http://community.borland.com/article/0,1410,25844,00.html
- function RowLock($tables,$where,$col=false)
+ /**
+ * Lock a table row for a duration of a transaction.
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:rowlock
+ * @link https://firebirdsql.org/refdocs/langrefupd21-notes-withlock.html
+ *
+ * @param string $table The table(s) to lock rows for.
+ * @param string $where (Optional) The WHERE clause to use to determine which rows to lock.
+ * @param string $col (Optional) The columns to select.
+ *
+ * @return bool True if the locking SQL statement executed successfully, otherwise false.
+ */
+ public function rowLock($table,$where,$col=false)
{
- if ($this->autoCommit) {
- $this->BeginTrans();
- }
- $this->Execute("UPDATE $table SET $col=$col WHERE $where "); // is this correct - jlim?
- return 1;
- }
+ if ($this->transCnt==0)
+ $this->beginTrans();
-
- function CreateSequence($seqname = 'adodbseq', $startID = 1)
- {
- $ok = $this->Execute(("CREATE GENERATOR $seqname" ));
- if (!$ok) return false;
- return $this->Execute("SET GENERATOR $seqname TO ".($startID-1));
+ if ($where) $where = ' where '.$where;
+ $rs = $this->execute("SELECT $col FROM $table $where FOR UPDATE WITH LOCK");
+ return !empty($rs);
}
- function DropSequence($seqname = 'adodbseq')
+ /**
+ * Creates a sequence in the database.
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:createsequence
+ *
+ * @param string $seqname The sequence name.
+ * @param int $startID The start id.
+ *
+ * @return ADORecordSet|bool A record set if executed successfully, otherwise false.
+ */
+ public function createSequence($seqname='adodbseq', $startID = 1)
{
- $seqname = strtoupper($seqname);
- return $this->Execute("DROP GENERATOR $seqname");
+ $sql = sprintf($this->_genSeqSQL,$seqname,$startID);
+ return $this->execute($sql);
}
- function GenID($seqname='adodbseq',$startID=1)
+ /**
+ * A portable method of creating sequence numbers.
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:genid
+ *
+ * @param string $seqname (Optional) The name of the sequence to use.
+ * @param int $startID (Optional) The point to start at in the sequence.
+ *
+ * @return int
+ */
+ public function genID($seqname='adodbseq',$startID=1)
{
$getnext = ("SELECT Gen_ID($seqname,1) FROM RDB\$DATABASE");
$rs = @$this->Execute($getnext);
if (!$rs) {
- $this->Execute(("CREATE GENERATOR $seqname" ));
- $this->Execute("SET GENERATOR $seqname TO ".($startID-1).';');
+ $this->Execute("CREATE SEQUENCE $seqname START WITH $startID");
$rs = $this->Execute($getnext);
}
if ($rs && !$rs->EOF) {
@@ -309,39 +440,62 @@ function GenID($seqname='adodbseq',$startID=1)
return $this->genID;
}
- function SelectDB($dbName)
+ function selectDB($dbName)
{
return false;
}
- function _handleerror()
+ function _handleError()
{
- $this->_errorMsg = fbird_errmsg();
+ $this->_errorCode = fbird_errcode();
+ $this->_errorMsg = fbird_errmsg();
}
- function ErrorNo()
+
+ public function errorNo()
{
- if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (integer) $arr[1];
- else return 0;
+ return (integer) $this->_errorCode;
}
- function ErrorMsg()
+ function errorMsg()
{
return $this->_errorMsg;
}
- function Prepare($sql)
+ /**
+ * Prepares an SQL statement and returns a handle to use.
+ * This is not used by bound parameters anymore
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:prepare
+ * @todo update this function to handle prepared statements correctly
+ *
+ * @param string $sql The SQL to prepare.
+ *
+ * @return bool|array The SQL that was provided and the prepared parameters,
+ * or false if the preparation fails
+ */
+ public function prepare($sql)
{
$stmt = fbird_prepare($this->_connectionID,$sql);
- if (!$stmt) return false;
+ if (!$stmt)
+ return false;
return array($sql,$stmt);
}
- // returns query ID if successful, otherwise false
- // there have been reports of problems with nested queries - the code is probably not re-entrant?
- function _query($sql,$iarr=false)
+ /**
+ * Return the query id.
+ *
+ * @param string|array $sql
+ * @param array $iarr
+ *
+ * @return bool|object
+ */
+ function _query($sql, $iarr = false)
{
- if ( !$this->isConnected() ) return false;
+ if (!$this->isConnected()) {
+ return false;
+ }
+
if (!$this->autoCommit && $this->_transactionID) {
$conn = $this->_transactionID;
$docommit = false;
@@ -349,36 +503,25 @@ function _query($sql,$iarr=false)
$conn = $this->_connectionID;
$docommit = true;
}
+
if (is_array($sql)) {
+ // Prepared statement
$fn = 'fbird_execute';
- $sql = $sql[1];
- if (is_array($iarr)) {
- if ( !isset($iarr[0]) )
- $iarr[0] = ''; // PHP5 compat hack
- $fnarr = array_merge( array($sql) , $iarr);
- $ret = call_user_func_array($fn,$fnarr);
- }
- else {
- $ret = $fn($sql);
- }
+ $args = [$sql[1]];
} else {
$fn = 'fbird_query';
- if (is_array($iarr))
- {
- if (sizeof($iarr) == 0)
- $iarr[0] = ''; // PHP5 compat hack
- $fnarr = array_merge( array($conn,$sql) , $iarr);
- $ret = call_user_func_array($fn,$fnarr);
- }
- else {
- $ret = $fn($conn, $sql);
- }
+ $args = [$conn, $sql];
+ }
+ if (is_array($iarr)) {
+ $args = array_merge($args, $iarr);
}
+ $ret = call_user_func_array($fn, $args);
+
if ($docommit && $ret === true) {
fbird_commit($this->_connectionID);
}
- $this->_handleerror();
+ $this->_handleError();
return $ret;
}
@@ -398,122 +541,133 @@ function _ConvertFieldType(&$fld, $ftype, $flen, $fscale, $fsubtype, $fprecision
$fld->max_length = $flen;
$fld->scale = null;
switch($ftype){
- case 7:
- case 8:
- if ($dialect3) {
- switch($fsubtype){
- case 0:
- $fld->type = ($ftype == 7 ? 'smallint' : 'integer');
- break;
- case 1:
- $fld->type = 'numeric';
- $fld->max_length = $fprecision;
- $fld->scale = $fscale;
- break;
- case 2:
- $fld->type = 'decimal';
- $fld->max_length = $fprecision;
- $fld->scale = $fscale;
- break;
- } // switch
- } else {
- if ($fscale !=0) {
+ case 7:
+ case 8:
+ if ($dialect3) {
+ switch($fsubtype){
+ case 0:
+ $fld->type = ($ftype == 7 ? 'smallint' : 'integer');
+ break;
+ case 1:
+ $fld->type = 'numeric';
+ $fld->max_length = $fprecision;
+ $fld->scale = $fscale;
+ break;
+ case 2:
$fld->type = 'decimal';
+ $fld->max_length = $fprecision;
$fld->scale = $fscale;
- $fld->max_length = ($ftype == 7 ? 4 : 9);
- } else {
- $fld->type = ($ftype == 7 ? 'smallint' : 'integer');
- }
- }
- break;
- case 16:
- if ($dialect3) {
- switch($fsubtype){
- case 0:
- $fld->type = 'decimal';
- $fld->max_length = 18;
- $fld->scale = 0;
- break;
- case 1:
- $fld->type = 'numeric';
- $fld->max_length = $fprecision;
- $fld->scale = $fscale;
- break;
- case 2:
- $fld->type = 'decimal';
- $fld->max_length = $fprecision;
- $fld->scale = $fscale;
- break;
- } // switch
- }
- break;
- case 10:
- $fld->type = 'float';
- break;
- case 14:
- $fld->type = 'char';
- break;
- case 27:
+ break;
+ } // switch
+ } else {
if ($fscale !=0) {
$fld->type = 'decimal';
- $fld->max_length = 15;
- $fld->scale = 5;
- } else {
- $fld->type = 'double';
- }
- break;
- case 35:
- if ($dialect3) {
- $fld->type = 'timestamp';
+ $fld->scale = $fscale;
+ $fld->max_length = ($ftype == 7 ? 4 : 9);
} else {
- $fld->type = 'date';
+ $fld->type = ($ftype == 7 ? 'smallint' : 'integer');
}
- break;
- case 12:
+ }
+ break;
+ case 16:
+ if ($dialect3) {
+ switch($fsubtype){
+ case 0:
+ $fld->type = 'decimal';
+ $fld->max_length = 18;
+ $fld->scale = 0;
+ break;
+ case 1:
+ $fld->type = 'numeric';
+ $fld->max_length = $fprecision;
+ $fld->scale = $fscale;
+ break;
+ case 2:
+ $fld->type = 'decimal';
+ $fld->max_length = $fprecision;
+ $fld->scale = $fscale;
+ break;
+ } // switch
+ }
+ break;
+ case 10:
+ $fld->type = 'float';
+ break;
+ case 14:
+ $fld->type = 'char';
+ break;
+ case 27:
+ if ($fscale !=0) {
+ $fld->type = 'decimal';
+ $fld->max_length = 15;
+ $fld->scale = 5;
+ } else {
+ $fld->type = 'double';
+ }
+ break;
+ case 35:
+ if ($dialect3) {
+ $fld->type = 'timestamp';
+ } else {
$fld->type = 'date';
- break;
- case 13:
- $fld->type = 'time';
- break;
- case 37:
- $fld->type = 'varchar';
- break;
- case 40:
- $fld->type = 'cstring';
- break;
- case 261:
- $fld->type = 'blob';
- $fld->max_length = -1;
- break;
+ }
+ break;
+ case 12:
+ $fld->type = 'date';
+ break;
+ case 13:
+ $fld->type = 'time';
+ break;
+ case 37:
+ $fld->type = 'varchar';
+ break;
+ case 40:
+ $fld->type = 'cstring';
+ break;
+ case 261:
+ $fld->type = 'blob';
+ $fld->max_length = -1;
+ break;
} // switch
}
//OPN STUFF end
- // returns array of ADOFieldObjects for current table
- function MetaColumns($table, $normalize=true)
+ /**
+ * Return an array of information about a table's columns.
+ *
+ * @param string $table The name of the table to get the column info for.
+ * @param bool $normalize (Optional) Unused.
+ *
+ * @return ADOFieldObject[]|bool An array of info for each column,
+ * or false if it could not determine the info.
+ */
+ public function metaColumns($table, $normalize = true)
{
- global $ADODB_FETCH_MODE;
+
+ global $ADODB_FETCH_MODE;
$save = $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
- $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
+ $rs = $this->execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
$ADODB_FETCH_MODE = $save;
- $false = false;
+
if ($rs === false) {
- return $false;
+ return false;
}
$retarr = array();
//OPN STUFF start
- $dialect3 = ($this->dialect==3 ? true : false);
+ $dialect3 = $this->dialect == 3;
//OPN STUFF end
while (!$rs->EOF) { //print_r($rs->fields);
$fld = new ADOFieldObject();
$fld->name = trim($rs->fields[0]);
//OPN STUFF start
- $this->_ConvertFieldType($fld, $rs->fields[7], $rs->fields[3], $rs->fields[4], $rs->fields[5], $rs->fields[6], $dialect3);
+ //print_r($rs->fields);
+ $this->_ConvertFieldType(
+ $fld, $rs->fields[7], $rs->fields[3], $rs->fields[4], $rs->fields[5], $rs->fields[6], $dialect3);
if (isset($rs->fields[1]) && $rs->fields[1]) {
$fld->not_null = true;
}
@@ -521,17 +675,24 @@ function MetaColumns($table, $normalize=true)
$fld->has_default = true;
$d = substr($rs->fields[2],strlen('default '));
- switch ($fld->type)
- {
- case 'smallint':
- case 'integer': $fld->default_value = (int) $d; break;
- case 'char':
- case 'blob':
- case 'text':
- case 'varchar': $fld->default_value = (string) substr($d,1,strlen($d)-2); break;
- case 'double':
- case 'float': $fld->default_value = (float) $d; break;
- default: $fld->default_value = $d; break;
+ switch ($fld->type) {
+ case 'smallint':
+ case 'integer':
+ $fld->default_value = (int)$d;
+ break;
+ case 'char':
+ case 'blob':
+ case 'text':
+ case 'varchar':
+ $fld->default_value = (string)substr($d, 1, strlen($d) - 2);
+ break;
+ case 'double':
+ case 'float':
+ $fld->default_value = (float)$d;
+ break;
+ default:
+ $fld->default_value = $d;
+ break;
}
// case 35:$tt = 'TIMESTAMP'; break;
}
@@ -547,61 +708,115 @@ function MetaColumns($table, $normalize=true)
$rs->MoveNext();
}
$rs->Close();
- if ( empty($retarr)) return $false;
+ if ( empty($retarr))
+ return false;
else return $retarr;
}
- function BlobEncode( $blob )
+ /**
+ * Retrieves a list of tables based on given criteria
+ *
+ * @param string|bool $ttype (Optional) Table type = 'TABLE', 'VIEW' or false=both (default)
+ * @param string|bool $showSchema (Optional) schema name, false = current schema (default)
+ * @param string|bool $mask (Optional) filters the table by name
+ *
+ * @return array list of tables
+ */
+ public function metaTables($ttype = false, $showSchema = false, $mask = false)
+ {
+ $save = $this->metaTablesSQL;
+ if (!$showSchema) {
+ $this->metaTablesSQL .= " WHERE (rdb\$relation_name NOT LIKE 'RDB\$%' AND rdb\$relation_name NOT LIKE 'MON\$%' AND rdb\$relation_name NOT LIKE 'SEC\$%')";
+ } elseif (is_string($showSchema)) {
+ $this->metaTablesSQL .= $this->qstr($showSchema);
+ }
+
+ if ($mask) {
+ $mask = $this->qstr($mask);
+ $this->metaTablesSQL .= " AND table_name LIKE $mask";
+ }
+ $ret = ADOConnection::metaTables($ttype,$showSchema);
+
+ $this->metaTablesSQL = $save;
+ return $ret;
+ }
+
+ /**
+ * Encodes a blob, then assigns an id ready to be used
+ *
+ * @param string $blob The blob to be encoded
+ *
+ * @return bool success
+ */
+ public function blobEncode( $blob )
{
$blobid = fbird_blob_create( $this->_connectionID);
fbird_blob_add( $blobid, $blob );
return fbird_blob_close( $blobid );
}
- // since we auto-decode all blob's since 2.42,
- // BlobDecode should not do any transforms
- function BlobDecode($blob)
+ /**
+ * Manually decode a blob
+ *
+ * since we auto-decode all blob's since 2.42,
+ * BlobDecode should not do any transforms
+ *
+ * @param string $blob
+ *
+ * @return string the same blob
+ */
+ public function blobDecode($blob)
{
return $blob;
}
- // old blobdecode function
- // still used to auto-decode all blob's
- function _BlobDecode_old( $blob )
+ /**
+ * Auto function called on read of blob to decode
+ *
+ * @param string $blob Value to decode
+ *
+ * @return string Decoded blob
+ */
+ public function _blobDecode($blob)
{
- $blobid = fbird_blob_open($this->_connectionID, $blob );
- $realblob = fbird_blob_get( $blobid,$this->maxblobsize); // 2nd param is max size of blob -- Kevin Boillet
- while($string = fbird_blob_get($blobid, 8192)){
- $realblob .= $string;
+ if ($blob === null) {
+ return '';
}
- fbird_blob_close( $blobid );
- return( $realblob );
- }
+ $blob_data = fbird_blob_info($this->_connectionID, $blob);
+ $blobId = fbird_blob_open($this->_connectionID, $blob);
- function _BlobDecode( $blob )
- {
- $blob_data = fbird_blob_info($this->_connectionID, $blob );
- $blobid = fbird_blob_open($this->_connectionID, $blob );
-
- if( $blob_data[0] > $this->maxblobsize ) {
- $realblob = fbird_blob_get($blobid, $this->maxblobsize);
-
- while($string = fbird_blob_get($blobid, 8192)) {
- $realblob .= $string;
+ if ($blob_data[0] > $this->maxblobsize) {
+ $realBlob = fbird_blob_get($blobId, $this->maxblobsize);
+ while ($string = fbird_blob_get($blobId, 8192)) {
+ $realBlob .= $string;
}
} else {
- $realblob = fbird_blob_get($blobid, $blob_data[0]);
+ $realBlob = fbird_blob_get($blobId, $blob_data[0]);
}
- fbird_blob_close( $blobid );
- return( $realblob );
+ fbird_blob_close($blobId);
+ return $realBlob;
}
- function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB')
+ /**
+ * Insert blob data into a database column directly
+ * from file
+ *
+ * @param string $table table to insert
+ * @param string $column column to insert
+ * @param string $path physical file name
+ * @param string $where string to find unique record
+ * @param string $blobtype BLOB or CLOB
+ *
+ * @return bool success
+ */
+ public function updateBlobFile($table,$column,$path,$where,$blobtype='BLOB')
{
$fd = fopen($path,'rb');
- if ($fd === false) return false;
+ if ($fd === false)
+ return false;
+
$blob_id = fbird_blob_create($this->_connectionID);
/* fill with data */
@@ -617,105 +832,106 @@ function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB')
return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false;
}
- /*
- Insert a null into the blob field of the table first.
- Then use UpdateBlob to store the blob.
-
- Usage:
-
- $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
- $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
- */
- function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+ /**
+ * Insert blob data into a database column
+ *
+ * @param string $table table to insert
+ * @param string $column column to insert
+ * @param string $val value to insert
+ * @param string $where string to find unique record
+ * @param string $blobtype BLOB or CLOB
+ *
+ * @return bool success
+ */
+ public function updateBlob($table,$column,$val,$where,$blobtype='BLOB')
{
- $blob_id = fbird_blob_create($this->_connectionID);
+ $blob_id = fbird_blob_create($this->_connectionID);
- // fbird_blob_add($blob_id, $val);
+ // fbird_blob_add($blob_id, $val);
- // replacement that solves the problem by which only the first modulus 64K /
- // of $val are stored at the blob field ////////////////////////////////////
- // Thx Abel Berenstein aberenstein#afip.gov.ar
- $len = strlen($val);
- $chunk_size = 32768;
- $tail_size = $len % $chunk_size;
- $n_chunks = ($len - $tail_size) / $chunk_size;
+ // replacement that solves the problem by which only the first modulus 64K /
+ // of $val are stored at the blob field ////////////////////////////////////
+ // Thx Abel Berenstein aberenstein#afip.gov.ar
+ $len = strlen($val);
+ $chunk_size = 32768;
+ $tail_size = $len % $chunk_size;
+ $n_chunks = ($len - $tail_size) / $chunk_size;
- for ($n = 0; $n < $n_chunks; $n++) {
- $start = $n * $chunk_size;
- $data = substr($val, $start, $chunk_size);
- fbird_blob_add($blob_id, $data);
- }
+ for ($n = 0; $n < $n_chunks; $n++) {
+ $start = $n * $chunk_size;
+ $data = substr($val, $start, $chunk_size);
+ fbird_blob_add($blob_id, $data);
+ }
- if ($tail_size) {
- $start = $n_chunks * $chunk_size;
- $data = substr($val, $start, $tail_size);
- fbird_blob_add($blob_id, $data);
- }
- // end replacement /////////////////////////////////////////////////////////
+ if ($tail_size) {
+ $start = $n_chunks * $chunk_size;
+ $data = substr($val, $start, $tail_size);
+ fbird_blob_add($blob_id, $data);
+ }
+ // end replacement /////////////////////////////////////////////////////////
- $blob_id_str = fbird_blob_close($blob_id);
+ $blob_id_str = fbird_blob_close($blob_id);
- return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false;
+ return $this->execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false;
}
- function OldUpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+ /**
+ * Returns a portably-formatted date string from a timestamp database column.
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:sqldate
+ *
+ * Firebird does not support an AM/PM format, so the A indicator always shows AM
+ *
+ * @param string $fmt The date format to use.
+ * @param string|bool $col (Optional) The table column to date format, or if false, use NOW().
+ *
+ * @return string The SQL DATE_FORMAT() string, or empty if the provided date format was empty.
+ */
+ public function sqlDate($fmt, $col=false)
{
- $blob_id = fbird_blob_create($this->_connectionID);
- fbird_blob_add($blob_id, $val);
- $blob_id_str = fbird_blob_close($blob_id);
- return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false;
- }
+ if (!$col)
+ $col = 'CURRENT_TIMESTAMP';
- // Format date column in sql string given an input format that understands Y M D
- // Only since Interbase 6.0 - uses EXTRACT
- // problem - does not zero-fill the day and month yet
- function SQLDate($fmt, $col=false)
- {
- if (!$col) $col = $this->sysDate;
$s = '';
$len = strlen($fmt);
for ($i=0; $i < $len; $i++) {
if ($s) $s .= '||';
$ch = $fmt[$i];
- switch($ch) {
+ $choice = strtoupper($ch);
+ switch($choice) {
case 'Y':
- case 'y':
- $s .= "extract(year from $col)";
+ $s .= "EXTRACT(YEAR FROM $col)";
break;
case 'M':
- case 'm':
- $s .= "extract(month from $col)";
+ $s .= "RIGHT('0' || TRIM(EXTRACT(MONTH FROM $col)),2)";
break;
case 'W':
- case 'w':
// The more accurate way of doing this is with a stored procedure
// See http://wiki.firebirdsql.org/wiki/index.php?page=DATE+Handling+Functions for details
- $s .= "((extract(yearday from $col) - extract(weekday from $col - 1) + 7) / 7)";
+ $s .= "((EXTRACT(YEARDAY FROM $col) - EXTRACT(WEEKDAY FROM $col - 1) + 7) / 7)";
break;
case 'Q':
- case 'q':
- $s .= "cast(((extract(month from $col)+2) / 3) as integer)";
+ $s .= "CAST(((EXTRACT(MONTH FROM $col)+2) / 3) AS INTEGER)";
break;
case 'D':
- case 'd':
- $s .= "(extract(day from $col))";
+ $s .= "RIGHT('0' || TRIM(EXTRACT(DAY FROM $col)),2)";
break;
case 'H':
- case 'h':
- $s .= "(extract(hour from $col))";
+ $s .= "RIGHT('0' || TRIM(EXTRACT(HOUR FROM $col)),2)";
break;
case 'I':
- case 'i':
- $s .= "(extract(minute from $col))";
+ $s .= "RIGHT('0' || TRIM(EXTRACT(MINUTE FROM $col)),2)";
break;
case 'S':
- case 's':
- $s .= "CAST((extract(second from $col)) AS INTEGER)";
+ //$s .= "CAST((EXTRACT(SECOND FROM $col)) AS INTEGER)";
+ $s .= "RIGHT('0' || TRIM(EXTRACT(SECOND FROM $col)),2)";
+ break;
+ case 'A':
+ $s .= $this->qstr('AM');
break;
-
default:
if ($ch == '\\') {
$i++;
@@ -728,10 +944,44 @@ function SQLDate($fmt, $col=false)
return $s;
}
+ /**
+ * Creates a portable date offset field, for use in SQL statements.
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:offsetdate
+ *
+ * @param float $dayFraction A day in floating point
+ * @param string|bool $date (Optional) The date to offset. If false, uses CURDATE()
+ *
+ * @return string
+ */
+ public function offsetDate($dayFraction, $date=false)
+ {
+ if (!$date)
+ $date = $this->sysTimeStamp;
+
+ $fraction = $dayFraction * 24 * 3600;
+ return sprintf("DATEADD (second, %s, %s) FROM RDB\$DATABASE",$fraction,$date);
+ }
+
+
// Note that Interbase 6.5 uses this ROWS instead - don't you love forking wars!
// SELECT col1, col2 FROM table ROWS 5 -- get 5 rows
// SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2
- function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs=0)
+ /**
+ * Executes a provided SQL statement and returns a handle to the result, with the ability to supply a starting
+ * offset and record count.
+ *
+ * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:selectlimit
+ *
+ * @param string $sql The SQL to execute.
+ * @param int $nrows (Optional) The limit for the number of records you want returned. By default, all results.
+ * @param int $offset (Optional) The offset to use when selecting the results. By default, no offset.
+ * @param array|bool $inputarr (Optional) Any parameter values required by the SQL statement, or false if none.
+ * @param int $secs2cache (Optional) If greater than 0, perform a cached execute. By default, normal execution.
+ *
+ * @return ADORecordSet|false The query results, or false if the query failed to execute.
+ */
+ public function selectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs2cache=0)
{
$nrows = (integer) $nrows;
$offset = (integer) $offset;
@@ -740,46 +990,88 @@ function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs=0)
$str .=($offset>=0) ? "SKIP $offset " : '';
$sql = preg_replace('/^[ \t]*select/i',$str,$sql);
- if ($secs)
- $rs = $this->CacheExecute($secs,$sql,$inputarr);
+ if ($secs2cache)
+ $rs = $this->cacheExecute($secs2cache,$sql,$inputarr);
else
- $rs = $this->Execute($sql,$inputarr);
+ $rs = $this->execute($sql,$inputarr);
return $rs;
}
}
-/*--------------------------------------------------------------------------------------
- Class Name: Recordset
---------------------------------------------------------------------------------------*/
-
-class ADORecordset_firebird extends ADORecordSet
+/**
+ * Class ADORecordset_firebird
+ */
+class ADORecordset_firebird extends ADORecordSet
{
-
var $databaseType = "firebird";
- var $bind=false;
- var $_cacheType;
+ var $bind = false;
+
+ /**
+ * @var ADOFieldObject[] Holds a cached version of the metadata
+ */
+ private $fieldObjects = false;
+
+ /**
+ * @var bool Flags if we have retrieved the metadata
+ */
+ private $fieldObjectsRetrieved = false;
+
+ /**
+ * @var array Cross-reference the objects by name for easy access
+ */
+ private $fieldObjectsIndex = array();
+
+ /**
+ * @var bool Flag to indicate if the result has a blob
+ */
+ private $fieldObjectsHaveBlob = false;
- function __construct($id,$mode=false)
+ function __construct($id, $mode = false)
{
- global $ADODB_FETCH_MODE;
+ global $ADODB_FETCH_MODE;
- $this->fetchMode = ($mode === false) ? $ADODB_FETCH_MODE : $mode;
- parent::__construct($id);
+ $this->fetchMode = ($mode === false) ? $ADODB_FETCH_MODE : $mode;
+ parent::__construct($id);
}
+
/**
- * Get column information in the Recordset object.
- * fetchField() can be used in order to obtain information about fields in
- * a certain query result. If the field offset isn't specified, the next
- * field that wasn't yet retrieved by fetchField() is retrieved.
- * @return object containing field information.
- */
- function FetchField($fieldOffset = -1)
+ * Returns: an object containing field information.
+ *
+ * Get column information in the Recordset object. fetchField()
+ * can be used in order to obtain information about fields in a
+ * certain query result. If the field offset isn't specified,
+ * the next field that wasn't yet retrieved by fetchField()
+ * is retrieved.
+ *
+ * $param int $fieldOffset (optional default=-1 for all
+ * @return mixed an ADOFieldObject, or array of objects
+ */
+ private function _fetchField($fieldOffset = -1)
{
+ if ($this->fieldObjectsRetrieved) {
+ if ($this->fieldObjects) {
+ // Already got the information
+ if ($fieldOffset == -1) {
+ return $this->fieldObjects;
+ } else {
+ return $this->fieldObjects[$fieldOffset];
+ }
+ } else {
+ // No metadata available
+ return false;
+ }
+ }
+
+ // Populate the field objects cache
+ $this->fieldObjectsRetrieved = true;
+ $this->fieldObjectsHaveBlob = false;
+ $this->_numOfFields = fbird_num_fields($this->_queryID);
+ for ($fieldIndex = 0; $fieldIndex < $this->_numOfFields; $fieldIndex++) {
$fld = new ADOFieldObject;
- $ibf = fbird_field_info($this->_queryID,$fieldOffset);
+ $ibf = fbird_field_info($this->_queryID, $fieldIndex);
$name = empty($ibf['alias']) ? $ibf['name'] : $ibf['alias'];
@@ -799,23 +1091,54 @@ function FetchField($fieldOffset = -1)
$fld->type = $ibf['type'];
$fld->max_length = $ibf['length'];
- /* This needs to be populated from the metadata */
+ // This needs to be populated from the metadata
$fld->not_null = false;
$fld->has_default = false;
$fld->default_value = 'null';
- return $fld;
+
+ $this->fieldObjects[$fieldIndex] = $fld;
+ $this->fieldObjectsIndex[$fld->name] = $fieldIndex;
+
+ if ($fld->type == 'BLOB') {
+ $this->fieldObjectsHaveBlob = true;
+ }
+ }
+
+ if ($fieldOffset == -1) {
+ return $this->fieldObjects;
+ }
+
+ return $this->fieldObjects[$fieldOffset];
+ }
+
+ /**
+ * Fetchfield copies the oracle method, it loads the field information
+ * into the _fieldobjs array once, to save multiple calls to the
+ * fbird_ function
+ *
+ * @param int $fieldOffset (optional)
+ *
+ * @return adoFieldObject|false
+ */
+ public function fetchField($fieldOffset = -1)
+ {
+ if ($fieldOffset == -1) {
+ return $this->fieldObjects;
+ }
+
+ return $this->fieldObjects[$fieldOffset];
}
function _initrs()
{
$this->_numOfRows = -1;
- $this->_numOfFields = @fbird_num_fields($this->_queryID);
- // cache types for blob decode check
- for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) {
- $f1 = $this->FetchField($i);
- $this->_cacheType[] = $f1->type;
- }
+ /*
+ * Retrieve all of the column information first. We copy
+ * this method from oracle
+ */
+ $this->_fetchField();
+
}
function _seek($row)
@@ -823,98 +1146,171 @@ function _seek($row)
return false;
}
- function _fetch()
+ public function _fetch()
{
- $f = @fbird_fetch_row($this->_queryID);
+ // Case conversion function for use in Closure defined below
+ $localFnCaseConv = null;
+
+ if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+ // Handle either associative or fetch both
+ $localNumeric = false;
+
+ $f = @fbird_fetch_assoc($this->_queryID);
+ if (is_array($f)) {
+ // Optimally do the case_upper or case_lower
+ if (ADODB_ASSOC_CASE == ADODB_ASSOC_CASE_LOWER) {
+ $f = array_change_key_case($f, CASE_LOWER);
+ $localFnCaseConv = 'strtolower';
+ } elseif (ADODB_ASSOC_CASE == ADODB_ASSOC_CASE_UPPER) {
+ $f = array_change_key_case($f, CASE_UPPER);
+ $localFnCaseConv = 'strtoupper';
+ }
+ }
+ } else {
+ // Numeric fetch mode
+ $localNumeric = true;
+ $f = @fbird_fetch_row($this->_queryID);
+ }
+
if ($f === false) {
$this->fields = false;
return false;
}
+
// OPN stuff start - optimized
// fix missing nulls and decode blobs automatically
-
global $ADODB_ANSI_PADDING_OFF;
- //$ADODB_ANSI_PADDING_OFF=1;
$rtrim = !empty($ADODB_ANSI_PADDING_OFF);
- for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) {
- if ($this->_cacheType[$i]=="BLOB") {
- if (isset($f[$i])) {
- $f[$i] = $this->connection->_BlobDecode($f[$i]);
+ // For optimal performance, only process if there is a possibility of something to do
+ if ($this->fieldObjectsHaveBlob || $rtrim) {
+ $localFieldObjects = $this->fieldObjects;
+ $localFieldObjectIndex = $this->fieldObjectsIndex;
+ /** @var ADODB_firebird $localConnection */
+ $localConnection = &$this->connection;
+
+ /**
+ * Closure for an efficient method of iterating over the elements.
+ * @param mixed $value
+ * @param string|int $key
+ * @return void
+ */
+ $rowTransform = function ($value, $key) use (
+ &$f,
+ $rtrim,
+ $localFieldObjects,
+ $localConnection,
+ $localNumeric,
+ $localFnCaseConv,
+ $localFieldObjectIndex
+ ) {
+ if ($localNumeric) {
+ $localKey = $key;
} else {
- $f[$i] = null;
+ // Cross-reference the associative key back to numeric
+ // with appropriate case conversion
+ $index = $localFnCaseConv ? $localFnCaseConv($key) : $key;
+ $localKey = $localFieldObjectIndex[$index];
}
- } else {
- if (!isset($f[$i])) {
- $f[$i] = null;
- } else if ($rtrim && is_string($f[$i])) {
- $f[$i] = rtrim($f[$i]);
+
+ // As we iterate the elements check for blobs and padding
+ if ($localFieldObjects[$localKey]->type == 'BLOB') {
+ $f[$key] = $localConnection->_BlobDecode($value);
+ } else {
+ if ($rtrim && is_string($value)) {
+ $f[$key] = rtrim($value);
+ }
}
- }
+
+ };
+
+ // Walk the array, applying the above closure
+ array_walk($f, $rowTransform);
}
- // OPN stuff end
- $this->fields = $f;
- if ($this->fetchMode == ADODB_FETCH_ASSOC) {
- $this->fields = $this->GetRowAssoc();
- } else if ($this->fetchMode == ADODB_FETCH_BOTH) {
- $this->fields = array_merge($this->fields,$this->GetRowAssoc());
+ if (!$localNumeric && $this->fetchMode & ADODB_FETCH_NUM) {
+ // Creates a fetch both
+ $fNum = array_values($f);
+ $f = array_merge($f, $fNum);
}
+
+ $this->fields = $f;
+
return true;
}
- /* Use associative array to get fields array */
- function Fields($colname)
+ /**
+ * Get the value of a field in the current row by column name.
+ * Will not work if ADODB_FETCH_MODE is set to ADODB_FETCH_NUM.
+ *
+ * @param string $colname is the field to access
+ *
+ * @return mixed the value of $colname column
+ */
+ public function fields($colname)
{
- if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
+ if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+ return $this->fields[$colname];
+ }
+
if (!$this->bind) {
- $this->bind = array();
- for ($i=0; $i < $this->_numOfFields; $i++) {
- $o = $this->FetchField($i);
- $this->bind[strtoupper($o->name)] = $i;
- }
+ // fieldsObjectIndex populated by the recordset load
+ $this->bind = array_change_key_case($this->fieldObjectsIndex, CASE_UPPER);
}
return $this->fields[$this->bind[strtoupper($colname)]];
-
}
function _close()
{
- return @fbird_free_result($this->_queryID);
+ return @fbird_free_result($this->_queryID);
}
- function MetaType($t,$len=-1,$fieldobj=false)
+ public function metaType($t, $len = -1, $fieldObj = false)
{
if (is_object($t)) {
- $fieldobj = $t;
- $t = $fieldobj->type;
- $len = $fieldobj->max_length;
+ $fieldObj = $t;
+ $t = $fieldObj->type;
+ $len = $fieldObj->max_length;
}
- switch (strtoupper($t)) {
- case 'CHAR':
- return 'C';
- case 'TEXT':
- case 'VARCHAR':
- case 'VARYING':
- if ($len <= $this->blobSize) return 'C';
- return 'X';
- case 'BLOB':
- return 'B';
+ $t = strtoupper($t);
+
+ if (array_key_exists($t, $this->connection->customActualTypes)) {
+ return $this->connection->customActualTypes[$t];
+ }
- case 'TIMESTAMP':
- case 'DATE': return 'D';
- case 'TIME': return 'T';
- //case 'T': return 'T';
+ switch ($t) {
+ case 'CHAR':
+ return 'C';
- //case 'L': return 'L';
- case 'INT':
- case 'SHORT':
- case 'INTEGER': return 'I';
- default: return ADODB_DEFAULT_METATYPE;
+ case 'TEXT':
+ case 'VARCHAR':
+ case 'VARYING':
+ if ($len <= $this->blobSize) {
+ return 'C';
+ }
+ return 'X';
+ case 'BLOB':
+ return 'B';
+
+ case 'TIMESTAMP':
+ case 'DATE':
+ return 'D';
+ case 'TIME':
+ return 'T';
+ //case 'T': return 'T';
+
+ //case 'L': return 'L';
+ case 'INT':
+ case 'SHORT':
+ case 'INTEGER':
+ return 'I';
+ default:
+ return ADODB_DEFAULT_METATYPE;
}
}
}
+
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-ibase.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-ibase.inc.php
index 69de30dcc..81ab29b56 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-ibase.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-ibase.inc.php
@@ -860,7 +860,14 @@ function MetaType($t,$len=-1,$fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
- switch (strtoupper($t)) {
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
+ switch ($t) {
+
case 'CHAR':
return 'C';
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-informix72.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-informix72.inc.php
index a9c43e231..79e5138a9 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-informix72.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-informix72.inc.php
@@ -253,12 +253,12 @@ function MetaColumns($table, $normalize=true)
return $false;
}
- function xMetaColumns($table)
- {
+ function xMetaColumns($table)
+ {
return ADOConnection::MetaColumns($table,false);
- }
+ }
- function MetaForeignKeys($table, $owner=false, $upper=false) //!Eos
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
$sql = "
select tr.tabname,updrule,delrule,
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-mssql.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-mssql.inc.php
index 3de3f8d33..8fb92249c 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-mssql.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-mssql.inc.php
@@ -429,7 +429,7 @@ function MetaIndexes($table,$primary=false, $owner=false)
return $indexes;
}
- function MetaForeignKeys($table, $owner=false, $upper=false)
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
global $ADODB_FETCH_MODE;
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-mssqlnative.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-mssqlnative.inc.php
index 36dc54339..dba647cb5 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-mssqlnative.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-mssqlnative.inc.php
@@ -719,7 +719,7 @@ function MetaIndexes($table,$primary=false, $owner = false)
return $indexes;
}
- function MetaForeignKeys($table, $owner=false, $upper=false)
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
global $ADODB_FETCH_MODE;
@@ -1009,6 +1009,37 @@ public function metaProcedures($procedureNamePattern = null, $catalog = null, $
return $metaProcedures;
}
+ /**
+ * An SQL Statement that adds a specific number of
+ * days or part to local datetime
+ *
+ * @param float $dayFraction
+ * @param string $date
+ *
+ * @return string
+ */
+ public function offsetDate($dayFraction, $date = false)
+ {
+ if (!$date)
+ /*
+ * Use GETDATE() via systTimestamp;
+ */
+ $date = $this->sysTimeStamp;
+
+ /*
+ * seconds, number of seconds, date base
+ */
+ $dateFormat = "DATEADD(s, %s, %s)";
+
+ /*
+ * Adjust the offset back to seconds
+ */
+ $fraction = $dayFraction * 24 * 3600;
+
+ return sprintf($dateFormat,$fraction,$date);
+
+ }
+
}
/*--------------------------------------------------------------------------------------
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-mysql.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-mysql.inc.php
deleted file mode 100644
index f07c081b5..000000000
--- a/app/vendor/adodb/adodb-php/drivers/adodb-mysql.inc.php
+++ /dev/null
@@ -1,932 +0,0 @@
-=')) {
- $this->outp_throw(
- 'mysql extension is not supported since PHP 7.0.0, use mysqli instead',
- __METHOD__
- );
- die(1); // Stop execution even if not using Exceptions
- } elseif(version_compare(PHP_VERSION, '5.5.0', '>=')) {
- // If mysql extension is available just print a warning,
- // otherwise die with an error message
- if(function_exists('mysql_connect')) {
- $this->outp('mysql extension is deprecated since PHP 5.5.0, consider using mysqli');
- } else {
- $this->outp_throw(
- 'mysql extension is not available, use mysqli instead',
- __METHOD__
- );
- die(1); // Stop execution even if not using Exceptions
- }
- }
- }
-
- function setCharSet($charset)
- {
- if (!function_exists('mysql_set_charset')) {
- return false;
- }
-
- if ($this->charSet !== $charset) {
- $ok = @mysql_set_charset($charset,$this->_connectionID);
- if ($ok) {
- $this->charSet = $charset;
- return true;
- }
- return false;
- }
- return true;
- }
-
- function serverInfo()
- {
- $arr['description'] = ADOConnection::GetOne("select version()");
- $arr['version'] = ADOConnection::_findvers($arr['description']);
- return $arr;
- }
-
- function ifNull( $field, $ifNull )
- {
- return " IFNULL($field, $ifNull) "; // if MySQL
- }
-
- function metaProcedures($NamePattern = false, $catalog = null, $schemaPattern = null)
- {
- // save old fetch mode
- global $ADODB_FETCH_MODE;
-
- $false = false;
- $save = $ADODB_FETCH_MODE;
- $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-
- if ($this->fetchMode !== FALSE) {
- $savem = $this->SetFetchMode(FALSE);
- }
-
- $procedures = array ();
-
- // get index details
-
- $likepattern = '';
- if ($NamePattern) {
- $likepattern = " LIKE '".$NamePattern."'";
- }
- $rs = $this->Execute('SHOW PROCEDURE STATUS'.$likepattern);
- if (is_object($rs)) {
-
- // parse index data into array
- while ($row = $rs->FetchRow()) {
- $procedures[$row[1]] = array(
- 'type' => 'PROCEDURE',
- 'catalog' => '',
- 'schema' => '',
- 'remarks' => $row[7],
- );
- }
- }
-
- $rs = $this->Execute('SHOW FUNCTION STATUS'.$likepattern);
- if (is_object($rs)) {
- // parse index data into array
- while ($row = $rs->FetchRow()) {
- $procedures[$row[1]] = array(
- 'type' => 'FUNCTION',
- 'catalog' => '',
- 'schema' => '',
- 'remarks' => $row[7]
- );
- }
- }
-
- // restore fetchmode
- if (isset($savem)) {
- $this->SetFetchMode($savem);
- }
- $ADODB_FETCH_MODE = $save;
-
- return $procedures;
- }
-
- /**
- * Retrieves a list of tables based on given criteria
- *
- * @param string $ttype Table type = 'TABLE', 'VIEW' or false=both (default)
- * @param string $showSchema schema name, false = current schema (default)
- * @param string $mask filters the table by name
- *
- * @return array list of tables
- */
- function metaTables($ttype=false,$showSchema=false,$mask=false)
- {
- $save = $this->metaTablesSQL;
- if ($showSchema && is_string($showSchema)) {
- $this->metaTablesSQL .= $this->qstr($showSchema);
- } else {
- $this->metaTablesSQL .= "schema()";
- }
-
- if ($mask) {
- $mask = $this->qstr($mask);
- $this->metaTablesSQL .= " AND table_name LIKE $mask";
- }
- $ret = ADOConnection::MetaTables($ttype,$showSchema);
-
- $this->metaTablesSQL = $save;
- return $ret;
- }
-
-
- function metaIndexes ($table, $primary = FALSE, $owner=false)
- {
- // save old fetch mode
- global $ADODB_FETCH_MODE;
-
- $false = false;
- $save = $ADODB_FETCH_MODE;
- $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
- if ($this->fetchMode !== FALSE) {
- $savem = $this->SetFetchMode(FALSE);
- }
-
- // get index details
- $rs = $this->Execute(sprintf('SHOW INDEX FROM %s',$table));
-
- // restore fetchmode
- if (isset($savem)) {
- $this->SetFetchMode($savem);
- }
- $ADODB_FETCH_MODE = $save;
-
- if (!is_object($rs)) {
- return $false;
- }
-
- $indexes = array ();
-
- // parse index data into array
- while ($row = $rs->FetchRow()) {
- if ($primary == FALSE AND $row[2] == 'PRIMARY') {
- continue;
- }
-
- if (!isset($indexes[$row[2]])) {
- $indexes[$row[2]] = array(
- 'unique' => ($row[1] == 0),
- 'columns' => array()
- );
- }
-
- $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4];
- }
-
- // sort columns by order in the index
- foreach ( array_keys ($indexes) as $index )
- {
- ksort ($indexes[$index]['columns']);
- }
-
- return $indexes;
- }
-
-
- /**
- * Appropriately quotes strings with ' characters for insertion into the database.
- *
- * Relies on mysql_real_escape_string()
- * @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:qstr
- *
- * @param string $s The string to quote
- * @param bool $magic_quotes This param is not used since 5.21.0.
- * It remains for backwards compatibility.
- *
- * @return string Quoted string
- */
- function qStr($s, $magic_quotes=false)
- {
- if (is_null($s)) {
- return 'NULL';
- }
-
- if (is_resource($this->_connectionID)) {
- return "'" . mysql_real_escape_string($s, $this->_connectionID) . "'";
- }
-
- if ($this->replaceQuote[0] == '\\') {
- $s = str_replace(array('\\', "\0"), array('\\\\', "\\\0"), $s);
- }
- return "'" . str_replace("'", $this->replaceQuote, $s) . "'";
- }
-
- protected function _insertID($table = '', $column = '')
- {
- return ADOConnection::GetOne('SELECT LAST_INSERT_ID()');
- //return mysql_insert_id($this->_connectionID);
- }
-
- function getOne($sql,$inputarr=false)
- {
- global $ADODB_GETONE_EOF;
- if ($this->compat323 == false && strncasecmp($sql,'sele',4) == 0) {
- $rs = $this->SelectLimit($sql,1,-1,$inputarr);
- if ($rs) {
- $rs->Close();
- if ($rs->EOF) return $ADODB_GETONE_EOF;
- return reset($rs->fields);
- }
- } else {
- return ADOConnection::GetOne($sql,$inputarr);
- }
- return false;
- }
-
- function beginTrans()
- {
- if ($this->debug) ADOConnection::outp("Transactions not supported in 'mysql' driver. Use 'mysqlt' or 'mysqli' driver");
- }
-
- function _affectedrows()
- {
- return mysql_affected_rows($this->_connectionID);
- }
-
- // See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html
- // Reference on Last_Insert_ID on the recommended way to simulate sequences
- var $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);";
- var $_genSeqSQL = "create table if not exists %s (id int not null)";
- var $_genSeqCountSQL = "select count(*) from %s";
- var $_genSeq2SQL = "insert into %s values (%s)";
- var $_dropSeqSQL = "drop table if exists %s";
-
- function createSequence($seqname='adodbseq',$startID=1)
- {
- if (empty($this->_genSeqSQL)) return false;
- $u = strtoupper($seqname);
-
- $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname));
- if (!$ok) return false;
- return $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1));
- }
-
-
- function genID($seqname='adodbseq',$startID=1)
- {
- // post-nuke sets hasGenID to false
- if (!$this->hasGenID) return false;
-
- $savelog = $this->_logsql;
- $this->_logsql = false;
- $getnext = sprintf($this->_genIDSQL,$seqname);
- $holdtransOK = $this->_transOK; // save the current status
- $rs = @$this->Execute($getnext);
- if (!$rs) {
- if ($holdtransOK) $this->_transOK = true; //if the status was ok before reset
- $u = strtoupper($seqname);
- $this->Execute(sprintf($this->_genSeqSQL,$seqname));
- $cnt = $this->GetOne(sprintf($this->_genSeqCountSQL,$seqname));
- if (!$cnt) $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1));
- $rs = $this->Execute($getnext);
- }
-
- if ($rs) {
- $this->genID = mysql_insert_id($this->_connectionID);
- $rs->Close();
- } else
- $this->genID = 0;
-
- $this->_logsql = $savelog;
- return $this->genID;
- }
-
- function metaDatabases()
- {
- $qid = mysql_list_dbs($this->_connectionID);
- $arr = array();
- $i = 0;
- $max = mysql_num_rows($qid);
- while ($i < $max) {
- $db = mysql_tablename($qid,$i);
- if ($db != 'mysql') $arr[] = $db;
- $i += 1;
- }
- return $arr;
- }
-
-
- // Format date column in sql string given an input format that understands Y M D
- function sqlDate($fmt, $col=false)
- {
- if (!$col) $col = $this->sysTimeStamp;
- $s = 'DATE_FORMAT('.$col.",'";
- $concat = false;
- $len = strlen($fmt);
- for ($i=0; $i < $len; $i++) {
- $ch = $fmt[$i];
- switch($ch) {
-
- default:
- if ($ch == '\\') {
- $i++;
- $ch = substr($fmt,$i,1);
- }
- /** FALL THROUGH */
- case '-':
- case '/':
- $s .= $ch;
- break;
-
- case 'Y':
- case 'y':
- $s .= '%Y';
- break;
- case 'M':
- $s .= '%b';
- break;
-
- case 'm':
- $s .= '%m';
- break;
- case 'D':
- case 'd':
- $s .= '%d';
- break;
-
- case 'Q':
- case 'q':
- $s .= "'),Quarter($col)";
-
- if ($len > $i+1) $s .= ",DATE_FORMAT($col,'";
- else $s .= ",('";
- $concat = true;
- break;
-
- case 'H':
- $s .= '%H';
- break;
-
- case 'h':
- $s .= '%I';
- break;
-
- case 'i':
- $s .= '%i';
- break;
-
- case 's':
- $s .= '%s';
- break;
-
- case 'a':
- case 'A':
- $s .= '%p';
- break;
-
- case 'w':
- $s .= '%w';
- break;
-
- case 'W':
- $s .= '%U';
- break;
-
- case 'l':
- $s .= '%W';
- break;
- }
- }
- $s.="')";
- if ($concat) $s = "CONCAT($s)";
- return $s;
- }
-
-
- // returns concatenated string
- // much easier to run "mysqld --ansi" or "mysqld --sql-mode=PIPES_AS_CONCAT" and use || operator
- function concat()
- {
- $s = "";
- $arr = func_get_args();
-
- // suggestion by andrew005@mnogo.ru
- $s = implode(',',$arr);
- if (strlen($s) > 0) return "CONCAT($s)";
- else return '';
- }
-
- function offsetDate($dayFraction,$date=false)
- {
- if (!$date) $date = $this->sysDate;
-
- $fraction = $dayFraction * 24 * 3600;
- return '('. $date . ' + INTERVAL ' . $fraction.' SECOND)';
-
-// return "from_unixtime(unix_timestamp($date)+$fraction)";
- }
-
- // returns true or false
- function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
- {
- if (!empty($this->port))
- $argHostname .= ":".$this->port;
-
- $this->_connectionID =
- mysql_connect($argHostname,
- $argUsername,
- $argPassword,
- $this->forceNewConnect,
- $this->clientFlags
- );
-
-
- if ($this->_connectionID === false)
- return false;
- if ($argDatabasename)
- return $this->SelectDB($argDatabasename);
-
- return true;
- }
-
- // returns true or false
- function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
- {
- if (!empty($this->port)) $argHostname .= ":".$this->port;
-
- $this->_connectionID =
- mysql_pconnect($argHostname,
- $argUsername,
- $argPassword,
- $this->clientFlags);
-
- if ($this->_connectionID === false)
- return false;
- if ($this->autoRollback)
- $this->RollbackTrans();
- if ($argDatabasename)
- return $this->SelectDB($argDatabasename);
- return true;
- }
-
- function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
- {
- $this->forceNewConnect = true;
- return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename);
- }
-
- function metaColumns($table, $normalize=true)
- {
- $this->_findschema($table,$schema);
- if ($schema) {
- $dbName = $this->database;
- $this->SelectDB($schema);
- }
- global $ADODB_FETCH_MODE;
- $save = $ADODB_FETCH_MODE;
- $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-
- if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
- $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
-
- if ($schema) {
- $this->SelectDB($dbName);
- }
-
- if (isset($savem)) $this->SetFetchMode($savem);
- $ADODB_FETCH_MODE = $save;
- if (!is_object($rs)) {
- $false = false;
- return $false;
- }
-
- $retarr = array();
- while (!$rs->EOF){
- $fld = new ADOFieldObject();
- $fld->name = $rs->fields[0];
- $type = $rs->fields[1];
-
- // split type into type(length):
- $fld->scale = null;
- if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) {
- $fld->type = $query_array[1];
- $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
- $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1;
- } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) {
- $fld->type = $query_array[1];
- $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
- } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) {
- $fld->type = $query_array[1];
- $arr = explode(",",$query_array[2]);
- $fld->enums = $arr;
- $zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6
- $fld->max_length = ($zlen > 0) ? $zlen : 1;
- } else {
- $fld->type = $type;
- $fld->max_length = -1;
- }
- $fld->not_null = ($rs->fields[2] != 'YES');
- $fld->primary_key = ($rs->fields[3] == 'PRI');
- $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false);
- $fld->binary = (strpos($type,'blob') !== false || strpos($type,'binary') !== false);
- $fld->unsigned = (strpos($type,'unsigned') !== false);
- $fld->zerofill = (strpos($type,'zerofill') !== false);
-
- if (!$fld->binary) {
- $d = $rs->fields[4];
- if ($d != '' && $d != 'NULL') {
- $fld->has_default = true;
- $fld->default_value = $d;
- } else {
- $fld->has_default = false;
- }
- }
-
- if ($save == ADODB_FETCH_NUM) {
- $retarr[] = $fld;
- } else {
- $retarr[strtoupper($fld->name)] = $fld;
- }
- $rs->MoveNext();
- }
-
- $rs->Close();
- return $retarr;
- }
-
- // returns true or false
- function selectDB($dbName)
- {
- $this->database = $dbName;
- $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
- if ($this->_connectionID) {
- return @mysql_select_db($dbName,$this->_connectionID);
- }
- else return false;
- }
-
- // parameters use PostgreSQL convention, not MySQL
- function selectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs=0)
- {
- $nrows = (int) $nrows;
- $offset = (int) $offset;
- $offsetStr =($offset>=0) ? ((integer)$offset)."," : '';
- // jason judge, see PHPLens Issue No: 9220
- if ($nrows < 0) $nrows = '18446744073709551615';
-
- if ($secs)
- $rs = $this->CacheExecute($secs,$sql." LIMIT $offsetStr".((integer)$nrows),$inputarr);
- else
- $rs = $this->Execute($sql." LIMIT $offsetStr".((integer)$nrows),$inputarr);
- return $rs;
- }
-
- // returns queryID or false
- function _query($sql,$inputarr=false)
- {
-
- return mysql_query($sql,$this->_connectionID);
- /*
- global $ADODB_COUNTRECS;
- if($ADODB_COUNTRECS)
- return mysql_query($sql,$this->_connectionID);
- else
- return @mysql_unbuffered_query($sql,$this->_connectionID); // requires PHP >= 4.0.6
- */
- }
-
- /* Returns: the last error message from previous database operation */
- function errorMsg()
- {
-
- if ($this->_logsql) return $this->_errorMsg;
- if (empty($this->_connectionID)) $this->_errorMsg = @mysql_error();
- else $this->_errorMsg = @mysql_error($this->_connectionID);
- return $this->_errorMsg;
- }
-
- /* Returns: the last error number from previous database operation */
- function errorNo()
- {
- if ($this->_logsql) return $this->_errorCode;
- if (empty($this->_connectionID)) return @mysql_errno();
- else return @mysql_errno($this->_connectionID);
- }
-
- // returns true or false
- function _close()
- {
- @mysql_close($this->_connectionID);
-
- $this->charSet = '';
- $this->_connectionID = false;
- }
-
-
- /*
- * Maximum size of C field
- */
- function charMax()
- {
- return 255;
- }
-
- /*
- * Maximum size of X field
- */
- function textMax()
- {
- return 4294967295;
- }
-
- // "Innox - Juan Carlos Gonzalez"
- function metaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE )
- {
- global $ADODB_FETCH_MODE;
- if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true;
-
- if ( !empty($owner) ) {
- $table = "$owner.$table";
- }
- $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table));
- if ($associative) {
- $create_sql = isset($a_create_table["Create Table"]) ? $a_create_table["Create Table"] : $a_create_table["Create View"];
- } else {
- $create_sql = $a_create_table[1];
- }
-
- $matches = array();
-
- if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false;
- $foreign_keys = array();
- $num_keys = count($matches[0]);
- for ( $i = 0; $i < $num_keys; $i ++ ) {
- $my_field = explode('`, `', $matches[1][$i]);
- $ref_table = $matches[2][$i];
- $ref_field = explode('`, `', $matches[3][$i]);
-
- if ( $upper ) {
- $ref_table = strtoupper($ref_table);
- }
-
- // see https://sourceforge.net/p/adodb/bugs/100/
- if (!isset($foreign_keys[$ref_table])) {
- $foreign_keys[$ref_table] = array();
- }
- $num_fields = count($my_field);
- for ( $j = 0; $j < $num_fields; $j ++ ) {
- if ( $associative ) {
- $foreign_keys[$ref_table][$ref_field[$j]] = $my_field[$j];
- } else {
- $foreign_keys[$ref_table][] = "{$my_field[$j]}={$ref_field[$j]}";
- }
- }
- }
-
- return $foreign_keys;
- }
-
-
-}
-
-/*--------------------------------------------------------------------------------------
- Class Name: Recordset
---------------------------------------------------------------------------------------*/
-
-
-class ADORecordSet_mysql extends ADORecordSet{
-
- var $databaseType = "mysql";
- var $canSeek = true;
-
- function __construct($queryID,$mode=false)
- {
- if ($mode === false) {
- global $ADODB_FETCH_MODE;
- $mode = $ADODB_FETCH_MODE;
- }
- switch ($mode)
- {
- case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
- case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
- case ADODB_FETCH_DEFAULT:
- case ADODB_FETCH_BOTH:
- default:
- $this->fetchMode = MYSQL_BOTH; break;
- }
- $this->adodbFetchMode = $mode;
- parent::__construct($queryID);
- }
-
- function _initrs()
- {
- //GLOBAL $ADODB_COUNTRECS;
- // $this->_numOfRows = ($ADODB_COUNTRECS) ? @mysql_num_rows($this->_queryID):-1;
- $this->_numOfRows = @mysql_num_rows($this->_queryID);
- $this->_numOfFields = @mysql_num_fields($this->_queryID);
- }
-
- function fetchField($fieldOffset = -1)
- {
- if ($fieldOffset != -1) {
- $o = @mysql_fetch_field($this->_queryID, $fieldOffset);
- $f = @mysql_field_flags($this->_queryID,$fieldOffset);
- if ($o) $o->max_length = @mysql_field_len($this->_queryID,$fieldOffset); // suggested by: Jim Nicholson (jnich#att.com)
- //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
- if ($o) $o->binary = (strpos($f,'binary')!== false);
- }
- else { /* The $fieldOffset argument is not provided thus its -1 */
- $o = @mysql_fetch_field($this->_queryID);
- //if ($o) $o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com)
- $o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
- }
-
- return $o;
- }
-
- function getRowAssoc($upper = ADODB_ASSOC_CASE)
- {
- if ($this->fetchMode == MYSQL_ASSOC && $upper == ADODB_ASSOC_CASE_LOWER) {
- $row = $this->fields;
- }
- else {
- $row = ADORecordSet::GetRowAssoc($upper);
- }
- return $row;
- }
-
- /* Use associative array to get fields array */
- function fields($colname)
- {
- // added @ by "Michael William Miller"
- if ($this->fetchMode != MYSQL_NUM) return @$this->fields[$colname];
-
- if (!$this->bind) {
- $this->bind = array();
- for ($i=0; $i < $this->_numOfFields; $i++) {
- $o = $this->FetchField($i);
- $this->bind[strtoupper($o->name)] = $i;
- }
- }
- return $this->fields[$this->bind[strtoupper($colname)]];
- }
-
- function _seek($row)
- {
- if ($this->_numOfRows == 0) return false;
- return @mysql_data_seek($this->_queryID,$row);
- }
-
- function moveNext()
- {
- if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) {
- $this->_updatefields();
- $this->_currentRow += 1;
- return true;
- }
- if (!$this->EOF) {
- $this->_currentRow += 1;
- $this->EOF = true;
- }
- return false;
- }
-
- function _fetch()
- {
- $this->fields = @mysql_fetch_array($this->_queryID,$this->fetchMode);
- $this->_updatefields();
- return is_array($this->fields);
- }
-
- function _close() {
- @mysql_free_result($this->_queryID);
- $this->_queryID = false;
- }
-
- function metaType($t,$len=-1,$fieldobj=false)
- {
- if (is_object($t)) {
- $fieldobj = $t;
- $t = $fieldobj->type;
- $len = $fieldobj->max_length;
- }
-
- $len = -1; // mysql max_length is not accurate
- switch (strtoupper($t)) {
- case 'STRING':
- case 'CHAR':
- case 'VARCHAR':
- case 'TINYBLOB':
- case 'TINYTEXT':
- case 'ENUM':
- case 'SET':
- if ($len <= $this->blobSize) return 'C';
-
- case 'TEXT':
- case 'LONGTEXT':
- case 'MEDIUMTEXT':
- return 'X';
-
- // php_mysql extension always returns 'blob' even if 'text'
- // so we have to check whether binary...
- case 'IMAGE':
- case 'LONGBLOB':
- case 'BLOB':
- case 'MEDIUMBLOB':
- case 'BINARY':
- return !empty($fieldobj->binary) ? 'B' : 'X';
-
- case 'YEAR':
- case 'DATE': return 'D';
-
- case 'TIME':
- case 'DATETIME':
- case 'TIMESTAMP': return 'T';
-
- case 'INT':
- case 'INTEGER':
- case 'BIGINT':
- case 'TINYINT':
- case 'MEDIUMINT':
- case 'SMALLINT':
-
- if (!empty($fieldobj->primary_key)) return 'R';
- else return 'I';
-
- default: return ADODB_DEFAULT_METATYPE;
- }
- }
-
-}
-
-/**
- * Class ADORecordSet_ext_mysql
- */
-class ADORecordSet_ext_mysql extends ADORecordSet_mysql {
-
- function moveNext()
- {
- return @adodb_movenext($this);
- }
-}
-
-}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php
index 160f5fa34..10f58ec67 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php
@@ -75,12 +75,17 @@ class ADODB_mysqli extends ADOConnection {
var $ssl_capath = null;
var $ssl_cipher = null;
+ /** @var mysqli Identifier for the native database connection */
+ var $_connectionID = false;
+
/**
* Tells the insert_id method how to obtain the last value, depending on whether
* we are using a stored procedure or not
*/
private $usePreparedStatement = false;
private $useLastInsertStatement = false;
+ private $usingBoundVariables = false;
+ private $statementAffectedRows = -1;
/**
* @var bool True if the last executed statement is a SELECT {@see _query()}
@@ -123,13 +128,12 @@ function SetTransactionMode($transaction_mode)
/**
* Adds a parameter to the connection string.
*
- * Parameter must be one of the the constants listed in mysqli_options().
+ * Parameter must be one of the constants listed in mysqli_options().
* @see https://www.php.net/manual/en/mysqli.options.php
*
- * @param int $parameter The parameter to set
- * @param string $value The value of the parameter
+ * @param int $parameter The parameter to set
+ * @param string $value The value of the parameter
*
- * @example, for mssqlnative driver ('CharacterSet','UTF-8')
* @return bool
*/
public function setConnectionParameter($parameter, $value) {
@@ -137,8 +141,7 @@ public function setConnectionParameter($parameter, $value) {
$this->outp_throw("Invalid connection parameter '$parameter'", __METHOD__);
return false;
}
- $this->connectionParameters[$parameter] = $value;
- return true;
+ return parent::setConnectionParameter($parameter, $value);
}
/**
@@ -184,13 +187,15 @@ function _connect($argHostname = null,
}
// Now merge in the standard connection parameters setting
- foreach ($this->connectionParameters as $parameter => $value) {
- // Make sure parameter is numeric before calling mysqli_options()
- // that to avoid Warning (or TypeError exception on PHP 8).
- if (!is_numeric($parameter)
- || !mysqli_options($this->_connectionID, $parameter, $value)
- ) {
- $this->outp_throw("Invalid connection parameter '$parameter'", __METHOD__);
+ foreach ($this->connectionParameters as $options) {
+ foreach ($options as $parameter => $value) {
+ // Make sure parameter is numeric before calling mysqli_options()
+ // to avoid Warning (or TypeError exception on PHP 8).
+ if (!is_numeric($parameter)
+ || !mysqli_options($this->_connectionID, $parameter, $value)
+ ) {
+ $this->outp_throw("Invalid connection parameter '$parameter'", __METHOD__);
+ }
}
}
@@ -202,9 +207,12 @@ function _connect($argHostname = null,
// SSL Connections for MySQLI
if ($this->ssl_key || $this->ssl_cert || $this->ssl_ca || $this->ssl_capath || $this->ssl_cipher) {
mysqli_ssl_set($this->_connectionID, $this->ssl_key, $this->ssl_cert, $this->ssl_ca, $this->ssl_capath, $this->ssl_cipher);
+ $this->socket = MYSQLI_CLIENT_SSL;
+ $this->clientFlags = MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
}
#if (!empty($this->port)) $argHostname .= ":".$this->port;
+ /** @noinspection PhpCastIsUnnecessaryInspection */
$ok = @mysqli_real_connect($this->_connectionID,
$argHostname,
$argUsername,
@@ -252,15 +260,15 @@ function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
* @param string|null $argHostname The host to connect to.
* @param string|null $argUsername The username to connect as.
* @param string|null $argPassword The password to connect with.
- * @param string|null $argDatabasename The name of the database to start in when connected.
+ * @param string|null $argDatabaseName The name of the database to start in when connected.
*
* @return bool|null True if connected successfully, false if connection failed, or null if the mysqli extension
* isn't currently loaded.
*/
- function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+ function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName)
{
$this->forceNewConnect = true;
- return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename);
+ return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName);
}
/**
@@ -376,17 +384,17 @@ function RollbackTrans()
*
* @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:rowlock
*
- * @param string $tables The table(s) to lock rows for.
+ * @param string $table The table(s) to lock rows for.
* @param string $where (Optional) The WHERE clause to use to determine which rows to lock.
* @param string $col (Optional) The columns to select.
*
* @return bool True if the locking SQL statement executed successfully, otherwise false.
*/
- function RowLock($tables, $where = '', $col = '1 as adodbignore')
+ function RowLock($table, $where = '', $col = '1 as adodbignore')
{
if ($this->transCnt==0) $this->beginTrans();
if ($where) $where = ' where '.$where;
- $rs = $this->execute("select $col from $tables $where for update");
+ $rs = $this->execute("select $col from $table $where for update");
return !empty($rs);
}
@@ -457,10 +465,17 @@ function _affectedrows()
// the rowcount, but ADOdb does not do that.
return false;
}
-
- $result = @mysqli_affected_rows($this->_connectionID);
- if ($result == -1) {
- if ($this->debug) ADOConnection::outp("mysqli_affected_rows() failed : " . $this->errorMsg());
+ else if ($this->statementAffectedRows >= 0)
+ {
+ $result = $this->statementAffectedRows;
+ $this->statementAffectedRows = -1;
+ }
+ else
+ {
+ $result = @mysqli_affected_rows($this->_connectionID);
+ if ($result == -1) {
+ if ($this->debug) ADOConnection::outp("mysqli_affected_rows() failed : " . $this->errorMsg());
+ }
}
return $result;
}
@@ -566,7 +581,6 @@ function MetaIndexes($table, $primary = false, $owner = false)
// save old fetch mode
global $ADODB_FETCH_MODE;
- $false = false;
$save = $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
if ($this->fetchMode !== FALSE) {
@@ -574,7 +588,7 @@ function MetaIndexes($table, $primary = false, $owner = false)
}
// get index details
- $rs = $this->execute(sprintf('SHOW INDEXES FROM %s',$table));
+ $rs = $this->Execute(sprintf('SHOW INDEXES FROM `%s`',$table));
// restore fetchmode
if (isset($savem)) {
@@ -583,7 +597,7 @@ function MetaIndexes($table, $primary = false, $owner = false)
$ADODB_FETCH_MODE = $save;
if (!is_object($rs)) {
- return $false;
+ return false;
}
$indexes = array ();
@@ -621,7 +635,7 @@ function MetaIndexes($table, $primary = false, $owner = false)
* @param string $fmt The date format to use.
* @param string|bool $col (Optional) The table column to date format, or if false, use NOW().
*
- * @return bool|string The SQL DATE_FORMAT() string, or false if the provided date format was empty.
+ * @return string The SQL DATE_FORMAT() string, or false if the provided date format was empty.
*/
function SQLDate($fmt, $col = false)
{
@@ -740,13 +754,13 @@ function OffsetDate($dayFraction, $date = false)
/**
* Returns information about stored procedures and stored functions.
*
- * @param string|bool $NamePattern (Optional) Only look for procedures/functions with a name matching this pattern.
+ * @param string|bool $procedureNamePattern (Optional) Only look for procedures/functions with a name matching this pattern.
* @param null $catalog (Optional) Unused.
* @param null $schemaPattern (Optional) Unused.
*
* @return array
*/
- function MetaProcedures($NamePattern = false, $catalog = null, $schemaPattern = null)
+ function MetaProcedures($procedureNamePattern = false, $catalog = null, $schemaPattern = null)
{
// save old fetch mode
global $ADODB_FETCH_MODE;
@@ -763,8 +777,8 @@ function MetaProcedures($NamePattern = false, $catalog = null, $schemaPattern
// get index details
$likepattern = '';
- if ($NamePattern) {
- $likepattern = " LIKE '".$NamePattern."'";
+ if ($procedureNamePattern) {
+ $likepattern = " LIKE '".$procedureNamePattern."'";
}
$rs = $this->execute('SHOW PROCEDURE STATUS'.$likepattern);
if (is_object($rs)) {
@@ -840,9 +854,8 @@ function MetaTables($ttype = false, $showSchema = false, $mask = false)
*
* @return array|bool An array of foreign keys, or false no foreign keys could be found.
*/
- function MetaForeignKeys($table, $owner = false, $upper = false, $associative = false)
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
-
global $ADODB_FETCH_MODE;
if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC
@@ -856,7 +869,7 @@ function MetaForeignKeys($table, $owner = false, $upper = false, $associative =
$table = "$owner.$table";
}
- $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table));
+ $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE `%s`', $table));
$this->setFetchMode($savem);
@@ -935,7 +948,6 @@ function MetaColumns($table, $normalize = true)
while (!$rs->EOF) {
$fld = new ADOFieldObject();
$fld->name = $rs->fields[0];
- $type = $rs->fields[1];
/*
* Type from information_schema returns
@@ -1027,7 +1039,7 @@ function SelectDB($dbName)
* @param int $nrows (Optional) The limit for the number of records you want returned. By default, all results.
* @param int $offset (Optional) The offset to use when selecting the results. By default, no offset.
* @param array|bool $inputarr (Optional) Any parameter values required by the SQL statement, or false if none.
- * @param int $secs (Optional) If greater than 0, perform a cached execute. By default, normal execution.
+ * @param int $secs2cache (Optional) If greater than 0, perform a cached execute. By default, normal execution.
*
* @return ADORecordSet|false The query results, or false if the query failed to execute.
*/
@@ -1035,15 +1047,15 @@ function SelectLimit($sql,
$nrows = -1,
$offset = -1,
$inputarr = false,
- $secs = 0)
+ $secs2cache = 0)
{
$nrows = (int) $nrows;
$offset = (int) $offset;
$offsetStr = ($offset >= 0) ? "$offset," : '';
if ($nrows < 0) $nrows = '18446744073709551615';
- if ($secs)
- $rs = $this->cacheExecute($secs, $sql . " LIMIT $offsetStr$nrows" , $inputarr );
+ if ($secs2cache)
+ $rs = $this->cacheExecute($secs2cache, $sql . " LIMIT $offsetStr$nrows" , $inputarr );
else
$rs = $this->execute($sql . " LIMIT $offsetStr$nrows" , $inputarr );
@@ -1052,6 +1064,7 @@ function SelectLimit($sql,
/**
* Prepares an SQL statement and returns a handle to use.
+ * This is not used by bound parameters anymore
*
* @link https://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:prepare
* @todo update this function to handle prepared statements correctly
@@ -1080,13 +1093,106 @@ function Prepare($sql)
}
/**
- * Return the query id.
+ * Execute SQL
+ *
+ * @param string $sql SQL statement to execute, or possibly an array
+ * holding prepared statement ($sql[0] will hold sql text)
+ * @param array|bool $inputarr holds the input data to bind to.
+ * Null elements will be set to null.
+ *
+ * @return ADORecordSet|bool
+ */
+ public function execute($sql, $inputarr = false)
+ {
+ if ($this->fnExecute) {
+ $fn = $this->fnExecute;
+ $ret = $fn($this, $sql, $inputarr);
+ if (isset($ret)) {
+ return $ret;
+ }
+ }
+
+ if ($inputarr === false) {
+ return $this->_execute($sql);
+ }
+
+ if (!is_array($inputarr)) {
+ $inputarr = array($inputarr);
+ }
+
+ if (!is_array($sql)) {
+ // Check if we are bulkbinding. If so, $inputarr is a 2d array,
+ // and we make a gross assumption that all rows have the same number
+ // of columns of the same type, and use the elements of the first row
+ // to determine the MySQL bind param types.
+ if (is_array($inputarr[0])) {
+ if (!$this->bulkBind) {
+ $this->outp_throw(
+ "2D Array of values sent to execute and 'ADOdb_mysqli::bulkBind' not set",
+ 'Execute'
+ );
+ return false;
+ }
+
+ $bulkTypeArray = [];
+ foreach ($inputarr as $v) {
+ if (is_string($this->bulkBind)) {
+ $typeArray = array_merge((array)$this->bulkBind, $v);
+ } else {
+ $typeArray = $this->getBindParamWithType($v);
+ }
+ $bulkTypeArray[] = $typeArray;
+ }
+ $this->bulkBind = false;
+ $ret = $this->_execute($sql, $bulkTypeArray);
+ } else {
+ $typeArray = $this->getBindParamWithType($inputarr);
+ $ret = $this->_execute($sql, $typeArray);
+ }
+ } else {
+ $ret = $this->_execute($sql, $inputarr);
+ }
+ return $ret;
+ }
+
+ /**
+ * Inserts the bind param type string at the front of the parameter array.
*
- * @param string|array $sql
- * @param array $inputarr
+ * @see https://www.php.net/manual/en/mysqli-stmt.bind-param.php
*
- * @return bool|mysqli_result
+ * @param array $inputArr
+ * @return array
*/
+ private function getBindParamWithType($inputArr): array
+ {
+ $typeString = '';
+ foreach ($inputArr as $v) {
+ if (is_integer($v) || is_bool($v)) {
+ $typeString .= 'i';
+ } elseif (is_float($v)) {
+ $typeString .= 'd';
+ } elseif (is_object($v)) {
+ // Assume a blob
+ $typeString .= 'b';
+ } else {
+ $typeString .= 's';
+ }
+ }
+
+ // Place the field type list at the front of the parameter array.
+ // This is the mysql specific format
+ array_unshift($inputArr, $typeString);
+ return $inputArr;
+ }
+
+ /**
+ * Return the query id.
+ *
+ * @param string|array $sql
+ * @param array $inputarr
+ *
+ * @return bool|mysqli_result
+ */
function _query($sql, $inputarr)
{
global $ADODB_COUNTRECS;
@@ -1104,7 +1210,7 @@ function _query($sql, $inputarr)
$stmt = $sql[1];
$a = '';
- foreach($inputarr as $k => $v) {
+ foreach($inputarr as $v) {
if (is_string($v)) $a .= 's';
else if (is_integer($v)) $a .= 'i';
else $a .= 'd';
@@ -1118,8 +1224,110 @@ function _query($sql, $inputarr)
$fnarr = array_merge( array($stmt,$a) , $inputarr);
call_user_func_array('mysqli_stmt_bind_param',$fnarr);
- $ret = mysqli_stmt_execute($stmt);
- return $ret;
+ return mysqli_stmt_execute($stmt);
+ }
+ else if (is_string($sql) && is_array($inputarr))
+ {
+
+ /*
+ * This is support for true prepared queries
+ * with bound parameters
+ *
+ * set prepared statement flags
+ */
+ $this->usePreparedStatement = true;
+ $this->usingBoundVariables = true;
+
+ $bulkBindArray = array();
+ if (is_array($inputarr[0]))
+ {
+ $bulkBindArray = $inputarr;
+ $inputArrayCount = count($inputarr[0]) - 1;
+ }
+ else
+ {
+ $bulkBindArray[] = $inputarr;
+ $inputArrayCount = count($inputarr) - 1;
+ }
+
+
+ /*
+ * Prepare the statement with the placeholders,
+ * prepare will fail if the statement is invalid
+ * so we trap and error if necessary. Note that we
+ * are calling MySQL prepare here, not ADOdb
+ */
+ $stmt = $this->_connectionID->prepare($sql);
+ if ($stmt === false)
+ {
+ $this->outp_throw(
+ "SQL Statement failed on preparation: " . htmlspecialchars($sql) . "'",
+ 'Execute'
+ );
+ return false;
+ }
+ /*
+ * Make sure the number of parameters provided in the input
+ * array matches what the query expects. We must discount
+ * the first parameter which contains the data types in
+ * our inbound parameters
+ */
+ $nparams = $stmt->param_count;
+
+ if ($nparams != $inputArrayCount)
+ {
+
+ $this->outp_throw(
+ "Input array has " . $inputArrayCount .
+ " params, does not match query: '" . htmlspecialchars($sql) . "'",
+ 'Execute'
+ );
+ return false;
+ }
+
+ foreach ($bulkBindArray as $inputarr)
+ {
+ /*
+ * Must pass references into call_user_func_array
+ */
+ $paramsByReference = array();
+ foreach($inputarr as $key => $value) {
+ /** @noinspection PhpArrayAccessCanBeReplacedWithForeachValueInspection */
+ $paramsByReference[$key] = &$inputarr[$key];
+ }
+
+ /*
+ * Bind the params
+ */
+ call_user_func_array(array($stmt, 'bind_param'), $paramsByReference);
+
+ /*
+ * Execute
+ */
+
+ $ret = mysqli_stmt_execute($stmt);
+
+ /*
+ * Did we throw an error?
+ */
+ if ($ret == false)
+ return false;
+ }
+
+ /*
+ * Is the statement a non-select
+ */
+ if ($stmt->affected_rows > -1)
+ {
+ $this->statementAffectedRows = $stmt->affected_rows;
+ return true;
+ }
+
+ // Tells affected_rows to be compliant
+ $this->isSelectStatement = true;
+
+ // Turn the statement into a result set and return it
+ return $stmt->get_result();
}
else
{
@@ -1144,7 +1352,7 @@ function _query($sql, $inputarr)
$rs = mysqli_multi_query($this->_connectionID, $sql.';');
if ($rs) {
$rs = ($ADODB_COUNTRECS) ? @mysqli_store_result( $this->_connectionID ) : @mysqli_use_result( $this->_connectionID );
- return $rs ? $rs : true; // mysqli_more_results( $this->_connectionID )
+ return $rs ?: true; // mysqli_more_results( $this->_connectionID )
}
} else {
$rs = mysqli_query($this->_connectionID, $sql, $ADODB_COUNTRECS ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT);
@@ -1262,6 +1470,12 @@ class ADORecordSet_mysqli extends ADORecordSet{
var $databaseType = "mysqli";
var $canSeek = true;
+ /** @var ADODB_mysqli The parent connection */
+ var $connection = false;
+
+ /** @var mysqli_result result link identifier */
+ var $_queryID;
+
function __construct($queryID, $mode = false)
{
if ($mode === false) {
@@ -1368,8 +1582,7 @@ function GetRowAssoc($upper = ADODB_ASSOC_CASE)
if ($this->fetchMode == MYSQLI_ASSOC && $upper == ADODB_ASSOC_CASE_LOWER) {
return $this->fields;
}
- $row = ADORecordSet::getRowAssoc($upper);
- return $row;
+ return ADORecordSet::getRowAssoc($upper);
}
/**
@@ -1524,6 +1737,7 @@ function _close()
12 = MYSQLI_TYPE_DATETIME
13 = MYSQLI_TYPE_YEAR
14 = MYSQLI_TYPE_NEWDATE
+245 = MYSQLI_TYPE_JSON
247 = MYSQLI_TYPE_ENUM
248 = MYSQLI_TYPE_SET
249 = MYSQLI_TYPE_TINY_BLOB
@@ -1544,7 +1758,7 @@ function _close()
*
* @return string The MetaType
*/
- function MetaType($t, $len = -1, $fieldobj = false)
+ function metaType($t, $len = -1, $fieldobj = false)
{
if (is_object($t)) {
$fieldobj = $t;
@@ -1552,8 +1766,16 @@ function MetaType($t, $len = -1, $fieldobj = false)
$len = $fieldobj->max_length;
}
+ $t = strtoupper($t);
+ /*
+ * Add support for custom actual types. We do this
+ * first, that allows us to override existing types
+ */
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
$len = -1; // mysql max_length is not accurate
- switch (strtoupper($t)) {
+ switch ($t) {
case 'STRING':
case 'CHAR':
case 'VARCHAR':
@@ -1631,6 +1853,8 @@ function MetaType($t, $len = -1, $fieldobj = false)
case 'DEC':
case 'FIXED':
default:
+
+
//if (!is_numeric($t)) echo "
--- Error in type matching $t -----
";
return 'N';
}
@@ -1661,8 +1885,14 @@ function MetaType($t, $len = -1, $fieldobj = false)
$len = $fieldobj->max_length;
}
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
$len = -1; // mysql max_length is not accurate
- switch (strtoupper($t)) {
+
+ switch ($t) {
case 'STRING':
case 'CHAR':
case 'VARCHAR':
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-mysqlpo.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-mysqlpo.inc.php
deleted file mode 100644
index 8aa7779ad..000000000
--- a/app/vendor/adodb/adodb-php/drivers/adodb-mysqlpo.inc.php
+++ /dev/null
@@ -1,124 +0,0 @@
-transOff) return true;
- $this->transCnt += 1;
- $this->Execute('SET AUTOCOMMIT=0');
- $this->Execute('BEGIN');
- return true;
- }
-
- function CommitTrans($ok=true)
- {
- if ($this->transOff) return true;
- if (!$ok) return $this->RollbackTrans();
-
- if ($this->transCnt) $this->transCnt -= 1;
- $this->Execute('COMMIT');
- $this->Execute('SET AUTOCOMMIT=1');
- return true;
- }
-
- function RollbackTrans()
- {
- if ($this->transOff) return true;
- if ($this->transCnt) $this->transCnt -= 1;
- $this->Execute('ROLLBACK');
- $this->Execute('SET AUTOCOMMIT=1');
- return true;
- }
-
- function RowLock($tables,$where='',$col='1 as adodbignore')
- {
- if ($this->transCnt==0) $this->BeginTrans();
- if ($where) $where = ' where '.$where;
- $rs = $this->Execute("select $col from $tables $where for update");
- return !empty($rs);
- }
-
-}
-
-class ADORecordSet_mysqlt extends ADORecordSet_mysql{
- var $databaseType = "mysqlt";
-
- function __construct($queryID,$mode=false)
- {
- if ($mode === false) {
- global $ADODB_FETCH_MODE;
- $mode = $ADODB_FETCH_MODE;
- }
-
- switch ($mode)
- {
- case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
- case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
-
- case ADODB_FETCH_DEFAULT:
- case ADODB_FETCH_BOTH:
- default: $this->fetchMode = MYSQL_BOTH; break;
- }
-
- $this->adodbFetchMode = $mode;
- parent::__construct($queryID);
- }
-
- function MoveNext()
- {
- if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) {
- $this->_currentRow += 1;
- return true;
- }
- if (!$this->EOF) {
- $this->_currentRow += 1;
- $this->EOF = true;
- }
- return false;
- }
-}
-
-class ADORecordSet_ext_mysqlt extends ADORecordSet_mysqlt {
-
- function MoveNext()
- {
- return adodb_movenext($this);
- }
-}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-mysqlt.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-mysqlt.inc.php
deleted file mode 100644
index cccd93f8d..000000000
--- a/app/vendor/adodb/adodb-php/drivers/adodb-mysqlt.inc.php
+++ /dev/null
@@ -1,141 +0,0 @@
-_transmode = $transaction_mode;
- if (empty($transaction_mode)) {
- $this->Execute('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ');
- return;
- }
- if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
- $this->Execute("SET SESSION TRANSACTION ".$transaction_mode);
- }
-
- function BeginTrans()
- {
- if ($this->transOff) return true;
- $this->transCnt += 1;
- $this->Execute('SET AUTOCOMMIT=0');
- $this->Execute('BEGIN');
- return true;
- }
-
- function CommitTrans($ok=true)
- {
- if ($this->transOff) return true;
- if (!$ok) return $this->RollbackTrans();
-
- if ($this->transCnt) $this->transCnt -= 1;
- $ok = $this->Execute('COMMIT');
- $this->Execute('SET AUTOCOMMIT=1');
- return $ok ? true : false;
- }
-
- function RollbackTrans()
- {
- if ($this->transOff) return true;
- if ($this->transCnt) $this->transCnt -= 1;
- $ok = $this->Execute('ROLLBACK');
- $this->Execute('SET AUTOCOMMIT=1');
- return $ok ? true : false;
- }
-
- function RowLock($tables,$where='',$col='1 as adodbignore')
- {
- if ($this->transCnt==0) $this->BeginTrans();
- if ($where) $where = ' where '.$where;
- $rs = $this->Execute("select $col from $tables $where for update");
- return !empty($rs);
- }
-
-}
-
-class ADORecordSet_mysqlt extends ADORecordSet_mysql{
- var $databaseType = "mysqlt";
-
- function __construct($queryID,$mode=false)
- {
- if ($mode === false) {
- global $ADODB_FETCH_MODE;
- $mode = $ADODB_FETCH_MODE;
- }
-
- switch ($mode)
- {
- case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
- case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
-
- case ADODB_FETCH_DEFAULT:
- case ADODB_FETCH_BOTH:
- default: $this->fetchMode = MYSQL_BOTH; break;
- }
-
- $this->adodbFetchMode = $mode;
- parent::__construct($queryID);
- }
-
- function MoveNext()
- {
- if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) {
- $this->_currentRow += 1;
- return true;
- }
- if (!$this->EOF) {
- $this->_currentRow += 1;
- $this->EOF = true;
- }
- return false;
- }
-}
-
-class ADORecordSet_ext_mysqlt extends ADORecordSet_mysqlt {
-
- function MoveNext()
- {
- return adodb_movenext($this);
- }
-}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-oci8.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-oci8.inc.php
index e541b6b6a..c1f4e5020 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-oci8.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-oci8.inc.php
@@ -791,6 +791,11 @@ function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
$nrows += $offset;
}
$sql = "select * from (".$sql.") where rownum <= :adodb_offset";
+
+ // If non-bound statement, $inputarr is false
+ if (!$inputarr) {
+ $inputarr = array();
+ }
$inputarr['adodb_offset'] = $nrows;
$nrows = -1;
}
@@ -973,9 +978,12 @@ function UpdateBlobFile($table,$column,$val,$where,$blobtype='BLOB')
/**
* Execute SQL
*
- * @param sql SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text)
- * @param [inputarr] holds the input data to bind to. Null elements will be set to null.
- * @return RecordSet or false
+ * @param string|array $sql SQL statement to execute, or possibly an array holding
+ * prepared statement ($sql[0] will hold sql text).
+ * @param array|false $inputarr holds the input data to bind to.
+ * Null elements will be set to null.
+ *
+ * @return ADORecordSet|false
*/
function Execute($sql,$inputarr=false)
{
@@ -1094,6 +1102,22 @@ function Prepare($sql,$cursor=false)
return array($sql,$stmt,0,$BINDNUM);
}
+ function releaseStatement(&$stmt)
+ {
+ if (is_array($stmt)
+ && isset($stmt[1])
+ && is_resource($stmt[1])
+ && oci_free_statement($stmt[1])
+ ) {
+ // Clearing the resource to avoid it being of type Unknown
+ $stmt[1] = null;
+ return true;
+ }
+
+ // Not a valid prepared statement
+ return false;
+ }
+
/*
Call an oracle stored procedure and returns a cursor variable as a recordset.
Concept by Robert Tuttle robert@ud.com
@@ -1241,12 +1265,12 @@ function Param($name,$type='C')
* $db->Parameter($stmt,$group,'group');
* $db->Execute($stmt);
*
- * @param $stmt Statement returned by Prepare() or PrepareSP().
+ * @param $stmt Statement returned by {@see Prepare()} or {@see PrepareSP()}.
* @param $var PHP variable to bind to
* @param $name Name of stored procedure variable name to bind to.
- * @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8.
- * @param [$maxLen] Holds an maximum length of the variable.
- * @param [$type] The data type of $var. Legal values depend on driver.
+ * @param bool $isOutput Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8.
+ * @param int $maxLen Holds an maximum length of the variable.
+ * @param mixed $type The data type of $var. Legal values depend on driver.
*
* @link http://php.net/oci_bind_by_name
*/
@@ -1484,16 +1508,17 @@ function MetaPrimaryKeys($table, $owner=false,$internalKey=false)
}
/**
- * returns assoc array where keys are tables, and values are foreign keys
+ * Returns a list of Foreign Keys associated with a specific table.
*
- * @param str $table
- * @param str $owner [optional][default=NULL]
- * @param bool $upper [optional][discarded]
- * @return mixed[] Array of foreign key information
+ * @param string $table
+ * @param string $owner
+ * @param bool $upper discarded
+ * @param bool $associative discarded
*
- * @link http://gis.mit.edu/classes/11.521/sqlnotes/referential_integrity.html
+ * @return string[]|false An array where keys are tables, and values are foreign keys;
+ * false if no foreign keys could be found.
*/
- function MetaForeignKeys($table, $owner=false, $upper=false)
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
global $ADODB_FETCH_MODE;
@@ -1810,7 +1835,12 @@ function MetaType($t, $len=-1, $fieldobj=false)
$len = $fieldobj->max_length;
}
- switch (strtoupper($t)) {
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
+ switch ($t) {
case 'VARCHAR':
case 'VARCHAR2':
case 'CHAR':
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-odbc_mssql.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-odbc_mssql.inc.php
index 37185aac3..9f53d3d7c 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-odbc_mssql.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-odbc_mssql.inc.php
@@ -81,8 +81,7 @@ protected function _insertID($table = '', $column = '')
return $this->GetOne($this->identitySQL);
}
-
- function MetaForeignKeys($table, $owner=false, $upper=false)
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
global $ADODB_FETCH_MODE;
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-odbtp.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-odbtp.inc.php
index bd167a1c8..41bd0873b 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-odbtp.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-odbtp.inc.php
@@ -393,7 +393,7 @@ function MetaPrimaryKeys($table, $owner='')
return $arr2;
}
- function MetaForeignKeys($table, $owner='', $upper=false)
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
global $ADODB_FETCH_MODE;
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-pdo.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-pdo.inc.php
index cf8e4e264..e0e6c7297 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-pdo.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-pdo.inc.php
@@ -82,7 +82,6 @@ class ADODB_pdo extends ADOConnection {
var $_errormsg = false;
var $_errorno = false;
- var $dsnType = '';
var $stmt = false;
var $_driver;
@@ -238,6 +237,26 @@ function Concat()
return call_user_func_array('parent::Concat', $args);
}
+ /**
+ * Triggers a driver-specific request for a bind parameter
+ *
+ * @param string $name
+ * @param string $type
+ *
+ * @return string
+ */
+ public function param($name,$type='C') {
+
+ $args = func_get_args();
+ if(method_exists($this->_driver, 'param')) {
+ // Return the driver specific entry, that mimics the native driver
+ return call_user_func_array(array($this->_driver, 'param'), $args);
+ }
+
+ // No driver specific method defined, use mysql format '?'
+ return call_user_func_array('parent::param', $args);
+ }
+
// returns true or false
function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename)
{
@@ -294,18 +313,19 @@ public function metaPrimaryKeys($table,$owner=false)
}
/**
- * Returns a list of Foreign Keys for a specified table.
+ * Returns a list of Foreign Keys associated with a specific table.
*
* @param string $table
- * @param bool $owner (optional) not used in this driver
+ * @param string $owner (optional) not used in this driver
* @param bool $upper
* @param bool $associative
*
- * @return string[] where keys are tables, and values are foreign keys
+ * @return string[]|false An array where keys are tables, and values are foreign keys;
+ * false if no foreign keys could be found.
*/
- public function metaForeignKeys($table, $owner=false, $upper=false,$associative=false) {
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false) {
if (method_exists($this->_driver,'metaForeignKeys'))
- return $this->_driver->metaForeignKeys($table,$owner,$upper,$associative);
+ return $this->_driver->metaForeignKeys($table, $owner, $upper, $associative);
}
/**
@@ -565,6 +585,7 @@ function _query($sql,$inputarr=false)
$this->_driver->debug = $this->debug;
}
if ($inputarr) {
+
/*
* inputarr must be numeric
*/
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-pdo_oci.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-pdo_oci.inc.php
index 9a05ee6a9..20b47deff 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-pdo_oci.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-pdo_oci.inc.php
@@ -75,15 +75,15 @@ function MetaColumns($table,$normalize=true)
$retarr = array();
while (!$rs->EOF) { //print_r($rs->fields);
$fld = new ADOFieldObject();
- $fld->name = $rs->fields[0];
- $fld->type = $rs->fields[1];
- $fld->max_length = $rs->fields[2];
+ $fld->name = $rs->fields[0];
+ $fld->type = $rs->fields[1];
+ $fld->max_length = $rs->fields[2];
$fld->scale = $rs->fields[3];
if ($rs->fields[1] == 'NUMBER' && $rs->fields[3] == 0) {
$fld->type ='INT';
- $fld->max_length = $rs->fields[4];
- }
- $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0);
+ $fld->max_length = $rs->fields[4];
+ }
+ $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0);
$fld->binary = (strpos($fld->type,'BLOB') !== false);
$fld->default_value = $rs->fields[6];
@@ -98,12 +98,25 @@ function MetaColumns($table,$normalize=true)
return $retarr;
}
- /**
- * @param bool $auto_commit
- * @return void
- */
- function SetAutoCommit($auto_commit)
- {
- $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT, $auto_commit);
- }
+ /**
+ * @param bool $auto_commit
+ * @return void
+ */
+ function SetAutoCommit($auto_commit)
+ {
+ $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT, $auto_commit);
+ }
+
+ /**
+ * Returns a driver-specific format for a bind parameter
+ *
+ * @param string $name
+ * @param string $type (ignored in driver)
+ *
+ * @return string
+ */
+ public function param($name,$type='C')
+ {
+ return sprintf(':%s', $name);
+ }
}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-pdo_pgsql.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-pdo_pgsql.inc.php
index 0212d4fda..6c06ac103 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-pdo_pgsql.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-pdo_pgsql.inc.php
@@ -21,11 +21,11 @@
class ADODB_pdo_pgsql extends ADODB_pdo {
var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1";
- var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
- and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages',
- 'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
- union
- select viewname,'V' from pg_views where viewname not like 'pg\_%'";
+ var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
+ and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages',
+ 'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
+ union
+ select viewname,'V' from pg_views where viewname not like 'pg\_%'";
//"select tablename from pg_tables where tablename not like 'pg_%' order by 1";
var $isoDates = true; // accepts dates in ISO format
var $sysDate = "CURRENT_DATE";
@@ -34,15 +34,15 @@ class ADODB_pdo_pgsql extends ADODB_pdo {
var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum
FROM pg_class c, pg_attribute a,pg_type t
WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%'
-AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
+ AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
// used when schema defined
var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum
-FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n
-WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
- and c.relnamespace=n.oid and n.nspname='%s'
- and a.attname not like '....%%' AND a.attnum > 0
- AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
+ FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n
+ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
+ and c.relnamespace=n.oid and n.nspname='%s'
+ and a.attname not like '....%%' AND a.attnum > 0
+ AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
// get primary key etc -- from Freek Dijkstra
var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key
@@ -97,23 +97,27 @@ function MetaTables($ttype=false,$showSchema=false,$mask=false)
{
$info = $this->ServerInfo();
if ($info['version'] >= 7.3) {
- $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
- and schemaname not in ( 'pg_catalog','information_schema')
- union
- select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') ";
+ $this->metaTablesSQL = "
+select tablename,'T' from pg_tables
+where tablename not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema')
+union
+select viewname,'V' from pg_views
+where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema')";
}
if ($mask) {
$save = $this->metaTablesSQL;
$mask = $this->qstr(strtolower($mask));
if ($info['version']>=7.3)
$this->metaTablesSQL = "
-select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')
- union
-select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') ";
+select tablename,'T' from pg_tables
+where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')
+union
+select viewname,'V' from pg_views
+where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema')";
else
$this->metaTablesSQL = "
select tablename,'T' from pg_tables where tablename like $mask
- union
+union
select viewname,'V' from pg_views where viewname like $mask";
}
$ret = ADOConnection::MetaTables($ttype,$showSchema);
@@ -297,4 +301,23 @@ function SetTransactionMode( $transaction_mode )
if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
$this->_connectionID->query("SET TRANSACTION ".$transaction_mode);
}
+
+ /**
+ * Returns a driver-specific format for a bind parameter
+ *
+ * Unlike the native driver, we use :name parameters
+ * instead of offsets
+ *
+ * @param string $name
+ * @param string $type (ignored in driver)
+ *
+ * @return string
+ */
+ public function param($name,$type='C') {
+ if (!$name) {
+ return '';
+ }
+
+ return sprintf(':%s', $name);
+ }
}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-pdo_sqlite.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-pdo_sqlite.inc.php
index b62ca35ed..dab1de993 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-pdo_sqlite.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-pdo_sqlite.inc.php
@@ -34,7 +34,7 @@ class ADODB_pdo_sqlite extends ADODB_pdo {
var $_genSeq2SQL = 'INSERT INTO %s VALUES(%s)';
var $_dropSeqSQL = 'DROP TABLE %s';
var $concat_operator = '||';
- var $pdoDriver = false;
+ var $pdoDriver = false;
var $random='abs(random())';
function _init($parentDriver)
@@ -156,40 +156,48 @@ function RollbackTrans()
// mark newnham
function MetaColumns($tab,$normalize=true)
{
- global $ADODB_FETCH_MODE;
-
- $parent = $this->pdoDriver;
- $false = false;
- $save = $ADODB_FETCH_MODE;
- $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
- if ($parent->fetchMode !== false) $savem = $parent->SetFetchMode(false);
- $rs = $parent->Execute("PRAGMA table_info('$tab')");
- if (isset($savem)) $parent->SetFetchMode($savem);
- if (!$rs) {
- $ADODB_FETCH_MODE = $save;
- return $false;
- }
- $arr = array();
- while ($r = $rs->FetchRow()) {
- $type = explode('(',$r['type']);
- $size = '';
- if (sizeof($type)==2)
- $size = trim($type[1],')');
- $fn = strtoupper($r['name']);
- $fld = new ADOFieldObject;
- $fld->name = $r['name'];
- $fld->type = $type[0];
- $fld->max_length = $size;
- $fld->not_null = $r['notnull'];
- $fld->primary_key = $r['pk'];
- $fld->default_value = $r['dflt_value'];
- $fld->scale = 0;
- if ($save == ADODB_FETCH_NUM) $arr[] = $fld;
- else $arr[strtoupper($fld->name)] = $fld;
- }
- $rs->Close();
- $ADODB_FETCH_MODE = $save;
- return $arr;
+ global $ADODB_FETCH_MODE;
+
+ $parent = $this->pdoDriver;
+ $false = false;
+ $save = $ADODB_FETCH_MODE;
+ $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+ if ($parent->fetchMode !== false) {
+ $savem = $parent->SetFetchMode(false);
+ }
+ $rs = $parent->Execute("PRAGMA table_info('$tab')");
+ if (isset($savem)) {
+ $parent->SetFetchMode($savem);
+ }
+ if (!$rs) {
+ $ADODB_FETCH_MODE = $save;
+ return $false;
+ }
+ $arr = array();
+ while ($r = $rs->FetchRow()) {
+ $type = explode('(', $r['type']);
+ $size = '';
+ if (sizeof($type) == 2) {
+ $size = trim($type[1], ')');
+ }
+ $fn = strtoupper($r['name']);
+ $fld = new ADOFieldObject;
+ $fld->name = $r['name'];
+ $fld->type = $type[0];
+ $fld->max_length = $size;
+ $fld->not_null = $r['notnull'];
+ $fld->primary_key = $r['pk'];
+ $fld->default_value = $r['dflt_value'];
+ $fld->scale = 0;
+ if ($save == ADODB_FETCH_NUM) {
+ $arr[] = $fld;
+ } else {
+ $arr[strtoupper($fld->name)] = $fld;
+ }
+ }
+ $rs->Close();
+ $ADODB_FETCH_MODE = $save;
+ return $arr;
}
function MetaTables($ttype=false,$showSchema=false,$mask=false)
@@ -208,5 +216,18 @@ function MetaTables($ttype=false,$showSchema=false,$mask=false)
$this->metaTablesSQL = $save;
}
return $ret;
- }
+ }
+
+ /**
+ * Returns a driver-specific format for a bind parameter
+ *
+ * @param string $name
+ * @param string $type (ignored in driver)
+ *
+ * @return string
+ */
+ public function param($name,$type='C')
+ {
+ return sprintf(':%s', $name);
+ }
}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-postgres64.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-postgres64.inc.php
index 9128467be..525e09d25 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-postgres64.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-postgres64.inc.php
@@ -22,19 +22,11 @@
// security - hide paths
if (!defined('ADODB_DIR')) die();
-function adodb_addslashes($s)
-{
- $len = strlen($s);
- if ($len == 0) return "''";
- if (strncmp($s,"'",1) === 0 && substr($s,$len-1) == "'") return $s; // already quoted
-
- return "'".addslashes($s)."'";
-}
-
class ADODB_postgres64 extends ADOConnection{
var $databaseType = 'postgres64';
var $dataProvider = 'postgres';
var $hasInsertID = true;
+ /** @var bool|resource */
var $_resultid = false;
var $concat_operator='||';
var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1";
@@ -177,7 +169,7 @@ function _affectedrows()
/**
- * @return true/false
+ * @return bool
*/
function BeginTrans()
{
@@ -387,7 +379,7 @@ function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB')
function BlobDelete( $blob )
{
pg_query($this->_connectionID, 'begin');
- $result = @pg_lo_unlink($blob);
+ $result = @pg_lo_unlink($this->_connectionID, $blob);
pg_query($this->_connectionID, 'commit');
return( $result );
}
@@ -682,36 +674,58 @@ function MetaIndexes ($table, $primary = FALSE, $owner = false)
return $indexes;
}
- // returns true or false
- //
- // examples:
- // $db->Connect("host=host1 user=user1 password=secret port=4341");
- // $db->Connect('host1','user1','secret');
- function _connect($str,$user='',$pwd='',$db='',$ctype=0)
+ /**
+ * Connect to a database.
+ *
+ * Examples:
+ * $db->Connect("host=host1 user=user1 password=secret port=4341");
+ * $db->Connect('host1:4341', 'user1', 'secret');
+ *
+ * @param string $str pg_connect() Connection string or Hostname[:port]
+ * @param string $user (Optional) The username to connect as.
+ * @param string $pwd (Optional) The password to connect with.
+ * @param string $db (Optional) The name of the database to start in when connected.
+ * @param int $ctype Connection type
+ * @return bool|null True if connected successfully, false if connection failed, or
+ * null if the PostgreSQL extension is not loaded.
+ */
+ function _connect($str, $user='', $pwd='', $db='', $ctype=0)
{
- if (!function_exists('pg_connect')) return null;
+ if (!function_exists('pg_connect')) {
+ return null;
+ }
$this->_errorMsg = false;
+ // If $user, $pwd and $db are all null, then $str is a pg_connect()
+ // connection string. Otherwise we expect it to be a hostname,
+ // with optional port separated by ':'
if ($user || $pwd || $db) {
- $user = adodb_addslashes($user);
- $pwd = adodb_addslashes($pwd);
- if (strlen($db) == 0) $db = 'template1';
- $db = adodb_addslashes($db);
- if ($str) {
- $host = explode(":", $str);
- if ($host[0]) $str = "host=".adodb_addslashes($host[0]);
- else $str = '';
- if (isset($host[1])) $str .= " port=$host[1]";
- else if (!empty($this->port)) $str .= " port=".$this->port;
+ // Hostname & port
+ if ($str) {
+ $host = explode(':', $str);
+ if ($host[0]) {
+ $conn['host'] = $host[0];
+ }
+ if (isset($host[1])) {
+ $conn['port'] = (int)$host[1];
+ } elseif (!empty($this->port)) {
+ $conn['port'] = $this->port;
+ }
+ }
+ $conn['user'] = $user;
+ $conn['password'] = $pwd;
+ // @TODO not sure why we default to 'template1', pg_connect() uses the username when dbname is empty
+ $conn['dbname'] = $db ?: 'template1';
+
+ // Generate connection string
+ $str = '';
+ foreach ($conn as $param => $value) {
+ // Escaping single quotes and backslashes per pg_connect() documentation
+ $str .= $param . "='" . addcslashes($value, "'\\") . "' ";
}
- if ($user) $str .= " user=".$user;
- if ($pwd) $str .= " password=".$pwd;
- if ($db) $str .= " dbname=".$db;
}
- //if ($user) $linea = "user=$user host=$linea password=$pwd dbname=$db port=5432";
-
if ($ctype === 1) { // persistent
$this->_connectionID = pg_pconnect($str);
} else {
@@ -795,8 +809,7 @@ function _query($sql,$inputarr=false)
if ($execp) $exsql = "EXECUTE $plan ($execp)";
else $exsql = "EXECUTE $plan";
-
- $rez = @pg_execute($this->_connectionID,$exsql);
+ $rez = @pg_query($this->_connectionID, $exsql);
if (!$rez) {
# Perhaps plan does not exist? Prepare/compile plan.
$params = '';
@@ -820,14 +833,14 @@ function _query($sql,$inputarr=false)
}
$s = "PREPARE $plan ($params) AS ".substr($sql,0,strlen($sql)-2);
//adodb_pr($s);
- $rez = pg_execute($this->_connectionID,$s);
+ $rez = pg_query($this->_connectionID, $s);
//echo $this->ErrorMsg();
}
if ($rez)
- $rez = pg_execute($this->_connectionID,$exsql);
+ $rez = pg_query($this->_connectionID, $exsql);
} else {
//adodb_backtrace();
- $rez = pg_query($this->_connectionID,$sql);
+ $rez = pg_query($this->_connectionID, $sql);
}
// check if no data returned, then no need to create real recordset
if ($rez && pg_num_fields($rez) <= 0) {
@@ -1007,8 +1020,20 @@ function _decode($blob)
return pg_unescape_bytea($blob);
}
- function _fixblobs()
+ /**
+ * Fetches and prepares the RecordSet's fields.
+ *
+ * Fixes the blobs if there are any.
+ */
+ protected function _prepFields()
{
+ $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
+
+ // Check prerequisites and bail early if we do not have what we need.
+ if (!isset($this->_blobArr) || $this->fields === false) {
+ return;
+ }
+
if ($this->fetchMode == PGSQL_NUM || $this->fetchMode == PGSQL_BOTH) {
foreach($this->_blobArr as $k => $v) {
$this->fields[$k] = ADORecordSet_postgres64::_decode($this->fields[$k]);
@@ -1027,9 +1052,8 @@ function MoveNext()
if (!$this->EOF) {
$this->_currentRow++;
if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
- $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
- if (is_array($this->fields) && $this->fields) {
- if (isset($this->_blobArr)) $this->_fixblobs();
+ $this->_prepfields();
+ if ($this->fields !== false) {
return true;
}
}
@@ -1041,15 +1065,12 @@ function MoveNext()
function _fetch()
{
-
- if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0)
+ if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0) {
return false;
+ }
- $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
-
- if ($this->fields && isset($this->_blobArr)) $this->_fixblobs();
-
- return (is_array($this->fields));
+ $this->_prepfields();
+ return $this->fields !== false;
}
function _close()
@@ -1069,7 +1090,13 @@ function MetaType($t,$len=-1,$fieldobj=false)
$t = $fieldobj->type;
$len = $fieldobj->max_length;
}
- switch (strtoupper($t)) {
+
+ $t = strtoupper($t);
+
+ if (array_key_exists($t,$this->connection->customActualTypes))
+ return $this->connection->customActualTypes[$t];
+
+ switch ($t) {
case 'MONEY': // stupid, postgres expects money to be a string
case 'INTERVAL':
case 'CHAR':
@@ -1081,6 +1108,7 @@ function MetaType($t,$len=-1,$fieldobj=false)
case 'CIDR':
case 'INET':
case 'MACADDR':
+ case 'UUID':
if ($len <= $this->blobSize) return 'C';
case 'TEXT':
@@ -1121,6 +1149,12 @@ function MetaType($t,$len=-1,$fieldobj=false)
case 'SERIAL':
return 'R';
+ case 'NUMERIC':
+ case 'DECIMAL':
+ case 'FLOAT4':
+ case 'FLOAT8':
+ return 'N';
+
default:
return ADODB_DEFAULT_METATYPE;
}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-postgres7.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-postgres7.inc.php
index 59174f678..ddbe7a6e0 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-postgres7.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-postgres7.inc.php
@@ -154,10 +154,7 @@ protected function _generateMetaColumnsSQL($table, $schema)
}
}
- /**
- * @returns assoc array where keys are tables, and values are foreign keys
- */
- function MetaForeignKeys($table, $owner=false, $upper=false)
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
# Regex isolates the 2 terms between parenthesis using subexpressions
$regex = '^.*\((.*)\).*\((.*)\).*$';
@@ -193,50 +190,18 @@ function MetaForeignKeys($table, $owner=false, $upper=false)
$a = array();
while (!$rs->EOF) {
+ $lookup_table = $rs->fields('lookup_table');
+ $fields = $rs->fields('dep_field') . '=' . $rs->fields('lookup_field');
if ($upper) {
- $a[strtoupper($rs->Fields('lookup_table'))][] = strtoupper(str_replace('"','',$rs->Fields('dep_field').'='.$rs->Fields('lookup_field')));
- } else {
- $a[$rs->Fields('lookup_table')][] = str_replace('"','',$rs->Fields('dep_field').'='.$rs->Fields('lookup_field'));
+ $lookup_table = strtoupper($lookup_table);
+ $fields = strtoupper($fields);
}
+ $a[$lookup_table][] = str_replace('"','', $fields);
+
$rs->MoveNext();
}
return $a;
-
- }
-
- // from Edward Jaramilla, improved version - works on pg 7.4
- function _old_MetaForeignKeys($table, $owner=false, $upper=false)
- {
- $sql = 'SELECT t.tgargs as args
- FROM
- pg_trigger t,pg_class c,pg_proc p
- WHERE
- t.tgenabled AND
- t.tgrelid = c.oid AND
- t.tgfoid = p.oid AND
- p.proname = \'RI_FKey_check_ins\' AND
- c.relname = \''.strtolower($table).'\'
- ORDER BY
- t.tgrelid';
-
- $rs = $this->Execute($sql);
-
- if (!$rs || $rs->EOF) return false;
-
- $arr = $rs->GetArray();
- $a = array();
- foreach($arr as $v) {
- $data = explode(chr(0), $v['args']);
- $size = count($data)-1; //-1 because the last node is empty
- for($i = 4; $i < $size; $i++) {
- if ($upper)
- $a[strtoupper($data[2])][] = strtoupper($data[$i].'='.$data[++$i]);
- else
- $a[$data[2]][] = $data[$i].'='.$data[++$i];
- }
- }
- return $a;
}
function _query($sql,$inputarr=false)
@@ -334,10 +299,8 @@ function MoveNext()
if (!$this->EOF) {
$this->_currentRow++;
if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
- $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
-
- if (is_array($this->fields)) {
- if ($this->fields && isset($this->_blobArr)) $this->_fixblobs();
+ $this->_prepfields();
+ if ($this->fields !== false) {
return true;
}
}
@@ -360,14 +323,13 @@ function _fetch()
return false;
}
- $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
-
- if ($this->fields) {
- if (isset($this->_blobArr)) $this->_fixblobs();
+ $this->_prepfields();
+ if ($this->fields !== false) {
$this->_updatefields();
+ return true;
}
- return (is_array($this->fields));
+ return false;
}
function MoveNext()
@@ -375,19 +337,13 @@ function MoveNext()
if (!$this->EOF) {
$this->_currentRow++;
if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
- $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
-
- if (is_array($this->fields)) {
- if ($this->fields) {
- if (isset($this->_blobArr)) $this->_fixblobs();
-
- $this->_updatefields();
- }
+ $this->_prepfields();
+ if ($this->fields !== false) {
+ $this->_updatefields();
return true;
}
}
-
$this->fields = false;
$this->EOF = true;
}
diff --git a/app/vendor/adodb/adodb-php/drivers/adodb-sqlite3.inc.php b/app/vendor/adodb/adodb-php/drivers/adodb-sqlite3.inc.php
index 548727d8b..318171a8c 100644
--- a/app/vendor/adodb/adodb-php/drivers/adodb-sqlite3.inc.php
+++ b/app/vendor/adodb/adodb-php/drivers/adodb-sqlite3.inc.php
@@ -24,6 +24,9 @@
// security - hide paths
if (!defined('ADODB_DIR')) die();
+/**
+ * Class ADODB_sqlite3
+ */
class ADODB_sqlite3 extends ADOConnection {
var $databaseType = "sqlite3";
var $dataProvider = "sqlite";
@@ -34,10 +37,13 @@ class ADODB_sqlite3 extends ADOConnection {
var $hasInsertID = true; /// supports autoincrement ID?
var $hasAffectedRows = true; /// supports affected rows for update/delete?
var $metaTablesSQL = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name";
- var $sysDate = "adodb_date('Y-m-d')";
- var $sysTimeStamp = "adodb_date('Y-m-d H:i:s')";
+ var $sysDate = "DATE('now','localtime')";
+ var $sysTimeStamp = "DATETIME('now','localtime')";
var $fmtTimeStamp = "'Y-m-d H:i:s'";
+ /** @var SQLite3 */
+ var $_connectionID;
+
function ServerInfo()
{
$version = SQLite3::version();
@@ -51,7 +57,7 @@ function BeginTrans()
if ($this->transOff) {
return true;
}
- $ret = $this->Execute("BEGIN TRANSACTION");
+ $this->Execute("BEGIN TRANSACTION");
$this->transCnt += 1;
return true;
}
@@ -95,6 +101,9 @@ function metaType($t,$len=-1,$fieldobj=false)
$t = strtoupper($t);
+ if (array_key_exists($t,$this->customActualTypes))
+ return $this->customActualTypes[$t];
+
/*
* We are using the Sqlite affinity method here
* @link https://www.sqlite.org/datatype3.html
@@ -197,7 +206,7 @@ function MetaColumns($table, $normalize=true)
return $arr;
}
- function metaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE )
+ public function metaForeignKeys($table, $owner = '', $upper = false, $associative = false)
{
global $ADODB_FETCH_MODE;
if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC
@@ -214,7 +223,7 @@ function metaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative =
)
WHERE type != 'meta'
AND sql NOTNULL
- AND LOWER(name) ='" . strtolower($table) . "'";
+ AND LOWER(name) ='" . strtolower($table) . "'";
$tableSql = $this->getOne($sql);
@@ -304,8 +313,7 @@ function _createFunctions()
$this->_connectionID->createFunction('adodb_date2', 'adodb_date2', 2);
}
-
- // returns true or false
+ /** @noinspection PhpUnusedParameterInspection */
function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
{
if (empty($argHostname) && $argDatabasename) {
@@ -317,7 +325,6 @@ function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
return true;
}
- // returns true or false
function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
{
// There's no permanent connect in SQLite3
@@ -394,7 +401,7 @@ function GenID($seq='adodbseq',$start=1)
return false;
}
- function CreateSequence($seqname='adodbseq',$start=1)
+ function createSequence($seqname='adodbseq', $startID=1)
{
if (empty($this->_genSeqSQL)) {
return false;
@@ -403,8 +410,8 @@ function CreateSequence($seqname='adodbseq',$start=1)
if (!$ok) {
return false;
}
- $start -= 1;
- return $this->Execute("insert into $seqname values($start)");
+ $startID -= 1;
+ return $this->Execute("insert into $seqname values($startID)");
}
var $_dropSeqSQL = 'drop table %s';
@@ -559,14 +566,13 @@ function textMax()
*
* This uses the more efficient strftime native function to process
*
- * @param str $fld The name of the field to process
+ * @param string $fld The name of the field to process
*
- * @return str The SQL Statement
+ * @return string The SQL Statement
*/
function month($fld)
{
- $x = "strftime('%m',$fld)";
- return $x;
+ return "strftime('%m',$fld)";
}
/**
@@ -574,13 +580,12 @@ function month($fld)
*
* This uses the more efficient strftime native function to process
*
- * @param str $fld The name of the field to process
+ * @param string $fld The name of the field to process
*
- * @return str The SQL Statement
+ * @return string The SQL Statement
*/
function day($fld) {
- $x = "strftime('%d',$fld)";
- return $x;
+ return "strftime('%d',$fld)";
}
/**
@@ -588,14 +593,116 @@ function day($fld) {
*
* This uses the more efficient strftime native function to process
*
- * @param str $fld The name of the field to process
+ * @param string $fld The name of the field to process
*
- * @return str The SQL Statement
+ * @return string The SQL Statement
*/
function year($fld)
{
- $x = "strftime('%Y',$fld)";
- return $x;
+ return "strftime('%Y',$fld)";
+ }
+
+ /**
+ * SQLite update for blob
+ *
+ * SQLite must be a fully prepared statement (all variables must be bound),
+ * so $where can either be an array (array params) or a string that we will
+ * do our best to unpack and turn into a prepared statement.
+ *
+ * @param string $table
+ * @param string $column
+ * @param string $val Blob value to set
+ * @param mixed $where An array of parameters (key => value pairs),
+ * or a string (where clause).
+ * @param string $blobtype ignored
+ *
+ * @return bool success
+ */
+ function updateBlob($table, $column, $val, $where, $blobtype = 'BLOB')
+ {
+ if (is_array($where)) {
+ // We were passed a set of key=>value pairs
+ $params = $where;
+ } else {
+ // Given a where clause string, we have to disassemble the
+ // statements into keys and values
+ $params = array();
+ $temp = preg_split('/(where|and)/i', $where);
+ $where = array_filter($temp);
+
+ foreach ($where as $wValue) {
+ $wTemp = preg_split('/[= \']+/', $wValue);
+ $wTemp = array_filter($wTemp);
+ $wTemp = array_values($wTemp);
+ $params[$wTemp[0]] = $wTemp[1];
+ }
+ }
+
+ $paramWhere = array();
+ foreach ($params as $bindKey => $bindValue) {
+ $paramWhere[] = $bindKey . '=?';
+ }
+
+ $sql = "UPDATE $table SET $column=? WHERE "
+ . implode(' AND ', $paramWhere);
+
+ // Prepare the statement
+ $stmt = $this->_connectionID->prepare($sql);
+
+ // Set the first bind value equal to value we want to update
+ if (!$stmt->bindValue(1, $val, SQLITE3_BLOB)) {
+ return false;
+ }
+
+ // Build as many keys as available
+ $bindIndex = 2;
+ foreach ($params as $bindValue) {
+ if (is_integer($bindValue) || is_bool($bindValue) || is_float($bindValue)) {
+ $type = SQLITE3_NUM;
+ } elseif (is_object($bindValue)) {
+ // Assume a blob, this should never appear in
+ // the binding for a where statement anyway
+ $type = SQLITE3_BLOB;
+ } else {
+ $type = SQLITE3_TEXT;
+ }
+
+ if (!$stmt->bindValue($bindIndex, $bindValue, $type)) {
+ return false;
+ }
+
+ $bindIndex++;
+ }
+
+ // Now execute the update. NB this is SQLite execute, not ADOdb
+ $ok = $stmt->execute();
+ return is_object($ok);
+ }
+
+ /**
+ * SQLite update for blob from a file
+ *
+ * @param string $table
+ * @param string $column
+ * @param string $path Filename containing blob data
+ * @param mixed $where {@see updateBlob()}
+ * @param string $blobtype ignored
+ *
+ * @return bool success
+ */
+ function updateBlobFile($table, $column, $path, $where, $blobtype = 'BLOB')
+ {
+ if (!file_exists($path)) {
+ return false;
+ }
+
+ // Read file information
+ $fileContents = file_get_contents($path);
+ if ($fileContents === false)
+ // Distinguish between an empty file and failure
+ return false;
+
+ return $this->updateBlob($table, $column, $fileContents, $where, $blobtype);
}
}
@@ -609,9 +716,12 @@ class ADORecordset_sqlite3 extends ADORecordSet {
var $databaseType = "sqlite3";
var $bind = false;
+ /** @var SQLite3Result */
+ var $_queryID;
+
+ /** @noinspection PhpMissingParentConstructorInspection */
function __construct($queryID,$mode=false)
{
-
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
diff --git a/app/vendor/adodb/adodb-php/perf/perf-mysql.inc.php b/app/vendor/adodb/adodb-php/perf/perf-mysql.inc.php
index dae44229d..ed92c8051 100644
--- a/app/vendor/adodb/adodb-php/perf/perf-mysql.inc.php
+++ b/app/vendor/adodb/adodb-php/perf/perf-mysql.inc.php
@@ -125,7 +125,7 @@ function Explain($sql,$partial=false)
/**
* Returns a list of table statuses.
- *
+ *
* @param string $orderby Unused (compatibility with parent method)
* @return string A formatted set of recordsets
*/
@@ -299,7 +299,7 @@ function GetKeyHitRatio()
var $optimizeTableHigh = 'OPTIMIZE TABLE %s';
/**
- * @see adodb_perf#optimizeTable
+ * @see adodb_perf::optimizeTable()
*/
function optimizeTable( $table, $mode = ADODB_OPT_LOW)
{
diff --git a/app/vendor/adodb/adodb-php/perf/perf-postgres.inc.php b/app/vendor/adodb/adodb-php/perf/perf-postgres.inc.php
index 315c17f5c..16b767d20 100644
--- a/app/vendor/adodb/adodb-php/perf/perf-postgres.inc.php
+++ b/app/vendor/adodb/adodb-php/perf/perf-postgres.inc.php
@@ -102,7 +102,7 @@ function __construct(&$conn)
var $optimizeTableHigh = 'VACUUM ANALYZE %s';
/**
- * @see adodb_perf#optimizeTable
+ * @see adodb_perf::optimizeTable()
*/
function optimizeTable($table, $mode = ADODB_OPT_LOW)
@@ -131,7 +131,7 @@ function Explain($sql,$partial=false)
if ($partial) {
$sqlq = $this->conn->qstr($sql.'%');
- $arr = $this->conn->GetArray("select distinct distinct sql1 from adodb_logsql where sql1 like $sqlq");
+ $arr = $this->conn->getArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq");
if ($arr) {
foreach($arr as $row) {
$sql = reset($row);
diff --git a/app/vendor/adodb/adodb-php/perf/perf-sqlite3.inc.php b/app/vendor/adodb/adodb-php/perf/perf-sqlite3.inc.php
new file mode 100644
index 000000000..19198d5b3
--- /dev/null
+++ b/app/vendor/adodb/adodb-php/perf/perf-sqlite3.inc.php
@@ -0,0 +1,40 @@
+conn = $conn;
+ }
+
+ function tables($orderby='1')
+ {
+ if (!$this->tablesSQL){
+ return false;
+ }
+
+ $rs = $this->conn->execute($this->tablesSQL);
+ if (!$rs) {
+ return false;
+ }
+
+ $html = rs2html($rs, false, false, false, false);
+ return $html;
+ }
+}
diff --git a/app/vendor/adodb/adodb-php/phpdoc.dist.xml b/app/vendor/adodb/adodb-php/phpdoc.dist.xml
new file mode 100644
index 000000000..bbddd3db7
--- /dev/null
+++ b/app/vendor/adodb/adodb-php/phpdoc.dist.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ docs/cache
+
+
+
+
+
+
+ scripts
+ tests
+ vendor/**/*
+ xsl
+
+
+
+
diff --git a/app/vendor/adodb/adodb-php/server.php b/app/vendor/adodb/adodb-php/server.php
deleted file mode 100644
index 76e757fd9..000000000
--- a/app/vendor/adodb/adodb-php/server.php
+++ /dev/null
@@ -1,103 +0,0 @@
-connect($host,$uid,$pwd,$database)) err($conn->errorNo(). $sep . $conn->errorMsg());
-$sql = $_REQUEST['sql'];
-
-if (isset($_REQUEST['fetch']))
- $ADODB_FETCH_MODE = $_REQUEST['fetch'];
-
-if (isset($_REQUEST['nrows'])) {
- $nrows = $_REQUEST['nrows'];
- $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1;
- $rs = $conn->selectLimit($sql,$nrows,$offset);
-} else
- $rs = $conn->execute($sql);
-if ($rs){
- //$rs->timeToLive = 1;
- echo _rs2serialize($rs,$conn,$sql);
- $rs->close();
-} else
- err($conn->errorNo(). $sep .$conn->errorMsg());
diff --git a/app/vendor/adodb/adodb-php/session/session_schema2.xml b/app/vendor/adodb/adodb-php/session/session_schema2.xml
index 89cb4f283..a8a1b2294 100644
--- a/app/vendor/adodb/adodb-php/session/session_schema2.xml
+++ b/app/vendor/adodb/adodb-php/session/session_schema2.xml
@@ -1,37 +1,33 @@
- table for ADOdb session-management
-
+ Table for ADOdb session management
- session key
+ Session key to identify a user's browser session.
-
-
-
-
+ Slightly redundant as it can be dynamically calculated by NOW() and MODIFIED field,
+ but it enables forcing a fixed timeout for specific sessions.
+
-
-
-
+
+ New session creation Timestamp.
-
-
-
+
+ Timestamp which is usually updated when the user interacts with a site, to extend the expire time.
-
-
+ Usually a User Id or unique username of your application.
+ The name EXPIREREF is a bit weird, it may be better to call it USERREF?
+
-
-
+ PHP's serialized session data or encrypted serialized session data.
diff --git a/app/vendor/cakephp/bake/composer.json b/app/vendor/cakephp/bake/composer.json
index f6429f021..96daca727 100644
--- a/app/vendor/cakephp/bake/composer.json
+++ b/app/vendor/cakephp/bake/composer.json
@@ -52,8 +52,14 @@
"cs-check": "phpcs --parallel=16 -p src/ tests/",
"cs-fix": "phpcbf --parallel=16 -p src/ tests/",
"stan": "phpstan analyse src/ && psalm.phar",
- "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 psalm/phar:~4.11.0 && mv composer.backup composer.json",
+ "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^1.5 psalm/phar:~4.22.0 && mv composer.backup composer.json",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=clover.xml"
+ },
+ "config": {
+ "allow-plugins": {
+ "cakephp/plugin-installer": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
}
}
diff --git a/app/vendor/cakephp/bake/docs.Dockerfile b/app/vendor/cakephp/bake/docs.Dockerfile
index adb6e9447..1f7afabdc 100644
--- a/app/vendor/cakephp/bake/docs.Dockerfile
+++ b/app/vendor/cakephp/bake/docs.Dockerfile
@@ -2,14 +2,20 @@
FROM markstory/cakephp-docs-builder as builder
# Copy entire repo in with .git so we can build all versions in one image.
-COPY docs /data/src
+COPY docs /data/docs
RUN cd /data/docs-builder \
- && make website LANGS="en es fr ja pt ru" SOURCE=/data/src DEST=/data/website/
+ && make website LANGS="en es fr ja pt ru" SOURCE=/data/docs DEST=/data/website/
# Build a small nginx container with just the static site in it.
-FROM nginx:1.15-alpine
+FROM markstory/cakephp-docs-builder:runtime as runtime
+# Configure search index script
+ENV LANGS="en es fr ja pt ru"
+ENV SEARCH_SOURCE="/usr/share/nginx/html"
+ENV SEARCH_URL_PREFIX="/bake/2"
+
+COPY --from=builder /data/docs /data/docs
COPY --from=builder /data/website /data/website
COPY --from=builder /data/docs-builder/nginx.conf /etc/nginx/conf.d/default.conf
diff --git a/app/vendor/cakephp/bake/docs/fr/development.rst b/app/vendor/cakephp/bake/docs/fr/development.rst
index 2bebf089b..b4f72c38d 100644
--- a/app/vendor/cakephp/bake/docs/fr/development.rst
+++ b/app/vendor/cakephp/bake/docs/fr/development.rst
@@ -119,6 +119,7 @@ Ainsi, par exemple, pour créer avec bake un shell comme ceci:
Le template utilisé
(***vendor/cakephp/bake/templates/bake/Command/command.twig**)
ressemble à ceci::
+
declare(strict_types=1);
namespace {{ namespace }}\Command;
diff --git a/app/vendor/cakephp/bake/phpstan.neon b/app/vendor/cakephp/bake/phpstan.neon
index 4decabc09..ac6727fb6 100644
--- a/app/vendor/cakephp/bake/phpstan.neon
+++ b/app/vendor/cakephp/bake/phpstan.neon
@@ -2,6 +2,6 @@ parameters:
level: 6
checkMissingIterableValueType: false
paths:
- - src
+ - src/
bootstrapFiles:
- tests/bootstrap.php
diff --git a/app/vendor/cakephp/bake/psalm.xml b/app/vendor/cakephp/bake/psalm.xml
index de0149164..8f0d13b5c 100644
--- a/app/vendor/cakephp/bake/psalm.xml
+++ b/app/vendor/cakephp/bake/psalm.xml
@@ -1,6 +1,5 @@
out('Bake All complete.', 1, ConsoleIo::QUIET);
+ $io->out('Bake All complete.', 1, ConsoleIo::NORMAL);
return static::CODE_SUCCESS;
}
diff --git a/app/vendor/cakephp/bake/src/Command/BakeCommand.php b/app/vendor/cakephp/bake/src/Command/BakeCommand.php
index 24f23da69..6ca98b700 100644
--- a/app/vendor/cakephp/bake/src/Command/BakeCommand.php
+++ b/app/vendor/cakephp/bake/src/Command/BakeCommand.php
@@ -161,7 +161,22 @@ protected function deleteEmptyFile(string $path, ConsoleIo $io): void
{
if (file_exists($path)) {
unlink($path);
- $io->out(sprintf('Deleted `%s`', $path), 1, ConsoleIo::QUIET);
+ $io->out(sprintf('Deleted `%s`', $path), 1, ConsoleIo::NORMAL);
}
}
+
+ /**
+ * Check if a column name is valid.
+ *
+ * The Regex used here basically states that:
+ * - the column name has to start with an ASCII character (lower or upper case) or an underscore and
+ * - further characters are allowed to be either lower or upper case ASCII characters, numbers or underscores.
+ *
+ * @param string $name The name of the column.
+ * @return bool
+ */
+ protected function isValidColumnName(string $name): bool
+ {
+ return (bool)preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $name);
+ }
}
diff --git a/app/vendor/cakephp/bake/src/Command/FixtureCommand.php b/app/vendor/cakephp/bake/src/Command/FixtureCommand.php
index 784bf11ce..69855d217 100644
--- a/app/vendor/cakephp/bake/src/Command/FixtureCommand.php
+++ b/app/vendor/cakephp/bake/src/Command/FixtureCommand.php
@@ -220,10 +220,11 @@ public function readSchema(string $name, string $table): TableSchemaInterface
public function validateNames(TableSchemaInterface $schema, ConsoleIo $io): void
{
foreach ($schema->columns() as $column) {
- if (!is_string($column) || (!ctype_alpha($column[0]) && $column[0] !== '_')) {
+ if (!$this->isValidColumnName($column)) {
$io->abort(sprintf(
- 'Unable to bake model. Table column names must start with a letter or underscore. Found `%s`.',
- (string)$column
+ 'Unable to bake model. Table column name must start with a letter or underscore and
+ cannot contain special characters. Found `%s`.',
+ $column
));
}
}
@@ -235,7 +236,7 @@ public function validateNames(TableSchemaInterface $schema, ConsoleIo $io): void
* @param \Cake\Console\Arguments $args The CLI arguments.
* @param \Cake\Console\ConsoleIo $io The console io instance.
* @param string $model name of the model being generated
- * @param array $otherVars Contents of the fixture file.
+ * @param array $otherVars Contents of the fixture file.
* @return void
*/
public function generateFixtureFile(Arguments $args, ConsoleIo $io, string $model, array $otherVars): void
@@ -265,7 +266,7 @@ public function generateFixtureFile(Arguments $args, ConsoleIo $io, string $mode
$renderer->set($vars);
$content = $renderer->generate('Bake.tests/fixture');
- $io->out("\n" . sprintf('Baking test fixture for %s...', $model), 1, ConsoleIo::QUIET);
+ $io->out("\n" . sprintf('Baking test fixture for %s...', $model), 1, ConsoleIo::NORMAL);
$io->createFile($path . $filename, $content, $args->getOption('force'));
$emptyFile = $path . '.gitkeep';
$this->deleteEmptyFile($emptyFile, $io);
@@ -430,6 +431,7 @@ protected function _generateRecords(TableSchemaInterface $table, int $recordCoun
*
* @param array $records Array of records to be converted to string
* @return string A string value of the $records array.
+ * @throws \Brick\VarExporter\ExportException
*/
protected function _makeRecordString(array $records): string
{
diff --git a/app/vendor/cakephp/bake/src/Command/ModelCommand.php b/app/vendor/cakephp/bake/src/Command/ModelCommand.php
index baae712e5..d6a19b7d0 100644
--- a/app/vendor/cakephp/bake/src/Command/ModelCommand.php
+++ b/app/vendor/cakephp/bake/src/Command/ModelCommand.php
@@ -127,10 +127,11 @@ public function bake(string $name, Arguments $args, ConsoleIo $io): void
public function validateNames(TableSchemaInterface $schema, ConsoleIo $io): void
{
foreach ($schema->columns() as $column) {
- if (!is_string($column) || (!ctype_alpha($column[0]) && $column[0] !== '_')) {
+ if (!$this->isValidColumnName($column)) {
$io->abort(sprintf(
- 'Unable to bake model. Table column names must start with a letter or underscore. Found `%s`.',
- (string)$column
+ 'Unable to bake model. Table column name must start with a letter or underscore and
+ cannot contain special characters. Found `%s`.',
+ $column
));
}
}
@@ -682,14 +683,9 @@ public function getValidation(Table $model, array $associations, Arguments $args
$validate = [];
$primaryKey = $schema->getPrimaryKey();
- $foreignKeys = [];
- if (isset($associations['belongsTo'])) {
- foreach ($associations['belongsTo'] as $assoc) {
- $foreignKeys[] = $assoc['foreignKey'];
- }
- }
foreach ($fields as $fieldName) {
- if (in_array($fieldName, $foreignKeys, true)) {
+ // Skip primary key
+ if (in_array($fieldName, $primaryKey, true)) {
continue;
}
$field = $schema->getColumn($fieldName);
@@ -708,7 +704,7 @@ public function getValidation(Table $model, array $associations, Arguments $args
* @param \Cake\Database\Schema\TableSchemaInterface $schema The table schema for the current field.
* @param string $fieldName Name of field to be validated.
* @param array $metaData metadata for field
- * @param array $primaryKey The primary key field
+ * @param array $primaryKey The primary key field. Unused because PK validation is skipped
* @return array Array of validation for the field.
*/
public function fieldValidation(
@@ -774,12 +770,7 @@ public function fieldValidation(
];
}
- if (in_array($fieldName, $primaryKey, true)) {
- $validation['allowEmpty'] = [
- 'rule' => $this->getEmptyMethod($fieldName, $metaData),
- 'args' => [null, 'create'],
- ];
- } elseif ($metaData['null'] === true) {
+ if ($metaData['null'] === true) {
$validation['allowEmpty'] = [
'rule' => $this->getEmptyMethod($fieldName, $metaData),
'args' => [],
@@ -1017,7 +1008,7 @@ public function bakeEntity(Table $model, array $data, Arguments $args, ConsoleIo
$path = $this->getPath($args);
$filename = $path . 'Entity' . DS . $name . '.php';
- $io->out("\n" . sprintf('Baking entity class for %s...', $name), 1, ConsoleIo::QUIET);
+ $io->out("\n" . sprintf('Baking entity class for %s...', $name), 1, ConsoleIo::NORMAL);
$io->createFile($filename, $out, $args->getOption('force'));
$emptyFile = $path . 'Entity' . DS . '.gitkeep';
@@ -1069,7 +1060,7 @@ public function bakeTable(Table $model, array $data, Arguments $args, ConsoleIo
$path = $this->getPath($args);
$filename = $path . 'Table' . DS . $name . 'Table.php';
- $io->out("\n" . sprintf('Baking table class for %s...', $name), 1, ConsoleIo::QUIET);
+ $io->out("\n" . sprintf('Baking table class for %s...', $name), 1, ConsoleIo::NORMAL);
$io->createFile($filename, $out, $args->getOption('force'));
// Work around composer caching that classes/files do not exist.
diff --git a/app/vendor/cakephp/bake/src/Command/PluginCommand.php b/app/vendor/cakephp/bake/src/Command/PluginCommand.php
index 9cc30f277..2479e1068 100644
--- a/app/vendor/cakephp/bake/src/Command/PluginCommand.php
+++ b/app/vendor/cakephp/bake/src/Command/PluginCommand.php
@@ -313,7 +313,7 @@ protected function _rootComposerFilePath(): string
/**
* find and change $this->path to the user selection
*
- * @param array $pathOptions The list of paths to look in.
+ * @param array $pathOptions The list of paths to look in.
* @param \Cake\Console\ConsoleIo $io The io object
* @return void
*/
@@ -412,7 +412,7 @@ public function findComposer(Arguments $args, ConsoleIo $io)
/**
* Search the $PATH for composer.
*
- * @param array $path The paths to search.
+ * @param array $path The paths to search.
* @param \Cake\Console\ConsoleIo $io The console io
* @return string|bool
*/
diff --git a/app/vendor/cakephp/bake/src/Command/SimpleBakeCommand.php b/app/vendor/cakephp/bake/src/Command/SimpleBakeCommand.php
index 57489645e..b48aa4a3a 100644
--- a/app/vendor/cakephp/bake/src/Command/SimpleBakeCommand.php
+++ b/app/vendor/cakephp/bake/src/Command/SimpleBakeCommand.php
@@ -81,8 +81,6 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
if (empty($name)) {
$io->err('You must provide a name to bake a ' . $this->name());
$this->abort();
-
- return null;
}
$name = $this->_getName($name);
$name = Inflector::camelize($name);
diff --git a/app/vendor/cakephp/bake/src/Command/TemplateCommand.php b/app/vendor/cakephp/bake/src/Command/TemplateCommand.php
index 77b60e415..4b8ea3629 100644
--- a/app/vendor/cakephp/bake/src/Command/TemplateCommand.php
+++ b/app/vendor/cakephp/bake/src/Command/TemplateCommand.php
@@ -334,7 +334,7 @@ protected function _loadController(ConsoleIo $io): array
* @param \Cake\Console\ConsoleIo $io Console io
* @param string $template Template file to use.
* @param string|true $content Content to write.
- * @param string $outputFile The output file to create. If null will use `$template`
+ * @param ?string $outputFile The output file to create. If null will use `$template`
* @return void
*/
public function bake(
@@ -358,7 +358,7 @@ public function bake(
$path = $this->getTemplatePath($args);
$filename = $path . Inflector::underscore($outputFile) . '.php';
- $io->out("\n" . sprintf('Baking `%s` view template file...', $outputFile), 1, ConsoleIo::QUIET);
+ $io->out("\n" . sprintf('Baking `%s` view template file...', $outputFile), 1, ConsoleIo::NORMAL);
$io->createFile($filename, $content, $args->getOption('force'));
}
@@ -369,9 +369,9 @@ public function bake(
* @param \Cake\Console\ConsoleIo $io The console io
* @param string $action name to generate content to
* @param array|null $vars passed for use in templates
- * @return string|false Content from template
+ * @return string Content from template
*/
- public function getContent(Arguments $args, ConsoleIo $io, string $action, ?array $vars = null)
+ public function getContent(Arguments $args, ConsoleIo $io, string $action, ?array $vars = null): string
{
if (!$vars) {
$vars = $this->_loadController($io);
diff --git a/app/vendor/cakephp/bake/src/Command/TestCommand.php b/app/vendor/cakephp/bake/src/Command/TestCommand.php
index 60be070e5..6158ec9b7 100644
--- a/app/vendor/cakephp/bake/src/Command/TestCommand.php
+++ b/app/vendor/cakephp/bake/src/Command/TestCommand.php
@@ -416,6 +416,7 @@ public function mapType(string $type): string
*
* @param string $className Name of class to look at.
* @return string[] Array of method names.
+ * @throws \ReflectionException
*/
public function getTestableMethods(string $className): array
{
@@ -450,6 +451,7 @@ public function generateFixtureList($subject): array
$this->_processController($subject);
}
+ /** @psalm-suppress RedundantFunctionCall */
return array_values($this->_fixtures);
}
diff --git a/app/vendor/cakephp/bake/src/Plugin.php b/app/vendor/cakephp/bake/src/Plugin.php
index 113e910f9..f1a96a02f 100644
--- a/app/vendor/cakephp/bake/src/Plugin.php
+++ b/app/vendor/cakephp/bake/src/Plugin.php
@@ -142,6 +142,7 @@ protected function findInPath(string $namespace, string $path): array
if (!$hasSubfolder) {
try {
$reflection = new ReflectionClass($class);
+ /** @phpstan-ignore-next-line */
} catch (ReflectionException $e) {
continue;
}
diff --git a/app/vendor/cakephp/bake/src/Utility/TemplateRenderer.php b/app/vendor/cakephp/bake/src/Utility/TemplateRenderer.php
index a513e65d4..bffec7ae2 100644
--- a/app/vendor/cakephp/bake/src/Utility/TemplateRenderer.php
+++ b/app/vendor/cakephp/bake/src/Utility/TemplateRenderer.php
@@ -49,7 +49,7 @@ class TemplateRenderer
/**
* Constructor
*
- * @param string $theme The template theme/plugin to use.
+ * @param ?string $theme The template theme/plugin to use.
*/
public function __construct(?string $theme = '')
{
diff --git a/app/vendor/cakephp/bake/src/View/BakeView.php b/app/vendor/cakephp/bake/src/View/BakeView.php
index 87afbb16a..b359c5e14 100644
--- a/app/vendor/cakephp/bake/src/View/BakeView.php
+++ b/app/vendor/cakephp/bake/src/View/BakeView.php
@@ -118,7 +118,7 @@ public function dispatchEvent(string $name, $data = null, $subject = null): Even
/**
* Return all possible paths to find view files in order
*
- * @param string $plugin Optional plugin name to scan for view files.
+ * @param ?string $plugin Optional plugin name to scan for view files.
* @param bool $cached Set to false to force a refresh of view paths. Default true.
* @return string[] paths
*/
diff --git a/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php b/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php
index 99cdbb899..07ab0965a 100644
--- a/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php
+++ b/app/vendor/cakephp/bake/src/View/Helper/BakeHelper.php
@@ -23,7 +23,7 @@ class BakeHelper extends Helper
/**
* Default configuration.
*
- * @var array
+ * @var array
*/
protected $_defaultConfig = [];
@@ -39,7 +39,7 @@ class BakeHelper extends Helper
*
* @param string $name the name of the property
* @param array $value the array of values
- * @param array $options extra options to be passed to the element
+ * @param array $options extra options to be passed to the element
* @return string
*/
public function arrayProperty(string $name, array $value = [], array $options = []): string
@@ -63,7 +63,7 @@ public function arrayProperty(string $name, array $value = [], array $options =
* Returns an array converted into a formatted multiline string
*
* @param array $list array of items to be stringified
- * @param array $options options to use
+ * @param array $options options to use
* @return string
* @deprecated 2.5.0 Use BakeHelper::exportVar() instead.
*/
@@ -136,6 +136,7 @@ public function stringifyList(array $list, array $options = []): string
* @param int $indentLevel Identation level.
* @param int $options VarExporter option flags
* @return string
+ * @throws \Brick\VarExporter\ExportException
* @see https://github.com/brick/varexporter#options
*/
public function exportVar($var, int $indentLevel = 0, int $options = 0): string
@@ -236,7 +237,7 @@ public function classInfo(string $class, string $type, string $suffix): array
* @param \Cake\Datasource\SchemaInterface $schema Schema instance.
* @param \Cake\ORM\Table|null $modelObject Model object.
* @param string|int $takeFields Take fields.
- * @param array $filterTypes Filter field types.
+ * @param array $filterTypes Filter field types.
* @return array
*/
public function filterFields(
@@ -244,7 +245,7 @@ public function filterFields(
SchemaInterface $schema,
?Table $modelObject = null,
$takeFields = 0,
- $filterTypes = ['binary']
+ array $filterTypes = ['binary']
): array {
$fields = collection($fields)
->filter(function ($field) use ($schema, $filterTypes) {
diff --git a/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php b/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php
index ffc1d0527..456396bc5 100644
--- a/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php
+++ b/app/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php
@@ -26,7 +26,7 @@ class DocBlockHelper extends Helper
*
* @param string $className The class this comment block is for.
* @param string $classType The type of class (example, Entity)
- * @param array $annotations An array of PHP comment block annotations.
+ * @param array $annotations An array of PHP comment block annotations.
* @return string The DocBlock for a class header.
*/
public function classDescription(string $className, string $classType, array $annotations): string
diff --git a/app/vendor/cakephp/bake/templates/bake/Controller/component.twig b/app/vendor/cakephp/bake/templates/bake/Controller/component.twig
index b032bfb3e..d4e3f95de 100644
--- a/app/vendor/cakephp/bake/templates/bake/Controller/component.twig
+++ b/app/vendor/cakephp/bake/templates/bake/Controller/component.twig
@@ -29,7 +29,7 @@ class {{ name }}Component extends Component
/**
* Default configuration.
*
- * @var array
+ * @var array
*/
protected $_defaultConfig = [];
}
diff --git a/app/vendor/cakephp/bake/templates/bake/Model/behavior.twig b/app/vendor/cakephp/bake/templates/bake/Model/behavior.twig
index c536fedd6..a6ff121d9 100644
--- a/app/vendor/cakephp/bake/templates/bake/Model/behavior.twig
+++ b/app/vendor/cakephp/bake/templates/bake/Model/behavior.twig
@@ -29,7 +29,7 @@ class {{ name }}Behavior extends Behavior
/**
* Default configuration.
*
- * @var array
+ * @var array
*/
protected $_defaultConfig = [];
}
diff --git a/app/vendor/cakephp/bake/templates/bake/Model/entity.twig b/app/vendor/cakephp/bake/templates/bake/Model/entity.twig
index 6dd3cdb76..e7798c302 100644
--- a/app/vendor/cakephp/bake/templates/bake/Model/entity.twig
+++ b/app/vendor/cakephp/bake/templates/bake/Model/entity.twig
@@ -41,7 +41,7 @@ class {{ name }} extends Entity
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
- * @var array
+ * @var array
*/
protected $_accessible = {{ Bake.exportVar(accessible, 1)|raw }};
{% endif %}
@@ -52,7 +52,7 @@ class {{ name }} extends Entity
/**
* Fields that are excluded from JSON versions of the entity.
*
- * @var array
+ * @var array
*/
protected $_hidden = {{ Bake.exportVar(hidden, 1)|raw }};
{% endif %}
diff --git a/app/vendor/cakephp/bake/templates/bake/Plugin/src/Plugin.php.twig b/app/vendor/cakephp/bake/templates/bake/Plugin/src/Plugin.php.twig
index fa078bbac..f39d042f6 100644
--- a/app/vendor/cakephp/bake/templates/bake/Plugin/src/Plugin.php.twig
+++ b/app/vendor/cakephp/bake/templates/bake/Plugin/src/Plugin.php.twig
@@ -19,6 +19,7 @@ declare(strict_types=1);
namespace {{ namespace }};
use Cake\Core\BasePlugin;
+use Cake\Core\ContainerInterface;
use Cake\Core\PluginApplicationInterface;
use Cake\Http\MiddlewareQueue;
use Cake\Routing\RouteBuilder;
@@ -68,7 +69,7 @@ class Plugin extends BasePlugin
/**
* Add middleware for the plugin.
*
- * @param \Cake\Http\MiddlewareQueue $middleware The middleware queue to update.
+ * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to update.
* @return \Cake\Http\MiddlewareQueue
*/
public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue
@@ -92,4 +93,16 @@ class Plugin extends BasePlugin
return $commands;
}
+
+ /**
+ * Register application container services.
+ *
+ * @param \Cake\Core\ContainerInterface $container The Container to update.
+ * @return void
+ * @link https://book.cakephp.org/4/en/development/dependency-injection.html#dependency-injection
+ */
+ public function services(ContainerInterface $container): void
+ {
+ // Add your services here
+ }
}
diff --git a/app/vendor/cakephp/bake/templates/bake/Shell/helper.twig b/app/vendor/cakephp/bake/templates/bake/Shell/helper.twig
index 0d1320d7c..171b4cfa8 100644
--- a/app/vendor/cakephp/bake/templates/bake/Shell/helper.twig
+++ b/app/vendor/cakephp/bake/templates/bake/Shell/helper.twig
@@ -30,9 +30,10 @@ class {{ name }}Helper extends Helper
*
* Generate the output for this shell helper.
*
+ * @param array $args Arguments.
* @return void
*/
- public function output($args)
+ public function output(array $args): void
{
}
}
diff --git a/app/vendor/cakephp/bake/templates/bake/Template/index.twig b/app/vendor/cakephp/bake/templates/bake/Template/index.twig
index 49c8cc385..0f64f3c47 100644
--- a/app/vendor/cakephp/bake/templates/bake/Template/index.twig
+++ b/app/vendor/cakephp/bake/templates/bake/Template/index.twig
@@ -51,6 +51,8 @@
{% set columnData = Bake.columnData(field, schema) %}
{% if columnData.type not in ['integer', 'float', 'decimal', 'biginteger', 'smallinteger', 'tinyinteger'] %}
= h(${{ singularVar }}->{{ field }}) ?>
+{% elseif columnData.null %}
+
= ${{ singularVar }}->{{ field }} === null ? '' : $this->Number->format(${{ singularVar }}->{{ field }}) ?>
{% else %}
= $this->Number->format(${{ singularVar }}->{{ field }}) ?>
{% endif %}
diff --git a/app/vendor/cakephp/bake/templates/bake/Template/view.twig b/app/vendor/cakephp/bake/templates/bake/Template/view.twig
index c2349dfd1..a709dd12f 100644
--- a/app/vendor/cakephp/bake/templates/bake/Template/view.twig
+++ b/app/vendor/cakephp/bake/templates/bake/Template/view.twig
@@ -67,7 +67,12 @@
{% for field in groupedFields.number %}
= __('{{ field|humanize }}') ?>
+{% set columnData = Bake.columnData(field, schema) %}
+{% if columnData.null %}
+
= ${{ singularVar }}->{{ field }} === null ? '' : $this->Number->format(${{ singularVar }}->{{ field }}) ?>
+{% else %}
= $this->Number->format(${{ singularVar }}->{{ field }}) ?>
+{% endif %}
{% endfor %}
{% endif %}
diff --git a/app/vendor/cakephp/bake/templates/bake/View/cell.twig b/app/vendor/cakephp/bake/templates/bake/View/cell.twig
index 477ca17bd..6ba66be8c 100644
--- a/app/vendor/cakephp/bake/templates/bake/View/cell.twig
+++ b/app/vendor/cakephp/bake/templates/bake/View/cell.twig
@@ -29,7 +29,7 @@ class {{ name }}Cell extends Cell
* List of valid options that can be passed into this
* cell's constructor.
*
- * @var array
+ * @var array
*/
protected $_validCellOptions = [];
diff --git a/app/vendor/cakephp/bake/templates/bake/View/helper.twig b/app/vendor/cakephp/bake/templates/bake/View/helper.twig
index 1c2c3bbac..f39ae2fd1 100644
--- a/app/vendor/cakephp/bake/templates/bake/View/helper.twig
+++ b/app/vendor/cakephp/bake/templates/bake/View/helper.twig
@@ -29,7 +29,7 @@ class {{ name }}Helper extends Helper
/**
* Default configuration.
*
- * @var array
+ * @var array
*/
protected $_defaultConfig = [];
diff --git a/app/vendor/cakephp/bake/templates/bake/tests/fixture.twig b/app/vendor/cakephp/bake/templates/bake/tests/fixture.twig
index 131fa18f5..f1f64851f 100644
--- a/app/vendor/cakephp/bake/templates/bake/tests/fixture.twig
+++ b/app/vendor/cakephp/bake/templates/bake/tests/fixture.twig
@@ -42,7 +42,7 @@ class {{ name }}Fixture extends TestFixture
/**
* Import
*
- * @var array
+ * @var array
*/
public $import = {{ import|raw }};
@@ -52,7 +52,7 @@ class {{ name }}Fixture extends TestFixture
/**
* Fields
*
- * @var array
+ * @var array
*/
// phpcs:disable
public $fields = {{ schema|raw }};
diff --git a/app/vendor/cakephp/bake/templates/bake/tests/test_case.twig b/app/vendor/cakephp/bake/templates/bake/tests/test_case.twig
index 0ca9bc303..31d413e8f 100644
--- a/app/vendor/cakephp/bake/templates/bake/tests/test_case.twig
+++ b/app/vendor/cakephp/bake/templates/bake/tests/test_case.twig
@@ -74,7 +74,7 @@ class {{ className }}Test extends TestCase
/**
* Fixtures
*
- * @var array
+ * @var array
*/
protected $fixtures = {{ Bake.exportVar(fixtures|values, 1)|raw }};
{% if construction or methods %}
@@ -88,7 +88,7 @@ class {{ className }}Test extends TestCase
*
* @return void
*/
- public function setUp(): void
+ protected function setUp(): void
{
parent::setUp();
{% if preConstruct %}
@@ -110,7 +110,7 @@ class {{ className }}Test extends TestCase
*
* @return void
*/
- public function tearDown(): void
+ protected function tearDown(): void
{
unset($this->{{ subject }});
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php
index f2ab05cdd..2b26ee9f8 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesBakeTagsFixture.php
@@ -24,7 +24,7 @@ class BakeArticlesBakeTagsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'bake_article_id' => ['type' => 'integer', 'null' => false],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php
index dd758ae81..4578b6b96 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeArticlesFixture.php
@@ -24,7 +24,7 @@ class BakeArticlesFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php
index 5ec27b45c..1270c047c 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeCarFixture.php
@@ -29,7 +29,7 @@ class BakeCarFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php
index 69a663d27..29faa0d07 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeCommentsFixture.php
@@ -24,7 +24,7 @@ class BakeCommentsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'otherid' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php
index 5f3209277..d25588a24 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTagsFixture.php
@@ -24,7 +24,7 @@ class BakeTagsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php
index 3473d942b..557bca566 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateAuthorsFixture.php
@@ -32,7 +32,7 @@ class BakeTemplateAuthorsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php
index 84ae5080b..fd112e181 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateProfilesFixture.php
@@ -32,7 +32,7 @@ class BakeTemplateProfilesFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php
index 2a4f5be81..60654c826 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BakeTemplateRolesFixture.php
@@ -29,7 +29,7 @@ class BakeTemplateRolesFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php
index 092815298..bbd9d73a7 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/BinaryTestsFixture.php
@@ -24,7 +24,7 @@ class BinaryTestsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php
index 21ff25181..314dcac94 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/CategoryThreadsFixture.php
@@ -24,7 +24,7 @@ class CategoryThreadsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php
index c7f5757d4..573b61596 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/DatatypesFixture.php
@@ -24,7 +24,7 @@ class DatatypesFixture extends TestFixture
/**
* Fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer', 'null' => false],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/HiddenFieldsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/HiddenFieldsFixture.php
index 6928415c4..f1db98741 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/HiddenFieldsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/HiddenFieldsFixture.php
@@ -24,7 +24,7 @@ class HiddenFieldsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php
index 976fbe0a1..0a6c2dab4 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/InvitationsFixture.php
@@ -24,7 +24,7 @@ class InvitationsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php b/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php
index cd5ffd27a..5081adc93 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/NumberTreesFixture.php
@@ -26,7 +26,7 @@ class NumberTreesFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/TodoItemsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/TodoItemsFixture.php
index ec3cc45d6..f9531b770 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/TodoItemsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/TodoItemsFixture.php
@@ -27,7 +27,7 @@ class TodoItemsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer', 'null' => false],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/TodoItemsTodoLabelsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/TodoItemsTodoLabelsFixture.php
index 67a4b9c1b..828baa5b2 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/TodoItemsTodoLabelsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/TodoItemsTodoLabelsFixture.php
@@ -27,7 +27,7 @@ class TodoItemsTodoLabelsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'todo_item_id' => ['type' => 'integer', 'null' => false],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/TodoLabelsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/TodoLabelsFixture.php
index e21cde1cf..6158c0f24 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/TodoLabelsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/TodoLabelsFixture.php
@@ -27,7 +27,7 @@ class TodoLabelsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/TodoTasksFixture.php b/app/vendor/cakephp/bake/tests/Fixture/TodoTasksFixture.php
index f8f34a85a..c715ad81d 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/TodoTasksFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/TodoTasksFixture.php
@@ -27,7 +27,7 @@ class TodoTasksFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'uid' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/UniqueFieldsFixture.php b/app/vendor/cakephp/bake/tests/Fixture/UniqueFieldsFixture.php
index 81dd98994..2d64967de 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/UniqueFieldsFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/UniqueFieldsFixture.php
@@ -24,7 +24,7 @@ class UniqueFieldsFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/bake/tests/Fixture/UsersFixture.php b/app/vendor/cakephp/bake/tests/Fixture/UsersFixture.php
index 7dbd989f8..259ef06c7 100644
--- a/app/vendor/cakephp/bake/tests/Fixture/UsersFixture.php
+++ b/app/vendor/cakephp/bake/tests/Fixture/UsersFixture.php
@@ -24,7 +24,7 @@ class UsersFixture extends TestFixture
/**
* fields property
*
- * @var array
+ * @var array
*/
public $fields = [
'id' => ['type' => 'integer'],
diff --git a/app/vendor/cakephp/cakephp/README.md b/app/vendor/cakephp/cakephp/README.md
index 00314c002..9cb846bb1 100644
--- a/app/vendor/cakephp/cakephp/README.md
+++ b/app/vendor/cakephp/cakephp/README.md
@@ -7,7 +7,9 @@
-
+
+
+
diff --git a/app/vendor/cakephp/cakephp/VERSION.txt b/app/vendor/cakephp/cakephp/VERSION.txt
index 78dc4583c..181b6fa38 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.3.1
+4.3.8
diff --git a/app/vendor/cakephp/cakephp/composer.json b/app/vendor/cakephp/cakephp/composer.json
index fc8677c76..9e5e15436 100644
--- a/app/vendor/cakephp/cakephp/composer.json
+++ b/app/vendor/cakephp/cakephp/composer.json
@@ -30,13 +30,13 @@
"composer/ca-bundle": "^1.2",
"laminas/laminas-diactoros": "^2.2.2",
"laminas/laminas-httphandlerrunner": "^1.1",
- "league/container": "^4.1.1",
- "psr/container": "^2.0",
+ "league/container": "^4.2.0",
+ "psr/container": "^1.1 || ^2.0",
"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"
+ "psr/log": "^1.0 || ^2.0",
+ "psr/simple-cache": "^1.0 || ^2.0"
},
"replace": {
"cakephp/cache": "self.version",
@@ -69,7 +69,10 @@
},
"config": {
"process-timeout": 900,
- "sort-packages": true
+ "sort-packages": true,
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
},
"autoload": {
"psr-4": {
@@ -111,7 +114,10 @@
"@psalm"
],
"stan-tests": "phpstan.phar analyze -c tests/phpstan.neon",
- "stan-setup": "cp composer.json composer.backup && composer require --dev symfony/polyfill-php81 phpstan/phpstan:~1.0.0 psalm/phar:~4.11.0 && mv composer.backup composer.json",
+ "stan-baseline": "phpstan.phar --generate-baseline",
+ "stan-setup": "cp composer.json composer.backup && composer require --dev symfony/polyfill-php81 phpstan/phpstan:~1.5.0 psalm/phar:~4.22.0 && mv composer.backup composer.json",
+ "lowest": "validate-prefer-lowest",
+ "lowest-setup": "composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction && cp composer.json composer.backup && composer require --dev dereuromark/composer-prefer-lowest && mv composer.backup composer.json",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=clover.xml"
},
diff --git a/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php b/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php
index 8e9fc613a..ed01098e3 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php
@@ -187,7 +187,11 @@ public function setMultiple($values, $ttl = null): bool
}
/**
- * Deletes multiple cache items in a single operation.
+ * Deletes multiple cache items as a list
+ *
+ * This is a best effort attempt. If deleting an item would
+ * create an error it will be ignored, and all items will
+ * be attempted.
*
* @param iterable $keys A list of string-based keys to be deleted.
* @return bool True if the items were successfully removed. False if there was an error.
@@ -198,14 +202,14 @@ public function deleteMultiple($keys): bool
{
$this->ensureValidType($keys);
+ $result = true;
foreach ($keys as $key) {
- $result = $this->delete($key);
- if ($result === false) {
- return false;
+ if (!$this->delete($key)) {
+ $result = false;
}
}
- return true;
+ return $result;
}
/**
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php
index e7ce5ea2c..46a7f187a 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php
@@ -223,6 +223,10 @@ public function delete($key): bool
$path = $this->_File->getRealPath();
$this->_File = null;
+ if ($path === false) {
+ return false;
+ }
+
// phpcs:disable
return @unlink($path);
// phpcs:enable
diff --git a/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php b/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php
index 9bdd3638d..b714f5056 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php
+++ b/app/vendor/cakephp/cakephp/src/Cache/Engine/MemcachedEngine.php
@@ -134,11 +134,6 @@ public function init(array $config = []): bool
$this->_config['servers'] = [$this->_config['servers']];
}
- /** @psalm-suppress RedundantPropertyInitializationCheck */
- if (isset($this->_Memcached)) {
- return true;
- }
-
if ($this->_config['persistent']) {
$this->_Memcached = new Memcached($this->_config['persistent']);
} else {
diff --git a/app/vendor/cakephp/cakephp/src/Cache/composer.json b/app/vendor/cakephp/cakephp/src/Cache/composer.json
index f78e504ab..001a8a9dc 100644
--- a/app/vendor/cakephp/cakephp/src/Cache/composer.json
+++ b/app/vendor/cakephp/cakephp/src/Cache/composer.json
@@ -24,7 +24,7 @@
"require": {
"php": ">=7.2.0",
"cakephp/core": "^4.0",
- "psr/simple-cache": "^1.0.0"
+ "psr/simple-cache": "^1.0 || ^2.0"
},
"provide": {
"psr/simple-cache-implementation": "^1.0.0"
diff --git a/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php b/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php
index a7cc8cc27..12cbb1c3c 100644
--- a/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php
+++ b/app/vendor/cakephp/cakephp/src/Collection/CollectionInterface.php
@@ -99,9 +99,8 @@ public function reject(callable $callback): CollectionInterface;
* Returns true if all values in this collection pass the truth test provided
* in the callback.
*
- * Each time the callback is executed it will receive the value of the element
- * in the current iteration and the key of the element as arguments, in that
- * order.
+ * The callback is passed the value and key of the element being tested and should
+ * return true if the test passed.
*
* ### Example:
*
@@ -111,7 +110,7 @@ public function reject(callable $callback): CollectionInterface;
* });
* ```
*
- * Empty collections always return true because it is a vacuous truth.
+ * Empty collections always return true.
*
* @param callable $callback a callback function
* @return bool true if for all elements in this collection the provided
@@ -123,14 +122,13 @@ public function every(callable $callback): bool;
* Returns true if any of the values in this collection pass the truth test
* provided in the callback.
*
- * Each time the callback is executed it will receive the value of the element
- * in the current iteration and the key of the element as arguments, in that
- * order.
+ * The callback is passed the value and key of the element being tested and should
+ * return true if the test passed.
*
* ### Example:
*
* ```
- * $hasYoungPeople = (new Collection([24, 45, 15]))->every(function ($value, $key) {
+ * $hasYoungPeople = (new Collection([24, 45, 15]))->some(function ($value, $key) {
* return $value < 21;
* });
* ```
diff --git a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsCopyCommand.php b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsCopyCommand.php
index 8cc8a5c36..8f5074233 100644
--- a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsCopyCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsCopyCommand.php
@@ -71,7 +71,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
'Copy plugin assets to app\'s webroot.',
])->addArgument('name', [
'help' => 'A specific plugin you want to copy assets for.',
- 'optional' => true,
+ 'required' => false,
])->addOption('overwrite', [
'help' => 'Overwrite existing symlink / folder / files.',
'default' => false,
diff --git a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsRemoveCommand.php b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsRemoveCommand.php
index 9a75911b7..f4cf1ed75 100644
--- a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsRemoveCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsRemoveCommand.php
@@ -80,7 +80,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
'Remove plugin assets from app\'s webroot.',
])->addArgument('name', [
'help' => 'A specific plugin you want to remove.',
- 'optional' => true,
+ 'required' => false,
]);
return $parser;
diff --git a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsSymlinkCommand.php b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsSymlinkCommand.php
index f54fba957..103c3e266 100644
--- a/app/vendor/cakephp/cakephp/src/Command/PluginAssetsSymlinkCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/PluginAssetsSymlinkCommand.php
@@ -72,7 +72,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
'Symlink (copy as fallback) plugin assets to app\'s webroot.',
])->addArgument('name', [
'help' => 'A specific plugin you want to symlink assets for.',
- 'optional' => true,
+ 'required' => false,
])->addOption('overwrite', [
'help' => 'Overwrite existing symlink / folder / files.',
'default' => false,
diff --git a/app/vendor/cakephp/cakephp/src/Command/SchemacacheBuildCommand.php b/app/vendor/cakephp/cakephp/src/Command/SchemacacheBuildCommand.php
index e6b300283..cd556a8f7 100644
--- a/app/vendor/cakephp/cakephp/src/Command/SchemacacheBuildCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/SchemacacheBuildCommand.php
@@ -85,7 +85,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
'default' => 'default',
])->addArgument('name', [
'help' => 'A specific table you want to refresh cached data for.',
- 'optional' => true,
+ 'required' => false,
]);
return $parser;
diff --git a/app/vendor/cakephp/cakephp/src/Command/SchemacacheClearCommand.php b/app/vendor/cakephp/cakephp/src/Command/SchemacacheClearCommand.php
index 88d926784..fedf74e28 100644
--- a/app/vendor/cakephp/cakephp/src/Command/SchemacacheClearCommand.php
+++ b/app/vendor/cakephp/cakephp/src/Command/SchemacacheClearCommand.php
@@ -85,7 +85,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar
'default' => 'default',
])->addArgument('name', [
'help' => 'A specific table you want to clear cached data for.',
- 'optional' => true,
+ 'required' => false,
]);
return $parser;
diff --git a/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php b/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php
index d8bbb5e8a..77044ffce 100644
--- a/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php
+++ b/app/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php
@@ -705,8 +705,13 @@ public function parse(array $argv): array
$args = $this->_parseArg($token, $args);
}
}
+
+ if (isset($params['help'])) {
+ return [$params, $args];
+ }
+
foreach ($this->_args as $i => $arg) {
- if ($arg->isRequired() && !isset($args[$i]) && empty($params['help'])) {
+ if ($arg->isRequired() && !isset($args[$i])) {
throw new ConsoleException(
sprintf('Missing required argument. The `%s` argument is required.', $arg->name())
);
diff --git a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingOptionException.php b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingOptionException.php
index 3d5994f77..0d1cfe810 100644
--- a/app/vendor/cakephp/cakephp/src/Console/Exception/MissingOptionException.php
+++ b/app/vendor/cakephp/cakephp/src/Console/Exception/MissingOptionException.php
@@ -94,7 +94,7 @@ protected function findClosestItem($needle, $haystack): ?string
{
$bestGuess = null;
foreach ($haystack as $item) {
- if (preg_match('/^' . $needle . '/', $item)) {
+ if (strpos($item, $needle) === 0) {
return $item;
}
}
diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php
index 3ef889269..73124a51a 100644
--- a/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php
+++ b/app/vendor/cakephp/cakephp/src/Controller/Component/FlashComponent.php
@@ -28,6 +28,8 @@
* FlashHelper.
*
* @method void success(string $message, array $options = []) Set a message using "success" element
+ * @method void info(string $message, array $options = []) Set a message using "info" element
+ * @method void warning(string $message, array $options = []) Set a message using "warning" element
* @method void error(string $message, array $options = []) Set a message using "error" element
*/
class FlashComponent extends Component
diff --git a/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php b/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php
index 596a14a2e..715ed486a 100644
--- a/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php
+++ b/app/vendor/cakephp/cakephp/src/Controller/Component/PaginatorComponent.php
@@ -23,6 +23,7 @@
use Cake\Datasource\ResultSetInterface;
use Cake\Http\Exception\NotFoundException;
use InvalidArgumentException;
+use UnexpectedValueException;
/**
* This component is used to handle automatic model data pagination. The primary way to use this
@@ -37,28 +38,6 @@
*/
class PaginatorComponent extends Component
{
- /**
- * Default pagination settings.
- *
- * When calling paginate() these settings will be merged with the configuration
- * you provide.
- *
- * - `maxLimit` - The maximum limit users can choose to view. Defaults to 100
- * - `limit` - The initial number of items per page. Defaults to 20.
- * - `page` - The starting page, defaults to 1.
- * - `allowedParameters` - A list of parameters users are allowed to set using request
- * parameters. Modifying this list will allow users to have more influence
- * over pagination, be careful with what you permit.
- *
- * @var array
- */
- protected $_defaultConfig = [
- 'page' => 1,
- 'limit' => 20,
- 'maxLimit' => 100,
- 'allowedParameters' => ['limit', 'sort', 'page', 'direction'],
- ];
-
/**
* Datasource paginator instance.
*
@@ -71,6 +50,10 @@ class PaginatorComponent extends Component
*/
public function __construct(ComponentRegistry $registry, array $config = [])
{
+ if (!empty($this->_defaultConfig)) {
+ throw new UnexpectedValueException('Default configuration must be set using a custom Paginator class.');
+ }
+
if (isset($config['paginator'])) {
if (!$config['paginator'] instanceof Paginator) {
throw new InvalidArgumentException('Paginator must be an instance of ' . Paginator::class);
diff --git a/app/vendor/cakephp/cakephp/src/Controller/Controller.php b/app/vendor/cakephp/cakephp/src/Controller/Controller.php
index 730b7198e..a3300fbde 100644
--- a/app/vendor/cakephp/cakephp/src/Controller/Controller.php
+++ b/app/vendor/cakephp/cakephp/src/Controller/Controller.php
@@ -210,6 +210,8 @@ public function __construct(
$plugin = $this->request->getParam('plugin');
$modelClass = ($plugin ? $plugin . '.' : '') . $this->name;
$this->_setModelClass($modelClass);
+
+ $this->defaultTable = $modelClass;
}
if ($components !== null) {
@@ -558,6 +560,7 @@ public function invokeAction(Closure $action, array $args): void
* - `only`: (array|string) Only run the middleware for specified actions.
* - `except`: (array|string) Run the middleware for all actions except the specified ones.
* @return void
+ * @since 4.3.0
* @psalm-param array{only?: array|string, except?: array|string} $options
*/
public function middleware($middleware, array $options = [])
@@ -572,6 +575,7 @@ public function middleware($middleware, array $options = [])
* Get middleware to be applied for this controller.
*
* @return array
+ * @since 4.3.0
*/
public function getMiddleware(): array
{
diff --git a/app/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php b/app/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php
index 076878432..65a09ca99 100644
--- a/app/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php
+++ b/app/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php
@@ -174,8 +174,16 @@ protected function getActionArgs(Closure $action, array $passedParams): array
// Check for dependency injection for classes
if ($type instanceof ReflectionNamedType && !$type->isBuiltin()) {
- if ($this->container->has($type->getName())) {
- $resolved[] = $this->container->get($type->getName());
+ $typeName = $type->getName();
+ if ($this->container->has($typeName)) {
+ $resolved[] = $this->container->get($typeName);
+ continue;
+ }
+
+ // Use passedParams as a source of typed dependencies.
+ // The accepted types for passedParams was never defined and userland code relies on that.
+ if ($passedParams && is_object($passedParams[0]) && $passedParams[0] instanceof $typeName) {
+ $resolved[] = array_shift($passedParams);
continue;
}
@@ -189,6 +197,7 @@ protected function getActionArgs(Closure $action, array $passedParams): array
throw new InvalidParameterException([
'template' => 'missing_dependency',
'parameter' => $parameter->getName(),
+ 'type' => $typeName,
'controller' => $this->controller->getName(),
'action' => $this->controller->getRequest()->getParam('action'),
'prefix' => $this->controller->getRequest()->getParam('prefix'),
@@ -199,7 +208,7 @@ protected function getActionArgs(Closure $action, array $passedParams): array
// Use any passed params as positional arguments
if ($passedParams) {
$argument = array_shift($passedParams);
- if ($type instanceof ReflectionNamedType) {
+ if (is_string($argument) && $type instanceof ReflectionNamedType) {
$typedArgument = $this->coerceStringToType($argument, $type);
if ($typedArgument === null) {
@@ -250,7 +259,7 @@ protected function getActionArgs(Closure $action, array $passedParams): array
*
* @param string $argument Argument to coerce
* @param \ReflectionNamedType $type Parameter type
- * @return string|float|int|bool|null
+ * @return array|string|float|int|bool|null
*/
protected function coerceStringToType(string $argument, ReflectionNamedType $type)
{
@@ -263,6 +272,8 @@ protected function coerceStringToType(string $argument, ReflectionNamedType $typ
return ctype_digit($argument) ? (int)$argument : null;
case 'bool':
return $argument === '0' ? false : ($argument === '1' ? true : null);
+ case 'array':
+ return $argument === '' ? [] : explode(',', $argument);
}
return null;
diff --git a/app/vendor/cakephp/cakephp/src/Controller/Exception/InvalidParameterException.php b/app/vendor/cakephp/cakephp/src/Controller/Exception/InvalidParameterException.php
index e9a9d68fa..b7d6fc8e2 100644
--- a/app/vendor/cakephp/cakephp/src/Controller/Exception/InvalidParameterException.php
+++ b/app/vendor/cakephp/cakephp/src/Controller/Exception/InvalidParameterException.php
@@ -27,7 +27,8 @@ class InvalidParameterException extends CakeException
*/
protected $templates = [
'failed_coercion' => 'Unable to coerce "%s" to `%s` for `%s` in action %s::%s().',
- 'missing_dependency' => 'Failed to inject dependency from service container for `%s` in action %s::%s().',
+ 'missing_dependency' => 'Failed to inject dependency from service container for parameter `%s` ' .
+ 'with type `%s` in action %s::%s().',
'missing_parameter' => 'Missing passed parameter for `%s` in action %s::%s().',
'unsupported_type' => 'Type declaration for `%s` in action %s::%s() is unsupported.',
];
diff --git a/app/vendor/cakephp/cakephp/src/Core/App.php b/app/vendor/cakephp/cakephp/src/Core/App.php
index 5d7f1f0db..3f5c9a0ba 100644
--- a/app/vendor/cakephp/cakephp/src/Core/App.php
+++ b/app/vendor/cakephp/cakephp/src/Core/App.php
@@ -59,13 +59,16 @@ public static function className(string $class, string $type = '', string $suffi
}
[$plugin, $name] = pluginSplit($class);
- $base = $plugin ?: Configure::read('App.namespace');
- $base = str_replace('/', '\\', rtrim($base, '\\'));
$fullname = '\\' . str_replace('/', '\\', $type . '\\' . $name) . $suffix;
- if (static::_classExistsInBase($fullname, $base)) {
- /** @var class-string */
- return $base . $fullname;
+ $base = $plugin ?: Configure::read('App.namespace');
+ if ($base !== null) {
+ $base = str_replace('/', '\\', rtrim($base, '\\'));
+
+ if (static::_classExistsInBase($fullname, $base)) {
+ /** @var class-string */
+ return $base . $fullname;
+ }
}
if ($plugin || !static::_classExistsInBase($fullname, 'Cake')) {
diff --git a/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php b/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php
index 2be443e81..4c85e326c 100644
--- a/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php
+++ b/app/vendor/cakephp/cakephp/src/Core/PluginCollection.php
@@ -115,7 +115,7 @@ protected function loadConfig(): void
* This method is not part of the official public API as plugins with
* no plugin class are being phased out.
*
- * @param string $name The plugin name to locate a path for. Will return '' when a plugin cannot be found.
+ * @param string $name The plugin name to locate a path for.
* @return string
* @throws \Cake\Core\Exception\MissingPluginException when a plugin path cannot be resolved.
* @internal
diff --git a/app/vendor/cakephp/cakephp/src/Core/functions.php b/app/vendor/cakephp/cakephp/src/Core/functions.php
index 29c82d9b2..2ca8619e8 100644
--- a/app/vendor/cakephp/cakephp/src/Core/functions.php
+++ b/app/vendor/cakephp/cakephp/src/Core/functions.php
@@ -252,10 +252,9 @@ function env(string $key, $default = null)
*/
function triggerWarning(string $message): void
{
- $stackFrame = 1;
$trace = debug_backtrace();
- if (isset($trace[$stackFrame])) {
- $frame = $trace[$stackFrame];
+ if (isset($trace[1])) {
+ $frame = $trace[1];
$frame += ['file' => '[internal]', 'line' => '??'];
$message = sprintf(
'%s - %s, line: %s',
@@ -298,10 +297,10 @@ function deprecationWarning(string $message, int $stackFrame = 1): void
}
$message = sprintf(
- '%s - %s, line: %s' . "\n" .
- ' 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.',
+ "%s\n%s, line: %s\n" .
+ 'You can disable all deprecation warnings by setting `Error.errorLevel` to ' .
+ '`E_ALL & ~E_USER_DEPRECATED`. Adding `%s` to `Error.ignoredDeprecationPaths` ' .
+ 'in your `config/app.php` config will mute deprecations from that file only.',
$message,
$frame['file'],
$frame['line'],
diff --git a/app/vendor/cakephp/cakephp/src/Database/Connection.php b/app/vendor/cakephp/cakephp/src/Database/Connection.php
index 70a96bfe4..5153d0e81 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Connection.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Connection.php
@@ -195,7 +195,7 @@ public function setDriver($driver, $config = [])
$driver = new $className($config);
}
if (!$driver->enabled()) {
- throw new MissingExtensionException(['driver' => get_class($driver)]);
+ throw new MissingExtensionException(['driver' => get_class($driver), 'name' => $config['name']]);
}
$this->_driver = $driver;
diff --git a/app/vendor/cakephp/cakephp/src/Database/Driver/SqlDialectTrait.php b/app/vendor/cakephp/cakephp/src/Database/Driver/SqlDialectTrait.php
index 949a10947..7bcabda6b 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Driver/SqlDialectTrait.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Driver/SqlDialectTrait.php
@@ -73,14 +73,14 @@ public function quoteIdentifier(string $identifier): string
}
// string.string with spaces
- if (preg_match('/^([\w-]+\.[\w][\w\s\-]*[\w])(.*)/u', $identifier, $matches)) {
+ 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)) {
+ if (preg_match('/^[\w\s-]*[\w-]+/u', $identifier)) {
return $this->_startQuote . $identifier . $this->_endQuote;
}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php
index 63380a2fa..794e0844f 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Exception/MissingExtensionException.php
@@ -27,5 +27,5 @@ class MissingExtensionException extends CakeException
* @inheritDoc
*/
// phpcs:ignore Generic.Files.LineLength
- protected $_messageTemplate = 'Database driver %s cannot be used due to a missing PHP extension or unmet dependency';
+ protected $_messageTemplate = 'Database driver %s cannot be used due to a missing PHP extension or unmet dependency. Requested by connection "%s"';
}
diff --git a/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php b/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php
index 35582dd04..2ab13d219 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php
@@ -781,21 +781,24 @@ protected function _parseCondition(string $field, $value)
$expression = $field;
$spaces = substr_count($field, ' ');
- // Handle operators with a space in them like `is not` and `not like`
+ // Handle field values that contain multiple spaces, such as
+ // operators with a space in them like `field IS NOT` and
+ // `field NOT LIKE`, or combinations with function expressions
+ // like `CONCAT(first_name, ' ', last_name) IN`.
if ($spaces > 1) {
$parts = explode(' ', $field);
if (preg_match('/(is not|not \w+)$/i', $field)) {
$last = array_pop($parts);
$second = array_pop($parts);
- array_push($parts, strtolower("{$second} {$last}"));
+ $parts[] = "{$second} {$last}";
}
$operator = array_pop($parts);
$expression = implode(' ', $parts);
} elseif ($spaces == 1) {
$parts = explode(' ', $field, 2);
[$expression, $operator] = $parts;
- $operator = strtolower(trim($operator));
}
+ $operator = strtolower(trim($operator));
$type = $this->getTypeMap()->type($expression);
$typeMultiple = (is_string($type) && strpos($type, '[]') !== false);
diff --git a/app/vendor/cakephp/cakephp/src/Database/Query.php b/app/vendor/cakephp/cakephp/src/Database/Query.php
index 7cc59b5e2..3df66cd51 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Query.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Query.php
@@ -793,7 +793,7 @@ public function removeJoin(string $name)
*
* See `join()` for further details on conditions and types.
*
- * @param array|string $table The table to join with
+ * @param array|string $table The table to join with
* @param \Cake\Database\ExpressionInterface|array|string $conditions The conditions
* to use for joining.
* @param array $types a list of types associated to the conditions used for converting
@@ -815,7 +815,7 @@ public function leftJoin($table, $conditions = [], $types = [])
* The arguments of this method are identical to the `leftJoin()` shorthand, please refer
* to that methods description for further details.
*
- * @param array|string $table The table to join with
+ * @param array|string $table The table to join with
* @param \Cake\Database\ExpressionInterface|array|string $conditions The conditions
* to use for joining.
* @param array $types a list of types associated to the conditions used for converting
@@ -837,7 +837,7 @@ public function rightJoin($table, $conditions = [], $types = [])
* The arguments of this method are identical to the `leftJoin()` shorthand, please refer
* to that method's description for further details.
*
- * @param array|string $table The table to join with
+ * @param array|string $table The table to join with
* @param \Cake\Database\ExpressionInterface|array|string $conditions The conditions
* to use for joining.
* @param array $types a list of types associated to the conditions used for converting
@@ -854,7 +854,7 @@ public function innerJoin($table, $conditions = [], $types = [])
/**
* Returns an array that can be passed to the join method describing a single join clause
*
- * @param array|string $table The table to join with
+ * @param array|string $table The table to join with
* @param \Cake\Database\ExpressionInterface|array|string $conditions The conditions
* to use for joining.
* @param string $type the join type to use
diff --git a/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php b/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php
index f0b6641e7..236d5eb72 100644
--- a/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php
+++ b/app/vendor/cakephp/cakephp/src/Database/QueryCompiler.php
@@ -59,7 +59,6 @@ class QueryCompiler
* The list of query clauses to traverse for generating an UPDATE statement
*
* @var array
- * @deprecated Not used.
*/
protected $_updateParts = ['with', 'update', 'set', 'where', 'epilog'];
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php b/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php
index 7e7aac559..bf2937998 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php
@@ -58,6 +58,14 @@ public function __construct(CollectionInterface $collection, string $prefix, Cac
$this->cacher = $cacher;
}
+ /**
+ * @inheritDoc
+ */
+ public function listTablesWithoutViews(): array
+ {
+ return $this->collection->listTablesWithoutViews();
+ }
+
/**
* @inheritDoc
*/
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php b/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php
index 62775e280..3393e1bbc 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php
@@ -54,10 +54,28 @@ public function __construct(Connection $connection)
}
/**
- * Get the list of tables available in the current connection.
+ * Get the list of tables, excluding any views, available in the current connection.
*
* @return array The list of tables in the connected database/schema.
*/
+ public function listTablesWithoutViews(): array
+ {
+ [$sql, $params] = $this->_dialect->listTablesWithoutViewsSql($this->_connection->config());
+ $result = [];
+ $statement = $this->_connection->execute($sql, $params);
+ while ($row = $statement->fetch()) {
+ $result[] = $row[0];
+ }
+ $statement->closeCursor();
+
+ return $result;
+ }
+
+ /**
+ * Get the list of tables and views available in the current connection.
+ *
+ * @return array The list of tables and views in the connected database/schema.
+ */
public function listTables(): array
{
[$sql, $params] = $this->_dialect->listTablesSql($this->_connection->config());
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/CollectionInterface.php b/app/vendor/cakephp/cakephp/src/Database/Schema/CollectionInterface.php
index a5c61982a..1861e3682 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/CollectionInterface.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/CollectionInterface.php
@@ -21,6 +21,9 @@
*
* Used to access information about the tables,
* and other data in a database.
+ *
+ * @method array listTablesWithoutViews() Get the list of tables available in the current connection.
+ * This will exclude any views in the schema.
*/
interface CollectionInterface
{
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchemaDialect.php b/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchemaDialect.php
index c6ca86759..d8dddef82 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchemaDialect.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/MysqlSchemaDialect.php
@@ -34,11 +34,30 @@ class MysqlSchemaDialect extends SchemaDialect
protected $_driver;
/**
- * @inheritDoc
+ * Generate the SQL to list the tables and views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
*/
public function listTablesSql(array $config): array
{
- return ['SHOW TABLES FROM ' . $this->_driver->quoteIdentifier($config['database']), []];
+ return ['SHOW FULL TABLES FROM ' . $this->_driver->quoteIdentifier($config['database']), []];
+ }
+
+ /**
+ * Generate the SQL to list the tables, excluding all views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
+ */
+ public function listTablesWithoutViewsSql(array $config): array
+ {
+ return [
+ 'SHOW FULL TABLES FROM ' . $this->_driver->quoteIdentifier($config['database'])
+ . ' WHERE TABLE_TYPE = "BASE TABLE"'
+ , []];
}
/**
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchemaDialect.php b/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchemaDialect.php
index 00e48ea7e..4b2b6e7dd 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchemaDialect.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/PostgresSchemaDialect.php
@@ -26,11 +26,32 @@
class PostgresSchemaDialect extends SchemaDialect
{
/**
- * @inheritDoc
+ * Generate the SQL to list the tables and views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
*/
public function listTablesSql(array $config): array
{
- $sql = 'SELECT table_name as name FROM information_schema.tables WHERE table_schema = ? ORDER BY name';
+ $sql = 'SELECT table_name as name FROM information_schema.tables
+ WHERE table_schema = ? ORDER BY name';
+ $schema = empty($config['schema']) ? 'public' : $config['schema'];
+
+ return [$sql, [$schema]];
+ }
+
+ /**
+ * Generate the SQL to list the tables, excluding all views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
+ */
+ public function listTablesWithoutViewsSql(array $config): array
+ {
+ $sql = 'SELECT table_name as name FROM information_schema.tables
+ WHERE table_schema = ? AND table_type = \'BASE TABLE\' ORDER BY name';
$schema = empty($config['schema']) ? 'public' : $config['schema'];
return [$sql, [$schema]];
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/SchemaDialect.php b/app/vendor/cakephp/cakephp/src/Database/Schema/SchemaDialect.php
index 1d887d7ae..58b2e682d 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/SchemaDialect.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/SchemaDialect.php
@@ -26,6 +26,8 @@
*
* This class contains methods that are common across
* the various SQL dialects.
+ *
+ * @method array listTablesWithoutViewsSql(array $config) Generate the SQL to list the tables, excluding all views.
*/
abstract class SchemaDialect
{
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchemaDialect.php b/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchemaDialect.php
index 01ee0d5c2..10b6fe16a 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchemaDialect.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/SqliteSchemaDialect.php
@@ -152,9 +152,30 @@ protected function _convertColumn(string $column): array
}
/**
- * @inheritDoc
+ * Generate the SQL to list the tables and views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
*/
public function listTablesSql(array $config): array
+ {
+ return [
+ 'SELECT name FROM sqlite_master ' .
+ 'WHERE (type="table" OR type="view") ' .
+ 'AND name != "sqlite_sequence" ORDER BY name',
+ [],
+ ];
+ }
+
+ /**
+ * Generate the SQL to list the tables, excluding all views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
+ */
+ public function listTablesWithoutViewsSql(array $config): array
{
return [
'SELECT name FROM sqlite_master WHERE type="table" ' .
diff --git a/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchemaDialect.php b/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchemaDialect.php
index ea45ffe60..1323869ab 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchemaDialect.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Schema/SqlserverSchemaDialect.php
@@ -29,7 +29,11 @@ class SqlserverSchemaDialect extends SchemaDialect
public const DEFAULT_SCHEMA_NAME = 'dbo';
/**
- * @inheritDoc
+ * Generate the SQL to list the tables and views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
*/
public function listTablesSql(array $config): array
{
@@ -43,6 +47,25 @@ public function listTablesSql(array $config): array
return [$sql, [$schema]];
}
+ /**
+ * Generate the SQL to list the tables, excluding all views.
+ *
+ * @param array $config The connection configuration to use for
+ * getting tables from.
+ * @return array An array of (sql, params) to execute.
+ */
+ public function listTablesWithoutViewsSql(array $config): array
+ {
+ $sql = "SELECT TABLE_NAME
+ FROM INFORMATION_SCHEMA.TABLES
+ WHERE TABLE_SCHEMA = ?
+ AND (TABLE_TYPE = 'BASE TABLE')
+ ORDER BY TABLE_NAME";
+ $schema = empty($config['schema']) ? static::DEFAULT_SCHEMA_NAME : $config['schema'];
+
+ return [$sql, [$schema]];
+ }
+
/**
* @inheritDoc
*/
diff --git a/app/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php b/app/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php
index d6b2dc1f5..4a1d33e95 100644
--- a/app/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php
+++ b/app/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php
@@ -204,9 +204,9 @@ public function fetch($type = self::FETCH_TYPE_NUM)
/**
* Returns the next row in a result set as an associative array. Calling this function is the same as calling
- * $statement->fetch(StatementDecorator::FETCH_TYPE_ASSOC). If no results are found false is returned.
+ * $statement->fetch(StatementDecorator::FETCH_TYPE_ASSOC). If no results are found an empty array is returned.
*
- * @return array Result array containing columns and values an an associative array or an empty array if no results
+ * @return array
*/
public function fetchAssoc(): array
{
@@ -318,7 +318,7 @@ public function bind(array $params, array $types): void
return;
}
- $anonymousParams = is_int(key($params)) ? true : false;
+ $anonymousParams = is_int(key($params));
$offset = 1;
foreach ($params as $index => $value) {
$type = $types[$index] ?? null;
diff --git a/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php b/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php
index 616b3db34..a18b4cdea 100644
--- a/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php
+++ b/app/vendor/cakephp/cakephp/src/Datasource/EntityTrait.php
@@ -143,7 +143,7 @@ public function __set(string $field, $value): void
/**
* Returns whether this entity contains a field named $field
- * regardless of if it is empty.
+ * and is not set to null.
*
* @param string $field The field to check.
* @return bool
@@ -405,7 +405,7 @@ public function isEmpty(string $field): bool
}
/**
- * Checks tha a field has a value.
+ * Checks that a field has a value.
*
* This method will return true for
*
diff --git a/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php b/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php
index 708e05882..dd950dd74 100644
--- a/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php
+++ b/app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php
@@ -136,6 +136,7 @@ public function setResult(iterable $results)
* @return \Cake\Datasource\ResultSetInterface
* @psalm-suppress ImplementedReturnTypeMismatch
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
return $this->all();
diff --git a/app/vendor/cakephp/cakephp/src/Datasource/RuleInvoker.php b/app/vendor/cakephp/cakephp/src/Datasource/RuleInvoker.php
index 01f0e2c57..3f9fe54a6 100644
--- a/app/vendor/cakephp/cakephp/src/Datasource/RuleInvoker.php
+++ b/app/vendor/cakephp/cakephp/src/Datasource/RuleInvoker.php
@@ -136,6 +136,7 @@ public function __invoke(EntityInterface $entity, array $scope): bool
$entity->setInvalidField($errorField, $invalidValue);
}
+ /** @phpstan-ignore-next-line */
return $pass === true;
}
}
diff --git a/app/vendor/cakephp/cakephp/src/Datasource/composer.json b/app/vendor/cakephp/cakephp/src/Datasource/composer.json
index ffd623c0d..ca90fc1c8 100644
--- a/app/vendor/cakephp/cakephp/src/Datasource/composer.json
+++ b/app/vendor/cakephp/cakephp/src/Datasource/composer.json
@@ -26,8 +26,8 @@
"require": {
"php": ">=7.2.0",
"cakephp/core": "^4.0",
- "psr/log": "^1.1",
- "psr/simple-cache": "^1.0"
+ "psr/log": "^1.0 || ^2.0",
+ "psr/simple-cache": "^1.0 || ^2.0"
},
"suggest": {
"cakephp/utility": "If you decide to use EntityTrait.",
diff --git a/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php b/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php
index 4baea0b89..9c0e6fad3 100644
--- a/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php
+++ b/app/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php
@@ -409,8 +409,12 @@ protected function _outputMessage(string $template): Response
}
return $this->_outputMessageSafe('error500');
- } catch (Throwable $e) {
- return $this->_outputMessageSafe('error500');
+ } catch (Throwable $outer) {
+ try {
+ return $this->_outputMessageSafe('error500');
+ } catch (Throwable $inner) {
+ throw $outer;
+ }
}
}
diff --git a/app/vendor/cakephp/cakephp/src/Form/Form.php b/app/vendor/cakephp/cakephp/src/Form/Form.php
index 9f73a5895..9e8122359 100644
--- a/app/vendor/cakephp/cakephp/src/Form/Form.php
+++ b/app/vendor/cakephp/cakephp/src/Form/Form.php
@@ -269,7 +269,7 @@ public function setErrors(array $errors)
* Defaults to `true`/`'default'`.
*
* @param array $data Form data.
- * @param array $options List of options.
+ * @param array $options List of options.
* @return bool False on validation failure, otherwise returns the
* result of the `_execute()` method.
*/
diff --git a/app/vendor/cakephp/cakephp/src/Form/FormProtector.php b/app/vendor/cakephp/cakephp/src/Form/FormProtector.php
index 5e3acde78..757cfebab 100644
--- a/app/vendor/cakephp/cakephp/src/Form/FormProtector.php
+++ b/app/vendor/cakephp/cakephp/src/Form/FormProtector.php
@@ -269,8 +269,8 @@ protected function extractToken($formData): ?string
/**
* Return hash parts for the token generation
*
- * @param array $formData Form data.
- * @return array
+ * @param array $formData Form data.
+ * @return array
* @psalm-return array{fields: array, unlockedFields: array}
*/
protected function extractHashParts(array $formData): array
@@ -422,7 +422,7 @@ public function buildTokenData(string $url = '', string $sessionId = ''): array
* Generate validation hash.
*
* @param array $fields Fields list.
- * @param array $unlockedFields Unlocked fields.
+ * @param array $unlockedFields Unlocked fields.
* @param string $url Form URL.
* @param string $sessionId Session Id.
* @return string
diff --git a/app/vendor/cakephp/cakephp/src/Http/Client.php b/app/vendor/cakephp/cakephp/src/Http/Client.php
index 51900f52c..7fc14d8a2 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Client.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Client.php
@@ -629,7 +629,6 @@ protected function _createRequest(string $method, string $url, $data, $options):
}
$request = new Request($url, $method, $headers, $data);
- /** @var \Cake\Http\Client\Request $request */
$request = $request->withProtocolVersion($this->getConfig('protocolVersion'));
$cookies = $options['cookies'] ?? [];
/** @var \Cake\Http\Client\Request $request */
diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php
index ecd8ca270..f6edf2785 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Client/Auth/Oauth.php
@@ -220,8 +220,12 @@ protected function _rsaSha1(Request $request, array $credentials): string
$credentials['privateKeyPassphrase'] = $passphrase;
}
$privateKey = openssl_pkey_get_private($credentials['privateKey'], $credentials['privateKeyPassphrase']);
+ $this->checkSslError();
+
$signature = '';
openssl_sign($baseString, $signature, $privateKey);
+ $this->checkSslError();
+
if (PHP_MAJOR_VERSION < 8) {
openssl_free_key($privateKey);
}
@@ -367,4 +371,21 @@ protected function _encode(string $value): string
{
return str_replace(['%7E', '+'], ['~', ' '], rawurlencode($value));
}
+
+ /**
+ * Check for SSL errors and raise if one is encountered.
+ *
+ * @return void
+ */
+ protected function checkSslError(): void
+ {
+ $error = '';
+ while ($text = openssl_error_string()) {
+ $error .= $text;
+ }
+
+ if (strlen($error) > 0) {
+ throw new RuntimeException('openssl error: ' . $error);
+ }
+ }
}
diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Message.php b/app/vendor/cakephp/cakephp/src/Http/Client/Message.php
index a23282d20..59994e03a 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Client/Message.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Client/Message.php
@@ -86,6 +86,13 @@ class Message
*/
public const STATUS_TEMPORARY_REDIRECT = 307;
+ /**
+ * HTTP 308 code
+ *
+ * @var int
+ */
+ public const STATUS_PERMANENT_REDIRECT = 308;
+
/**
* HTTP GET method
*
diff --git a/app/vendor/cakephp/cakephp/src/Http/Client/Response.php b/app/vendor/cakephp/cakephp/src/Http/Client/Response.php
index cd2f5132c..74b3818be 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Client/Response.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Client/Response.php
@@ -235,6 +235,7 @@ public function isRedirect(): bool
static::STATUS_FOUND,
static::STATUS_SEE_OTHER,
static::STATUS_TEMPORARY_REDIRECT,
+ static::STATUS_PERMANENT_REDIRECT,
];
return in_array($this->code, $codes, true) &&
diff --git a/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php b/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php
index ab519e078..93057cbe2 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Cookie/CookieCollection.php
@@ -26,6 +26,7 @@
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Traversable;
+use TypeError;
/**
* Cookie Collection
@@ -68,7 +69,7 @@ public static function createFromHeader(array $header, array $defaults = [])
foreach ($header as $value) {
try {
$cookies[] = Cookie::createFromHeaderString($value, $defaults);
- } catch (Exception $e) {
+ } catch (Exception | TypeError $e) {
// Don't blow up on invalid cookies
}
}
@@ -237,10 +238,10 @@ public function addToRequest(RequestInterface $request, array $extraCookies = []
$uri->getHost(),
$uri->getPath() ?: '/'
);
- $cookies = array_merge($cookies, $extraCookies);
+ $cookies = $extraCookies + $cookies;
$cookiePairs = [];
foreach ($cookies as $key => $value) {
- $cookie = sprintf('%s=%s', rawurlencode($key), rawurlencode($value));
+ $cookie = sprintf('%s=%s', rawurlencode((string)$key), rawurlencode($value));
$size = strlen($cookie);
if ($size > 4096) {
triggerWarning(sprintf(
diff --git a/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php b/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php
index b06976f69..28e33bdf1 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php
@@ -342,7 +342,7 @@ protected function _verifyToken(string $token): bool
} else {
$decoded = base64_decode($token, true);
}
- if (strlen($decoded) <= static::TOKEN_VALUE_LENGTH) {
+ if (!$decoded || strlen($decoded) <= static::TOKEN_VALUE_LENGTH) {
return false;
}
diff --git a/app/vendor/cakephp/cakephp/src/Http/Response.php b/app/vendor/cakephp/cakephp/src/Http/Response.php
index 5b71e61e6..6bf4bea2a 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Response.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Response.php
@@ -1351,36 +1351,6 @@ public function withCookieCollection(CookieCollection $cookieCollection)
/**
* Get a CorsBuilder instance for defining CORS headers.
*
- * This method allow multiple ways to setup the domains, see the examples
- *
- * ### Full URI
- * ```
- * cors($request, 'https://www.cakephp.org');
- * ```
- *
- * ### URI with wildcard
- * ```
- * cors($request, 'https://*.cakephp.org');
- * ```
- *
- * ### Ignoring the requested protocol
- * ```
- * cors($request, 'www.cakephp.org');
- * ```
- *
- * ### Any URI
- * ```
- * cors($request, '*');
- * ```
- *
- * ### Allowed list of URIs
- * ```
- * cors($request, ['http://www.cakephp.org', '*.google.com', 'https://myproject.github.io']);
- * ```
- *
- * *Note* The `$allowedDomains`, `$allowedMethods`, `$allowedHeaders` parameters are deprecated.
- * Instead the builder object should be used.
- *
* @param \Cake\Http\ServerRequest $request Request object
* @return \Cake\Http\CorsBuilder A builder object the provides a fluent interface for defining
* additional CORS headers.
diff --git a/app/vendor/cakephp/cakephp/src/Http/Session.php b/app/vendor/cakephp/cakephp/src/Http/Session.php
index 6f23ba151..19b83d5f4 100644
--- a/app/vendor/cakephp/cakephp/src/Http/Session.php
+++ b/app/vendor/cakephp/cakephp/src/Http/Session.php
@@ -481,6 +481,7 @@ public function consume(string $name)
}
$value = $this->read($name);
if ($value !== null) {
+ /** @psalm-suppress InvalidScalarArgument */
$this->_overwrite($_SESSION, Hash::remove($_SESSION, $name));
}
@@ -545,6 +546,7 @@ public function id(?string $id = null): string
public function delete(string $name): void
{
if ($this->check($name)) {
+ /** @psalm-suppress InvalidScalarArgument */
$this->_overwrite($_SESSION, Hash::remove($_SESSION, $name));
}
}
diff --git a/app/vendor/cakephp/cakephp/src/I18n/Number.php b/app/vendor/cakephp/cakephp/src/I18n/Number.php
index bf49dfe2d..accd550b0 100644
--- a/app/vendor/cakephp/cakephp/src/I18n/Number.php
+++ b/app/vendor/cakephp/cakephp/src/I18n/Number.php
@@ -95,7 +95,7 @@ public static function precision($value, int $precision = 3, array $options = []
{
$formatter = static::formatter(['precision' => $precision, 'places' => $precision] + $options);
- return $formatter->format($value);
+ return $formatter->format((float)$value);
}
/**
@@ -159,7 +159,7 @@ public static function toPercentage($value, int $precision = 2, array $options =
* - `before` - The string to place before whole numbers, e.g. '['
* - `after` - The string to place after decimal numbers, e.g. ']'
*
- * @param string|float $value A floating point number.
+ * @param string|int|float $value A floating point number.
* @param array $options An array with options.
* @return string Formatted number
*/
diff --git a/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php b/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php
index b6bcb06e6..2895b61ed 100644
--- a/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php
+++ b/app/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php
@@ -201,6 +201,11 @@ public function get(string $name, ?string $locale = null): ?Translator
$keyName = str_replace('/', '.', $name);
$key = "translations.{$keyName}.{$locale}";
$translator = $this->_cacher->get($key);
+
+ // PHP <8.1 does not correctly garbage collect strings created
+ // by unserialized arrays.
+ gc_collect_cycles();
+
if (!$translator || !$translator->getPackage()) {
$translator = $this->_getTranslator($name, $locale);
$this->_cacher->set($key, $translator);
diff --git a/app/vendor/cakephp/cakephp/src/Log/Formatter/DefaultFormatter.php b/app/vendor/cakephp/cakephp/src/Log/Formatter/DefaultFormatter.php
index cdac453fb..b4fc4d4a1 100644
--- a/app/vendor/cakephp/cakephp/src/Log/Formatter/DefaultFormatter.php
+++ b/app/vendor/cakephp/cakephp/src/Log/Formatter/DefaultFormatter.php
@@ -16,6 +16,8 @@
*/
namespace Cake\Log\Formatter;
+use DateTime;
+
class DefaultFormatter extends AbstractFormatter
{
/**
@@ -43,7 +45,7 @@ public function __construct(array $config = [])
public function format($level, string $message, array $context = []): string
{
if ($this->_config['includeDate']) {
- $message = sprintf('%s %s: %s', date($this->_config['dateFormat']), $level, $message);
+ $message = sprintf('%s %s: %s', (new DateTime())->format($this->_config['dateFormat']), $level, $message);
} else {
$message = sprintf('%s: %s', $level, $message);
}
diff --git a/app/vendor/cakephp/cakephp/src/Log/composer.json b/app/vendor/cakephp/cakephp/src/Log/composer.json
index 0d43640be..81d234e8d 100644
--- a/app/vendor/cakephp/cakephp/src/Log/composer.json
+++ b/app/vendor/cakephp/cakephp/src/Log/composer.json
@@ -25,7 +25,7 @@
"require": {
"php": ">=7.2.0",
"cakephp/core": "^4.0",
- "psr/log": "^1.0.0"
+ "psr/log": "^1.0 || ^2.0"
},
"provide": {
"psr/log-implementation": "^1.0.0"
diff --git a/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php b/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php
index 8ce190bab..e59e9f13f 100644
--- a/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php
+++ b/app/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php
@@ -93,6 +93,7 @@ protected static function _buildTransport(string $name): void
);
}
+ /** @phpstan-ignore-next-line */
static::getRegistry()->load($name, static::$_config[$name]);
}
diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association.php b/app/vendor/cakephp/cakephp/src/ORM/Association.php
index baf400520..86ef6984c 100644
--- a/app/vendor/cakephp/cakephp/src/ORM/Association.php
+++ b/app/vendor/cakephp/cakephp/src/ORM/Association.php
@@ -431,7 +431,7 @@ public function getTarget(): Table
*
* @param \Closure|array $conditions list of conditions to be used
* @see \Cake\Database\Query::where() for examples on the format of the array
- * @return \Cake\ORM\Association
+ * @return $this
*/
public function setConditions($conditions)
{
diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php b/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php
index ba3503b69..a781e32ba 100644
--- a/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php
+++ b/app/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php
@@ -426,6 +426,7 @@ protected function _generateJunctionAssociations(Table $junction, Table $source,
if (!$junction->hasAssociation($sAlias)) {
$junction->belongsTo($sAlias, [
+ 'bindingKey' => $this->getBindingKey(),
'foreignKey' => $this->getForeignKey(),
'targetTable' => $source,
]);
@@ -1183,27 +1184,33 @@ function () use ($sourceEntity, $targetEntities, $primaryValue, $options) {
$target = $this->getTarget();
$foreignKey = (array)$this->getForeignKey();
- $prefixedForeignKey = array_map([$junction, 'aliasField'], $foreignKey);
+ $assocForeignKey = (array)$junction->getAssociation($target->getAlias())->getForeignKey();
+ $prefixedForeignKey = array_map([$junction, 'aliasField'], $foreignKey);
$junctionPrimaryKey = (array)$junction->getPrimaryKey();
- $assocForeignKey = (array)$junction->getAssociation($target->getAlias())->getForeignKey();
+ $junctionQueryAlias = $junction->getAlias() . '__matches';
- $keys = array_combine($foreignKey, $prefixedForeignKey);
+ $keys = $matchesConditions = [];
foreach (array_merge($assocForeignKey, $junctionPrimaryKey) as $key) {
- $keys[$key] = $junction->aliasField($key);
+ $aliased = $junction->aliasField($key);
+ $keys[$key] = $aliased;
+ $matchesConditions[$aliased] = new IdentifierExpression($junctionQueryAlias . '.' . $key);
}
- // Find junction records. We join with the association target so that junction
- // conditions from `targetConditions()` or the finder work.
- $existing = $junction->find()
- ->innerJoinWith($target->getAlias())
- ->where($this->targetConditions())
- ->where($this->junctionConditions())
+ // Use association to create row selection
+ // with finders & association conditions.
+ $matches = $this->_appendJunctionJoin($this->find())
+ ->select($keys)
->where(array_combine($prefixedForeignKey, $primaryValue));
- [$finder, $finderOptions] = $this->_extractFinder($this->getFinder());
- if ($finder) {
- $existing = $target->callFinder($finder, $existing, $finderOptions);
- }
+
+ // Create a subquery join to ensure we get
+ // the correct entity passed to callbacks.
+ $existing = $junction->query()
+ ->from([$junctionQueryAlias => $matches])
+ ->innerJoin(
+ [$junction->getAlias() => $junction->getTable()],
+ $matchesConditions
+ );
$jointEntities = $this->_collectJointEntities($sourceEntity, $targetEntities);
$inserts = $this->_diffLinks($existing, $jointEntities, $targetEntities, $options);
diff --git a/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php b/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php
index 0ccff39a6..6a2591d49 100644
--- a/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php
+++ b/app/vendor/cakephp/cakephp/src/ORM/Association/Loader/SelectLoader.php
@@ -244,6 +244,10 @@ protected function _extractFinder($finderData): array
*/
protected function _assertFieldsPresent(Query $fetchQuery, array $key): void
{
+ if ($fetchQuery->isAutoFieldsEnabled()) {
+ return;
+ }
+
$select = $fetchQuery->aliasFields($fetchQuery->clause('select'));
if (empty($select)) {
return;
diff --git a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php
index 62ac3369d..154d10d20 100644
--- a/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php
+++ b/app/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php
@@ -601,12 +601,12 @@ protected function _removeFromTree(EntityInterface $node)
* Reorders the node without changing its parent.
*
* If the node is the first child, or is a top level node with no previous node
- * this method will return false
+ * this method will return the same node without any changes
*
* @param \Cake\Datasource\EntityInterface $node The node to move
* @param int|true $number How many places to move the node, or true to move to first position
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
- * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure
+ * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false if `$number` is < 1
*/
public function moveUp(EntityInterface $node, $number = 1)
{
@@ -626,7 +626,7 @@ public function moveUp(EntityInterface $node, $number = 1)
*
* @param \Cake\Datasource\EntityInterface $node The node to move
* @param int|true $number How many places to move the node, or true to move to first position
- * @return \Cake\Datasource\EntityInterface $node The node after being moved or false on failure
+ * @return \Cake\Datasource\EntityInterface $node The node after being moved
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
*/
protected function _moveUp(EntityInterface $node, $number): EntityInterface
@@ -693,12 +693,12 @@ protected function _moveUp(EntityInterface $node, $number): EntityInterface
* Reorders the node without changing the parent.
*
* If the node is the last child, or is a top level node with no subsequent node
- * this method will return false
+ * this method will return the same node without any changes
*
* @param \Cake\Datasource\EntityInterface $node The node to move
* @param int|true $number How many places to move the node or true to move to last position
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
- * @return \Cake\Datasource\EntityInterface|false the entity after being moved or false on failure
+ * @return \Cake\Datasource\EntityInterface|false the entity after being moved or false if `$number` is < 1
*/
public function moveDown(EntityInterface $node, $number = 1)
{
@@ -718,7 +718,7 @@ public function moveDown(EntityInterface $node, $number = 1)
*
* @param \Cake\Datasource\EntityInterface $node The node to move
* @param int|true $number How many places to move the node, or true to move to last position
- * @return \Cake\Datasource\EntityInterface $node The node after being moved or false on failure
+ * @return \Cake\Datasource\EntityInterface $node The node after being moved
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
*/
protected function _moveDown(EntityInterface $node, $number): EntityInterface
diff --git a/app/vendor/cakephp/cakephp/src/ORM/Table.php b/app/vendor/cakephp/cakephp/src/ORM/Table.php
index eb5694a9e..859eff21a 100644
--- a/app/vendor/cakephp/cakephp/src/ORM/Table.php
+++ b/app/vendor/cakephp/cakephp/src/ORM/Table.php
@@ -1260,10 +1260,7 @@ public function belongsToMany(string $associated, array $options = []): BelongsT
*/
public function find(string $type = 'all', array $options = []): Query
{
- $query = $this->query();
- $query->select();
-
- return $this->callFinder($type, $query, $options);
+ return $this->callFinder($type, $this->query()->select(), $options);
}
/**
@@ -1413,7 +1410,7 @@ public function findList(Query $query, array $options): Query
* ```
* $table->find('threaded', [
* 'keyField' => 'id',
- * 'parentField' => 'ancestor_id'
+ * 'parentField' => 'ancestor_id',
* 'nestingKey' => 'children'
* ]);
* ```
@@ -1531,7 +1528,7 @@ public function get($primaryKey, array $options = []): EntityInterface
if ($cacheConfig) {
if (!$cacheKey) {
$cacheKey = sprintf(
- 'get:%s.%s%s',
+ 'get-%s-%s-%s',
$this->getConnection()->configName(),
$this->getTable(),
json_encode($primaryKey)
@@ -1718,11 +1715,11 @@ public function subquery(): Query
*/
public function updateAll($fields, $conditions): int
{
- $query = $this->query();
- $query->update()
+ $statement = $this->query()
+ ->update()
->set($fields)
- ->where($conditions);
- $statement = $query->execute();
+ ->where($conditions)
+ ->execute();
$statement->closeCursor();
return $statement->rowCount();
@@ -1733,10 +1730,10 @@ public function updateAll($fields, $conditions): int
*/
public function deleteAll($conditions): int
{
- $query = $this->query()
+ $statement = $this->query()
->delete()
- ->where($conditions);
- $statement = $query->execute();
+ ->where($conditions)
+ ->execute();
$statement->closeCursor();
return $statement->rowCount();
@@ -2066,15 +2063,15 @@ protected function _insert(EntityInterface $entity, array $data)
}
}
- $success = false;
if (empty($data)) {
- return $success;
+ return false;
}
$statement = $this->query()->insert(array_keys($data))
->values($data)
->execute();
+ $success = false;
if ($statement->rowCount() !== 0) {
$success = $entity;
$entity->set($filteredKeys, ['guard' => false]);
@@ -2151,16 +2148,13 @@ protected function _update(EntityInterface $entity, array $data)
throw new InvalidArgumentException($message);
}
- $query = $this->query();
- $statement = $query->update()
+ $statement = $this->query()
+ ->update()
->set($data)
->where($primaryKey)
->execute();
- $success = false;
- if ($statement->errorCode() === '00000') {
- $success = $entity;
- }
+ $success = $statement->errorCode() === '00000' ? $entity : false;
$statement->closeCursor();
return $success;
@@ -2469,15 +2463,13 @@ protected function _processDelete(EntityInterface $entity, ArrayObject $options)
return $success;
}
- $query = $this->query();
- $conditions = $entity->extract($primaryKey);
- $statement = $query->delete()
- ->where($conditions)
+ $statement = $this->query()
+ ->delete()
+ ->where($entity->extract($primaryKey))
->execute();
- $success = $statement->rowCount() > 0;
- if (!$success) {
- return $success;
+ if ($statement->rowCount() < 1) {
+ return false;
}
$this->dispatchEvent('Model.afterDelete', [
@@ -2485,7 +2477,7 @@ protected function _processDelete(EntityInterface $entity, ArrayObject $options)
'options' => $options,
]);
- return $success;
+ return true;
}
/**
@@ -2502,12 +2494,11 @@ public function hasFinder(string $type): bool
}
/**
- * Calls a finder method directly and applies it to the passed query,
- * if no query is passed a new one will be created and returned
+ * Calls a finder method and applies it to the passed query.
*
- * @param string $type name of the finder to be called
- * @param \Cake\ORM\Query $query The query object to apply the finder options to
- * @param array $options List of options to pass to the finder
+ * @param string $type Name of the finder to be called.
+ * @param \Cake\ORM\Query $query The query object to apply the finder options to.
+ * @param array $options List of options to pass to the finder.
* @return \Cake\ORM\Query
* @throws \BadMethodCallException
* @uses findAll()
diff --git a/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php b/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php
index b3a4a7a9b..7119be7d5 100644
--- a/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php
+++ b/app/vendor/cakephp/cakephp/src/ORM/TableRegistry.php
@@ -88,7 +88,7 @@ public static function setTableLocator(LocatorInterface $tableLocator): void
* @param string $alias The alias name you want to get.
* @param array $options The options you want to build the table with.
* @return \Cake\ORM\Table
- * @deprecated 3.6.0 Use {@link \Cake\ORM\Locator\TableLocator::get()} instead. Will be removed in 5.0.
+ * @deprecated 3.6.0 Use {@link \Cake\ORM\Locator\LocatorAwareTrait::fetchTable()} instead. Will be removed in 5.0.
*/
public static function get(string $alias, array $options = []): Table
{
diff --git a/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php b/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php
index b3e1d6fda..bf9347c22 100644
--- a/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php
+++ b/app/vendor/cakephp/cakephp/src/Routing/Route/PluginShortRoute.php
@@ -18,7 +18,7 @@
/**
* Plugin short route, that copies the plugin param to the controller parameters
- * It is used for supporting /:plugin routes.
+ * It is used for supporting /{plugin} routes.
*/
class PluginShortRoute extends InflectedRoute
{
diff --git a/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php b/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php
index 638d820b7..89ce7d3fe 100644
--- a/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php
+++ b/app/vendor/cakephp/cakephp/src/Routing/Route/Route.php
@@ -128,6 +128,7 @@ class Route
* specific host names. You can use `.*` and to create wildcard subdomains/hosts
* e.g. `*.example.com` matches all subdomains on `example.com`.
* - '_port` - Define the port if you want this route to only match specific port number.
+ * - '_urldecode' - Set to `false` to disable URL decoding before route parsing.
*
* @param string $template Template string with parameter placeholders
* @param array $defaults Defaults for the route.
@@ -325,9 +326,14 @@ protected function _writeRoute(): void
$parsed = preg_quote($this->template, '#');
if (strpos($route, '{') !== false && strpos($route, '}') !== false) {
- preg_match_all(static::PLACEHOLDER_REGEX, $route, $namedElements);
+ preg_match_all(static::PLACEHOLDER_REGEX, $route, $namedElements, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
} else {
- $hasMatches = preg_match_all('/:([a-z0-9-_]+(?braceKeys = false;
if ($hasMatches) {
deprecationWarning(
@@ -336,17 +342,20 @@ protected function _writeRoute(): void
);
}
}
- foreach ($namedElements[1] as $i => $name) {
- $search = preg_quote($namedElements[0][$i]);
+ foreach ($namedElements as $matchArray) {
+ // Placeholder name, e.g. "foo"
+ $name = $matchArray[1][0];
+ // Placeholder with colon/braces, e.g. "{foo}"
+ $search = preg_quote($matchArray[0][0]);
if (isset($this->options[$name])) {
$option = '';
if ($name !== 'plugin' && array_key_exists($name, $this->defaults)) {
$option = '?';
}
- $slashParam = '/' . $search;
// phpcs:disable Generic.Files.LineLength
- if (strpos($parsed, $slashParam) !== false) {
- $routeParams[$slashParam] = '(?:/(?P<' . $name . '>' . $this->options[$name] . ')' . $option . ')' . $option;
+ // Offset of the colon/braced placeholder in the full template string
+ if ($parsed[$matchArray[0][1] - 1] === '/') {
+ $routeParams['/' . $search] = '(?:/(?P<' . $name . '>' . $this->options[$name] . ')' . $option . ')' . $option;
} else {
$routeParams[$search] = '(?:(?P<' . $name . '>' . $this->options[$name] . ')' . $option . ')' . $option;
}
@@ -424,10 +433,10 @@ public function getName(): string
* Checks to see if the given URL can be parsed by this route.
*
* If the route can be parsed an array of parameters will be returned; if not
- * false will be returned.
+ * `null` will be returned.
*
* @param \Psr\Http\Message\ServerRequestInterface $request The URL to attempt to parse.
- * @return array|null An array of request parameters, or null on failure.
+ * @return array|null An array of request parameters, or `null` on failure.
*/
public function parseRequest(ServerRequestInterface $request): ?array
{
@@ -443,11 +452,11 @@ public function parseRequest(ServerRequestInterface $request): ?array
* Checks to see if the given URL can be parsed by this route.
*
* If the route can be parsed an array of parameters will be returned; if not
- * false will be returned. String URLs are parsed if they match a routes regular expression.
+ * `null` will be returned. String URLs are parsed if they match a routes regular expression.
*
* @param string $url The URL to attempt to parse.
* @param string $method The HTTP method of the request being parsed.
- * @return array|null An array of request parameters, or null on failure.
+ * @return array|null An array of request parameters, or `null` on failure.
* @throws \InvalidArgumentException When method is not an empty string or in `VALID_METHODS` list.
*/
public function parse(string $url, string $method): ?array
@@ -458,7 +467,12 @@ public function parse(string $url, string $method): ?array
$compiledRoute = $this->compile();
[$url, $ext] = $this->_parseExtension($url);
- if (!preg_match($compiledRoute, urldecode($url), $route)) {
+ $urldecode = $this->options['_urldecode'] ?? true;
+ if ($urldecode) {
+ $url = urldecode($url);
+ }
+
+ if (!preg_match($compiledRoute, $url, $route)) {
return null;
}
@@ -575,12 +589,13 @@ protected function _parseArgs(string $args, array $context): array
{
$pass = [];
$args = explode('/', $args);
+ $urldecode = $this->options['_urldecode'] ?? true;
foreach ($args as $param) {
if (empty($param) && $param !== '0') {
continue;
}
- $pass[] = rawurldecode($param);
+ $pass[] = $urldecode ? rawurldecode($param) : $param;
}
return $pass;
@@ -687,11 +702,6 @@ public function match(array $url, array $context = []): ?string
}
unset($url['_method'], $url['[method]'], $defaults['_method']);
- // Missing defaults is a fail.
- if (array_diff_key($defaults, $url) !== []) {
- return null;
- }
-
// Defaults with different values are a fail.
if (array_intersect_key($url, $defaults) != $defaults) {
return null;
diff --git a/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php b/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php
index cd450d491..16aec336a 100644
--- a/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php
+++ b/app/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php
@@ -312,7 +312,7 @@ public function namePrefix(?string $value = null): string
* });
* ```
*
- * The above would generate both resource routes for `/articles`, and `/articles/:article_id/comments`.
+ * The above would generate both resource routes for `/articles`, and `/articles/{article_id}/comments`.
* You can use the `map` option to connect additional resource methods:
*
* ```
diff --git a/app/vendor/cakephp/cakephp/src/Routing/Router.php b/app/vendor/cakephp/cakephp/src/Routing/Router.php
index 8e05e3ac0..c6808c922 100644
--- a/app/vendor/cakephp/cakephp/src/Routing/Router.php
+++ b/app/vendor/cakephp/cakephp/src/Routing/Router.php
@@ -650,11 +650,28 @@ public static function reverseToArray($params): array
}
$pass = $params['pass'] ?? [];
+ $template = $params['_matchedRoute'] ?? null;
unset(
$params['pass'],
$params['_matchedRoute'],
$params['_name']
);
+ $route = null;
+ if ($template) {
+ // Locate the route that was used to match this route
+ // so we can access the pass parameter configuration.
+ foreach (static::getRouteCollection()->routes() as $maybe) {
+ if ($maybe->template === $template) {
+ $route = $maybe;
+ break;
+ }
+ }
+ }
+ if ($route) {
+ // If we found a route, slice off the number of passed args.
+ $routePass = $route->options['pass'] ?? [];
+ $pass = array_slice($pass, count($routePass));
+ }
$params = array_merge($params, $pass);
return $params;
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/ConnectionHelper.php b/app/vendor/cakephp/cakephp/src/TestSuite/ConnectionHelper.php
index 8bfdfe28d..f696d6d12 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/ConnectionHelper.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/ConnectionHelper.php
@@ -86,7 +86,12 @@ public function dropTables(string $connectionName, ?array $tables = null): void
$connection = ConnectionManager::get($connectionName);
$collection = $connection->getSchemaCollection();
- $allTables = $collection->listTables();
+ if (method_exists($collection, 'listTablesWithoutViews')) {
+ $allTables = $collection->listTablesWithoutViews();
+ } else {
+ $allTables = $collection->listTables();
+ }
+
$tables = $tables !== null ? array_intersect($tables, $allTables) : $allTables;
$schemas = array_map(function ($table) use ($collection) {
return $collection->describe($table);
@@ -120,13 +125,13 @@ public function truncateTables(string $connectionName, ?array $tables = null): v
$connection = ConnectionManager::get($connectionName);
$collection = $connection->getSchemaCollection();
- $allTables = $collection->listTables();
+ $allTables = $collection->listTablesWithoutViews();
$tables = $tables !== null ? array_intersect($tables, $allTables) : $allTables;
$schemas = array_map(function ($table) use ($collection) {
return $collection->describe($table);
}, $tables);
- $this->runWithoutConstraints($connection, function (Connection $connection) use ($schemas) {
+ $this->runWithoutConstraints($connection, function (Connection $connection) use ($schemas): void {
$dialect = $connection->getDriver()->schemaDialect();
/** @var \Cake\Database\Schema\TableSchema $schema */
foreach ($schemas as $schema) {
@@ -147,12 +152,12 @@ public function truncateTables(string $connectionName, ?array $tables = null): v
public function runWithoutConstraints(Connection $connection, Closure $callback): void
{
if ($connection->getDriver()->supports(DriverInterface::FEATURE_DISABLE_CONSTRAINT_WITHOUT_TRANSACTION)) {
- $connection->disableConstraints(function (Connection $connection) use ($callback) {
+ $connection->disableConstraints(function (Connection $connection) use ($callback): void {
$callback($connection);
});
} else {
- $connection->transactional(function (Connection $connection) use ($callback) {
- $connection->disableConstraints(function (Connection $connection) use ($callback) {
+ $connection->transactional(function (Connection $connection) use ($callback): void {
+ $connection->disableConstraints(function (Connection $connection) use ($callback): void {
$callback($connection);
});
});
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php
index 065943121..a1de975d0 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/FlashParamEquals.php
@@ -80,9 +80,10 @@ public function matches($other): bool
// Server::run calls Session::close at the end of the request.
// Which means, that we cannot use Session object here to access the session data.
// Call to Session::read will start new session (and will erase the data).
-
+ /** @psalm-suppress InvalidScalarArgument */
$messages = (array)Hash::get($_SESSION, 'Flash.' . $this->key);
if ($this->at) {
+ /** @psalm-suppress InvalidScalarArgument */
$messages = [Hash::get($_SESSION, 'Flash.' . $this->key . '.' . $this->at)];
}
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php
index 5cb470394..6d96c2707 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionEquals.php
@@ -51,6 +51,7 @@ public function matches($other): bool
// Server::run calls Session::close at the end of the request.
// Which means, that we cannot use Session object here to access the session data.
// Call to Session::read will start new session (and will erase the data).
+ /** @psalm-suppress InvalidScalarArgument */
return Hash::get($_SESSION, $this->path) === $other;
}
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionHasKey.php b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionHasKey.php
index 2240d3e0f..e529249c8 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionHasKey.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/Constraint/Session/SessionHasKey.php
@@ -51,6 +51,7 @@ public function matches($other): bool
// Server::run calls Session::close at the end of the request.
// Which means, that we cannot use Session object here to access the session data.
// Call to Session::read will start new session (and will erase the data).
+ /** @psalm-suppress InvalidScalarArgument */
return Hash::check($_SESSION, $this->path) === true;
}
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureHelper.php b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureHelper.php
index 2a97522e3..ce8210e60 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureHelper.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureHelper.php
@@ -17,6 +17,7 @@
namespace Cake\TestSuite\Fixture;
use Cake\Core\Configure;
+use Cake\Core\Exception\CakeException;
use Cake\Database\Connection;
use Cake\Database\DriverInterface;
use Cake\Database\Schema\TableSchema;
@@ -25,6 +26,7 @@
use Cake\Datasource\FixtureInterface;
use Cake\TestSuite\ConnectionHelper;
use Closure;
+use PDOException;
use UnexpectedValueException;
/**
@@ -131,29 +133,50 @@ public function runPerConnection(Closure $callback, array $fixtures): void
*/
public function insert(array $fixtures): void
{
- $this->runPerConnection(function (ConnectionInterface $connection, array $groupFixtures) {
+ $this->runPerConnection(function (ConnectionInterface $connection, array $groupFixtures): void {
if ($connection instanceof Connection) {
$sortedFixtures = $this->sortByConstraint($connection, $groupFixtures);
if ($sortedFixtures) {
- foreach ($sortedFixtures as $fixture) {
- $fixture->insert($connection);
- }
+ $this->insertConnection($connection, $sortedFixtures);
} else {
$helper = new ConnectionHelper();
- $helper->runWithoutConstraints($connection, function (Connection $connection) use ($groupFixtures) {
- foreach ($groupFixtures as $fixture) {
- $fixture->insert($connection);
+ $helper->runWithoutConstraints(
+ $connection,
+ function (Connection $connection) use ($groupFixtures): void {
+ $this->insertConnection($connection, $groupFixtures);
}
- });
+ );
}
} else {
- foreach ($groupFixtures as $fixture) {
- $fixture->insert($connection);
- }
+ $this->insertConnection($connection, $groupFixtures);
}
}, $fixtures);
}
+ /**
+ * Inserts all fixtures for a connection and provides friendly errors for bad data.
+ *
+ * @param \Cake\Datasource\ConnectionInterface $connection Fixture connection
+ * @param array<\Cake\Datasource\FixtureInterface> $fixtures Connection fixtures
+ * @return void
+ */
+ protected function insertConnection(ConnectionInterface $connection, array $fixtures): void
+ {
+ foreach ($fixtures as $fixture) {
+ try {
+ $fixture->insert($connection);
+ } catch (PDOException $exception) {
+ $message = sprintf(
+ 'Unable to insert rows for table `%s`.'
+ . " Fixture records might have invalid data or unknown contraints.\n%s",
+ $fixture->sourceName(),
+ $exception->getMessage()
+ );
+ throw new CakeException($message);
+ }
+ }
+ }
+
/**
* Truncates fixture tables.
*
@@ -163,7 +186,7 @@ public function insert(array $fixtures): void
*/
public function truncate(array $fixtures): void
{
- $this->runPerConnection(function (ConnectionInterface $connection, array $groupFixtures) {
+ $this->runPerConnection(function (ConnectionInterface $connection, array $groupFixtures): void {
if ($connection instanceof Connection) {
$sortedFixtures = null;
if ($connection->getDriver()->supports(DriverInterface::FEATURE_TRUNCATE_WITH_CONSTRAINTS)) {
@@ -171,25 +194,46 @@ public function truncate(array $fixtures): void
}
if ($sortedFixtures !== null) {
- foreach (array_reverse($sortedFixtures) as $fixture) {
- $fixture->truncate($connection);
- }
+ $this->truncateConnection($connection, array_reverse($sortedFixtures));
} else {
$helper = new ConnectionHelper();
- $helper->runWithoutConstraints($connection, function (Connection $connection) use ($groupFixtures) {
- foreach ($groupFixtures as $fixture) {
- $fixture->truncate($connection);
+ $helper->runWithoutConstraints(
+ $connection,
+ function (Connection $connection) use ($groupFixtures): void {
+ $this->truncateConnection($connection, $groupFixtures);
}
- });
+ );
}
} else {
- foreach ($groupFixtures as $fixture) {
- $fixture->truncate($connection);
- }
+ $this->truncateConnection($connection, $groupFixtures);
}
}, $fixtures);
}
+ /**
+ * Truncates all fixtures for a connection and provides friendly errors for bad data.
+ *
+ * @param \Cake\Datasource\ConnectionInterface $connection Fixture connection
+ * @param array<\Cake\Datasource\FixtureInterface> $fixtures Connection fixtures
+ * @return void
+ */
+ protected function truncateConnection(ConnectionInterface $connection, array $fixtures): void
+ {
+ foreach ($fixtures as $fixture) {
+ try {
+ $fixture->truncate($connection);
+ } catch (PDOException $exception) {
+ $message = sprintf(
+ 'Unable to truncate table `%s`.'
+ . " Fixture records might have invalid data or unknown contraints.\n%s",
+ $fixture->sourceName(),
+ $exception->getMessage()
+ );
+ throw new CakeException($message);
+ }
+ }
+ }
+
/**
* Sort fixtures with foreign constraints last if possible, otherwise returns null.
*
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php
index e83bf0cf5..ade52d898 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php
@@ -75,7 +75,7 @@ public function startTestSuite(TestSuite $suite): void
'You are using the listener based PHPUnit integration. ' .
'This fixture system is deprecated, and we recommend you ' .
'upgrade to the extension based PHPUnit integration. ' .
- 'See https://book.cakephp.org/4.x/en/appendixes/fixture-upgrade.html',
+ 'See https://book.cakephp.org/4/en/appendices/fixture-upgrade.html',
0
);
$this->_first = $suite;
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php
index 94a5eee11..93d6732ef 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php
@@ -19,7 +19,6 @@
use Cake\Core\Configure;
use Cake\Core\Exception\CakeException;
use Cake\Database\ConstraintsInterface;
-use Cake\Database\Driver\Postgres;
use Cake\Database\Schema\TableSchema;
use Cake\Database\Schema\TableSchemaAwareInterface;
use Cake\Datasource\ConnectionInterface;
@@ -392,18 +391,11 @@ protected function _runOperation(array $fixtures, callable $operation): void
if ($logQueries && !$this->_debug) {
$db->disableQueryLogging();
}
- if ($db->getDriver() instanceof Postgres) {
- // disabling foreign key constraints is only valid in a transaction
- $db->transactional(function (ConnectionInterface $db) use ($fixtures, $operation): void {
- $db->disableConstraints(function (ConnectionInterface $db) use ($fixtures, $operation): void {
- $operation($db, $fixtures);
- });
- });
- } else {
+ $db->transactional(function (ConnectionInterface $db) use ($fixtures, $operation): void {
$db->disableConstraints(function (ConnectionInterface $db) use ($fixtures, $operation): void {
$operation($db, $fixtures);
});
- }
+ });
if ($logQueries) {
$db->enableQueryLogging(true);
}
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php
index a8ef4c97a..a4f0fde86 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/Fixture/TestFixture.php
@@ -252,6 +252,8 @@ protected function _schemaFromReflection(): void
/** @var \Cake\Database\Schema\TableSchema $schema */
$schema = $ormTable->getSchema();
$this->_schema = $schema;
+
+ $this->getTableLocator()->clear();
} catch (CakeException $e) {
$message = sprintf(
'Cannot describe schema for table `%s` for fixture `%s`. The table does not exist.',
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php b/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php
index 4c88478cf..04973d038 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestTrait.php
@@ -271,6 +271,7 @@ public function enableRetainFlashMessages(): void
*
* You can call this method multiple times to append into
* the current state.
+ * Sub-keys like 'headers' will be reset, though.
*
* @param array $data The request data to use.
* @return void
@@ -1362,6 +1363,7 @@ protected function extractExceptionMessage(Exception $exception): string
*/
protected function getSession(): TestSession
{
+ /** @psalm-suppress InvalidScalarArgument */
return new TestSession($_SESSION);
}
}
diff --git a/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php b/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php
index 7f1a6f43e..90635aed3 100644
--- a/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php
+++ b/app/vendor/cakephp/cakephp/src/TestSuite/TestCase.php
@@ -212,11 +212,11 @@ public function deprecated(callable $callable): void
* @psalm-suppress InvalidArgument
*/
$previousHandler = set_error_handler(
- function ($code, $message, $file, $line, $context = null) use (&$previousHandler, &$deprecation) {
+ function ($code, $message, $file, $line, $context = null) use (&$previousHandler, &$deprecation): bool {
if ($code == E_USER_DEPRECATED) {
$deprecation = true;
- return;
+ return true;
}
if ($previousHandler) {
return $previousHandler($code, $message, $file, $line, $context);
diff --git a/app/vendor/cakephp/cakephp/src/Utility/Security.php b/app/vendor/cakephp/cakephp/src/Utility/Security.php
index 5fcdc4fcd..df3952a7e 100644
--- a/app/vendor/cakephp/cakephp/src/Utility/Security.php
+++ b/app/vendor/cakephp/cakephp/src/Utility/Security.php
@@ -110,6 +110,7 @@ public static function setHash(string $hash): void
*/
public static function randomBytes(int $length): string
{
+ /** @psalm-suppress ArgumentTypeCoercion */
return random_bytes($length);
}
diff --git a/app/vendor/cakephp/cakephp/src/Validation/Validator.php b/app/vendor/cakephp/cakephp/src/Validation/Validator.php
index 2b03cde84..ef574a78b 100644
--- a/app/vendor/cakephp/cakephp/src/Validation/Validator.php
+++ b/app/vendor/cakephp/cakephp/src/Validation/Validator.php
@@ -906,7 +906,7 @@ public function allowEmptyString(string $field, ?string $message = null, $when =
}
/**
- * Requires a field to be not be an empty string.
+ * Requires a field to not be an empty string.
*
* Opposite to allowEmptyString()
*
diff --git a/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php b/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php
index 754a848a8..30d7a6799 100644
--- a/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php
+++ b/app/vendor/cakephp/cakephp/src/View/Form/EntityContext.php
@@ -123,10 +123,14 @@ protected function _prepare(): void
{
/** @var \Cake\ORM\Table|null $table */
$table = $this->_context['table'];
- /** @var \Cake\Datasource\EntityInterface|iterable $entity */
+ /** @var \Cake\Datasource\EntityInterface|iterable<\Cake\Datasource\EntityInterface|array> $entity */
$entity = $this->_context['entity'];
+
+ $this->_isCollection = is_iterable($entity);
+
if (empty($table)) {
- if (is_iterable($entity)) {
+ if ($this->_isCollection) {
+ /** @var iterable<\Cake\Datasource\EntityInterface|array> $entity */
foreach ($entity as $e) {
$entity = $e;
break;
@@ -138,6 +142,7 @@ protected function _prepare(): void
/** @psalm-suppress PossiblyInvalidMethodCall */
$table = $entity->getSource();
}
+ /** @psalm-suppress PossiblyInvalidArgument */
if (!$table && $isEntity && get_class($entity) !== Entity::class) {
[, $entityClass] = namespaceSplit(get_class($entity));
$table = Inflector::pluralize($entityClass);
@@ -152,10 +157,6 @@ protected function _prepare(): void
'Unable to find table class for current entity.'
);
}
- $this->_isCollection = (
- is_array($entity) ||
- $entity instanceof Traversable
- );
$alias = $this->_rootName = $table->getAlias();
$this->_tables[$alias] = $table;
diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php
index f9c4f6dc7..d96a70a28 100644
--- a/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php
+++ b/app/vendor/cakephp/cakephp/src/View/Helper/BreadcrumbsHelper.php
@@ -136,8 +136,10 @@ public function prepend($title, $url = null, array $options = [])
* Insert a crumb at a specific index.
*
* If the index already exists, the new crumb will be inserted,
- * and the existing element will be shifted one index greater.
- * If the index is out of bounds, it will throw an exception.
+ * before the existing element, shifting the existing element one index
+ * greater than before.
+ *
+ * If the index is out of bounds, an exception will be thrown.
*
* @param int $index The index to insert at.
* @param string $title Title of the crumb.
@@ -154,7 +156,7 @@ public function prepend($title, $url = null, array $options = [])
*/
public function insertAt(int $index, string $title, $url = null, array $options = [])
{
- if (!isset($this->crumbs[$index])) {
+ if (!isset($this->crumbs[$index]) && $index !== count($this->crumbs)) {
throw new LogicException(sprintf("No crumb could be found at index '%s'", $index));
}
diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php
index 152e95e71..1486b1cde 100644
--- a/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php
+++ b/app/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php
@@ -1480,8 +1480,8 @@ protected function _inputLabel(string $fieldName, $label = null, array $options
*
* - `value` - the value of the checkbox
* - `checked` - boolean indicate that this checkbox is checked.
- * - `hiddenField` - boolean to indicate if you want the results of checkbox() to include
- * a hidden input with a value of ''.
+ * - `hiddenField` - boolean|string. Set to false to disable a hidden input from
+ * being generated. Passing a string will define the hidden input value.
* - `disabled` - create a disabled input.
* - `default` - Set the default value for the checkbox. This allows you to start checkboxes
* as checked, without having to check the POST data. A matching POST data value, will overwrite
@@ -1503,12 +1503,12 @@ public function checkbox(string $fieldName, array $options = [])
$options['value'] = $value;
$output = '';
- if ($options['hiddenField']) {
+ if ($options['hiddenField'] !== false && is_scalar($options['hiddenField'])) {
$hiddenOptions = [
'name' => $options['name'],
'value' => $options['hiddenField'] !== true
&& $options['hiddenField'] !== '_split'
- ? $options['hiddenField'] : '0',
+ ? (string)$options['hiddenField'] : '0',
'form' => $options['form'] ?? null,
'secure' => false,
];
@@ -1537,8 +1537,9 @@ public function checkbox(string $fieldName, array $options = [])
* - `label` - Either `false` to disable label around the widget or an array of attributes for
* the label tag. `selected` will be added to any classes e.g. `'class' => 'myclass'` where widget
* is checked
- * - `hiddenField` - boolean to indicate if you want the results of radio() to include
- * a hidden input with a value of ''. This is useful for creating radio sets that are non-continuous.
+ * - `hiddenField` - boolean|string. Set to false to not include a hidden input with a value of ''.
+ * Can also be a string to set the value of the hidden input. This is useful for creating
+ * radio sets that are non-continuous.
* - `disabled` - Set to `true` or `disabled` to disable all the radio buttons. Use an array of
* values to disable specific radio buttons.
* - `empty` - Set to `true` to create an input with the value '' as the first option. When `true`
@@ -1562,9 +1563,9 @@ public function radio(string $fieldName, iterable $options = [], array $attribut
$radio = $this->widget('radio', $attributes);
$hidden = '';
- if ($hiddenField) {
+ if ($hiddenField !== false && is_scalar($hiddenField)) {
$hidden = $this->hidden($fieldName, [
- 'value' => $hiddenField === true ? '' : $hiddenField,
+ 'value' => $hiddenField === true ? '' : (string)$hiddenField,
'form' => $attributes['form'] ?? null,
'name' => $attributes['name'],
]);
diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/NumberHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/NumberHelper.php
index 2238867d5..8740ae545 100644
--- a/app/vendor/cakephp/cakephp/src/View/Helper/NumberHelper.php
+++ b/app/vendor/cakephp/cakephp/src/View/Helper/NumberHelper.php
@@ -146,7 +146,7 @@ public function toPercentage($number, int $precision = 2, array $options = []):
* - `after` - The string to place after decimal numbers, e.g. ']'
* - `escape` - Whether to escape html in resulting string
*
- * @param string|float $number A floating point number.
+ * @param string|int|float $number A floating point number.
* @param array $options An array with options.
* @return string Formatted number
* @link https://book.cakephp.org/4/en/views/helpers/number.html#formatting-numbers
diff --git a/app/vendor/cakephp/cakephp/src/View/Helper/PaginatorHelper.php b/app/vendor/cakephp/cakephp/src/View/Helper/PaginatorHelper.php
index d7fa2f310..a3033bcc2 100644
--- a/app/vendor/cakephp/cakephp/src/View/Helper/PaginatorHelper.php
+++ b/app/vendor/cakephp/cakephp/src/View/Helper/PaginatorHelper.php
@@ -1234,10 +1234,17 @@ public function implementedEvents(): array
*/
public function limitControl(array $limits = [], ?int $default = null, array $options = []): string
{
- $out = $this->Form->create(null, ['type' => 'get']);
+ $model = $options['model'] ?? $this->defaultModel();
+ unset($options['model']);
+
+ $params = $this->params($model);
+ $scope = '';
+ if (!empty($params['scope'])) {
+ $scope = $params['scope'] . '.';
+ }
if (empty($default)) {
- $default = $this->param('perPage');
+ $default = $params['perPage'] ?? 0;
}
if (empty($limits)) {
@@ -1247,15 +1254,15 @@ public function limitControl(array $limits = [], ?int $default = null, array $op
'100' => '100',
];
}
-
- $out .= $this->Form->control('limit', $options + [
- 'type' => 'select',
- 'label' => __('View'),
- 'default' => $default,
- 'value' => $this->_View->getRequest()->getQuery('limit'),
- 'options' => $limits,
- 'onChange' => 'this.form.submit()',
- ]);
+ $out = $this->Form->create(null, ['type' => 'get']);
+ $out .= $this->Form->control($scope . 'limit', $options + [
+ 'type' => 'select',
+ 'label' => __('View'),
+ 'default' => $default,
+ 'value' => $this->_View->getRequest()->getQuery('limit'),
+ 'options' => $limits,
+ 'onChange' => 'this.form.submit()',
+ ]);
$out .= $this->Form->end();
return $out;
diff --git a/app/vendor/cakephp/cakephp/src/View/Widget/DateTimeWidget.php b/app/vendor/cakephp/cakephp/src/View/Widget/DateTimeWidget.php
index 4cd5f8bf0..199d539ab 100644
--- a/app/vendor/cakephp/cakephp/src/View/Widget/DateTimeWidget.php
+++ b/app/vendor/cakephp/cakephp/src/View/Widget/DateTimeWidget.php
@@ -189,7 +189,7 @@ protected function formatDateTime($value, array $options): string
$dateTime = clone $value;
} elseif (is_string($value) && !is_numeric($value)) {
$dateTime = new DateTime($value);
- } elseif (is_int($value) || is_numeric($value)) {
+ } elseif (is_numeric($value)) {
$dateTime = new DateTime('@' . $value);
} else {
$dateTime = new DateTime();
diff --git a/app/vendor/cakephp/cakephp/tests/Fixture/ArticlesTagsBindingKeysFixture.php b/app/vendor/cakephp/cakephp/tests/Fixture/ArticlesTagsBindingKeysFixture.php
new file mode 100644
index 000000000..893a42187
--- /dev/null
+++ b/app/vendor/cakephp/cakephp/tests/Fixture/ArticlesTagsBindingKeysFixture.php
@@ -0,0 +1,35 @@
+ 1, 'tagname' => 'tag1'],
+ ['article_id' => 1, 'tagname' => 'tag2'],
+ ['article_id' => 2, 'tagname' => 'tag1'],
+ ['article_id' => 2, 'tagname' => 'tag3'],
+ ];
+}
diff --git a/app/vendor/cakephp/cakephp/tests/schema.php b/app/vendor/cakephp/cakephp/tests/schema.php
index 062354f3f..18ea93a15 100644
--- a/app/vendor/cakephp/cakephp/tests/schema.php
+++ b/app/vendor/cakephp/cakephp/tests/schema.php
@@ -899,6 +899,28 @@
],
],
],
+ [
+ 'table' => 'articles_tags_binding_keys',
+ 'columns' => [
+ 'article_id' => [
+ 'type' => 'integer',
+ 'null' => false,
+ ],
+ 'tagname' => [
+ 'type' => 'string',
+ 'null' => false,
+ ],
+ ],
+ 'constraints' => [
+ 'unique_tag' => [
+ 'type' => 'primary',
+ 'columns' => [
+ 'article_id',
+ 'tagname',
+ ],
+ ],
+ ],
+ ],
[
'table' => 'profiles',
'columns' => [
diff --git a/app/vendor/cakephp/debug_kit/docs.Dockerfile b/app/vendor/cakephp/debug_kit/docs.Dockerfile
index 88f2c0235..aa10f4314 100644
--- a/app/vendor/cakephp/debug_kit/docs.Dockerfile
+++ b/app/vendor/cakephp/debug_kit/docs.Dockerfile
@@ -4,18 +4,25 @@ FROM markstory/cakephp-docs-builder as builder
RUN pip install git+https://github.com/sphinx-contrib/video.git@master
# Copy entire repo in with .git so we can build all versions in one image.
-COPY docs /data/src
+COPY docs /data/docs
+ENV LANGS="en fr ja pt"
# Make docs
RUN cd /data/docs-builder \
- && make website LANGS="en fr ja pt" SOURCE=/data/src DEST=/data/website \
+ && make website LANGS="$LANGS" SOURCE=/data/docs DEST=/data/website \
# Move media files into the output directory so video elements work.
&& mkdir -p /data/website/html/_static \
- && cp /data/src/static/* /data/website/html/_static/
+ && cp /data/docs/static/* /data/website/html/_static/
# Build a small nginx container with just the static site in it.
-FROM nginx:1.15-alpine
+FROM markstory/cakephp-docs-builder:runtime as runtime
+# Configure search index script
+ENV LANGS="en fr ja pt"
+ENV SEARCH_SOURCE="/data/docs"
+ENV SEARCH_URL_PREFIX="/debugkit/4"
+
+COPY --from=builder /data/docs /data/docs
COPY --from=builder /data/website /data/website
COPY --from=builder /data/docs-builder/nginx.conf /etc/nginx/conf.d/default.conf
diff --git a/app/vendor/cakephp/debug_kit/docs/en/index.rst b/app/vendor/cakephp/debug_kit/docs/en/index.rst
index 45cfea1c5..d672de9bd 100644
--- a/app/vendor/cakephp/debug_kit/docs/en/index.rst
+++ b/app/vendor/cakephp/debug_kit/docs/en/index.rst
@@ -58,6 +58,12 @@ Configuration
* ``DebugKit.ignoreAuthorization`` - Set to true to ignore Cake Authorization plugin for DebugKit requests. Disabled by default.
+* ``DebugKit.variablesPanelMaxDepth`` - Defines how many levels of nested data should be shown in the variables tab. Default is 5.
+ WARNING: Increasing the max depth level can lead to an out of memory error.::
+
+ // Show more levels
+ Configure::write('DebugKit.variablesPanelMaxDepth', 8);
+
Database Configuration
----------------------
diff --git a/app/vendor/cakephp/debug_kit/src/Panel/RequestPanel.php b/app/vendor/cakephp/debug_kit/src/Panel/RequestPanel.php
index 577eafaee..4cc705aea 100644
--- a/app/vendor/cakephp/debug_kit/src/Panel/RequestPanel.php
+++ b/app/vendor/cakephp/debug_kit/src/Panel/RequestPanel.php
@@ -34,7 +34,7 @@ public function shutdown(EventInterface $event)
$controller = $event->getSubject();
$request = $controller->getRequest();
$this->_data = [
- 'params' => $request->getAttribute('params'),
+ 'attributes' => $request->getAttributes(),
'query' => $request->getQueryParams(),
'data' => $request->getData(),
'cookie' => $request->getCookieParams(),
diff --git a/app/vendor/cakephp/debug_kit/src/Panel/VariablesPanel.php b/app/vendor/cakephp/debug_kit/src/Panel/VariablesPanel.php
index 6e8013f8e..1fdf04e02 100644
--- a/app/vendor/cakephp/debug_kit/src/Panel/VariablesPanel.php
+++ b/app/vendor/cakephp/debug_kit/src/Panel/VariablesPanel.php
@@ -14,6 +14,7 @@
*/
namespace DebugKit\Panel;
+use Cake\Core\Configure;
use Cake\Datasource\EntityInterface;
use Cake\Error\Debugger;
use Cake\Event\EventInterface;
@@ -91,6 +92,7 @@ public function shutdown(EventInterface $event)
$errors = [];
$content = [];
$vars = $controller->viewBuilder()->getVars();
+ $varsMaxDepth = (int)Configure::read('DebugKit.variablesPanelMaxDepth', 5);
foreach ($vars as $k => $v) {
// Get the validation errors for Entity
@@ -102,12 +104,13 @@ public function shutdown(EventInterface $event)
$errors[$k] = $formErrors;
}
}
- $content[$k] = Debugger::exportVarAsNodes($v, 5);
+ $content[$k] = Debugger::exportVarAsNodes($v, $varsMaxDepth);
}
$this->_data = [
'variables' => $content,
'errors' => $errors,
+ 'varsMaxDepth' => $varsMaxDepth,
];
}
diff --git a/app/vendor/cakephp/debug_kit/src/Plugin.php b/app/vendor/cakephp/debug_kit/src/Plugin.php
index ba4a8f2b7..f9ff8cba7 100644
--- a/app/vendor/cakephp/debug_kit/src/Plugin.php
+++ b/app/vendor/cakephp/debug_kit/src/Plugin.php
@@ -95,6 +95,24 @@ public function setDeprecationHandler($service)
$previousHandler = set_error_handler(
function ($code, $message, $file, $line, $context = null) use (&$previousHandler) {
if ($code == E_USER_DEPRECATED || $code == E_DEPRECATED) {
+ // In PHP 8.0+ the $context variable has been removed from the set_error_handler callback
+ // Therefore we need to fetch the correct file and line string ourselves
+ if (PHP_VERSION_ID >= 80000) {
+ $trace = debug_backtrace();
+ foreach ($trace as $idx => $traceEntry) {
+ if ($traceEntry['function'] !== 'deprecationWarning') {
+ continue;
+ }
+ $offset = 1;
+ // ['args'][1] refers to index of $stackFrame argument in deprecationWarning()
+ if (isset($traceEntry['args'][1])) {
+ $offset = $traceEntry['args'][1];
+ }
+ $file = $trace[$idx + $offset]['file'];
+ $line = $trace[$idx + $offset]['line'];
+ break;
+ }
+ }
DeprecationsPanel::addDeprecatedError(compact('code', 'message', 'file', 'line', 'context'));
return;
diff --git a/app/vendor/cakephp/debug_kit/templates/element/request_panel.php b/app/vendor/cakephp/debug_kit/templates/element/request_panel.php
index 6770ceeba..cebb96a86 100644
--- a/app/vendor/cakephp/debug_kit/templates/element/request_panel.php
+++ b/app/vendor/cakephp/debug_kit/templates/element/request_panel.php
@@ -19,47 +19,53 @@
/**
* @var \DebugKit\View\AjaxView $this
* @var array $headers
- * @var array $params
+ * @var array $attributes
* @var array $data
* @var array $query
* @var array $cookie
* @var string $matchedRoute
*/
?>
-
+
= __d('debug_kit', 'Warning') ?>
= '
' . __d('debug_kit', 'Headers already sent at file {0} and line {1}.', [$headers['file'], $headers['line']]) . '
', $error);
endif;
+if (isset($varsMaxDepth)) {
+ $msg = sprintf(__d('debug_kit', '%s levels of nested data shown.'), $varsMaxDepth);
+ $msg .= ' ' . __d('debug_kit', 'You can overwrite this via the config key');
+ $msg .= ' DebugKit.variablesPanelMaxDepth ';
+ $msg .= __d('debug_kit', 'Increasing the depth value can lead to an out of memory error.');
+ printf('
%s
', $msg);
+}
+
// Backwards compatibility for old debug kit data.
if (!empty($content)) :
printf('', $sort ? ' checked="checked"' : '', __d('debug_kit', 'Sort variables by name'));
diff --git a/app/vendor/cakephp/debug_kit/webroot/css/toolbar.css b/app/vendor/cakephp/debug_kit/webroot/css/toolbar.css
index f5f1f148f..d59bc9931 100644
--- a/app/vendor/cakephp/debug_kit/webroot/css/toolbar.css
+++ b/app/vendor/cakephp/debug_kit/webroot/css/toolbar.css
@@ -1,19 +1,19 @@
@font-face {
- font-family: 'CakeFont';
- src: url('./raleway-medium.eot');
- src: url('./raleway-regular.eot?#iefix') format('embedded-opentype'),
- url('./raleway-regular.woff') format('woff'),
- url('./raleway-regular.ttf') format('truetype'),
- url('./raleway-regular.svg#ralewayregular') format('svg');
- font-weight: normal;
- font-style: normal;
+ font-family: 'CakeFont';
+ src: url('./raleway-medium.eot');
+ src: url('./raleway-regular.eot?#iefix') format('embedded-opentype'),
+ url('./raleway-regular.woff') format('woff'),
+ url('./raleway-regular.ttf') format('truetype'),
+ url('./raleway-regular.svg#ralewayregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
}
body {
- padding: 0;
- margin: 0;
- font-family: "Helvetica-Neue", Helvetica, Arial, sans-serif;
- overflow: hidden;
+ padding: 0;
+ margin: 0;
+ font-family: "Helvetica-Neue", Helvetica, Arial, sans-serif;
+ overflow: hidden;
}
/**
@@ -23,204 +23,204 @@ h1,
h2,
h3,
h4 {
- font-family: 'CakeFont', sans-serif;
- margin: 15px 0;
- font-weight: 300;
- line-height: 20px;
- text-rendering: optimizelegibility;
+ font-family: 'CakeFont', sans-serif;
+ margin: 15px 0;
+ font-weight: 300;
+ line-height: 20px;
+ text-rendering: optimizelegibility;
}
h1,
h2,
h3 {
- line-height: 40px;
+ line-height: 40px;
}
h1 {
- font-size: 38.5px;
+ font-size: 38.5px;
}
h2 {
- font-size: 31.5px;
+ font-size: 31.5px;
}
h3 {
- font-size: 24.5px;
+ font-size: 24.5px;
}
h4 {
- font-size: 17.5px;
+ font-size: 17.5px;
}
p {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
strong {
- font-weight: bold;
+ font-weight: bold;
}
.centered-text {
- text-align: center;
+ text-align: center;
}
.right-text {
- text-align: right;
+ text-align: right;
}
.toolbar {
- background: #D33C44;
- height: 40px;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
+ background: #D33C44;
+ height: 40px;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
}
.toolbar.open {
- border-radius: 0;
- overflow: auto;
- padding-right: 40px;
+ border-radius: 0;
+ overflow: auto;
+ padding-right: 40px;
}
.toolbar-inner {
- position: relative;
- overflow: hidden;
- white-space: nowrap;
- display: flex;
- justify-content: flex-end;
+ position: relative;
+ overflow: hidden;
+ white-space: nowrap;
+ display: flex;
+ justify-content: flex-end;
}
.hidden {
- display: none;
+ display: none;
}
/* Open close button */
#panel-button,
.panel {
- height: 40px;
- line-height: 40px;
- text-align: center;
- cursor: pointer;
- float: left;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ cursor: pointer;
+ float: left;
}
#panel-button {
- line-height: 20px;
- height: 40px;
- width: 40px;
- position: absolute;
- right: 0;
- bottom: 0;
+ line-height: 20px;
+ height: 40px;
+ width: 40px;
+ position: absolute;
+ right: 0;
+ bottom: 0;
}
#panel-button img {
- margin: 0;
- display: block;
+ margin: 0;
+ display: block;
}
.panel {
- border-left: 1px solid rgba(0, 0, 0, 0.075);
- padding: 0px 9px;
- position: relative;
+ border-left: 1px solid rgba(0, 0, 0, 0.075);
+ padding: 0px 9px;
+ position: relative;
}
.panel:first-child {
- border-left: 0;
+ border-left: 0;
}
.panel-active {
- background: #fff;
- color: #D33C44;
- transition: background-color 300ms linear;
+ background: #fff;
+ color: #D33C44;
+ transition: background-color 300ms linear;
}
.panel-active .panel-button {
- color: #D33C44;
+ color: #D33C44;
}
.panel-button {
- color: #fff;
- font-family: CakeFont, Helvetica, Arial, sans-serif;
+ color: #fff;
+ font-family: CakeFont, Helvetica, Arial, sans-serif;
}
.panel-summary {
- background: rgba(60, 60, 60, 0.3);
- color: #fff;
- font-size: 12px;
- line-height: 20px;
- padding: 4px;
- border-radius: 4px;
- vertical-align: middle;
+ background: rgba(60, 60, 60, 0.3);
+ color: #fff;
+ font-size: 12px;
+ line-height: 20px;
+ padding: 4px;
+ border-radius: 4px;
+ vertical-align: middle;
}
.panel-button-left {
- padding-left: 0;
+ padding-left: 0;
}
.panel-button-right {
- padding-right: 0;
- border-right: 1px solid rgba(0, 0, 0, 0.075);
+ padding-right: 0;
+ border-right: 1px solid rgba(0, 0, 0, 0.075);
}
.history-mode .panel-active .panel-button {
- color: #ab47bc;
+ color: #ab47bc;
}
/**
* Panel layout
*/
#panel-content-container {
- background: #fff;
- position: absolute;
- top: 100%;
- bottom: 40px;
- left: 0;
- right: 0;
- overflow-y: auto;
- transition: top 0.25s ease-out;
+ background: #fff;
+ position: absolute;
+ top: 100%;
+ bottom: 40px;
+ left: 0;
+ right: 0;
+ overflow-y: auto;
+ transition: top 0.25s ease-out;
}
#panel-content-container.enabled {
- top: 0;
- transition: top 0.25s ease-out-expo;
+ top: 0;
+ transition: top 0.25s ease-out-expo;
}
@keyframes slideup {
- from {
- top: 100%;
- }
- to {
- top: 0%;
- }
+ from {
+ top: 100%;
+ }
+ to {
+ top: 0%;
+ }
}
.panel-title {
- color: #fff;
- font-family: CakeFont, sans-serif;
- font-weight: normal;
- background: #D33C44;
- padding: 10px;
- margin: 0;
- transition: background-color 300ms linear;
+ color: #fff;
+ font-family: CakeFont, sans-serif;
+ font-weight: normal;
+ background: #D33C44;
+ padding: 10px;
+ margin: 0;
+ transition: background-color 300ms linear;
}
.history-mode .panel-title {
- background: #ab47bc;
+ background: #ab47bc;
}
.panel-content {
- padding: 10px;
+ padding: 10px;
}
.button-close {
- position: absolute;
- top: 15px;
- right: 15px;
- background: rgba(0, 0, 0, 0.3);
- color: #fff;
- display: inline-block;
- padding: 8px;
- line-height: 12px;
- font-size: 20px;
- height: 12px;
- width: 12px;
- border-radius: 15px;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
- vertical-align: middle;
- cursor: pointer;
+ position: absolute;
+ top: 15px;
+ right: 15px;
+ background: rgba(0, 0, 0, 0.3);
+ color: #fff;
+ display: inline-block;
+ padding: 8px;
+ line-height: 12px;
+ font-size: 20px;
+ height: 12px;
+ width: 12px;
+ border-radius: 15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+ vertical-align: middle;
+ cursor: pointer;
}
.button-close:hover {
- background: rgba(0, 0, 0, 0.5);
+ background: rgba(0, 0, 0, 0.5);
}
.section-tile {
- box-sizing: border-box;
- float: left;
- width: 50%;
- padding: 10px;
+ box-sizing: border-box;
+ float: left;
+ width: 50%;
+ padding: 10px;
}
@@ -228,61 +228,64 @@ strong {
* Tables
*/
table {
- width: 100%;
- border: 0;
- clear: both;
- margin: 10px 0;
- border-spacing: 0;
+ width: 100%;
+ border: 0;
+ clear: both;
+ margin: 10px 0;
+ border-spacing: 0;
}
table td,
table th {
- text-align: left;
- border: 0;
- padding: 9px;
- margin: 0;
+ text-align: left;
+ border: 0;
+ padding: 9px;
+ margin: 0;
}
table td {
- border-bottom: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
}
table th {
- border-bottom: 3px solid #2a6496;
- color: #111;
- font-weight: bold;
- line-height: 16px;
+ border-bottom: 3px solid #2a6496;
+ color: #111;
+ font-weight: bold;
+ line-height: 16px;
}
pre,
.debug-table td {
- font-family: Monaco, Consolas, monospace;
+ font-family: Monaco, Consolas, monospace;
}
/* X column tables have the 2nd+ cell right aligned */
.debug-table th:nth-child(n+2),
.debug-table td:nth-child(n+2) {
- text-align:right;
+ text-align:right;
}
.debug-table td:nth-child(n+2) {
- word-wrap: break-word;
- word-break: break-all;
- word-break: break-word; /* Not standard for webkit */
+ word-wrap: break-word;
+ word-break: break-all;
+ word-break: break-word; /* Not standard for webkit */
}
.debug-table th.left,
.debug-table td.left {
text-align: left;
}
+.debug-table .duplicate-route td {
+ background: #ffea96;
+}
.debug-table .highlighted td {
- background: #e7e9fd;
+ background: #e7e9fd;
}
.list {
- list-style: disc;
- margin: 10px 0 10px 20px;
+ list-style: disc;
+ margin: 10px 0 10px 20px;
}
.list li {
- margin: 10px 0;
+ margin: 10px 0;
}
.deprecation-list li {
- font-family: Monaco, Consolas, monospace;
+ font-family: Monaco, Consolas, monospace;
}
/**
@@ -290,71 +293,71 @@ pre,
*/
.neat-array,
.neat-array li {
- list-style:none;
- list-style-image:none;
+ list-style:none;
+ list-style-image:none;
}
.neat-array {
- padding: 1px 2px 1px 20px;
- background: #eaeae7;
- list-style: none;
- margin: 0 0 1em 0;
+ padding: 1px 2px 1px 20px;
+ background: #eaeae7;
+ list-style: none;
+ margin: 0 0 1em 0;
}
.neat-array .neat-array {
- padding: 0 0 0 20px;
- margin: 0;
- border-top: 1px solid #eaeae7;
+ padding: 0 0 0 20px;
+ margin: 0;
+ border-top: 1px solid #eaeae7;
}
.neat-array li {
- border-top: 1px solid #eaeae7;
- border-bottom: 1px solid #eaeae7;
- background: rgba(255, 255, 255, 0.95);
- margin: 0;
- line-height: 1.5em;
+ border-top: 1px solid #eaeae7;
+ border-bottom: 1px solid #eaeae7;
+ background: rgba(255, 255, 255, 0.95);
+ margin: 0;
+ line-height: 1.5em;
}
.neat-array li:hover {
- background: #fff;
+ background: #fff;
}
.neat-array li strong {
- padding-left: 8px;
- font-weight: bold;
+ padding-left: 8px;
+ font-weight: bold;
}
.neat-array li > strong:before {
- position: relative;
- left: -3px;
- content: "\2003 ";
+ position: relative;
+ left: -3px;
+ content: "\2003 ";
}
/* expandable sections */
.neat-array li.expandable {
- cursor: pointer;
+ cursor: pointer;
}
.neat-array .expanded {
- border-bottom:0;
+ border-bottom:0;
}
.neat-array li.expandable.expanded > strong:before {
- position: relative;
- left: -3px;
- content: "\2937 ";
+ position: relative;
+ left: -3px;
+ content: "\2937 ";
}
.neat-array li.expandable.collapsed > strong:before,
.neat-array li.expandable.expanded .expandable.collapsed > strong:before {
- position: relative;
- left: -3px;
- content: "\2192 ";
+ position: relative;
+ left: -3px;
+ content: "\2192 ";
}
.neat-array li {
- cursor: default;
+ cursor: default;
}
.toggle-checkbox {
- display: block;
- margin-bottom: 10px;
- font-size: 12px;
- color: #666;
+ display: block;
+ margin-bottom: 10px;
+ font-size: 12px;
+ color: #666;
}
.toggle-checkbox input[type=checkbox] {
- vertical-align: middle;
- margin-top: 0;
+ vertical-align: middle;
+ margin-top: 0;
}
@@ -363,17 +366,17 @@ pre,
*/
.graph-bar,
.graph-bar-value {
- margin: 0;
- padding: 0;
- border: none;
- overflow: hidden;
- height: 14px;
+ margin: 0;
+ padding: 0;
+ border: none;
+ overflow: hidden;
+ height: 14px;
}
.graph-bar {
- background: #ddd;
+ background: #ddd;
}
.graph-bar-value {
- background: #428bca;
+ background: #428bca;
}
@@ -381,69 +384,69 @@ pre,
* History panel
*/
.history-list li {
- padding-left: 10px;
- border-bottom: 1px solid #ccc;
- position: relative;
+ padding-left: 10px;
+ border-bottom: 1px solid #ccc;
+ position: relative;
}
.history-list .active:before {
- content: "\2022 ";
- font-size: 40px;
- color: #42bd41;
- line-height: 12px;
- position: absolute;
- top: 38%;
- left: 0;
- vertical-align: middle;
+ content: "\2022 ";
+ font-size: 40px;
+ color: #42bd41;
+ line-height: 12px;
+ position: absolute;
+ top: 38%;
+ left: 0;
+ vertical-align: middle;
}
.history-list li:last-child {
- border-bottom: 0;
+ border-bottom: 0;
}
.history-list li:hover {
- background-color: #e7e9fd;
+ background-color: #e7e9fd;
}
.history-link {
- color: #222;
- display: block;
- text-decoration: none;
- padding: 6px;
+ color: #222;
+ display: block;
+ text-decoration: none;
+ padding: 6px;
}
.history-bubble {
- font-size: 12px;
- line-height: 14px;
- display: inline-block;
- background: #eee;
- padding: 2px;
- border-radius: 4px;
+ font-size: 12px;
+ line-height: 14px;
+ display: inline-block;
+ background: #eee;
+ padding: 2px;
+ border-radius: 4px;
}
.xhr {
- background:#7CFF46
+ background:#7CFF46
}
.history-time {
- font-size: 12px;
- display: block;
+ font-size: 12px;
+ display: block;
}
.history-url {
- font-size: 14px;
- font-family: Monaco, Consolas, monospace;
+ font-size: 14px;
+ font-family: Monaco, Consolas, monospace;
}
/**
* Packages panel
*/
.package-version {
- background: #D33C44;
- border-radius: 4px;
- line-height: 20px;
- display: inline-block;
- white-space: nowrap;
+ background: #D33C44;
+ border-radius: 4px;
+ line-height: 20px;
+ display: inline-block;
+ white-space: nowrap;
}
.package-link {
- color: #000000;
- text-decoration: none;
+ color: #000000;
+ text-decoration: none;
}
/**
@@ -451,162 +454,198 @@ pre,
*/
.warning,
.info {
- padding: 10px 10px 10px 20px;
- font-size: 14px;
+ position: relative;
+ padding: 10px 10px 10px 50px;
+ font-size: 14px;
}
.warning {
- background: #f2dede;
+ background: #f2dede;
}
.info {
- background: #d9edf7;
+ background: #d9edf7;
}
.warning:before,
.info:before {
- padding: 8px;
- line-height: 12px;
- font-size: 20px;
- font-family: "CakeFont";
- font-weight: bold;
- height: 12px;
- width: 12px;
- border-radius: 15px;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
- text-align: center;
- vertical-align: middle;
- display: inline-block;
- position: relative;
- left: -11px;
-
- background-color: #fff;
+ padding: 8px;
+ line-height: 12px;
+ font-size: 20px;
+ font-family: "CakeFont";
+ font-weight: bold;
+ height: 12px;
+ width: 12px;
+ border-radius: 15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+ text-align: center;
+ vertical-align: middle;
+ display: inline-block;
+ position: absolute;
+ left: 10px;
+ top: 50%;
+ transform: translate(0, -50%);
+
+ background-color: #fff;
}
.warning:before {
- color: #f2dede;
- content: '!';
+ color: #f2dede;
+ content: '!';
}
.info:before {
- color: #d9edf7;
- content: 'i';
+ color: #d9edf7;
+ content: 'i';
}
/**
* Buttons
*/
.btn-primary {
- font-size: 14px;
- border: 1px solid #2a6496;
- background-color: #428bca;
- color: #fff;
- border-radius: 4px;
- box-shadow: 0 2px 0 #2a6496;
- padding: 4px 10px;
+ font-size: 14px;
+ border: 1px solid #2a6496;
+ background-color: #428bca;
+ color: #fff;
+ border-radius: 4px;
+ box-shadow: 0 2px 0 #2a6496;
+ padding: 4px 10px;
}
.btn-primary:active {
- box-shadow: none;
- position: relative;
- top: 2px;
+ box-shadow: none;
+ position: relative;
+ top: 2px;
}
-
.btn-primary:hover {
- cursor:pointer;
+ cursor: pointer;
+}
+.toggle-plugin-route-active {
+ background-color: #fff !important;
+ color: #555;
+ border-color: #6f6f6f;
+ box-shadow: 0 2px 0 #6f6f6f;
}
#loader {
- background: rgba(255, 255, 255, 0.7);
- position: absolute;
- top: 0;
- bottom: 40px;
- left: 0;
- right: 0;
- overflow: hidden;
- z-index: 100;
- display: none;
- opacity: 0;
- transition: opacity 0.5s ease-in;
+ background: rgba(255, 255, 255, 0.7);
+ position: absolute;
+ top: 0;
+ bottom: 40px;
+ left: 0;
+ right: 0;
+ overflow: hidden;
+ z-index: 100;
+ display: none;
+ opacity: 0;
+ transition: opacity 0.5s ease-in;
}
#loader.loading {
- display: block;
- opacity: 1;
+ display: block;
+ opacity: 1;
}
#loader .indicator {
- width: 30px;
- height: 30px;
- position: absolute;
- top: 50%;
- left: 50%;
- margin: -15px 0 0 -15px;
- -webkit-animation: spin 4s linear infinite;
- -moz-animation: spin 4s linear infinite;
- animation: spin 4s linear infinite;
+ width: 30px;
+ height: 30px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin: -15px 0 0 -15px;
+ -webkit-animation: spin 4s linear infinite;
+ -moz-animation: spin 4s linear infinite;
+ animation: spin 4s linear infinite;
}
@-moz-keyframes spin {
- 100% {
- -moz-transform: rotate(360deg);
- }
+ 100% {
+ -moz-transform: rotate(360deg);
+ }
}
@-webkit-keyframes spin {
- 100% {
- -webkit-transform: rotate(360deg);
- }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ }
}
@keyframes spin {
- 100% {
- -webkit-transform: rotate(360deg);
- transform: rotate(360deg);
- }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
}
.panel-content .filtered-credentials {
- text-decoration: underline;
- cursor: pointer;
+ text-decoration: underline;
+ cursor: pointer;
}
.terminal {
- margin: 20px 0;
- padding: 20px;
- background-color: #1a1a1a;
- color: #ffffff;
- line-height: 1.4;
- display: none;
+ margin: 20px 0;
+ padding: 20px;
+ background-color: #1a1a1a;
+ color: #ffffff;
+ line-height: 1.4;
+ display: none;
}
.terminal .section-header {
- color: #428bca;
+ color: #428bca;
}
.terminal .section-header:nth-of-type(1) {
- margin-top: 0;
+ margin-top: 0;
}
.terminal highlight {
- color: #D33C44;
+ color: #D33C44;
}
.terminal .loading {
- margin: 0;
+ margin: 0;
}
.terminal .indicator {
- vertical-align: middle;
- width: 30px;
- height: 30px;
- -webkit-animation: spin 4s linear infinite;
- -moz-animation: spin 4s linear infinite;
- animation: spin 4s linear infinite;
+ vertical-align: middle;
+ width: 30px;
+ height: 30px;
+ -webkit-animation: spin 4s linear infinite;
+ -moz-animation: spin 4s linear infinite;
+ animation: spin 4s linear infinite;
}
.terminal .warning-message {
- color: #ffcc00;
+ color: #ffcc00;
}
.terminal .success-message {
- color: #42bd41;
+ color: #42bd41;
+}
+
+.debugkit-plugin-routes-button-wrapper {
+ display: flex;
+ gap: 5px;
+ flex-wrap: wrap;
+ margin: 0 -5px;
+}
+
+.color-info-type {
+ align-items: center;
+ display: flex;
+}
+
+.color-info-type:before {
+ content: '';
+ display: inline-block;
+ height: 20px;
+ margin-right: 10px;
+ width: 20px;
+}
+
+.color-info-type--current-route:before {
+ background: #e7e9fd;
+}
+
+.color-info-type--duplicate-route:before {
+ background: #ffea96;
}
diff --git a/app/vendor/cakephp/migrations/README.md b/app/vendor/cakephp/migrations/README.md
index 7ad2e7352..55f1edf60 100644
--- a/app/vendor/cakephp/migrations/README.md
+++ b/app/vendor/cakephp/migrations/README.md
@@ -41,4 +41,4 @@ Additionally, you will need to configure the ``default`` database configuration
## Documentation
-Full documentation of the plugin can be found on the [CakePHP Cookbook](https://book.cakephp.org/migrations/2/).
+Full documentation of the plugin can be found on the [CakePHP Cookbook](https://book.cakephp.org/migrations/3/).
diff --git a/app/vendor/cakephp/migrations/composer.json b/app/vendor/cakephp/migrations/composer.json
index 07a733eb0..0c1bb60b2 100644
--- a/app/vendor/cakephp/migrations/composer.json
+++ b/app/vendor/cakephp/migrations/composer.json
@@ -2,7 +2,10 @@
"name": "cakephp/migrations",
"description": "Database Migration plugin for CakePHP based on Phinx",
"type": "cakephp-plugin",
- "keywords": ["cakephp", "migrations"],
+ "keywords": [
+ "cakephp",
+ "migrations"
+ ],
"homepage": "https://github.com/cakephp/migrations",
"license": "MIT",
"authors": [
@@ -56,8 +59,13 @@
"cs-check": "phpcs --colors -p -s src/ tests/",
"cs-fix": "phpcbf --colors -p src/ tests/",
"stan": "phpstan analyse src/ && psalm.phar --show-info=false",
- "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.88 psalm/phar:~4.7.0 && mv composer.backup composer.json",
+ "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:~1.4.0 psalm/phar:~4.19.0 && mv composer.backup composer.json",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=clover.xml"
+ },
+ "config": {
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
}
}
diff --git a/app/vendor/cakephp/migrations/docs.Dockerfile b/app/vendor/cakephp/migrations/docs.Dockerfile
index 57e67529a..032bb3aa5 100644
--- a/app/vendor/cakephp/migrations/docs.Dockerfile
+++ b/app/vendor/cakephp/migrations/docs.Dockerfile
@@ -8,11 +8,17 @@ RUN cd /data/docs-builder && \
make website LANGS="en fr ja pt ru" SOURCE=/data/docs DEST=/data/website/
# Build a small nginx container with just the static site in it.
-FROM nginx:1.15-alpine
+FROM markstory/cakephp-docs-builder:runtime as runtime
+ENV LANGS="en fr ja pt ru"
+ENV SEARCH_SOURCE="/data/docs"
+ENV SEARCH_URL_PREFIX="/migrations/3"
+
+COPY --from=builder /data/docs /data/docs
COPY --from=builder /data/website /data/website
COPY --from=builder /data/docs-builder/nginx.conf /etc/nginx/conf.d/default.conf
+
# Move each version into place
RUN cp -R /data/website/html/* /usr/share/nginx/html \
&& rm -rf /data/website/
diff --git a/app/vendor/cakephp/migrations/docs/en/index.rst b/app/vendor/cakephp/migrations/docs/en/index.rst
index 49e41f76c..2a4600e97 100644
--- a/app/vendor/cakephp/migrations/docs/en/index.rst
+++ b/app/vendor/cakephp/migrations/docs/en/index.rst
@@ -869,6 +869,15 @@ If you need to run multiple sets of migrations, those can be run as follows::
['plugin' => 'Documents', 'connection' => 'test_docs']
]);
+If your database also contains tables that are not managed by your application
+like those created by PostGIS, then you can exclude those tables from the drop
+& truncate behavior using the ``skip`` option::
+
+ $migrator->run(['connection' => 'test', 'skip' => 'postgis*']);
+
+The ``skip`` option accepts a ``fnmatch()`` compatible pattern to exclude tables
+from drop & truncate operations.
+
If you need to see additional debugging output from migrations are being run,
you can enable a ``debug`` level logger.
diff --git a/app/vendor/cakephp/migrations/src/Command/BakeSeedCommand.php b/app/vendor/cakephp/migrations/src/Command/BakeSeedCommand.php
index 1f5dc8be3..4f33524f3 100644
--- a/app/vendor/cakephp/migrations/src/Command/BakeSeedCommand.php
+++ b/app/vendor/cakephp/migrations/src/Command/BakeSeedCommand.php
@@ -117,19 +117,23 @@ public function templateData(Arguments $arguments): array
if ($fields !== '*') {
$fields = explode(',', $fields);
}
+ $model = $this->getTableLocator()->get('BakeSeed', [
+ 'table' => $table,
+ 'connection' => ConnectionManager::get($this->connection),
+ ]);
- $connection = ConnectionManager::get($this->connection);
-
- $query = $connection->newQuery()
- ->from($table)
- ->select($fields);
+ $query = $model->find('all')
+ ->enableHydration(false);
if ($limit) {
$query->limit($limit);
}
+ if ($fields !== '*') {
+ $query->select($fields);
+ }
/** @var array $records */
- $records = $connection->execute($query->sql())->fetchAll('assoc');
+ $records = $query->toArray();
$records = $this->prettifyArray($records);
}
diff --git a/app/vendor/cakephp/migrations/src/ConfigurationTrait.php b/app/vendor/cakephp/migrations/src/ConfigurationTrait.php
index 5f98f5941..6851190f1 100644
--- a/app/vendor/cakephp/migrations/src/ConfigurationTrait.php
+++ b/app/vendor/cakephp/migrations/src/ConfigurationTrait.php
@@ -14,6 +14,10 @@
namespace Migrations;
use Cake\Core\Configure;
+use Cake\Database\Driver\Mysql;
+use Cake\Database\Driver\Postgres;
+use Cake\Database\Driver\Sqlite;
+use Cake\Database\Driver\Sqlserver;
use Cake\Datasource\ConnectionManager;
use Migrations\Util\UtilTrait;
use Phinx\Config\Config;
@@ -173,17 +177,17 @@ public function getConfig($forceRefresh = false)
public function getAdapterName($driver)
{
switch ($driver) {
- case 'Cake\Database\Driver\Mysql':
- case is_subclass_of($driver, 'Cake\Database\Driver\Mysql'):
+ case Mysql::class:
+ case is_subclass_of($driver, Mysql::class):
return 'mysql';
- case 'Cake\Database\Driver\Postgres':
- case is_subclass_of($driver, 'Cake\Database\Driver\Postgres'):
+ case Postgres::class:
+ case is_subclass_of($driver, Postgres::class):
return 'pgsql';
- case 'Cake\Database\Driver\Sqlite':
- case is_subclass_of($driver, 'Cake\Database\Driver\Sqlite'):
+ case Sqlite::class:
+ case is_subclass_of($driver, Sqlite::class):
return 'sqlite';
- case 'Cake\Database\Driver\Sqlserver':
- case is_subclass_of($driver, 'Cake\Database\Driver\Sqlserver'):
+ case Sqlserver::class:
+ case is_subclass_of($driver, Sqlserver::class):
return 'sqlsrv';
}
diff --git a/app/vendor/cakephp/migrations/src/Shell/Task/SimpleMigrationTask.php b/app/vendor/cakephp/migrations/src/Shell/Task/SimpleMigrationTask.php
index 4287bfab2..189ba9269 100644
--- a/app/vendor/cakephp/migrations/src/Shell/Task/SimpleMigrationTask.php
+++ b/app/vendor/cakephp/migrations/src/Shell/Task/SimpleMigrationTask.php
@@ -57,7 +57,7 @@ public function fileName($name): string
public function getPath(): string
{
$path = ROOT . DS . $this->pathFragment;
- if (isset($this->plugin)) {
+ if ($this->plugin !== null) {
$path = $this->_pluginPath($this->plugin) . $this->pathFragment;
}
diff --git a/app/vendor/cakephp/migrations/src/TestSuite/Migrator.php b/app/vendor/cakephp/migrations/src/TestSuite/Migrator.php
index 9bce49bed..910e7608b 100644
--- a/app/vendor/cakephp/migrations/src/TestSuite/Migrator.php
+++ b/app/vendor/cakephp/migrations/src/TestSuite/Migrator.php
@@ -39,7 +39,11 @@ public function __construct()
* This is useful if all your migrations are located in config/Migrations,
* or in a single directory, or in a single plugin.
*
- * For options, {@see \Migrations\Migrations::migrate()}.
+ * ## Options
+ *
+ * - `skip` A list of `fnmatch` compatible table names that should be ignored.
+ *
+ * For additional options {@see \Migrations\Migrations::migrate()}.
*
* @param array $options Migrate options. Connection defaults to `test`.
* @param bool $truncateTables Truncate all tables after running migrations. Defaults to true.
@@ -56,7 +60,7 @@ public function run(
* Runs multiple sets of migrations.
* This is useful if your migrations are located in multiple sources, plugins or connections.
*
- * For options, {@see \Migrations\Migrations::migrate()}.
+ * For options, {@see \Migrations\Migrator::run()}.
*
* Example:
*
@@ -83,20 +87,23 @@ public function runMany(
$connectionsList = [];
foreach ($options as $i => $migrationSet) {
$migrationSet += ['connection' => 'test'];
+ $skip = $migrationSet['skip'] ?? [];
+ unset($migrationSet['skip']);
+
$options[$i] = $migrationSet;
$connectionName = $migrationSet['connection'];
if (!in_array($connectionName, $connectionsList)) {
- $connectionsList[] = $connectionName;
+ $connectionsList[] = ['name' => $connectionName, 'skip' => $skip];
}
$migrations = new Migrations();
if (!in_array($connectionName, $connectionsToDrop) && $this->shouldDropTables($migrations, $migrationSet)) {
- $connectionsToDrop[] = $connectionName;
+ $connectionsToDrop[] = ['name' => $connectionName, 'skip' => $skip];
}
}
- foreach ($connectionsToDrop as $connectionName) {
- $this->dropTables($connectionName);
+ foreach ($connectionsToDrop as $item) {
+ $this->dropTables($item['name'], $item['skip']);
}
// Run all sets of migrations
@@ -105,15 +112,15 @@ public function runMany(
if (!$migrations->migrate($migrationSet)) {
throw new RuntimeException(
- sprintf('Unable to migrate fixtures for `%s`.', $migrationSet['connection'])
+ "Unable to migrate fixtures for `{$migrationSet['connection']}`."
);
}
}
// Truncate all connections if required in parameters
if ($truncateTables) {
- foreach ($connectionsList as $connectionName) {
- $this->truncate($connectionName);
+ foreach ($connectionsList as $item) {
+ $this->truncate($item['name'], $item['skip']);
}
}
}
@@ -124,16 +131,17 @@ public function runMany(
* For options, {@see \Migrations\Migrations::migrate()}.
*
* @param string $connection Connection name to truncate all non-phinx tables
+ * @param string[] $skip A fnmatch compatible list of table names to skip.
* @return void
*/
- public function truncate(string $connection): void
+ public function truncate(string $connection, array $skip = []): void
{
// Don't recreate schema if we are in a phpunit separate process test.
if (isset($GLOBALS['__PHPUNIT_BOOTSTRAP'])) {
return;
}
- $tables = $this->getNonPhinxTables($connection);
+ $tables = $this->getNonPhinxTables($connection, $skip);
if ($tables) {
$this->helper->truncateTables($connection, $tables);
}
@@ -150,26 +158,56 @@ protected function shouldDropTables(Migrations $migrations, array $options): boo
{
Log::write('debug', "Reading migrations status for {$options['connection']}...");
+ $messages = [
+ 'up' => [],
+ 'down' => [],
+ 'missing' => [],
+ ];
foreach ($migrations->status($options) as $migration) {
if ($migration['status'] === 'up') {
- Log::write('debug', 'One or more additional migrations detected.');
-
- return true;
+ $messages['up'][] = "Unapplied migration source={$migration['name']} id={$migration['id']}";
}
if ($migration['missing'] ?? false) {
- Log::write('debug', 'One or more missing migrations detected.');
-
- return true;
+ $messages['missing'][] = 'Applied but, missing Migration ' .
+ "source={$migration['name']} id={$migration['id']}";
}
if ($migration['status'] === 'down') {
- Log::write('debug', 'New migration(s) found.');
-
- return true;
+ $messages['down'][] = "Migration to reverse. source={$migration['name']} id={$migration['id']}";
}
}
- Log::write('debug', 'No migration changes detected');
+ $output = [];
+ $hasProblems = false;
+ $itemize = function ($item) {
+ return '- ' . $item;
+ };
+ if (!empty($messages['up'])) {
+ $hasProblems = true;
+ $output[] = 'Unapplied migrations:';
+ $output = array_merge($output, array_map($itemize, $messages['up']));
+ $output[] = '';
+ }
+ if (!empty($messages['down'])) {
+ $hasProblems = true;
+ $output[] = 'Migrations needing to be reversed:';
+ $output = array_merge($output, array_map($itemize, $messages['down']));
+ $output[] = '';
+ }
+ if (!empty($messages['missing'])) {
+ $hasProblems = true;
+ $output[] = 'Applied but missing migrations:';
+ $output = array_merge($output, array_map($itemize, $messages['down']));
+ $output[] = '';
+ }
+ if ($output) {
+ $output = array_merge(
+ ['Your migration status some differences with the expected state.', ''],
+ $output,
+ ['Going to drop all tables in this source, and re-apply migrations.']
+ );
+ Log::write('debug', implode("\n", $output));
+ }
- return false;
+ return $hasProblems;
}
/**
@@ -177,11 +215,12 @@ protected function shouldDropTables(Migrations $migrations, array $options): boo
* and truncates the phinx tables.
*
* @param string $connection Connection on which tables are dropped.
+ * @param string[] $skip A fnmatch compatible list of tables to skip.
* @return void
*/
- protected function dropTables(string $connection): void
+ protected function dropTables(string $connection, array $skip = []): void
{
- $dropTables = $this->getNonPhinxTables($connection);
+ $dropTables = $this->getNonPhinxTables($connection, $skip);
if (count($dropTables)) {
$this->helper->dropTables($connection, $dropTables);
}
@@ -210,14 +249,22 @@ protected function getPhinxTables(string $connection): array
* Get the list of tables that are not phinxlog related.
*
* @param string $connection The connection name to operate on.
+ * @param string[] $skip A fnmatch compatible list of tables to skip.
* @return string[] The list of tables that are not related to phinx in the provided connection.
*/
- protected function getNonPhinxTables(string $connection): array
+ protected function getNonPhinxTables(string $connection, array $skip): array
{
$tables = ConnectionManager::get($connection)->getSchemaCollection()->listTables();
+ $skip[] = '*phinxlog*';
- return array_filter($tables, function ($table) {
- return strpos($table, 'phinxlog') === false;
+ return array_filter($tables, function ($table) use ($skip) {
+ foreach ($skip as $pattern) {
+ if (fnmatch($pattern, $table) === true) {
+ return false;
+ }
+ }
+
+ return true;
});
}
}
diff --git a/app/vendor/composer/autoload_classmap.php b/app/vendor/composer/autoload_classmap.php
index 53e82c769..60b1b9bbe 100644
--- a/app/vendor/composer/autoload_classmap.php
+++ b/app/vendor/composer/autoload_classmap.php
@@ -8,7 +8,9 @@
return array(
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+ 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'Mobile_Detect' => $vendorDir . '/mobiledetect/mobiledetectlib/Mobile_Detect.php',
+ 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php',
'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
@@ -129,7 +131,6 @@
'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
'PHPUnit\\Framework\\MockObject\\MockTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
'PHPUnit\\Framework\\MockObject\\MockType' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
- 'PHPUnit\\Framework\\MockObject\\MockedCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php',
'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php',
'PHPUnit\\Framework\\MockObject\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php',
'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php',
@@ -160,7 +161,6 @@
'PHPUnit\\Framework\\MockObject\\UnknownClassException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php',
- 'PHPUnit\\Framework\\MockObject\\UnmockedCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php',
'PHPUnit\\Framework\\MockObject\\Verifiable' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
'PHPUnit\\Framework\\NoChildTestSuiteException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
'PHPUnit\\Framework\\OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
@@ -409,11 +409,13 @@
'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
+ 'PharIo\\Version\\BuildMetaData' => $vendorDir . '/phar-io/version/src/BuildMetaData.php',
'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php',
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php',
+ 'PharIo\\Version\\NoBuildMetaDataException' => $vendorDir . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php',
'PharIo\\Version\\NoPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php',
'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php',
@@ -425,6 +427,7 @@
'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
+ 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'SebastianBergmann\\CliParser\\AmbiguousOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
'SebastianBergmann\\CliParser\\Exception' => $vendorDir . '/sebastian/cli-parser/src/exceptions/Exception.php',
@@ -434,10 +437,7 @@
'SebastianBergmann\\CliParser\\UnknownOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php',
'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php',
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
- 'SebastianBergmann\\CodeCoverage\\CrapIndex' => $vendorDir . '/phpunit/php-code-coverage/src/CrapIndex.php',
'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php',
- 'SebastianBergmann\\CodeCoverage\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Directory.php',
- 'SebastianBergmann\\CodeCoverage\\DirectoryCouldNotBeCreatedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php',
@@ -459,11 +459,11 @@
'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => $vendorDir . '/phpunit/php-code-coverage/src/Node/CrapIndex.php',
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php',
'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php',
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php',
'SebastianBergmann\\CodeCoverage\\ParserException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ParserException.php',
- 'SebastianBergmann\\CodeCoverage\\Percentage' => $vendorDir . '/phpunit/php-code-coverage/src/Percentage.php',
'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\ReflectionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php',
@@ -492,19 +492,18 @@
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Cache' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Cache.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingCoveredFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingCoveredFileAnalyser.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingUncoveredFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingUncoveredFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CoveredFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CoveredFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingCoveredFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingCoveredFileAnalyser.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingUncoveredFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingUncoveredFileAnalyser.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\UncoveredFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/UncoveredFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php',
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Filesystem.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Percentage.php',
'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php',
'SebastianBergmann\\CodeCoverage\\XmlException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XmlException.php',
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
@@ -608,24 +607,25 @@
'SebastianBergmann\\Timer\\ResourceUsageFormatter' => $vendorDir . '/phpunit/php-timer/src/ResourceUsageFormatter.php',
'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => $vendorDir . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php',
'SebastianBergmann\\Timer\\Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
- 'SebastianBergmann\\Type\\CallableType' => $vendorDir . '/sebastian/type/src/CallableType.php',
+ 'SebastianBergmann\\Type\\CallableType' => $vendorDir . '/sebastian/type/src/type/CallableType.php',
'SebastianBergmann\\Type\\Exception' => $vendorDir . '/sebastian/type/src/exception/Exception.php',
- 'SebastianBergmann\\Type\\FalseType' => $vendorDir . '/sebastian/type/src/FalseType.php',
- 'SebastianBergmann\\Type\\GenericObjectType' => $vendorDir . '/sebastian/type/src/GenericObjectType.php',
- 'SebastianBergmann\\Type\\IterableType' => $vendorDir . '/sebastian/type/src/IterableType.php',
- 'SebastianBergmann\\Type\\LogicException' => $vendorDir . '/sebastian/type/src/exception/LogicException.php',
- 'SebastianBergmann\\Type\\MixedType' => $vendorDir . '/sebastian/type/src/MixedType.php',
- 'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/NullType.php',
- 'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/ObjectType.php',
+ 'SebastianBergmann\\Type\\FalseType' => $vendorDir . '/sebastian/type/src/type/FalseType.php',
+ 'SebastianBergmann\\Type\\GenericObjectType' => $vendorDir . '/sebastian/type/src/type/GenericObjectType.php',
+ 'SebastianBergmann\\Type\\IntersectionType' => $vendorDir . '/sebastian/type/src/type/IntersectionType.php',
+ 'SebastianBergmann\\Type\\IterableType' => $vendorDir . '/sebastian/type/src/type/IterableType.php',
+ 'SebastianBergmann\\Type\\MixedType' => $vendorDir . '/sebastian/type/src/type/MixedType.php',
+ 'SebastianBergmann\\Type\\NeverType' => $vendorDir . '/sebastian/type/src/type/NeverType.php',
+ 'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/type/NullType.php',
+ 'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/type/ObjectType.php',
'SebastianBergmann\\Type\\ReflectionMapper' => $vendorDir . '/sebastian/type/src/ReflectionMapper.php',
'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php',
- 'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/SimpleType.php',
- 'SebastianBergmann\\Type\\StaticType' => $vendorDir . '/sebastian/type/src/StaticType.php',
- 'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/Type.php',
+ 'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php',
+ 'SebastianBergmann\\Type\\StaticType' => $vendorDir . '/sebastian/type/src/type/StaticType.php',
+ 'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/type/Type.php',
'SebastianBergmann\\Type\\TypeName' => $vendorDir . '/sebastian/type/src/TypeName.php',
- 'SebastianBergmann\\Type\\UnionType' => $vendorDir . '/sebastian/type/src/UnionType.php',
- 'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/UnknownType.php',
- 'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/VoidType.php',
+ 'SebastianBergmann\\Type\\UnionType' => $vendorDir . '/sebastian/type/src/type/UnionType.php',
+ 'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/type/UnknownType.php',
+ 'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/type/VoidType.php',
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
'SqlFormatter' => $vendorDir . '/jdorn/sql-formatter/lib/SqlFormatter.php',
'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
diff --git a/app/vendor/composer/autoload_files.php b/app/vendor/composer/autoload_files.php
index 7c30393a1..d08e7f4bf 100644
--- a/app/vendor/composer/autoload_files.php
+++ b/app/vendor/composer/autoload_files.php
@@ -6,13 +6,18 @@
$baseDir = dirname($vendorDir);
return array(
- '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
- '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
+ '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
+ '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
+ '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
+ 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
+ '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
+ 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
'07d7f1a47144818725fd8d91a907ac57' => $vendorDir . '/laminas/laminas-diactoros/src/functions/create_uploaded_file.php',
'da94ac5d3ca7d2dbab84ce561ce72bfd' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php',
@@ -37,10 +42,8 @@
'90236b492da7ca2983a2ad6e33e4152e' => $vendorDir . '/cakephp/cakephp/src/I18n/functions.php',
'2cb76c05856dfb60ada40ef54138d49a' => $vendorDir . '/cakephp/cakephp/src/Routing/functions.php',
'b1fc73705e1bec51cd2b20a32cf1c60a' => $vendorDir . '/cakephp/cakephp/src/Utility/bootstrap.php',
- '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
- '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
- '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
+ '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'9e907be52ac44624247b526b1e9ccfae' => $vendorDir . '/cakephp/repl/src/functions.php',
'bf9f5270ae66ac6fa0290b4bf47867b7' => $vendorDir . '/adodb/adodb-php/adodb.inc.php',
);
diff --git a/app/vendor/composer/autoload_psr4.php b/app/vendor/composer/autoload_psr4.php
index fc5ccf05d..a6db27bb1 100644
--- a/app/vendor/composer/autoload_psr4.php
+++ b/app/vendor/composer/autoload_psr4.php
@@ -12,14 +12,17 @@
'Twig\\' => array($vendorDir . '/twig/twig/src'),
'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
- 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
+ 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
+ 'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
+ 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
+ 'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
- 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'),
'SlevomatCodingStandard\\' => array($vendorDir . '/slevomat/coding-standard/SlevomatCodingStandard'),
@@ -33,10 +36,10 @@
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
+ 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'Phinx\\' => array($vendorDir . '/robmorgan/phinx/src/Phinx'),
- 'PackageVersions\\' => array($vendorDir . '/composer/package-versions-deprecated/src/PackageVersions'),
'PHPStan\\PhpDocParser\\' => array($vendorDir . '/phpstan/phpdoc-parser/src'),
'Migrations\\' => array($vendorDir . '/cakephp/migrations/src'),
'M1\\Env\\' => array($vendorDir . '/m1/env/src'),
@@ -58,6 +61,7 @@
'Composer\\XdebugHandler\\' => array($vendorDir . '/composer/xdebug-handler/src'),
'Composer\\Spdx\\' => array($vendorDir . '/composer/spdx-licenses/src'),
'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'),
+ 'Composer\\Pcre\\' => array($vendorDir . '/composer/pcre/src'),
'Composer\\MetadataMinifier\\' => array($vendorDir . '/composer/metadata-minifier/src'),
'Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'),
'Composer\\' => array($vendorDir . '/composer/composer/src/Composer'),
diff --git a/app/vendor/composer/autoload_static.php b/app/vendor/composer/autoload_static.php
index 13443dcb2..d38ccaf5e 100644
--- a/app/vendor/composer/autoload_static.php
+++ b/app/vendor/composer/autoload_static.php
@@ -7,13 +7,18 @@
class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
{
public static $files = array (
- '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
- '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
+ '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
+ '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
+ '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
+ 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
+ '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
+ 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
'07d7f1a47144818725fd8d91a907ac57' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/create_uploaded_file.php',
'da94ac5d3ca7d2dbab84ce561ce72bfd' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php',
@@ -38,10 +43,8 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'90236b492da7ca2983a2ad6e33e4152e' => __DIR__ . '/..' . '/cakephp/cakephp/src/I18n/functions.php',
'2cb76c05856dfb60ada40ef54138d49a' => __DIR__ . '/..' . '/cakephp/cakephp/src/Routing/functions.php',
'b1fc73705e1bec51cd2b20a32cf1c60a' => __DIR__ . '/..' . '/cakephp/cakephp/src/Utility/bootstrap.php',
- '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
- '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
- '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php',
+ '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'9e907be52ac44624247b526b1e9ccfae' => __DIR__ . '/..' . '/cakephp/repl/src/functions.php',
'bf9f5270ae66ac6fa0290b4bf47867b7' => __DIR__ . '/..' . '/adodb/adodb-php/adodb.inc.php',
);
@@ -64,14 +67,17 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
array (
'Symfony\\Polyfill\\Php81\\' => 23,
'Symfony\\Polyfill\\Php80\\' => 23,
- 'Symfony\\Polyfill\\Php72\\' => 23,
+ 'Symfony\\Polyfill\\Php73\\' => 23,
'Symfony\\Polyfill\\Mbstring\\' => 26,
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
+ 'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31,
'Symfony\\Polyfill\\Ctype\\' => 23,
+ 'Symfony\\Contracts\\Service\\' => 26,
'Symfony\\Component\\VarDumper\\' => 28,
+ 'Symfony\\Component\\String\\' => 25,
'Symfony\\Component\\Process\\' => 26,
'Symfony\\Component\\Finder\\' => 25,
'Symfony\\Component\\Filesystem\\' => 29,
- 'Symfony\\Component\\Debug\\' => 24,
'Symfony\\Component\\Console\\' => 26,
'Symfony\\Component\\Config\\' => 25,
'SlevomatCodingStandard\\' => 23,
@@ -91,10 +97,10 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'Psr\\Http\\Message\\' => 17,
'Psr\\Http\\Client\\' => 16,
'Psr\\Container\\' => 14,
+ 'Psr\\Cache\\' => 10,
'Prophecy\\' => 9,
'PhpParser\\' => 10,
'Phinx\\' => 6,
- 'PackageVersions\\' => 16,
'PHPStan\\PhpDocParser\\' => 21,
),
'M' =>
@@ -131,6 +137,7 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'Composer\\XdebugHandler\\' => 23,
'Composer\\Spdx\\' => 14,
'Composer\\Semver\\' => 16,
+ 'Composer\\Pcre\\' => 14,
'Composer\\MetadataMinifier\\' => 26,
'Composer\\CaBundle\\' => 18,
'Composer\\' => 9,
@@ -181,22 +188,38 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
),
- 'Symfony\\Polyfill\\Php72\\' =>
+ 'Symfony\\Polyfill\\Php73\\' =>
array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
+ ),
+ 'Symfony\\Polyfill\\Intl\\Grapheme\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme',
+ ),
'Symfony\\Polyfill\\Ctype\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
),
+ 'Symfony\\Contracts\\Service\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/service-contracts',
+ ),
'Symfony\\Component\\VarDumper\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/var-dumper',
),
+ 'Symfony\\Component\\String\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/string',
+ ),
'Symfony\\Component\\Process\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/process',
@@ -209,10 +232,6 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
array (
0 => __DIR__ . '/..' . '/symfony/filesystem',
),
- 'Symfony\\Component\\Debug\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/debug',
- ),
'Symfony\\Component\\Console\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/console',
@@ -267,6 +286,10 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
+ 'Psr\\Cache\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/cache/src',
+ ),
'Prophecy\\' =>
array (
0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy',
@@ -279,10 +302,6 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
array (
0 => __DIR__ . '/..' . '/robmorgan/phinx/src/Phinx',
),
- 'PackageVersions\\' =>
- array (
- 0 => __DIR__ . '/..' . '/composer/package-versions-deprecated/src/PackageVersions',
- ),
'PHPStan\\PhpDocParser\\' =>
array (
0 => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src',
@@ -367,6 +386,10 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
array (
0 => __DIR__ . '/..' . '/composer/semver/src',
),
+ 'Composer\\Pcre\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/composer/pcre/src',
+ ),
'Composer\\MetadataMinifier\\' =>
array (
0 => __DIR__ . '/..' . '/composer/metadata-minifier/src',
@@ -446,7 +469,9 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
public static $classMap = array (
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'Mobile_Detect' => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/Mobile_Detect.php',
+ 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php',
'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
@@ -567,7 +592,6 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
'PHPUnit\\Framework\\MockObject\\MockTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
'PHPUnit\\Framework\\MockObject\\MockType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
- 'PHPUnit\\Framework\\MockObject\\MockedCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php',
'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php',
'PHPUnit\\Framework\\MockObject\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php',
'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php',
@@ -598,7 +622,6 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'PHPUnit\\Framework\\MockObject\\UnknownClassException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php',
- 'PHPUnit\\Framework\\MockObject\\UnmockedCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php',
'PHPUnit\\Framework\\MockObject\\Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
'PHPUnit\\Framework\\NoChildTestSuiteException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
'PHPUnit\\Framework\\OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
@@ -847,11 +870,13 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
+ 'PharIo\\Version\\BuildMetaData' => __DIR__ . '/..' . '/phar-io/version/src/BuildMetaData.php',
'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php',
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php',
+ 'PharIo\\Version\\NoBuildMetaDataException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php',
'PharIo\\Version\\NoPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php',
'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php',
@@ -863,6 +888,7 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
+ 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'SebastianBergmann\\CliParser\\AmbiguousOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
'SebastianBergmann\\CliParser\\Exception' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/Exception.php',
@@ -872,10 +898,7 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'SebastianBergmann\\CliParser\\UnknownOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php',
'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php',
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
- 'SebastianBergmann\\CodeCoverage\\CrapIndex' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CrapIndex.php',
'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php',
- 'SebastianBergmann\\CodeCoverage\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Directory.php',
- 'SebastianBergmann\\CodeCoverage\\DirectoryCouldNotBeCreatedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php',
@@ -897,11 +920,11 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/CrapIndex.php',
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php',
'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php',
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php',
'SebastianBergmann\\CodeCoverage\\ParserException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ParserException.php',
- 'SebastianBergmann\\CodeCoverage\\Percentage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Percentage.php',
'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\ReflectionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php',
@@ -930,19 +953,18 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Cache' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Cache.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingCoveredFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingCoveredFileAnalyser.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingUncoveredFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingUncoveredFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CoveredFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CoveredFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingCoveredFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingCoveredFileAnalyser.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingUncoveredFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingUncoveredFileAnalyser.php',
- 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\UncoveredFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/UncoveredFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php',
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Filesystem.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Percentage.php',
'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php',
'SebastianBergmann\\CodeCoverage\\XmlException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XmlException.php',
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
@@ -1046,24 +1068,25 @@ class ComposerStaticInit8d81387c26c532d7a48feda4036c56c7
'SebastianBergmann\\Timer\\ResourceUsageFormatter' => __DIR__ . '/..' . '/phpunit/php-timer/src/ResourceUsageFormatter.php',
'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php',
'SebastianBergmann\\Timer\\Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
- 'SebastianBergmann\\Type\\CallableType' => __DIR__ . '/..' . '/sebastian/type/src/CallableType.php',
+ 'SebastianBergmann\\Type\\CallableType' => __DIR__ . '/..' . '/sebastian/type/src/type/CallableType.php',
'SebastianBergmann\\Type\\Exception' => __DIR__ . '/..' . '/sebastian/type/src/exception/Exception.php',
- 'SebastianBergmann\\Type\\FalseType' => __DIR__ . '/..' . '/sebastian/type/src/FalseType.php',
- 'SebastianBergmann\\Type\\GenericObjectType' => __DIR__ . '/..' . '/sebastian/type/src/GenericObjectType.php',
- 'SebastianBergmann\\Type\\IterableType' => __DIR__ . '/..' . '/sebastian/type/src/IterableType.php',
- 'SebastianBergmann\\Type\\LogicException' => __DIR__ . '/..' . '/sebastian/type/src/exception/LogicException.php',
- 'SebastianBergmann\\Type\\MixedType' => __DIR__ . '/..' . '/sebastian/type/src/MixedType.php',
- 'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/NullType.php',
- 'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/ObjectType.php',
+ 'SebastianBergmann\\Type\\FalseType' => __DIR__ . '/..' . '/sebastian/type/src/type/FalseType.php',
+ 'SebastianBergmann\\Type\\GenericObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/GenericObjectType.php',
+ 'SebastianBergmann\\Type\\IntersectionType' => __DIR__ . '/..' . '/sebastian/type/src/type/IntersectionType.php',
+ 'SebastianBergmann\\Type\\IterableType' => __DIR__ . '/..' . '/sebastian/type/src/type/IterableType.php',
+ 'SebastianBergmann\\Type\\MixedType' => __DIR__ . '/..' . '/sebastian/type/src/type/MixedType.php',
+ 'SebastianBergmann\\Type\\NeverType' => __DIR__ . '/..' . '/sebastian/type/src/type/NeverType.php',
+ 'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/type/NullType.php',
+ 'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/ObjectType.php',
'SebastianBergmann\\Type\\ReflectionMapper' => __DIR__ . '/..' . '/sebastian/type/src/ReflectionMapper.php',
'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php',
- 'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/SimpleType.php',
- 'SebastianBergmann\\Type\\StaticType' => __DIR__ . '/..' . '/sebastian/type/src/StaticType.php',
- 'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/Type.php',
+ 'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php',
+ 'SebastianBergmann\\Type\\StaticType' => __DIR__ . '/..' . '/sebastian/type/src/type/StaticType.php',
+ 'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/type/Type.php',
'SebastianBergmann\\Type\\TypeName' => __DIR__ . '/..' . '/sebastian/type/src/TypeName.php',
- 'SebastianBergmann\\Type\\UnionType' => __DIR__ . '/..' . '/sebastian/type/src/UnionType.php',
- 'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/UnknownType.php',
- 'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/VoidType.php',
+ 'SebastianBergmann\\Type\\UnionType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnionType.php',
+ 'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnknownType.php',
+ 'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/type/VoidType.php',
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
'SqlFormatter' => __DIR__ . '/..' . '/jdorn/sql-formatter/lib/SqlFormatter.php',
'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
diff --git a/app/vendor/composer/composer/.php-cs-fixer.php b/app/vendor/composer/composer/.php-cs-fixer.php
index 4031efea1..ed2e6cf2b 100644
--- a/app/vendor/composer/composer/.php-cs-fixer.php
+++ b/app/vendor/composer/composer/.php-cs-fixer.php
@@ -16,12 +16,13 @@
->in(__DIR__.'/tests')
->name('*.php')
->notPath('Fixtures')
+ ->notPath('Composer/Autoload/ClassLoader.php')
+ ->notPath('Composer/InstalledVersions.php')
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR2' => true,
- 'array_syntax' => array('syntax' => 'long'),
'binary_operator_spaces' => true,
'blank_line_before_statement' => array('statements' => array('declare', 'return')),
'cast_spaces' => array('space' => 'single'),
@@ -33,7 +34,6 @@
'no_blank_lines_after_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
- 'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_whitespace_in_blank_line' => true,
@@ -57,10 +57,24 @@
'no_unused_imports' => true,
'fully_qualified_strict_types' => true,
'single_line_after_imports' => true,
- 'fully_qualified_strict_types' => true,
//'global_namespace_import' => ['import_classes' => true],
'no_leading_import_slash' => true,
'single_import_per_statement' => true,
+
+ // PHP 7.2 migration
+ // TODO later once 2.2 is more stable
+ // 'array_syntax' => true,
+ // 'list_syntax' => true,
+ 'visibility_required' => ['elements' => ['property', 'method', 'const']],
+ 'non_printable_character' => true,
+ 'combine_nested_dirname' => true,
+ 'random_api_migration' => true,
+ 'ternary_to_null_coalescing' => true,
+ 'phpdoc_to_param_type' => true,
+ 'declare_strict_types' => true,
+
+ // TODO php 7.4 migration (one day..)
+ // 'phpdoc_to_property_type' => true,
])
->setUsingCache(true)
->setRiskyAllowed(true)
diff --git a/app/vendor/composer/composer/CHANGELOG.md b/app/vendor/composer/composer/CHANGELOG.md
index ae55a5967..decb5b05c 100644
--- a/app/vendor/composer/composer/CHANGELOG.md
+++ b/app/vendor/composer/composer/CHANGELOG.md
@@ -1,3 +1,206 @@
+### [2.3.5] 2022-04-13
+
+ * Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)
+ * Added warning when downloading a file with `verify_peer[_name]` disabled (#10722)
+ * Fixed curl downloader not retrying when a DNS resolution failure occurs (#10716)
+ * Fixed composer.lock file still being used/read when the `lock` config option is disabled (#10726)
+ * Fixed `validate` command checking the lock file even if the `lock` option is disabled (#10723)
+ * Fixed detection of default branch name when it changed since a git repo was mirrored in cache dir (#10701)
+
+### [2.3.4] 2022-04-07
+
+ * Fixed the generated autoload.php to support running on PHP 5.6+ (down from 7.0+) and warn clearly on older PHP versions (#10714)
+ * Fixed run-script --list flag regression (#10710)
+ * Fixed curl downloader handling of DNS resolution failures to do an automatic retry (#10716)
+ * Fixed script handling of external commands not setting the Path env correctly on windows (#10700)
+ * Fixed various type errors (#10694, #10696, #10702, #10712, #10703)
+
+### [2.3.3] 2022-04-01
+
+ * Added --2.2 flag to `self-update` to pin the Composer version to the 2.2 LTS range (#10682)
+ * Added missing config.bitbucket-oauth in composer-schema.json
+ * Fixed type errors in SvnDriver (#10681)
+ * Fixed --version output to match the pre-2.3 one (#10684)
+ * Fixed config/auth.json files not being validated against the composer-schema.json (#10685)
+ * Fixed generation of autoload crashing if a package has a broken path (#10688)
+ * Fixed GitDriver state issue when reusing old cache dirs and the default branch was renamed (#10687)
+ * Updated semver, jsonlint deps for minor fixes
+ * Removed dev-master=>dev-main alias from #10372 as it does not work when reloading from lock file and extracting dev deps (#10651)
+
+### [2.3.2] 2022-03-30
+
+ * Fixed type error when running `exec` command (#10672)
+ * Fixed endless loop in plugin activation prompt when input is not fully interactive yet appears to be (#10648)
+ * Fixed type error in ComposerRepository (#10675)
+ * Fixed issues loading platform packages where the version of a library cannot be established (#10631)
+
+### [2.3.1] 2022-03-30
+
+ * Fixed type error when HOME env var is not set (#10670)
+
+### [2.3.0] 2022-03-30
+
+ * Fixed many strict types errors (#10646, #10642, #10647, #10658, #10656, #10665, #10660, #10663, #10662)
+
+### [2.3.0-RC2] 2022-03-20
+
+ * Fixed invalid return value in ComposerRepository::findPackage (#10622)
+ * Fixed many `show` command issues due to a flipped condition (#10623)
+ * Fixed `phpversion()` handling when it returns false due to an extension defining no version (#10631)
+ * Fixed `remove` command failing when no `allow-plugin` is defined in config (#10629)
+ * Performance improvement in Composer bootstrapping (version guessing) when on a feature branch (#10632)
+
+### [2.3.0-RC1] 2022-03-16
+
+ * BC Break: the minimum PHP version is now 7.2.5+, use the [Composer 2.2 LTS](https://github.com/composer/composer/issues/10340) if you are stuck with an older PHP (#10343)
+ * BC Break: added native parameter & return types to many internal APIs, we explicitly left the most extended/implemented symbols untouched but if this causes problems nonetheless please report it ASAP (#10547, #10561)
+ * BC Break: added visibility to all constants, a few internal ones have been made private/protected, if this causes problems please report it ASAP (#10550)
+ * BC Break: the minimum supported Symfony components version is now 5.4, this only affects you if you are requiring composer/composer directly however, which is generally frowned upon
+ * Bumped `composer-plugin-api` to `2.3.0`
+ * Bumped bundled Symfony components from 2.8 to 5.4 🥳
+ * Added `declare(strict_types=1)` to all the classes, which for sure could cause regressions in edge cases, please report with stack traces (#10567)
+ * Added `--patch-only` to the `outdated` command to only show updates to patch versions and ignore new major/minor versions (#10589)
+ * Added clickable links to various commands for terminals which support it (#10430)
+ * Added ProcessExecutor ability to receive commands as arrays by (internals/plugin change only) (#10435)
+ * Added abandoned flag to `show`/`outdated` commands JSON-formatted output (#10485)
+ * Added config.reference option to `path` repositories to configure the way the reference is generated, and possibly reduce composer.lock conflicts (#10488)
+ * Added automatic removal of allow-plugins rules when removing a plugin via the `remove` command (#10615)
+ * Added COMPOSER_IGNORE_PLATFOR_REQ & COMPOSER_IGNORE_PLATFOR_REQS env vars to configure the equivalent flags (#10616)
+ * Added support for Symfony 6.0 components
+ * Added support for psr/log 3.x (#10454)
+ * Fixed symlink creation in linux VM guest filesystems to be recognized by Windows (#10592)
+ * Performance improvement in pool optimization step (#10585)
+
+### [2.2.12] 2022-04-13
+
+ * Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)
+ * Fixed curl downloader not retrying when a DNS resolution failure occurs (#10716)
+ * Fixed composer.lock file still being used/read when the `lock` config option is disabled (#10726)
+ * Fixed `validate` command checking the lock file even if the `lock` option is disabled (#10723)
+
+### [2.2.11] 2022-04-01
+
+ * Added missing config.bitbucket-oauth in composer-schema.json
+ * Added --2.2 flag to `self-update` to pin the Composer version to the 2.2 LTS range (#10682)
+ * Updated semver, jsonlint deps for minor fixes
+ * Fixed generation of autoload crashing if a package has a broken path (#10688)
+ * Removed dev-master=>dev-main alias from #10372 as it does not work when reloading from lock file and extracting dev deps (#10651)
+
+### [2.2.10] 2022-03-29
+
+ * Fixed Bitbucket authorization detection due to API changes (#10657)
+ * Fixed validate command warning about dist/source keys if defined (#10655)
+ * Fixed deletion/handling of corrupted 0-bytes zip archives (#10666)
+
+### [2.2.9] 2022-03-15
+
+ * Fixed regression with plugins that modify install path of packages, [see docs](https://getcomposer.org/doc/articles/plugins.md#plugin-modifies-install-path) if you are authoring such a plugin (#10621)
+
+### [2.2.8] 2022-03-15
+
+ * Fixed `files` autoloading sort order to be fully deterministic (#10617)
+ * Fixed pool optimization pass edge cases (#10579)
+ * Fixed `require` command failing when `self.version` is used as constraint (#10593)
+ * Fixed --no-ansi / undecorated output still showing color in repo warnings (#10601)
+ * Performance improvement in pool optimization step (composer/semver#131)
+
+### [2.2.7] 2022-02-25
+
+ * Allow installation together with composer/xdebug-handler ^3 (#10528)
+ * Fixed support for packages with no licenses in `licenses` command output (#10537)
+ * Fixed handling of `allow-plugins: false` which kept warning (#10530)
+ * Fixed enum parsing in classmap generation when the enum keyword is not lowercased (#10521)
+ * Fixed author parsing in `init` command requiring an email whereas the schema allows a name only (#10538)
+ * Fixed issues in `require` command when requiring packages which do not exist (but are provided by something else you require) (#10541)
+ * Performance improvement in pool optimization step (#10546)
+
+### [2.2.6] 2022-02-04
+
+ * BC Break: due to an oversight, the `COMPOSER_BIN_DIR` env var for binaries added in Composer 2.2.2 had to be renamed to `COMPOSER_RUNTIME_BIN_DIR` (#10512)
+ * Fixed enum parsing in classmap generation with syntax like `enum foo:string` without space after `:` (#10498)
+ * Fixed package search not urlencoding the input (#10500)
+ * Fixed `reinstall` command not firing `pre-install-cmd`/`post-install-cmd` events (#10514)
+ * Fixed edge case in path repositories where a symlink: true option would be ignored on old Windows and old PHP combos (#10482)
+ * Fixed test suite compatibility with latest symfony/console releases (#10499)
+ * Fixed some error reporting edge cases (#10484, #10451, #10493)
+
+### [2.2.5] 2022-01-21
+
+ * Disabled `composer/package-versions-deprecated` by default as it can function using `Composer\InstalledVersions` at runtime (#10458)
+ * Fixed artifact repositories crashing if a phar file was present in the directory (#10406)
+ * Fixed binary proxy issue on PHP <8 when fseek is used on the proxied binary path (#10468)
+ * Fixed handling of non-string versions in package repositories metadata (#10470)
+
+### [2.2.4] 2022-01-08
+
+ * Fixed handling of process timeout when running async processes during installation
+ * Fixed GitLab API handling when projects have a repository disabled (#10440)
+ * Fixed reading of environment variables (e.g. APPDATA) containing unicode characters to workaround a PHP bug on Windows (#10434)
+ * Fixed partial update issues with path repos missing if a path repo is required by a path repo (#10431)
+ * Fixed support for sourcing binaries via the new bin proxies ([#10389](https://github.com/composer/composer/issues/10389#issuecomment-1007372740))
+ * Fixed messaging when GitHub tokens need SSO authorization (#10432)
+
+### [2.2.3] 2021-12-31
+
+ * Fixed issue with PHPUnit and process isolation now including PHPUnit <6.5 (#10387)
+ * Fixed interoperability issue with laminas/laminas-zendframework-bridge and Composer 2.2 (#10401)
+ * Fixed binary proxies for shell scripts to work correctly when they are symlinked (jakzal/phpqa#336)
+ * Fixed overly greedy pool optimization in cases where a locked package is not required by anything anymore in a partial update (#10405)
+
+### [2.2.2] 2021-12-29
+
+ * Added [`COMPOSER_BIN_DIR` env var and `_composer_bin_dir` global](https://getcomposer.org/doc/articles/vendor-binaries.md#finding-the-composer-bin-dir-from-a-binary) containing the path to the bin-dir for binaries. Packages relying on finding the bin dir with `$BASH_SOURCES[0]` will need to update their binaries (#10402)
+ * Fixed issue when new binary proxies are combined with PHPUnit and process isolation (#10387)
+ * Fixed deprecation warnings when using Symfony 5.4+ and requiring composer/composer itself (#10404)
+ * Fixed UX of plugin warnings (#10381)
+
+### [2.2.1] 2021-12-22
+
+ * Fixed plugin autoloading including files autoload rules from the root package (#10382)
+ * Fixed issue parsing php files with unterminated comments found inside backticks (#10385)
+
+### [2.2.0] 2021-12-22
+
+ * Added support for using `dev-main` as the default path repo package version if no VCS info is available (#10372)
+ * Added --no-scripts as a globally supported flag to all Composer commands to disable scripts execution (#10371)
+ * Fixed self-update failing in some edge cases due to loading plugins (#10371)
+ * Fixed display of conflicts showing the wrong package name in some conditions (#10355)
+
+### [2.2.0-RC1] 2021-12-08
+
+ * Bumped `composer-runtime-api` and `composer-plugin-api` to `2.2.0`
+ * UX Change: Added [`allow-plugins`](https://getcomposer.org/doc/06-config.md#allow-plugins) config value to enhance security against runtime execution, this will prompt you the first time you use a plugin and may hang pipelines if they aren't using --no-interaction (-n) as they should (#10314)
+ * Added an optimization pass to reduce the amount of redundant inspected during resolution, drastically improving memory and CPU usage (#9261, #9620)
+ * Added a [global $_composer_autoload_path variable](https://getcomposer.org/doc/articles/vendor-binaries.md#finding-the-composer-autoloader-from-a-binary) containing the path to autoload.php for binaries (#10137)
+ * Added wildcard support to --ignore-platform-req (e.g. `ext-*`) (#10083)
+ * Added support for ignoring the upper bound of platform requirements using "name+" notation e.g. using `--ignore-platform-req=php+` would allow installing a package requiring `php: 8.0.*` on PHP 8.1, but not on PHP 7.4. Useful for CI builds of upcoming PHP versions (#10318)
+ * Added support for setting platform packages to false in config.platform to disable/hide them (#10308)
+ * Added [`use-parent-dir`](https://getcomposer.org/doc/06-config.md#use-parent-dir) option to configure the prompt for using composer.json in upper directory when none is present in current dir (#10307)
+ * Added [`composer` platform package](https://getcomposer.org/doc/articles/composer-platform-dependencies.md) which is always the exact version of Composer running unlike `composer-*-api` packages (#10313)
+ * Added a --source flag to `config` command to show where config values are loaded from (#10129)
+ * Added support for `files` autoloaders in the runtime scripts/plugins contexts (#10065)
+ * Added retry behavior on certain http status and curl error codes (#10162)
+ * Added abandoned flag display in search command output
+ * Added support for --ignore-platform-reqs in `outdated` command (#10293)
+ * Added --only-vendor (-O) flag to `search` command to search (and return) vendor names (#10336)
+ * Added COMPOSER_NO_DEV environment variable to set the --no-dev flag (#10262)
+ * Fixed `archive` command to behave more like git archive, gitignore/hgignore are not taken into account anymore, and gitattributes support was improved (#10309)
+ * Fixed unlocking of replacers when a replaced package is unlocked (#10280)
+ * Fixed auto-unlocked path repo packages also unlocking their transitive deps when -w/-W is used (#10157)
+ * Fixed handling of recursive package links (e.g. requiring or replacing oneself)
+ * Fixed env var reads to check $_SERVER and $_ENV before getenv for broader ecosystem compatibility (#10218)
+ * Fixed `archive` command to produce archives with files sorted by name (#10274)
+ * Fixed VcsRepository issues where server failure could cause missing tags/branches (#10319)
+ * Fixed some error reporting issues (#10283, #10339)
+
+### [2.1.14] 2021-11-30
+
+ * Fixed invalid release build
+
+### [2.1.13] 2021-11-30
+
+ * Removed `symfony/console ^6` support as we cannot be compatible until Composer 2.3.0 is released. If you have issues with Composer required as a dependency + Symfony make sure you stay on Symfony 5.4 for now. (#10321)
+
### [2.1.12] 2021-11-09
* Fixed issues in proxied binary files relying on __FILE__ / __DIR__ on php <8 (#10261)
@@ -258,7 +461,7 @@
### [2.0.1] 2020-10-24
- * Fixed crash on PHP8
+ * Fixed crash on PHP 8
### [2.0.0] 2020-10-24
@@ -1297,6 +1500,30 @@
* Initial release
+[2.3.5]: https://github.com/composer/composer/compare/2.3.4...2.3.5
+[2.3.4]: https://github.com/composer/composer/compare/2.3.3...2.3.4
+[2.3.3]: https://github.com/composer/composer/compare/2.3.2...2.3.3
+[2.3.2]: https://github.com/composer/composer/compare/2.3.1...2.3.2
+[2.3.1]: https://github.com/composer/composer/compare/2.3.0...2.3.1
+[2.3.0]: https://github.com/composer/composer/compare/2.3.0-RC2...2.3.0
+[2.3.0-RC2]: https://github.com/composer/composer/compare/2.3.0-RC1...2.3.0-RC2
+[2.3.0-RC1]: https://github.com/composer/composer/compare/2.2.9...2.3.0-RC1
+[2.2.12]: https://github.com/composer/composer/compare/2.2.11...2.2.12
+[2.2.11]: https://github.com/composer/composer/compare/2.2.10...2.2.11
+[2.2.10]: https://github.com/composer/composer/compare/2.2.9...2.2.10
+[2.2.9]: https://github.com/composer/composer/compare/2.2.8...2.2.9
+[2.2.8]: https://github.com/composer/composer/compare/2.2.7...2.2.8
+[2.2.7]: https://github.com/composer/composer/compare/2.2.6...2.2.7
+[2.2.6]: https://github.com/composer/composer/compare/2.2.5...2.2.6
+[2.2.5]: https://github.com/composer/composer/compare/2.2.4...2.2.5
+[2.2.4]: https://github.com/composer/composer/compare/2.2.3...2.2.4
+[2.2.3]: https://github.com/composer/composer/compare/2.2.2...2.2.3
+[2.2.2]: https://github.com/composer/composer/compare/2.2.1...2.2.2
+[2.2.1]: https://github.com/composer/composer/compare/2.2.0...2.2.1
+[2.2.0]: https://github.com/composer/composer/compare/2.2.0-RC1...2.2.0
+[2.2.0-RC1]: https://github.com/composer/composer/compare/2.1.14...2.2.0-RC1
+[2.1.14]: https://github.com/composer/composer/compare/2.1.13...2.1.14
+[2.1.13]: https://github.com/composer/composer/compare/2.1.12...2.1.13
[2.1.12]: https://github.com/composer/composer/compare/2.1.11...2.1.12
[2.1.11]: https://github.com/composer/composer/compare/2.1.10...2.1.11
[2.1.10]: https://github.com/composer/composer/compare/2.1.9...2.1.10
diff --git a/app/vendor/composer/composer/README.md b/app/vendor/composer/composer/README.md
index bc7d8c645..2d9fc7990 100644
--- a/app/vendor/composer/composer/README.md
+++ b/app/vendor/composer/composer/README.md
@@ -17,7 +17,7 @@ For usage, see [the documentation](https://getcomposer.org/doc/).
Packages
--------
-Find packages on [Packagist](https://packagist.org).
+Find public packages on [Packagist.org](https://packagist.org). For private package hosting take a look at [Private Packagist](https://packagist.com).
Community
---------
@@ -34,7 +34,15 @@ By participating in this project and its community you agree to abide by those t
Requirements
------------
-PHP 5.3.2 or above (at least 5.3.4 recommended to avoid potential bugs)
+#### Latest Composer
+
+PHP 7.2.5 or above for the latest version.
+
+#### Composer 2.2 LTS (Long Term Support)
+
+PHP versions 5.3.2 - 8.1 are still supported via the LTS releases of Composer (2.2.x). If you
+run the installer or the `self-update` command the appropriate Composer version for your PHP
+should be automatically selected.
Authors
-------
diff --git a/app/vendor/composer/composer/bin/compile b/app/vendor/composer/composer/bin/compile
index f9156245f..1e2e4be1c 100755
--- a/app/vendor/composer/composer/bin/compile
+++ b/app/vendor/composer/composer/bin/compile
@@ -2,17 +2,30 @@
= 70113 && (PHP_VERSION_ID < 80016 || (PHP_VERSION_ID >= 80100 && PHP_VERSION_ID < 80103)) && Platform::isWindows()) {
+ foreach ($_SERVER as $serverVar => $serverVal) {
+ if (($serverVal = getenv($serverVar)) !== false) {
+ $_SERVER[$serverVar] = $serverVal;
+ }
+ }
+}
+
Platform::putEnv('COMPOSER_BINARY', realpath($_SERVER['argv'][0]));
ErrorHandler::register();
diff --git a/app/vendor/composer/composer/composer.json b/app/vendor/composer/composer/composer.json
index a13c6b5d4..80b97d6ad 100644
--- a/app/vendor/composer/composer/composer.json
+++ b/app/vendor/composer/composer/composer.json
@@ -22,25 +22,32 @@
}
],
"require": {
- "php": "^5.3.2 || ^7.0 || ^8.0",
+ "php": "^7.2.5 || ^8.0",
"composer/ca-bundle": "^1.0",
"composer/metadata-minifier": "^1.0",
"composer/semver": "^3.0",
"composer/spdx-licenses": "^1.2",
- "composer/xdebug-handler": "^2.0",
+ "composer/xdebug-handler": "^2.0.2 || ^3.0.3",
"justinrainbow/json-schema": "^5.2.11",
- "psr/log": "^1.0 || ^2.0",
+ "psr/log": "^1.0 || ^2.0 || ^3.0",
"seld/jsonlint": "^1.4",
- "seld/phar-utils": "^1.0",
- "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",
- "react/promise": "^1.2 || ^2.7"
+ "seld/phar-utils": "^1.2",
+ "symfony/console": "^5.4.1 || ^6.0",
+ "symfony/filesystem": "^5.4 || ^6.0",
+ "symfony/finder": "^5.4 || ^6.0",
+ "symfony/process": "^5.4 || ^6.0",
+ "react/promise": "^2.8",
+ "composer/pcre": "^2 || ^3",
+ "symfony/polyfill-php73": "^1.24",
+ "symfony/polyfill-php80": "^1.24"
},
"require-dev": {
- "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0",
- "phpspec/prophecy": "^1.10"
+ "symfony/phpunit-bridge": "^6.0",
+ "phpstan/phpstan": "^1.4.1",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpstan/phpstan-deprecation-rules": "^1",
+ "phpstan/phpstan-strict-rules": "^1",
+ "phpstan/phpstan-symfony": "^1.1"
},
"suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -49,13 +56,13 @@
},
"config": {
"platform": {
- "php": "5.3.9"
+ "php": "7.2.5"
},
"platform-check": false
},
"extra": {
"branch-alias": {
- "dev-main": "2.1-dev"
+ "dev-main": "2.3-dev"
}
},
"autoload": {
@@ -65,33 +72,21 @@
},
"autoload-dev": {
"psr-4": {
- "Composer\\Test\\": "tests/Composer/Test",
- "Composer\\PHPStanRules\\": "phpstan/Rules/src",
- "Composer\\PHPStanRulesTests\\": "phpstan/Rules/tests"
- },
- "classmap": [
- "phpstan/Rules/tests/data"
- ]
+ "Composer\\Test\\": "tests/Composer/Test"
+ }
},
"bin": [
"bin/composer"
],
"scripts": {
"compile": "@php -dphar.readonly=0 bin/compile",
- "test": "simple-phpunit",
- "phpstan-setup": [
- "@composer config platform --unset",
- "@php composer.phar update",
- "@composer require --dev phpstan/phpstan:^0.12.93 phpstan/phpstan-phpunit:^0.12.17 phpunit/phpunit:^7.5.20 --with-all-dependencies",
- "git checkout composer.json composer.lock"
- ],
+ "test": "@php simple-phpunit",
"phpstan": "@php vendor/bin/phpstan analyse --configuration=phpstan/config.neon"
},
"scripts-descriptions": {
"compile": "Compile composer.phar",
"test": "Run all tests",
- "phpstan-setup": "Prepare environment to run PHPStan locally (must be run with PHP7.4)",
- "phpstan": "Runs PHPStan (after phpstan-setup was executed, must be run with PHP7.4)"
+ "phpstan": "Runs PHPStan"
},
"support": {
"issues": "https://github.com/composer/composer/issues",
diff --git a/app/vendor/composer/composer/composer.lock b/app/vendor/composer/composer/composer.lock
index e628c1a23..c652dca6c 100644
--- a/app/vendor/composer/composer/composer.lock
+++ b/app/vendor/composer/composer/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": "d3dfd8964a34240eba83383a25e2f1fb",
+ "content-hash": "3a7c7da73f59287030b9704930778e2b",
"packages": [
{
"name": "composer/ca-bundle",
@@ -151,25 +151,96 @@
],
"time": "2021-04-07T13:37:33+00:00"
},
+ {
+ "name": "composer/pcre",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/pcre.git",
+ "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/c8e9d27cfc5ed22643c19c160455b473ffd8aabe",
+ "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.3",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "keywords": [
+ "PCRE",
+ "preg",
+ "regex",
+ "regular expression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/pcre/issues",
+ "source": "https://github.com/composer/pcre/tree/2.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-02-25T20:05:29+00:00"
+ },
{
"name": "composer/semver",
- "version": "3.2.6",
+ "version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
- "reference": "83e511e247de329283478496f7a1e114c9517506"
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506",
- "reference": "83e511e247de329283478496f7a1e114c9517506",
+ "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpstan/phpstan": "^0.12.54",
+ "phpstan/phpstan": "^1.4",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
@@ -214,7 +285,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
- "source": "https://github.com/composer/semver/tree/3.2.6"
+ "source": "https://github.com/composer/semver/tree/3.3.2"
},
"funding": [
{
@@ -230,27 +301,28 @@
"type": "tidelift"
}
],
- "time": "2021-10-25T11:34:17+00:00"
+ "time": "2022-04-01T19:23:25+00:00"
},
{
"name": "composer/spdx-licenses",
- "version": "1.5.5",
+ "version": "1.5.6",
"source": {
"type": "git",
"url": "https://github.com/composer/spdx-licenses.git",
- "reference": "de30328a7af8680efdc03e396aad24befd513200"
+ "reference": "a30d487169d799745ca7280bc90fdfa693536901"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200",
- "reference": "de30328a7af8680efdc03e396aad24befd513200",
+ "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/a30d487169d799745ca7280bc90fdfa693536901",
+ "reference": "a30d487169d799745ca7280bc90fdfa693536901",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7"
+ "phpstan/phpstan": "^0.12.55",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
@@ -293,7 +365,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/spdx-licenses/issues",
- "source": "https://github.com/composer/spdx-licenses/tree/1.5.5"
+ "source": "https://github.com/composer/spdx-licenses/tree/1.5.6"
},
"funding": [
{
@@ -309,29 +381,31 @@
"type": "tidelift"
}
],
- "time": "2020-12-03T16:04:16+00:00"
+ "time": "2021-11-18T10:14:14+00:00"
},
{
"name": "composer/xdebug-handler",
- "version": "2.0.2",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
- "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
+ "reference": "ced299686f41dce890debac69273b47ffe98a40c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
- "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c",
+ "reference": "ced299686f41dce890debac69273b47ffe98a40c",
"shasum": ""
},
"require": {
- "php": "^5.3.2 || ^7.0 || ^8.0",
+ "composer/pcre": "^1 || ^2 || ^3",
+ "php": "^7.2.5 || ^8.0",
"psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
- "phpstan/phpstan": "^0.12.55",
- "symfony/phpunit-bridge": "^4.2 || ^5"
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^6.0"
},
"type": "library",
"autoload": {
@@ -357,7 +431,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
- "source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
+ "source": "https://github.com/composer/xdebug-handler/tree/3.0.3"
},
"funding": [
{
@@ -373,7 +447,7 @@
"type": "tidelift"
}
],
- "time": "2021-07-31T17:03:58+00:00"
+ "time": "2022-02-25T21:32:43+00:00"
},
{
"name": "justinrainbow/json-schema",
@@ -445,6 +519,54 @@
},
"time": "2021-07-22T09:24:00+00:00"
},
+ {
+ "name": "psr/container",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
+ "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/1.1.1"
+ },
+ "time": "2021-03-05T17:36:06+00:00"
+ },
{
"name": "psr/log",
"version": "1.1.4",
@@ -497,34 +619,32 @@
},
{
"name": "react/promise",
- "version": "v1.2.1",
+ "version": "v2.9.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
- "reference": "eefff597e67ff66b719f8171480add3c91474a1e"
+ "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/reactphp/promise/zipball/eefff597e67ff66b719f8171480add3c91474a1e",
- "reference": "eefff597e67ff66b719f8171480add3c91474a1e",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910",
+ "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.4.0"
},
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
+ "require-dev": {
+ "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36"
},
+ "type": "library",
"autoload": {
- "psr-0": {
- "React\\Promise": "src/"
- },
"files": [
- "src/React/Promise/functions_include.php"
- ]
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "React\\Promise\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -533,35 +653,66 @@
"authors": [
{
"name": "Jan Sorgalla",
- "email": "jsorgalla@gmail.com"
+ "email": "jsorgalla@gmail.com",
+ "homepage": "https://sorgalla.com/"
+ },
+ {
+ "name": "Christian Lück",
+ "email": "christian@clue.engineering",
+ "homepage": "https://clue.engineering/"
+ },
+ {
+ "name": "Cees-Jan Kiewiet",
+ "email": "reactphp@ceesjankiewiet.nl",
+ "homepage": "https://wyrihaximus.net/"
+ },
+ {
+ "name": "Chris Boden",
+ "email": "cboden@gmail.com",
+ "homepage": "https://cboden.dev/"
}
],
"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/1.0"
+ "source": "https://github.com/reactphp/promise/tree/v2.9.0"
},
- "time": "2016-03-07T13:46:50+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/WyriHaximus",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/clue",
+ "type": "github"
+ }
+ ],
+ "time": "2022-02-11T10:27:51+00:00"
},
{
"name": "seld/jsonlint",
- "version": "1.8.3",
+ "version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/jsonlint.git",
- "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57"
+ "reference": "4211420d25eba80712bff236a98960ef68b866b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57",
- "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57",
+ "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7",
+ "reference": "4211420d25eba80712bff236a98960ef68b866b7",
"shasum": ""
},
"require": {
"php": "^5.3 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "phpstan/phpstan": "^1.5",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13"
},
"bin": [
"bin/jsonlint"
@@ -592,7 +743,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/jsonlint/issues",
- "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3"
+ "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0"
},
"funding": [
{
@@ -604,20 +755,20 @@
"type": "tidelift"
}
],
- "time": "2020-11-11T09:19:24+00:00"
+ "time": "2022-04-01T13:37:23+00:00"
},
{
"name": "seld/phar-utils",
- "version": "1.1.2",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/phar-utils.git",
- "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0"
+ "reference": "9f3452c93ff423469c0d56450431562ca423dcee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0",
- "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0",
+ "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9f3452c93ff423469c0d56450431562ca423dcee",
+ "reference": "9f3452c93ff423469c0d56450431562ca423dcee",
"shasum": ""
},
"require": {
@@ -650,45 +801,60 @@
],
"support": {
"issues": "https://github.com/Seldaek/phar-utils/issues",
- "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2"
+ "source": "https://github.com/Seldaek/phar-utils/tree/1.2.0"
},
- "time": "2021-08-19T21:01:38+00:00"
+ "time": "2021-12-10T11:20:11+00:00"
},
{
"name": "symfony/console",
- "version": "v2.8.52",
+ "version": "v5.4.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12"
+ "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12",
- "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12",
+ "url": "https://api.github.com/repos/symfony/console/zipball/d8111acc99876953f52fe16d4c50eb60940d49ad",
+ "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad",
"shasum": ""
},
"require": {
- "php": ">=5.3.9",
- "symfony/debug": "^2.7.2|~3.0.0",
- "symfony/polyfill-mbstring": "~1.0"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.9",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/string": "^5.1|^6.0"
+ },
+ "conflict": {
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
+ "symfony/event-dispatcher": "<4.4",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<4.4"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
- "psr/log": "~1.0",
- "symfony/event-dispatcher": "~2.1|~3.0.0",
- "symfony/process": "~2.1|~3.0.0"
+ "psr/log": "^1|^2",
+ "symfony/config": "^4.4|^5.0|^6.0",
+ "symfony/dependency-injection": "^4.4|^5.0|^6.0",
+ "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
+ "symfony/lock": "^4.4|^5.0|^6.0",
+ "symfony/process": "^4.4|^5.0|^6.0",
+ "symfony/var-dumper": "^4.4|^5.0|^6.0"
},
"suggest": {
- "psr/log-implementation": "For using the console logger",
+ "psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
+ "symfony/lock": "",
"symfony/process": ""
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.8-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
@@ -711,50 +877,63 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Console Component",
+ "description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
+ "keywords": [
+ "cli",
+ "command line",
+ "console",
+ "terminal"
+ ],
"support": {
- "source": "https://github.com/symfony/console/tree/v2.8.52"
+ "source": "https://github.com/symfony/console/tree/v5.4.5"
},
- "time": "2018-11-20T15:55:20+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": "2022-02-24T12:45:35+00:00"
},
{
- "name": "symfony/debug",
- "version": "v2.8.52",
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.5.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/debug.git",
- "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0"
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/74251c8d50dd3be7c4ce0c7b862497cdc641a5d0",
- "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
+ "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": ""
},
"require": {
- "php": ">=5.3.9",
- "psr/log": "~1.0"
- },
- "conflict": {
- "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
- },
- "require-dev": {
- "symfony/class-loader": "~2.2|~3.0.0",
- "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.8-dev"
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Component\\Debug\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
+ "files": [
+ "function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -763,45 +942,56 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Debug Component",
+ "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v2.8.50"
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0"
},
- "time": "2018-11-11T11:18:13+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-07-12T14:48:14+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v2.8.52",
+ "version": "v5.4.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080"
+ "reference": "d53a45039974952af7f7ebc461ccdd4295e29440"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/7ae46872dad09dffb7fe1e93a0937097339d0080",
- "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/d53a45039974952af7f7ebc461ccdd4295e29440",
+ "reference": "d53a45039974952af7f7ebc461ccdd4295e29440",
"shasum": ""
},
"require": {
- "php": ">=5.3.9",
- "symfony/polyfill-ctype": "~1.8"
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.8",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.8-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
@@ -824,36 +1014,47 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Filesystem Component",
+ "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v2.8.52"
+ "source": "https://github.com/symfony/filesystem/tree/v5.4.6"
},
- "time": "2018-11-11T11:18:13+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": "2022-03-02T12:42:23+00:00"
},
{
"name": "symfony/finder",
- "version": "v2.8.52",
+ "version": "v5.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "1444eac52273e345d9b95129bf914639305a9ba4"
+ "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/1444eac52273e345d9b95129bf914639305a9ba4",
- "reference": "1444eac52273e345d9b95129bf914639305a9ba4",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d",
+ "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d",
"shasum": ""
},
"require": {
- "php": ">=5.3.9"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.8-dev"
- }
- },
"autoload": {
"psr-4": {
"Symfony\\Component\\Finder\\": ""
@@ -876,29 +1077,46 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Finder Component",
+ "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v2.8.50"
+ "source": "https://github.com/symfony/finder/tree/v5.4.3"
},
- "time": "2018-11-11T11:18:13+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": "2022-01-26T16:34:36+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.19.0",
+ "version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b"
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b",
- "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -906,7 +1124,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.19-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -914,12 +1132,12 @@
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- },
"files": [
"bootstrap.php"
- ]
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -944,7 +1162,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
},
"funding": [
{
@@ -960,32 +1178,32 @@
"type": "tidelift"
}
],
- "time": "2020-10-23T09:01:57+00:00"
+ "time": "2021-10-20T20:35:02+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.19.0",
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce"
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "81b86b50cf841a64252b439e738e97f4a34e2783"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce",
- "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783",
+ "reference": "81b86b50cf841a64252b439e738e97f4a34e2783",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
- "ext-mbstring": "For best performance"
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.19-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -993,12 +1211,12 @@
}
},
"autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
"files": [
"bootstrap.php"
- ]
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1014,17 +1232,18 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill for intl's grapheme_* functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
+ "grapheme",
+ "intl",
"polyfill",
"portable",
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0"
},
"funding": [
{
@@ -1040,37 +1259,47 @@
"type": "tidelift"
}
],
- "time": "2020-10-23T09:01:57+00:00"
+ "time": "2021-11-23T21:10:46+00:00"
},
{
- "name": "symfony/process",
- "version": "v2.8.52",
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/process.git",
- "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8"
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/c3591a09c78639822b0b290d44edb69bf9f05dc8",
- "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
+ "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
},
"require": {
- "php": ">=5.3.9"
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.8-dev"
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
- "Symfony\\Component\\Process\\": ""
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
- "exclude-from-classmap": [
- "/Tests/"
+ "classmap": [
+ "Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -1079,56 +1308,82 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Process Component",
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
"homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "intl",
+ "normalizer",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
"support": {
- "source": "https://github.com/symfony/process/tree/v2.8.50"
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0"
},
- "time": "2018-11-11T11:18:13+00:00"
- }
- ],
- "packages-dev": [
- {
- "name": "doctrine/instantiator",
- "version": "1.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-02-19T12:13:01+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.25.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
+ "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"shasum": ""
},
"require": {
- "php": ">=5.3,<8.0-DEV"
+ "php": ">=7.1"
},
- "require-dev": {
- "athletic/athletic": "~0.1.8",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "~2.0"
+ "provide": {
+ "ext-mbstring": "*"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ "Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1137,59 +1392,79 @@
],
"authors": [
{
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/doctrine/instantiator",
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
"keywords": [
- "constructor",
- "instantiate"
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
],
"support": {
- "issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/master"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
},
- "time": "2015-06-14T21:17:01+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-11-30T18:21:41+00:00"
},
{
- "name": "phpdocumentor/reflection-docblock",
- "version": "2.0.5",
+ "name": "symfony/polyfill-php73",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b"
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
- "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
+ "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "suggest": {
- "dflydev/markdown": "~1.0",
- "erusev/parsedown": "~1.0"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
- "psr-0": {
- "phpDocumentor": [
- "src/"
- ]
- }
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1197,51 +1472,78 @@
],
"authors": [
{
- "name": "Mike van Riel",
- "email": "mike.vanriel@naenius.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
"support": {
- "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
- "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/2.x"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0"
},
- "time": "2016-01-25T08:17:30+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-06-05T21:20:04+00:00"
},
{
- "name": "phpspec/prophecy",
- "version": "v1.10.3",
+ "name": "symfony/polyfill-php80",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/phpspec/prophecy.git",
- "reference": "451c3cd1418cf640de218914901e51b064abb093"
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
- "reference": "451c3cd1418cf640de218914901e51b064abb093",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
+ "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
- "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
- },
- "require-dev": {
- "phpspec/phpspec": "^2.5 || ^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.10.x-dev"
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
- "Prophecy\\": "src/Prophecy"
- }
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1249,314 +1551,596 @@
],
"authors": [
{
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
- "name": "Marcello Duarte",
- "email": "marcello.duarte@gmail.com"
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
- "description": "Highly opinionated mocking framework for PHP 5.3+",
- "homepage": "https://github.com/phpspec/prophecy",
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
"keywords": [
- "Double",
- "Dummy",
- "fake",
- "mock",
- "spy",
- "stub"
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
],
"support": {
- "issues": "https://github.com/phpspec/prophecy/issues",
- "source": "https://github.com/phpspec/prophecy/tree/v1.10.3"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
},
- "time": "2020-03-05T15:02:03+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": "2022-03-04T08:16:47+00:00"
},
{
- "name": "sebastian/comparator",
- "version": "1.2.4",
+ "name": "symfony/process",
+ "version": "v5.4.5",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
+ "url": "https://github.com/symfony/process.git",
+ "reference": "95440409896f90a5f85db07a32b517ecec17fa4c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
+ "url": "https://api.github.com/repos/symfony/process/zipball/95440409896f90a5f85db07a32b517ecec17fa4c",
+ "reference": "95440409896f90a5f85db07a32b517ecec17fa4c",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2 || ~2.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.4"
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.x-dev"
- }
- },
"autoload": {
- "classmap": [
- "src/"
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD-3-Clause"
+ "MIT"
],
"authors": [
{
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
},
{
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Executes commands in sub-processes",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/process/tree/v5.4.5"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
},
{
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
+ "url": "https://github.com/fabpot",
+ "type": "github"
},
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
}
],
- "description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
- "keywords": [
- "comparator",
- "compare",
- "equality"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/1.2"
- },
- "time": "2017-01-29T09:50:25+00:00"
+ "time": "2022-01-30T18:16:22+00:00"
},
{
- "name": "sebastian/diff",
- "version": "1.4.3",
+ "name": "symfony/service-contracts",
+ "version": "v2.5.0",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
+ "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": ">=7.2.5",
+ "psr/container": "^1.1",
+ "symfony/deprecation-contracts": "^2.1"
},
- "require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "conflict": {
+ "ext-psr": "<1.1|>=2"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
- "classmap": [
- "src/"
- ]
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD-3-Clause"
+ "MIT"
],
"authors": [
{
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
- "description": "Diff implementation",
- "homepage": "https://github.com/sebastianbergmann/diff",
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
"keywords": [
- "diff"
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
],
"support": {
- "issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/1.4"
+ "source": "https://github.com/symfony/service-contracts/tree/v2.5.0"
},
- "time": "2017-05-22T07:24:03+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-11-04T16:48:04+00:00"
},
{
- "name": "sebastian/exporter",
- "version": "2.0.0",
+ "name": "symfony/string",
+ "version": "v5.4.3",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
+ "url": "https://github.com/symfony/string.git",
+ "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+ "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10",
+ "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/recursion-context": "~2.0"
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "~1.15"
+ },
+ "conflict": {
+ "symfony/translation-contracts": ">=3.0"
},
"require-dev": {
- "ext-mbstring": "*",
- "phpunit/phpunit": "~4.4"
+ "symfony/error-handler": "^4.4|^5.0|^6.0",
+ "symfony/http-client": "^4.4|^5.0|^6.0",
+ "symfony/translation-contracts": "^1.1|^2",
+ "symfony/var-exporter": "^4.4|^5.0|^6.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
"autoload": {
- "classmap": [
- "src/"
+ "files": [
+ "Resources/functions.php"
+ ],
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD-3-Clause"
+ "MIT"
],
"authors": [
{
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/string/tree/v5.4.3"
+ },
+ "funding": [
{
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
},
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
+ "url": "https://github.com/fabpot",
+ "type": "github"
},
{
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
}
],
- "description": "Provides the functionality to export PHP variables for visualization",
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
- "keywords": [
- "export",
- "exporter"
+ "time": "2022-01-02T09:53:40+00:00"
+ }
+ ],
+ "packages-dev": [
+ {
+ "name": "phpstan/phpstan",
+ "version": "1.5.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan.git",
+ "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bbf68cae24f6dc023c607ea0f87da55dd9d55c2b",
+ "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2|^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan-shim": "*"
+ },
+ "bin": [
+ "phpstan",
+ "phpstan.phar"
],
+ "type": "library",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan - PHP Static Analysis Tool",
"support": {
- "issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/master"
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "source": "https://github.com/phpstan/phpstan/tree/1.5.4"
},
- "time": "2016-11-19T08:54:04+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/ondrejmirtes",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/phpstan",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/phpstan",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-04-03T12:39:00+00:00"
},
{
- "name": "sebastian/recursion-context",
- "version": "2.0.0",
+ "name": "phpstan/phpstan-deprecation-rules",
+ "version": "1.0.0",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
+ "url": "https://github.com/phpstan/phpstan-deprecation-rules.git",
+ "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+ "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682",
+ "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.1 || ^8.0",
+ "phpstan/phpstan": "^1.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^9.5"
},
- "type": "library",
+ "type": "phpstan-extension",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "1.0-dev"
+ },
+ "phpstan": {
+ "includes": [
+ "rules.neon"
+ ]
}
},
"autoload": {
- "classmap": [
- "src/"
- ]
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD-3-Clause"
+ "MIT"
],
- "authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
+ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues",
+ "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.0.0"
+ },
+ "time": "2021-09-23T11:02:21+00:00"
+ },
+ {
+ "name": "phpstan/phpstan-phpunit",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-phpunit.git",
+ "reference": "09133ce914f1388a8bb8c7f8573aaa3723cff52a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/09133ce914f1388a8bb8c7f8573aaa3723cff52a",
+ "reference": "09133ce914f1388a8bb8c7f8573aaa3723cff52a",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpstan": "^1.5.0"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<7.0"
+ },
+ "require-dev": {
+ "nikic/php-parser": "^4.13.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-strict-rules": "^1.0",
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon",
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPUnit extensions and rules for PHPStan",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-phpunit/issues",
+ "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.1.0"
+ },
+ "time": "2022-03-28T09:20:49+00:00"
+ },
+ {
+ "name": "phpstan/phpstan-strict-rules",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-strict-rules.git",
+ "reference": "e12d55f74a8cca18c6e684c6450767e055ba7717"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/e12d55f74a8cca18c6e684c6450767e055ba7717",
+ "reference": "e12d55f74a8cca18c6e684c6450767e055ba7717",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0",
+ "phpstan/phpstan": "^1.2.0"
+ },
+ "require-dev": {
+ "nikic/php-parser": "^4.13.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
},
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
+ "phpstan": {
+ "includes": [
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Extra strict and opinionated rules for PHPStan",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
+ "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.1.0"
+ },
+ "time": "2021-11-18T09:30:29+00:00"
+ },
+ {
+ "name": "phpstan/phpstan-symfony",
+ "version": "1.1.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-symfony.git",
+ "reference": "4bdffcf1033b6c60662a28419d0192e0dda5684f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/4bdffcf1033b6c60662a28419d0192e0dda5684f",
+ "reference": "4bdffcf1033b6c60662a28419d0192e0dda5684f",
+ "shasum": ""
+ },
+ "require": {
+ "ext-simplexml": "*",
+ "php": "^7.1 || ^8.0",
+ "phpstan/phpstan": "^1.4"
+ },
+ "conflict": {
+ "symfony/framework-bundle": "<3.0"
+ },
+ "require-dev": {
+ "nikic/php-parser": "^4.13.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.0",
+ "phpunit/phpunit": "^9.5",
+ "psr/container": "1.0 || 1.1.1",
+ "symfony/config": "^4.2 || ^5.0",
+ "symfony/console": "^4.0 || ^5.0",
+ "symfony/dependency-injection": "^4.0 || ^5.0",
+ "symfony/form": "^4.0 || ^5.0",
+ "symfony/framework-bundle": "^4.4 || ^5.0",
+ "symfony/http-foundation": "^5.1",
+ "symfony/messenger": "^4.2 || ^5.0",
+ "symfony/polyfill-php80": "^1.24",
+ "symfony/serializer": "^4.0 || ^5.0"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
},
+ "phpstan": {
+ "includes": [
+ "extension.neon",
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
{
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
+ "name": "Lukáš Unger",
+ "email": "looky.msc@gmail.com",
+ "homepage": "https://lookyman.net"
}
],
- "description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "description": "Symfony Framework extensions and rules for PHPStan",
"support": {
- "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/master"
+ "issues": "https://github.com/phpstan/phpstan-symfony/issues",
+ "source": "https://github.com/phpstan/phpstan-symfony/tree/1.1.8"
},
- "time": "2016-11-19T07:33:16+00:00"
+ "time": "2022-03-24T07:56:03+00:00"
},
{
"name": "symfony/phpunit-bridge",
- "version": "v4.2.12",
+ "version": "v6.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/phpunit-bridge.git",
- "reference": "80f9ffa6afcc27c7b00e8b8446b1d5d48d94bae7"
+ "reference": "81f5e8e453433e0182a49ca45d4734cb3a2f818f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/80f9ffa6afcc27c7b00e8b8446b1d5d48d94bae7",
- "reference": "80f9ffa6afcc27c7b00e8b8446b1d5d48d94bae7",
+ "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/81f5e8e453433e0182a49ca45d4734cb3a2f818f",
+ "reference": "81f5e8e453433e0182a49ca45d4734cb3a2f818f",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1.3"
},
"conflict": {
- "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
+ "phpunit/phpunit": "<7.5|9.1.2"
+ },
+ "require-dev": {
+ "symfony/deprecation-contracts": "^2.1|^3.0",
+ "symfony/error-handler": "^5.4|^6.0"
},
"suggest": {
- "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
+ "symfony/error-handler": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"bin": [
"bin/simple-phpunit"
],
"type": "symfony-bridge",
"extra": {
- "branch-alias": {
- "dev-master": "4.2-dev"
- },
"thanks": {
"name": "phpunit/phpunit",
"url": "https://github.com/sebastianbergmann/phpunit"
@@ -1587,12 +2171,26 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony PHPUnit Bridge",
+ "description": "Provides utilities for PHPUnit, especially user deprecation notices management",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/phpunit-bridge/tree/4.2"
+ "source": "https://github.com/symfony/phpunit-bridge/tree/v6.0.3"
},
- "time": "2019-07-05T06:33:37+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": "2022-01-26T17:23:29+00:00"
}
],
"aliases": [],
@@ -1601,11 +2199,11 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": "^5.3.2 || ^7.0 || ^8.0"
+ "php": "^7.2.5 || ^8.0"
},
"platform-dev": [],
"platform-overrides": {
- "php": "5.3.9"
+ "php": "7.2.5"
},
- "plugin-api-version": "2.1.0"
+ "plugin-api-version": "2.3.0"
}
diff --git a/app/vendor/composer/composer/doc/00-intro.md b/app/vendor/composer/composer/doc/00-intro.md
index acd5ee3e6..96df2e21f 100644
--- a/app/vendor/composer/composer/doc/00-intro.md
+++ b/app/vendor/composer/composer/doc/00-intro.md
@@ -33,9 +33,11 @@ dependencies.
## System Requirements
-Composer requires PHP 5.3.2+ to run. A few sensitive php settings and compile
-flags are also required, but when using the installer you will be warned about
-any incompatibilities.
+Composer in its latest version requires PHP 7.2.5 to run. A long-term-support
+version (2.2.x) still offers support for PHP 5.3.2+ in case you are stuck with
+a legacy PHP version. A few sensitive php settings and compile flags are also
+required, but when using the installer you will be warned about any
+incompatibilities.
To install packages from sources instead of plain zip archives, you will need
git, svn, fossil or hg depending on how the package is version-controlled.
@@ -53,7 +55,7 @@ or review it on [GitHub](https://github.com/composer/getcomposer.org/blob/main/w
if you wish to know more about the inner workings of the installer. The source
is plain PHP.
-There are in short, two ways to install Composer. Locally as part of your
+There are, in short, two ways to install Composer. Locally as part of your
project, or globally as a system wide executable.
#### Locally
@@ -99,7 +101,7 @@ you can use `~/.local/bin` instead which is available by default on some
Linux distributions.
> **Note:** If the above fails due to permissions, you may need to run it again
-> with sudo.
+> with `sudo`.
> **Note:** On some versions of macOS the `/usr` directory does not exist by
> default. If you receive the error "/usr/local/bin/composer: No such file or
diff --git a/app/vendor/composer/composer/doc/01-basic-usage.md b/app/vendor/composer/composer/doc/01-basic-usage.md
index 4ccc50965..671e46dd6 100644
--- a/app/vendor/composer/composer/doc/01-basic-usage.md
+++ b/app/vendor/composer/composer/doc/01-basic-usage.md
@@ -41,8 +41,8 @@ Composer uses this information to search for the right set of files in package
key, or in [Packagist.org](https://packagist.org), the default package repository.
In the above example, since no other repository has been registered in the
`composer.json` file, it is assumed that the `monolog/monolog` package is registered
-on Packagist.org. (See more about Packagist [below](#packagist), or read more
-about repositories [here](05-repositories.md)).
+on Packagist.org. (Read more [about Packagist](#packagist), and
+[about repositories](05-repositories.md)).
### Package names
@@ -51,7 +51,7 @@ will be identical - the vendor name only exists to prevent naming clashes. For
example, it would allow two different people to create a library named `json`.
One might be named `igorw/json` while the other might be `seldaek/json`.
-Read more about publishing packages and package naming [here](02-libraries.md).
+Read more about [publishing packages and package naming](02-libraries.md).
(Note that you can also specify "platform packages" as dependencies, allowing
you to require certain versions of server software. See
[platform packages](#platform-packages) below.)
@@ -243,7 +243,7 @@ Composer will register a [PSR-4](https://www.php-fig.org/psr/psr-4/) autoloader
for the `Acme` namespace.
You define a mapping from namespaces to directories. The `src` directory would
-be in your project root, on the same level as `vendor` directory is. An example
+be in your project root, on the same level as the `vendor` directory. An example
filename would be `src/Foo.php` containing an `Acme\Foo` class.
After adding the [`autoload`](04-schema.md#autoload) field, you have to re-run
diff --git a/app/vendor/composer/composer/doc/03-cli.md b/app/vendor/composer/composer/doc/03-cli.md
index 6722fa8b3..b76891b6f 100644
--- a/app/vendor/composer/composer/doc/03-cli.md
+++ b/app/vendor/composer/composer/doc/03-cli.md
@@ -22,6 +22,7 @@ The following options are available with every command:
* **--quiet (-q):** Do not output any message.
* **--no-interaction (-n):** Do not ask any interactive question.
* **--no-plugins:** Disables plugins.
+* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--no-cache:** Disables the use of the cache directory. Same as setting the COMPOSER_CACHE_DIR
env var to /dev/null (or NUL on Windows).
* **--working-dir (-d):** If specified, use the given directory as working directory.
@@ -100,7 +101,6 @@ resolution.
* **--no-dev:** Skip installing packages listed in `require-dev`. The autoloader
generation skips the `autoload-dev` rules.
* **--no-autoloader:** Skips autoloader generation.
-* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--no-progress:** Removes the progress display that can mess with some
terminals or scripts which don't handle backspace characters.
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to get a faster
@@ -117,7 +117,10 @@ resolution.
See also the [`platform`](06-config.md#platform) config option.
* **--ignore-platform-req:** ignore a specific platform requirement(`php`,
`hhvm`, `lib-*` and `ext-*`) and force the installation even if the local machine
- does not fulfill it.
+ does not fulfill it. Multiple requirements can be ignored via wildcard. Appending
+ a `+` makes it only ignore the upper-bound of the requirements. For example, if a package
+ requires `php: ^7`, then the option `--ignore-platform-req=php+` would allow installing on PHP 8,
+ but installation on PHP 5.6 would still fail.
## update / u
@@ -153,17 +156,17 @@ composer.json you can use `--with` and provide a custom version constraint:
php composer.phar update --with vendor/package:2.0.1
```
-The custom constraint has to be a subset of the existing constraint you have,
-and this feature is only available for your root package dependencies.
-
-If you only want to update the package(s) for which you provide custom constraints
-using `--with`, you can skip `--with` and just use constraints with the partial
-update syntax:
+Note that with the above all packages will be updated. If you only want to
+update the package(s) for which you provide custom constraints using `--with`,
+you can skip `--with` and instead use constraints with the partial update syntax:
```sh
php composer.phar update vendor/package:2.0.1 vendor/package2:3.0.*
```
+The custom constraint has to be a subset of the existing constraint you have,
+and this feature is only available for your root package dependencies.
+
### Options
@@ -183,7 +186,6 @@ php composer.phar update vendor/package:2.0.1 vendor/package2:3.0.*
lock file being out of date.
* **--with:** Temporary version constraint to add, e.g. foo/bar:1.0.0 or foo/bar=1.0.0
* **--no-autoloader:** Skips autoloader generation.
-* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--no-progress:** Removes the progress display that can mess with some
terminals or scripts which don't handle backspace characters.
* **--with-dependencies (-w):** Update also dependencies of packages in the argument list, except those which are root requirements.
@@ -202,7 +204,10 @@ php composer.phar update vendor/package:2.0.1 vendor/package2:3.0.*
See also the [`platform`](06-config.md#platform) config option.
* **--ignore-platform-req:** ignore a specific platform requirement(`php`,
`hhvm`, `lib-*` and `ext-*`) and force the installation even if the local machine
- does not fulfill it.
+ does not fulfill it. Multiple requirements can be ignored via wildcard. Appending
+ a `+` makes it only ignore the upper-bound of the requirements. For example, if a package
+ requires `php: ^7`, then the option `--ignore-platform-req=php+` would allow installing on PHP 8,
+ but installation on PHP 5.6 would still fail.
* **--prefer-stable:** Prefer stable versions of dependencies.
* **--prefer-lowest:** Prefer lowest versions of dependencies. Useful for testing minimal
versions of requirements, generally used with `--prefer-stable`.
@@ -248,7 +253,6 @@ If you do not specify a package, Composer will prompt you to search for a packag
terminals or scripts which don't handle backspace characters.
* **--no-update:** Disables the automatic update of the dependencies (implies --no-install).
* **--no-install:** Does not run the install step after updating the composer.lock file.
-* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--update-no-dev:** Run the dependency update with the `--no-dev` option.
* **--update-with-dependencies (-w):** Also update dependencies of the newly required packages, except those that are root requirements.
* **--update-with-all-dependencies (-W):** Also update dependencies of the newly required packages, including those that are root requirements.
@@ -258,7 +262,7 @@ If you do not specify a package, Composer will prompt you to search for a packag
See also the [`platform`](06-config.md#platform) config option.
* **--ignore-platform-req:** ignore a specific platform requirement(`php`,
`hhvm`, `lib-*` and `ext-*`) and force the installation even if the local machine
- does not fulfill it.
+ does not fulfill it. Multiple requirements can be ignored via wildcard.
* **--prefer-stable:** Prefer stable versions of dependencies.
* **--prefer-lowest:** Prefer lowest versions of dependencies. Useful for testing minimal
versions of requirements, generally used with `--prefer-stable`.
@@ -291,7 +295,6 @@ uninstalled.
terminals or scripts which don't handle backspace characters.
* **--no-update:** Disables the automatic update of the dependencies (implies --no-install).
* **--no-install:** Does not run the install step after updating the composer.lock file.
-* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--update-no-dev:** Run the dependency update with the --no-dev option.
* **--update-with-dependencies (-w):** Also update dependencies of the removed packages.
(Deprecated, is now default behavior)
@@ -303,7 +306,7 @@ uninstalled.
See also the [`platform`](06-config.md#platform) config option.
* **--ignore-platform-req:** ignore a specific platform requirement(`php`,
`hhvm`, `lib-*` and `ext-*`) and force the installation even if the local machine
- does not fulfill it.
+ does not fulfill it. Multiple requirements can be ignored via wildcard.
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to
get a faster autoloader. This is recommended especially for production, but
can take a bit of time to run so it is currently not done by default.
@@ -342,7 +345,6 @@ php composer.phar reinstall "acme/*"
versions of packages, use `--prefer-install=auto`. See also [config.preferred-install](06-config.md#preferred-install).
Passing this flag will override the config value.
* **--no-autoloader:** Skips autoloader generation.
-* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--no-progress:** Removes the progress display that can mess with some
terminals or scripts which don't handle backspace characters.
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to get a faster
@@ -358,7 +360,7 @@ php composer.phar reinstall "acme/*"
reinstall command.
* **--ignore-platform-req:** ignore a specific platform requirement. This only
has an effect in the context of the autoloader generation for the
- reinstall command.
+ reinstall command. Multiple requirements can be ignored via wildcard.
## check-platform-reqs
@@ -414,7 +416,9 @@ You can also search for more than one term by passing multiple arguments.
### Options
-* **--only-name (-N):** Search only in name.
+* **--only-name (-N):** Search only in package names.
+* **--only-vendor (-O):** Search only for vendor / organization names, returns only "vendor"
+ as a result.
* **--type (-t):** Search for a specific package type.
* **--format (-f):** Lets you pick between text (default) or json output format.
Note that in the json, only the name and description keys are guaranteed to be
@@ -485,6 +489,13 @@ php composer.phar show monolog/monolog 1.0.2
* **--direct (-D):** Restricts the list of packages to your direct dependencies.
* **--strict:** Return a non-zero exit code when there are outdated packages.
* **--format (-f):** Lets you pick between text (default) or json output format.
+* **--ignore-platform-reqs:** ignore all platform requirements (`php`, `hhvm`,
+ `lib-*` and `ext-*`) and force the installation even if the local machine does
+ not fulfill these. Use with the --outdated option.
+* **--ignore-platform-req:** ignore a specific platform requirement(`php`,
+ `hhvm`, `lib-*` and `ext-*`) and force the installation even if the local machine
+ does not fulfill it. Multiple requirements can be ignored via wildcard. Use with
+ the --outdated option.
## outdated
@@ -508,6 +519,12 @@ The color coding is as such:
* **--format (-f):** Lets you pick between text (default) or json output format.
* **--no-dev:** Do not show outdated dev dependencies.
* **--locked:** Shows updates for packages from the lock file, regardless of what is currently in vendor dir.
+* **--ignore-platform-reqs:** ignore all platform requirements (`php`, `hhvm`,
+ `lib-*` and `ext-*`) and force the installation even if the local machine does
+ not fulfill these.
+* **--ignore-platform-req:** ignore a specific platform requirement(`php`,
+ `hhvm`, `lib-*` and `ext-*`) and force the installation even if the local machine
+ does not fulfill it. Multiple requirements can be ignored via wildcard.
## browse / home
@@ -521,7 +538,7 @@ in your browser.
## suggests
-Lists all packages suggested by currently installed set of packages. You can
+Lists all packages suggested by the currently installed set of packages. You can
optionally pass one or multiple package names in the format of `vendor/package`
to limit output to suggestions made by those packages only.
@@ -709,7 +726,7 @@ php composer.phar config --list
`setting-key` is a configuration option name and `setting-value1` is a
configuration value. For settings that can take an array of values (like
-`github-protocols`), more than one setting-value arguments are allowed.
+`github-protocols`), multiple setting-value arguments are allowed.
You can also edit the values of the following properties:
@@ -736,6 +753,8 @@ See the [Config](06-config.md) chapter for valid configuration options.
instead of relative.
* **--json:** JSON decode the setting value, to be used with `extra.*` keys.
* **--merge:** Merge the setting value with the current value, to be used with `extra.*` keys in combination with `--json`.
+* **--append:** When adding a repository, append it (lowest priority) to the existing ones instead of prepending it (highest priority).
+* **--source:** Display where the config value is loaded from.
### Modifying Repositories
@@ -786,7 +805,7 @@ There are several applications for this:
To create a new project using Composer you can use the `create-project` command.
Pass it a package name, and the directory to create the project in. You can also
-provide a version as third argument, otherwise the latest version is used.
+provide a version as a third argument, otherwise the latest version is used.
If the directory does not currently exist, it will be created during installation.
@@ -816,7 +835,7 @@ By default the command checks for the packages on packagist.org.
JSON string which similar to what the [repositories](04-schema.md#repositories)
key accepts. You can use this multiple times to configure multiple repositories.
* **--add-repository:** Add the custom repository in the composer.json. If a lock
- file is present it will be deleted and an update will be run instead of install.
+ file is present, it will be deleted and an update will be run instead of an install.
* **--dev:** Install packages listed in `require-dev`.
* **--no-dev:** Disables installation of require-dev packages.
* **--no-scripts:** Disables the execution of the scripts defined in the root
@@ -837,8 +856,8 @@ By default the command checks for the packages on packagist.org.
See also the [`platform`](06-config.md#platform) config option.
* **--ignore-platform-req:** ignore a specific platform requirement(`php`,
`hhvm`, `lib-*` and `ext-*`) and force the installation even if the local machine
- does not fulfill it.
-* **--ask:** Ask user to provide target directory for new project.
+ does not fulfill it. Multiple requirements can be ignored via wildcard.
+* **--ask:** Ask the user to provide a target directory for the new project.
## dump-autoload (dumpautoload)
@@ -854,7 +873,6 @@ using this option you can still use PSR-0/4 for convenience and classmaps for
performance.
### Options
-* **--no-scripts:** Skips the execution of all scripts defined in `composer.json` file.
* **--optimize (-o):** Convert PSR-0/4 autoloading to classmap to get a faster
autoloader. This is recommended especially for production, but can take
a bit of time to run, so it is currently not done by default.
@@ -872,6 +890,7 @@ performance.
See also the [`platform`](06-config.md#platform) config option.
* **--ignore-platform-req:** ignore a specific platform requirement (`php`, `hhvm`,
`lib-*` and `ext-*`) and skip the [platform check](07-runtime.md#platform-check) for it.
+ Multiple requirements can be ignored via wildcard.
## clear-cache / clearcache / cc
@@ -931,8 +950,8 @@ php composer.phar archive vendor/package 2.0.21 --format=zip
### Options
-* **--format (-f):** Format of the resulting archive: tar or zip (default:
- "tar")
+* **--format (-f):** Format of the resulting archive: tar, tar.gz, tar.bz2
+ or zip (default: "tar").
* **--dir:** Write the archive to this directory (default: ".")
* **--file:** Write the archive with the given file name.
@@ -973,7 +992,7 @@ The generated lock file will use the same name: `composer-other.lock` in this ex
If set to 1, this env disables the warning about running commands as root/super user.
It also disables automatic clearing of sudo sessions, so you should really only set this
-if you use Composer as super user at all times like in docker containers.
+if you use Composer as a super user at all times like in docker containers.
### COMPOSER_ALLOW_XDEBUG
@@ -997,8 +1016,11 @@ directory to something other than `vendor/bin`.
The `COMPOSER_CACHE_DIR` var allows you to change the Composer cache directory,
which is also configurable via the [`cache-dir`](06-config.md#cache-dir) option.
-By default, it points to `$COMPOSER_HOME/cache` on \*nix and macOS, and
-`C:\Users\\AppData\Local\Composer` (or `%LOCALAPPDATA%/Composer`) on Windows.
+By default, it points to `C:\Users\\AppData\Local\Composer` (or `%LOCALAPPDATA%/Composer`) on Windows.
+On \*nix systems that follow the [XDG Base
+Directory Specifications](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html),
+it points to `$XDG_CACHE_HOME/composer`. On other \*nix systems and on macOS, it points to
+`$COMPOSER_HOME/cache`.
### COMPOSER_CAFILE
@@ -1121,7 +1143,7 @@ from setting the request_fulluri option.
### COMPOSER_SELF_UPDATE_TARGET
-If set, makes the self-update command write the new Composer phar file into that path instead of overwriting itself. Useful for updating Composer on read-only filesystem.
+If set, makes the self-update command write the new Composer phar file into that path instead of overwriting itself. Useful for updating Composer on a read-only filesystem.
### no_proxy or NO_PROXY
@@ -1147,3 +1169,16 @@ If set to `1`, outputs information about events being dispatched, which can be
useful for plugin authors to identify what is firing when exactly.
← [Libraries](02-libraries.md) | [Schema](04-schema.md) →
+
+### COMPOSER_NO_DEV
+
+If set to `1`, it is the equivalent of passing the `--no-dev` argument to `install` or
+`update`. You can override this for a single command by setting `COMPOSER_NO_DEV=0`.
+
+### COMPOSER_IGNORE_PLATFORM_REQ or COMPOSER_IGNORE_PLATFORM_REQS
+
+If `COMPOSER_IGNORE_PLATFORM_REQS` set to `1`, it is the equivalent of passing the `--ignore-platform-reqs` argument.
+Otherwise, specifying a comma separated list in `COMPOSER_IGNORE_PLATFORM_REQ` will ignore those specific requirements.
+
+For example, if a development workstation will never run database queries, this can be used to ignore the requirement for the database extensions to be available.
+If you set `COMPOSER_IGNORE_PLATFORM_REQ=ext-oci8`, then composer will allow packages to be installed even if the `oci8` PHP extension is not enabled.
diff --git a/app/vendor/composer/composer/doc/04-schema.md b/app/vendor/composer/composer/doc/04-schema.md
index dbc02ff24..bfe70d9bf 100644
--- a/app/vendor/composer/composer/doc/04-schema.md
+++ b/app/vendor/composer/composer/doc/04-schema.md
@@ -34,7 +34,7 @@ separated by `/`. Examples:
* monolog/monolog
* igorw/event-source
-The name must be lowercased and consist of words separated by `-`, `.` or `_`.
+The name must be lowercase and consist of words separated by `-`, `.` or `_`.
The complete name should match `^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$`.
The `name` property is required for published packages (libraries).
@@ -171,7 +171,7 @@ An Example:
```
For a package, when there is a choice between licenses ("disjunctive license"),
-multiple can be specified as array.
+multiple can be specified as an array.
An Example for disjunctive licenses:
@@ -203,7 +203,7 @@ Each author object can have following properties:
* **name:** The author's name. Usually their real name.
* **email:** The author's email address.
-* **homepage:** An URL to the author's website.
+* **homepage:** URL to the author's website.
* **role:** The author's role in the project (e.g. developer or translator)
An example:
@@ -675,7 +675,7 @@ for more details on how to reduce this impact.
### autoload-dev ([root-only](04-schema.md#root-package))
-This section allows to define autoload rules for development purposes.
+This section allows defining autoload rules for development purposes.
Classes needed to run the test suite should not be included in the main autoload
rules to avoid polluting the autoloader in production and when other people use
@@ -884,8 +884,8 @@ Optional.
### bin
-A set of files that should be treated as binaries and symlinked into the `bin-dir`
-(from config).
+A set of files that should be treated as binaries and made available
+into the `bin-dir` (from config).
See [Vendor Binaries](articles/vendor-binaries.md) for more details.
@@ -941,9 +941,9 @@ It can be boolean or a package name/URL pointing to a recommended alternative.
Examples:
-Use `"abandoned": true` to indicates this package is abandoned.
-Use `"abandoned": "monolog/monolog"` to indicates this package is abandoned, and the
-recommended alternative is `monolog/monolog`.
+Use `"abandoned": true` to indicate this package is abandoned.
+Use `"abandoned": "monolog/monolog"` to indicate this package is abandoned, and that
+the recommended alternative is `monolog/monolog`.
Defaults to false.
@@ -962,7 +962,7 @@ version of the parent branch or at least master or something.
To handle non-numeric named branches as versions instead of searching for a parent branch
with a valid version or special branch name like master, you can set patterns for branch
-names, that should be handled as dev version branches.
+names that should be handled as dev version branches.
This is really helpful when you have dependencies using "self.version", so that not dev-master,
but the same branch is installed (in the example: latest-testing).
diff --git a/app/vendor/composer/composer/doc/05-repositories.md b/app/vendor/composer/composer/doc/05-repositories.md
index 2379165bb..a403fd9bf 100644
--- a/app/vendor/composer/composer/doc/05-repositories.md
+++ b/app/vendor/composer/composer/doc/05-repositories.md
@@ -46,7 +46,7 @@ add more repositories to your project by declaring them in `composer.json`.
Repositories are only available to the root package and the repositories
defined in your dependencies will not be loaded. Read the
-[FAQ entry](faqs/why-can't-composer-load-repositories-recursively.md) if you
+[FAQ entry](faqs/why-cant-composer-load-repositories-recursively.md) if you
want to learn why.
When resolving dependencies, packages are looked up from repositories from
@@ -197,7 +197,7 @@ Avoid redirects to alternative 404 pages.
If your repository only has a small number of packages, and you want to avoid
the 404-requests, you can also specify an `"available-packages"` key in
`packages.json` which should be an array with all the package names that your
-repository contain. Alternatively you can specify an
+repository contains. Alternatively you can specify an
`"available-package-patterns"` key which is an array of package name patterns
(with `*` matching any string, e.g. `vendor/*` would make Composer look up
every matching package name in this repository).
@@ -299,12 +299,33 @@ described [above](#packages).
These fields are optional. You probably don't need them for your own custom
repository.
-#### stream options
+#### cURL or stream options
-The `packages.json` file is loaded using a PHP stream. You can set extra
-options on that stream using the `options` parameter. You can set any valid
-PHP stream context option. See [Context options and
-parameters](https://php.net/manual/en/context.php) for more information.
+The repository is accessed either using cURL (Composer 2 with ext-curl enabled)
+or PHP streams. You can set extra options using the `options` parameter. For
+PHP streams, you can set any valid PHP stream context option. See [Context
+options and parameters](https://php.net/manual/en/context.php) for more
+information. When cURL is used, only a limited set of `http` and `ssl` options
+can be configured.
+
+```json
+{
+ "repositories": [
+ {
+ "type": "composer",
+ "url": "https://example.org",
+ "options": {
+ "http": {
+ "timeout": 60
+ }
+ }
+ }
+ ],
+ "require": {
+ "acme/package": "^1.0"
+ }
+}
+```
### VCS
@@ -321,8 +342,9 @@ project to use the patched version. If the library is on GitHub (this is the
case most of the time), you can fork it there and push your changes to
your fork. After that you update the project's `composer.json`. All you have
to do is add your fork as a repository and update the version constraint to
-point to your custom branch. In `composer.json`, you should prefix your custom
-branch name with `"dev-"`. For version constraint naming conventions see
+point to your custom branch. In `composer.json` only, you should prefix your
+custom branch name with `"dev-"` (without making it part of the actual branch
+name). For version constraint naming conventions see
[Libraries](02-libraries.md) for more information.
Example assuming you patched monolog to fix a bug in the `bugfix` branch:
@@ -362,7 +384,7 @@ For more information [see the aliases article](articles/aliases.md).
#### Using private repositories
Exactly the same solution allows you to work with your private repositories at
-GitHub and BitBucket:
+GitHub and Bitbucket:
```json
{
@@ -392,16 +414,16 @@ The following are supported:
To get packages from these systems you need to have their respective clients
installed. That can be inconvenient. And for this reason there is special
-support for GitHub and BitBucket that use the APIs provided by these sites, to
+support for GitHub and Bitbucket that use the APIs provided by these sites, to
fetch the packages without having to install the version control system. The
VCS repository provides `dist`s for them that fetch the packages as zips.
* **GitHub:** [github.com](https://github.com) (Git)
-* **BitBucket:** [bitbucket.org](https://bitbucket.org) (Git and Mercurial)
+* **Bitbucket:** [bitbucket.org](https://bitbucket.org) (Git)
The VCS driver to be used is detected automatically based on the URL. However,
-should you need to specify one for whatever reason, you can use `git-bitbucket`,
-`hg-bitbucket`, `github`, `gitlab`, `perforce`, `fossil`, `git`, `svn` or `hg`
+should you need to specify one for whatever reason, you can use `bitbucket`,
+`github`, `gitlab`, `perforce`, `fossil`, `git`, `svn` or `hg`
as the repository type instead of `vcs`.
If you set the `no-api` key to `true` on a github repository it will clone the
@@ -412,10 +434,11 @@ attempt to use github's zip files.
Please note:
* **To let Composer choose which driver to use** the repository type needs to be defined as "vcs"
* **If you already used a private repository**, this means Composer should have cloned it in cache. If you want to install the same package with drivers, remember to launch the command `composer clearcache` followed by the command `composer update` to update Composer cache and install the package from dist.
+* VCS driver `git-bitbucket` is deprecated in favor of `bitbucket`
-#### BitBucket Driver Configuration
+#### Bitbucket Driver Configuration
-> **Note that the repository endpoint for BitBucket needs to be https rather than git.**
+> **Note that the repository endpoint for Bitbucket needs to be https rather than git.**
After setting up your bitbucket repository, you will also need to
[set up authentication](articles/authentication-for-private-packages.md#bitbucket-oauth).
@@ -445,7 +468,7 @@ repository like this:
If you have no branches or tags directory you can disable them entirely by
setting the `branches-path` or `tags-path` to `false`.
-If the package is in a sub-directory, e.g. `/trunk/foo/bar/composer.json` and
+If the package is in a subdirectory, e.g. `/trunk/foo/bar/composer.json` and
`/tags/1.0/foo/bar/composer.json`, then you can make Composer access it by
setting the `"package-path"` option to the sub-directory, in this example it
would be `"package-path": "foo/bar/"`.
@@ -732,6 +755,31 @@ variables are parsed in both Windows and Linux/Mac notations. For example
> **Note:** Repository paths can also contain wildcards like `*` and `?`.
> For details, see the [PHP glob function](https://php.net/glob).
+You can configure the way the package's dist reference (which appears in
+the composer.lock file) is built.
+
+The following modes exist:
+- `none` - reference will be always null. This can help reduce lock file conflicts
+ in the lock file but reduces clarity as to when the last update happened and whether
+ the package is in the latest state.
+- `config` - reference is built based on a hash of the package's composer.json and repo config
+- `auto` (used by default) - reference is built basing on the hash like with `config`, but if
+ the package folder contains a git repository, the HEAD commit's hash is used as reference instead.
+
+```json
+{
+ "repositories": [
+ {
+ "type": "path",
+ "url": "../../packages/my-package",
+ "options": {
+ "reference": "config"
+ }
+ }
+ ]
+}
+```
+
## Disabling Packagist.org
You can disable the default Packagist.org repository by adding this to your
diff --git a/app/vendor/composer/composer/doc/06-config.md b/app/vendor/composer/composer/doc/06-config.md
index 96bd1840e..5217b18f2 100644
--- a/app/vendor/composer/composer/doc/06-config.md
+++ b/app/vendor/composer/composer/doc/06-config.md
@@ -24,6 +24,37 @@ helper is available:
}
```
+## allow-plugins
+
+Defaults to `null` (allow all plugins implicitly) for backwards compatibility until July 2022.
+At that point the default will become `{}` and plugins will not load anymore unless allowed.
+
+As of Composer 2.2.0, the `allow-plugins` option adds a layer of security
+allowing you to restrict which Composer plugins are able to execute code during
+a Composer run.
+
+When a new plugin is first activated, which is not yet listed in the config option,
+Composer will print a warning. If you run Composer interactively it will
+prompt you to decide if you want to execute the plugin or not.
+
+Use this setting to allow only packages you trust to execute code. Set it to
+an object with package name patterns as keys. The values are **true** to allow
+and **false** to disallow while suppressing further warnings and prompts.
+
+```json
+{
+ "config": {
+ "allow-plugins": {
+ "third-party/required-plugin": true,
+ "my-organization/*": true,
+ "unnecessary/plugin": false
+ }
+ }
+}
+```
+
+You can also set the config option itself to `false` to disallow all plugins, or `true` to allow all plugins to run (NOT recommended).
+
## use-include-path
Defaults to `false`. If `true`, the Composer autoloader will also look for classes
@@ -33,7 +64,7 @@ in the PHP include path.
Defaults to `dist` and can be any of `source`, `dist` or `auto`. This option
allows you to set the install method Composer will prefer to use. Can
-optionally be a hash of patterns for more granular install preferences.
+optionally be an object with package name patterns for keys for more granular install preferences.
```json
{
@@ -63,6 +94,19 @@ optionally be a hash of patterns for more granular install preferences.
> configuration in global and package configurations the string notation
> is translated to a `*` package pattern.
+## use-parent-dir
+
+When running Composer in a directory where there is no composer.json, if there
+is one present in a directory above Composer will by default ask you whether
+you want to use that directory's composer.json instead.
+
+If you always want to answer yes to this prompt, you can set this config value
+to `true`. To never be prompted, set it to `false`. The default is `"prompt"`.
+
+> **Note:** This config must be set in your global user-wide config for it
+> to work. Use for example `php composer.phar config --global use-parent-dir true`
+> to set it.
+
## store-auths
What to do after prompting for authentication, one of: `true` (always store),
@@ -191,6 +235,9 @@ you may ignore it instead by passing `--ignore-platform-req=ext-foo` to `update`
extensions as if you ignore one now and a new package you add a month later also
requires it, you may introduce issues in production unknowingly.
+If you have an extension installed locally but *not* on production, you may want
+to artificially hide it from Composer using `{"ext-foo": false}`.
+
## vendor-dir
Defaults to `vendor`. You can install dependencies into a different directory if
@@ -206,8 +253,8 @@ into this directory.
Defaults to `C:\Users\\AppData\Roaming\Composer` on Windows,
`$XDG_DATA_HOME/composer` on unix systems that follow the XDG Base Directory
-Specifications, and `$home` on other unix systems. Right now it is only
-used for storing past composer.phar files to be able to rollback to older
+Specifications, and `$COMPOSER_HOME` on other unix systems. Right now it is only
+used for storing past composer.phar files to be able to roll back to older
versions. See also [COMPOSER_HOME](03-cli.md#composer-home).
## cache-dir
@@ -215,8 +262,8 @@ versions. See also [COMPOSER_HOME](03-cli.md#composer-home).
Defaults to `C:\Users\\AppData\Local\Composer` on Windows,
`/Users//Library/Caches/composer` on macOS, `$XDG_CACHE_HOME/composer`
on unix systems that follow the XDG Base Directory Specifications, and
-`$home/cache` on other unix systems. Stores all the caches used by Composer.
-See also [COMPOSER_HOME](03-cli.md#composer-home).
+`$COMPOSER_HOME/cache` on other unix systems. Stores all the caches used by
+Composer. See also [COMPOSER_HOME](03-cli.md#composer-home).
## cache-files-dir
@@ -257,8 +304,8 @@ If it is `auto` then Composer only installs .bat proxy files when on Windows or
set to `full` then both .bat files for Windows and scripts for Unix-based
operating systems will be installed for each binary. This is mainly useful if you
run Composer inside a linux VM but still want the `.bat` proxies available for use
-in the Windows host OS. If set to `symlink` Composer will always symlink even on
-Windows/WSL.
+in the Windows host OS. If set to `proxy` Composer will only create bash/Unix-style
+proxy files and no .bat files even on Windows/WSL.
## prepend-autoloader
@@ -268,8 +315,8 @@ with other autoloaders.
## autoloader-suffix
-Defaults to `null`. String to be used as a suffix for the generated Composer
-autoloader. When null a random one will be generated.
+Defaults to `null`. Non-empty string to be used as a suffix for the generated
+Composer autoloader. When null a random one will be generated.
## optimize-autoloader
@@ -349,7 +396,7 @@ in the Composer home, cache, and data directories.
## lock
Defaults to `true`. If set to `false`, Composer will not create a `composer.lock`
-file.
+file and will ignore it if one is present.
## platform-check
diff --git a/app/vendor/composer/composer/doc/07-runtime.md b/app/vendor/composer/composer/doc/07-runtime.md
index 79f0022fd..fef0b3923 100644
--- a/app/vendor/composer/composer/doc/07-runtime.md
+++ b/app/vendor/composer/composer/doc/07-runtime.md
@@ -152,4 +152,23 @@ not its exact version.
`lib-*` requirements are never supported/checked by the platform check feature.
+## Autoloader path in binaries
+
+composer-runtime-api 2.2 introduced a new `$_composer_autoload_path` global
+variable set when running binaries installed with Composer. Read more
+about this [on the vendor binaries docs](articles/vendor-binaries.md#finding-the-composer-autoloader-from-a-binary).
+
+This is set by the binary proxy and as such is not made available to projects
+by Composer's `vendor/autoload.php`, which would be useless as it would point back
+to itself.
+
+## Binary (bin-dir) path in binaries
+
+composer-runtime-api 2.2.2 introduced a new `$_composer_bin_dir` global
+variable set when running binaries installed with Composer. Read more
+about this [on the vendor binaries docs](articles/vendor-binaries.md#finding-the-composer-bin-dir-from-a-binary).
+
+This is set by the binary proxy and as such is not made available to projects
+by Composer's `vendor/autoload.php`.
+
← [Config](06-config.md) | [Community](08-community.md) →
diff --git a/app/vendor/composer/composer/doc/articles/authentication-for-private-packages.md b/app/vendor/composer/composer/doc/articles/authentication-for-private-packages.md
index 4dda9a9b8..1c6081afd 100644
--- a/app/vendor/composer/composer/doc/articles/authentication-for-private-packages.md
+++ b/app/vendor/composer/composer/doc/articles/authentication-for-private-packages.md
@@ -224,7 +224,7 @@ php composer.phar config [--global] --editor --auth
> [`gitlab-domains`](../06-config.md#gitlab-domains) section should also contain the url.
To create a new access token, go to your [access tokens section on GitLab](https://gitlab.com/-/profile/personal_access_tokens)
-(or the equivalent URL on your private instance) and create a new token. See also [the GitLab access token documentation](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token) for more informations.
+(or the equivalent URL on your private instance) and create a new token. See also [the GitLab access token documentation](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token) for more information.
When creating a gitlab token manually, make sure it has either the `read_api` or `api` scope.
diff --git a/app/vendor/composer/composer/doc/articles/composer-platform-dependencies.md b/app/vendor/composer/composer/doc/articles/composer-platform-dependencies.md
new file mode 100644
index 000000000..a3f2cadb2
--- /dev/null
+++ b/app/vendor/composer/composer/doc/articles/composer-platform-dependencies.md
@@ -0,0 +1,77 @@
+
+
+# Composer platform dependencies
+
+## What are platform dependencies
+
+Composer makes information about the environment Composer runs in available as virtual packages. This allows other
+packages to define dependencies ([require](../04-schema.md#require), [conflict](../04-schema.md#conflict),
+[provide](../04-schema.md#provide), [replace](../04-schema.md#replace)) on different aspects of the platform, like PHP,
+extensions or system libraries, including version constraints.
+
+When you require one of the platform packages no code is installed. The version numbers of platform packages are
+derived from the environment Composer is executed in and they cannot be updated or removed. They can however be
+overwritten for the purposes of dependency resolution with a [platform configuration](../06-config.md#platform).
+
+**For example:** If you are executing `composer update` with a PHP interpreter in version
+`7.4.42`, then Composer automatically adds a package to the pool of available packages
+called `php` and assigns version `7.4.42` to it.
+
+That's how packages can add a dependency on the used PHP version:
+
+```json
+{
+ "require" : {
+ "php" : ">=7.4"
+ }
+}
+```
+
+Composer will check this requirement against the currently used PHP version when running the composer command.
+
+### Different types of platform packages
+
+The following types of platform packages exist and can be depended on:
+
+1. PHP (`php` and the subtypes: `php-64bit`, `php-ipv6`, `php-zts` `php-debug`)
+2. PHP Extensions (`ext-*`, e.g. `ext-mbstring`)
+3. PHP Libraries (`lib-*`, e.g. `lib-curl`)
+4. Composer (`composer`, `composer-plugin-api`, `composer-runtime-api`)
+
+To see the complete list of platform packages available in your environment
+you can run `php composer.phar show --platform` (or `show -p` for short).
+
+The differences between the various Composer platform packages are explained further in this document.
+
+## Plugin package `composer-plugin-api`
+
+You can modify Composer's behavior with [plugin](plugins.md) packages. Composer provides a set of versioned APIs for
+plugins. Because internal Composer changes may **not** change the plugin APIs, the API version may not increase every
+time the Composer version increases. E.g. In Composer version `2.3.12`, the `composer-plugin-api` version could still
+be `2.2.0`.
+
+## Runtime package `composer-runtime-api`
+
+When applications which were installed with Composer are run (either on CLI or through a web request), they require the
+`vendor/autoload.php` file, typically as one of the first lines of executed code. Invocations of the Composer
+autoloader are considered the application "runtime".
+
+Starting with version 2.0, Composer makes [additional features](../07-runtime.md) (besides registering the class autoloader) available to the application runtime environment.
+
+Similar to `composer-plugin-api`, not every Composer release adds new runtime features,
+thus the version of `composer-runtimeapi` is also increased independently from Composer's version.
+
+## Composer package `composer`
+
+Starting with Composer 2.2.0, a new platform package called `composer` is available, which represents the exact
+Composer version that is executed. Packages depending on this platform package can therefore depend on (or conflict
+with) individual Composer versions to cover edge cases where neither the `composer-runtime-api` version nor the
+`composer-plugin-api` was changed.
+
+Because this option was introduced with Composer 2.2.0, it is recommended to add a `composer-plugin-api` dependency on
+at least `>=2.2.0` to provide a more meaningful error message for users running older Composer versions.
+
+In general, depending on `composer-plugin-api` or `composer-runtime-api` is always recommended
+over depending on concrete Composer versions with the `composer` platform package.
diff --git a/app/vendor/composer/composer/doc/articles/custom-installers.md b/app/vendor/composer/composer/doc/articles/custom-installers.md
index 02d62b836..6e2ad8670 100644
--- a/app/vendor/composer/composer/doc/articles/custom-installers.md
+++ b/app/vendor/composer/composer/doc/articles/custom-installers.md
@@ -78,7 +78,7 @@ requirements:
1. the [type][1] attribute must be `composer-plugin`.
2. the [extra][2] attribute must contain an element `class` defining the
class name of the plugin (including namespace). If a package contains
- multiple plugins this can be array of class names.
+ multiple plugins, this can be an array of class names.
Example:
diff --git a/app/vendor/composer/composer/doc/articles/plugins.md b/app/vendor/composer/composer/doc/articles/plugins.md
index e19e32562..bcbbe2cad 100644
--- a/app/vendor/composer/composer/doc/articles/plugins.md
+++ b/app/vendor/composer/composer/doc/articles/plugins.md
@@ -27,19 +27,19 @@ requirements:
1. The [type][1] attribute must be `composer-plugin`.
2. The [extra][2] attribute must contain an element `class` defining the
class name of the plugin (including namespace). If a package contains
- multiple plugins, this can be array of class names.
+ multiple plugins, this can be an array of class names.
3. You must require the special package called `composer-plugin-api`
to define which Plugin API versions your plugin is compatible with.
Requiring this package doesn't actually include any extra dependencies,
it only specifies which version of the plugin API to use.
> **Note:** When developing a plugin, although not required, it's useful to add
-> a require-dev dependency on `composer/composer` to have IDE auto completion on Composer classes.
+> a require-dev dependency on `composer/composer` to have IDE autocompletion on Composer classes.
The required version of the `composer-plugin-api` follows the same [rules][7]
-as a normal package's.
+as a normal package's rules.
-The current Composer plugin API version is `2.1.0`.
+The current Composer plugin API version is `2.3.0`.
An example of a valid plugin `composer.json` file (with the autoloading
part omitted and an optional require-dev dependency on `composer/composer` for IDE auto completion):
@@ -263,12 +263,12 @@ class CommandProvider implements CommandProviderCapability
class Command extends BaseCommand
{
- protected function configure()
+ protected function configure(): void
{
$this->setName('custom-plugin-command');
}
- protected function execute(InputInterface $input, OutputInterface $output)
+ protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('Executing');
}
@@ -323,6 +323,22 @@ hint to Composer that the plugin should be installed on its own before proceedin
the rest of the package downloads. This slightly slows down the overall installation
process however, so do not use it in plugins which do not absolutely require it.
+### plugin-modifies-install-path
+
+Some special plugins modify the install path of packages.
+
+As of Composer 2.2.9, you can specify `{"extra": {"plugin-modifies-install-path": true}}`
+in your composer.json to hint to Composer that the plugin should be activated as soon
+as possible to prevent any bad side-effects from Composer assuming packages are installed
+in another location than they actually are.
+
+## Plugin Autoloading
+
+Due to plugins being loaded by Composer at runtime, and to ensure that plugins which
+depend on other packages can function correctly, a runtime autoloader is created whenever
+a plugin is loaded. That autoloader is only configured to load with the plugin dependencies,
+so you may not have access to all the packages which are installed.
+
[1]: ../04-schema.md#type
[2]: ../04-schema.md#extra
[3]: https://github.com/composer/composer/blob/main/src/Composer/Plugin/PluginInterface.php
diff --git a/app/vendor/composer/composer/doc/articles/repository-priorities.md b/app/vendor/composer/composer/doc/articles/repository-priorities.md
index d87eed6dd..baaefb314 100644
--- a/app/vendor/composer/composer/doc/articles/repository-priorities.md
+++ b/app/vendor/composer/composer/doc/articles/repository-priorities.md
@@ -13,17 +13,17 @@ goes on to the next one, until one repository contains it and the process ends.
Canonical repositories are better for a few reasons:
- Performance wise, it is more efficient to stop looking for a package once it
-has been found somewhere. It also avoids loading duplicate packages in case
-the same package is present in several of your repositories.
+ has been found somewhere. It also avoids loading duplicate packages in case
+ the same package is present in several of your repositories.
- Security wise, it is safer to treat them canonically as it means that packages you
-expect to come from your most important repositories will never be loaded from
-another repository instead. Let's
-say you have a private repository which is not canonical, and you require your
-private package `foo/bar ^2.0` for example. Now if someone publishes
-`foo/bar 2.999` to packagist.org, suddenly Composer will pick that package as it
-has a higher version than your latest release (say 2.4.3), and you end up installing
-something you may not have meant to. If the private repository is canonical
-however, that 2.999 version from packagist.org will not be considered at all.
+ expect to come from your most important repositories will never be loaded from
+ another repository instead. Let's
+ say you have a private repository which is not canonical, and you require your
+ private package `foo/bar ^2.0` for example. Now if someone publishes
+ `foo/bar 2.999` to packagist.org, suddenly Composer will pick that package as it
+ has a higher version than your latest release (say 2.4.3), and you end up installing
+ something you may not have meant to. However, if the private repository is canonical,
+ that 2.999 version from packagist.org will not be considered at all.
There are however a few cases where you may want to specifically load some packages
from a given repository, but not all. Or you may want a given repository to not be
@@ -92,4 +92,4 @@ we may not want to load in this project.
```
Both `only` and `exclude` should be arrays of package names, which can also
-contain wildcards (`*`) which will match any characters.
+contain wildcards (`*`), which will match any character.
diff --git a/app/vendor/composer/composer/doc/articles/resolving-merge-conflicts.md b/app/vendor/composer/composer/doc/articles/resolving-merge-conflicts.md
index fe6d1a110..2733a186a 100644
--- a/app/vendor/composer/composer/doc/articles/resolving-merge-conflicts.md
+++ b/app/vendor/composer/composer/doc/articles/resolving-merge-conflicts.md
@@ -49,8 +49,8 @@ php composer.phar install [--dry-run]
## Important considerations
-Keep in mind that whenever merge conflicts occur on the lock file, the information about the exact version
-new packages were locked on for one of the branches gets lost. When package A in branch 1 is constrained
+Keep in mind that whenever merge conflicts occur on the lock file, the information, about the exact version
+new packages were locked on for one of the branches, is lost. When package A in branch 1 is constrained
as `^1.2.0` and locked as `1.2.0`, it might get updated when branch 2 is used as baseline and a new
`composer require package/A:^1.2.0` is executed, as that will use the most recent version that the
constraint allows when possible. There might be a version 1.3.0 for that package available by now, which
diff --git a/app/vendor/composer/composer/doc/articles/scripts.md b/app/vendor/composer/composer/doc/articles/scripts.md
index 30fa03851..37fe8e7ff 100644
--- a/app/vendor/composer/composer/doc/articles/scripts.md
+++ b/app/vendor/composer/composer/doc/articles/scripts.md
@@ -46,7 +46,9 @@ Composer fires the following named events during its execution process:
### Installer Events
- **pre-operations-exec**: occurs before the install/upgrade/.. operations
- are executed when installing a lock file.
+ are executed when installing a lock file. Plugins that need to hook into
+ this event will need to be installed globally to be usable, as otherwise
+ they would not be loaded yet when a fresh install of a project happens.
### Package Events
@@ -71,7 +73,7 @@ Composer fires the following named events during its execution process:
manipulate the `InputInterface` object's options and arguments to tweak
a command's behavior.
- **pre-pool-create**: occurs before the Pool of packages is created, and lets
- you filter the list of packages which is going to enter the Solver.
+ you filter the list of packages that is going to enter the Solver.
> **Note:** Composer makes no assumptions about the state of your dependencies
> prior to `install` or `update`. Therefore, you should not specify scripts
@@ -166,7 +168,7 @@ class MyClass
`COMPOSER_DEV_MODE` will be added to the environment. If the command was run
with the `--no-dev` flag, this variable will be set to 0, otherwise it will be
set to 1. The variable is also available while `dump-autoload` runs, and it
-will be set to same as the last `install` or `update` was run in.
+will be set to the same as the last `install` or `update` was run in.
## Event classes
diff --git a/app/vendor/composer/composer/doc/articles/troubleshooting.md b/app/vendor/composer/composer/doc/articles/troubleshooting.md
index 0182f9231..6e5a4018c 100644
--- a/app/vendor/composer/composer/doc/articles/troubleshooting.md
+++ b/app/vendor/composer/composer/doc/articles/troubleshooting.md
@@ -5,6 +5,7 @@
This is a list of common pitfalls on using Composer, and how to avoid them.
+
## General
1. When facing any kind of problems using Composer, be sure to **work with the
@@ -23,6 +24,7 @@ This is a list of common pitfalls on using Composer, and how to avoid them.
possible interferences with existing vendor installations or `composer.lock`
entries.
+
## Package not found
1. Double-check you **don't have typos** in your `composer.json` or repository
@@ -47,6 +49,12 @@ This is a list of common pitfalls on using Composer, and how to avoid them.
In this case add the `--with-dependencies` argument **or** add all dependencies which
need an update to the command.
+
+## Package is not updating to the expected version
+
+Try running `php composer.phar why-not [package-name] [expected-version]`.
+
+
## Dependencies on the root package
When your root package depends on a package which ends up depending (directly or
@@ -69,6 +77,7 @@ indirectly) back on the root package itself, issues can occur in two cases:
the variable only for the call to composer, or you can define it globally in the
CI env vars.
+
## Package not found in a Jenkins-build
1. Check the ["Package not found"](#package-not-found) item above.
@@ -81,13 +90,15 @@ indirectly) back on the root package itself, issues can occur in two cases:
branch as you are checking out. Using this, the checkout will not be in detached state any more
and the dependency on the root package should become satisfied.
+
## I have a dependency which contains a "repositories" definition in its composer.json, but it seems to be ignored.
The [`repositories`](../04-schema.md#repositories) configuration property is defined as [root-only](../04-schema.md#root-package). It is not inherited. You can read more about the reasons behind this in the "[why can't
-Composer load repositories recursively?](../faqs/why-can't-composer-load-repositories-recursively.md)" article.
+Composer load repositories recursively?](../faqs/why-cant-composer-load-repositories-recursively.md)" article.
The simplest work-around to this limitation, is moving or duplicating the `repositories` definition into your root
composer.json.
+
## I have locked a dependency to a specific commit but get unexpected results.
While Composer supports locking dependencies to a specific commit using the `#commit-ref` syntax, there are certain
@@ -103,6 +114,7 @@ frequently overlooked:
There is no simple work-around to this limitation. It is therefore strongly recommended that you do not use it.
+
## Need to override a package version
Let's say your project depends on package A, which in turn depends on a specific
@@ -123,8 +135,18 @@ composer.json:
See [aliases](aliases.md) for more information.
+
+## Figuring out where a config value came from
+
+Use `php composer.phar config --list --source` to see where each config value originated from.
+
+
## Memory limit errors
+The first thing to do is to make sure you are running Composer 2, and if possible 2.2.0 or above.
+
+Composer 1 used much more memory and upgrading to the latest version will give you much better and faster results.
+
Composer may sometimes fail on some commands with this message:
`PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted <...>`
@@ -161,6 +183,7 @@ php -d memory_limit=-1 composer.phar <...>
This issue can also happen on cPanel instances, when the shell fork bomb protection is activated. For more information, see the [documentation](https://documentation.cpanel.net/display/68Docs/Shell+Fork+Bomb+Protection) of the fork bomb feature on the cPanel site.
+
## Xdebug impact on Composer
To improve performance when the Xdebug extension is enabled, Composer automatically restarts PHP without it.
@@ -170,13 +193,15 @@ Composer will always show a warning if Xdebug is being used, but you can overrid
`COMPOSER_DISABLE_XDEBUG_WARN=1`. If you see this warning unexpectedly, then the restart process has failed:
please report this [issue](https://github.com/composer/composer/issues).
+
## "The system cannot find the path specified" (Windows)
1. Open regedit.
2. Search for an `AutoRun` key inside `HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor`,
`HKEY_CURRENT_USER\Software\Microsoft\Command Processor`
or `HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Command Processor`.
-3. Check if it contains any path to non-existent file, if it's the case, remove them.
+3. Check if it contains any path to a non-existent file, if it's the case, remove them.
+
## API rate limit and OAuth tokens
@@ -188,7 +213,9 @@ manually create a token using the [procedure documented here](authentication-for
Now Composer should install/update without asking for authentication.
+
## proc_open(): fork failed errors
+
If Composer shows proc_open() fork failed on some commands:
`PHP Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar`
@@ -214,6 +241,7 @@ To enable the swap you can use for example:
```
You can make a permanent swap file following this [tutorial](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04).
+
## proc_open(): failed to open stream errors (Windows)
If Composer shows proc_open(NUL) errors on Windows:
@@ -227,6 +255,7 @@ service. The issue was fixed in PHP 7.2.23 and 7.3.10.
Alternatively it could be because the Windows Null Service is not enabled. For
more information, see this [issue](https://github.com/composer/composer/issues/7186#issuecomment-373134916).
+
## Degraded Mode
Due to some intermittent issues on Travis and other systems, we introduced a
@@ -244,11 +273,11 @@ If you have been pointed to this page, you want to check a few things:
- If you are using IPv6, try disabling it. If that solves your issues, get in touch
with your ISP or server host, the problem is not at the Packagist level but in the
routing rules between you and Packagist (i.e. the internet at large). The best way to get
- these fixed is raise awareness to the network engineers that have the power to fix it.
+ these fixed is to raise awareness to the network engineers that have the power to fix it.
Take a look at the next section for IPv6 workarounds.
-
- If none of the above helped, please report the error.
+
## Operation timed out (IPv6 issues)
You may run into errors if IPv6 is not configured correctly. A common error is:
@@ -264,7 +293,7 @@ following workarounds:
**Workaround Linux:**
On linux, it seems that running this command helps to make ipv4 traffic have a
-higher prio than ipv6, which is a better alternative than disabling ipv6 entirely:
+higher priority than ipv6, which is a better alternative than disabling ipv6 entirely:
```bash
sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
@@ -297,9 +326,10 @@ networksetup -setv6automatic Wi-Fi
```
That said, if this fixes your problem, please talk to your ISP about it to
-try and resolve the routing errors. That's the best way to get things resolved
+try to resolve the routing errors. That's the best way to get things resolved
for everyone.
+
## Composer hangs with SSH ControlMaster
When you try to install packages from a Git repository and you use the `ControlMaster`
@@ -317,9 +347,33 @@ php composer.phar update
See also https://github.com/composer/composer/issues/4180 for more information.
+
## Zip archives are not unpacked correctly.
-Composer can unpack zipballs using either a system-provided `unzip` utility or PHP's
-native `ZipArchive` class. The `ZipArchive` class is preferred on Windows. On other
-OSes where ZIP files can contain permissions and symlinks, the `unzip` utility is
-preferred. You're advised to install it if you need these features.
+Composer can unpack zipballs using either a system-provided `unzip` or `7z` (7-Zip) utility, or PHP's
+native `ZipArchive` class. On OSes where ZIP files can contain permissions and symlinks, we recommend
+installing `unzip` or `7z` as these features are not supported by `ZipArchive`.
+
+
+## Disabling the pool optimizer
+
+In Composer, the `Pool` class contains all the packages that are relevant for the dependency
+resolving process. That is what is used to generate all the rules which are then
+passed on to the dependency solver.
+In order to improve performance, Composer tries to optimize this `Pool` by removing useless
+package information early on.
+
+If all goes well, you should never notice any issues with it but in case you run into
+an unexpected result such as an unresolvable set of dependencies or conflicts where you
+think Composer is wrong, you might want to disable the optimizer by using the environment
+variable `COMPOSER_POOL_OPTIMIZER` and run the update again like so:
+
+```bash
+COMPOSER_POOL_OPTIMIZER=0 php composer.phar update
+```
+
+Now double check if the result is still the same. It will take significantly longer and use
+a lot more memory to run the dependency resolving process.
+
+If the result is different, you likely hit a problem in the pool optimizer.
+Please [report this issue](https://github.com/composer/composer/issues) so it can be fixed.
diff --git a/app/vendor/composer/composer/doc/articles/vendor-binaries.md b/app/vendor/composer/composer/doc/articles/vendor-binaries.md
index 0022b90b9..6ce952a4e 100644
--- a/app/vendor/composer/composer/doc/articles/vendor-binaries.md
+++ b/app/vendor/composer/composer/doc/articles/vendor-binaries.md
@@ -40,7 +40,8 @@ For the binaries that a package defines directly, nothing happens.
## What happens when Composer is run on a composer.json that has dependencies with vendor binaries listed?
Composer looks for the binaries defined in all of the dependencies. A
-symlink is created from each dependency's binaries to `vendor/bin`.
+proxy file (or two on Windows/WSL) is created from each dependency's
+binaries to `vendor/bin`.
Say package `my-vendor/project-a` has binaries setup like this:
@@ -69,8 +70,62 @@ Running `composer install` for this `composer.json` will look at
all of project-a's binaries and install them to `vendor/bin`.
In this case, Composer will make `vendor/my-vendor/project-a/bin/project-a-bin`
-available as `vendor/bin/project-a-bin`. On a Unix-like platform
-this is accomplished by creating a symlink.
+available as `vendor/bin/project-a-bin`.
+
+## Finding the Composer autoloader from a binary
+
+As of Composer 2.2, a new `$_composer_autoload_path` global variable
+is defined by the bin proxy file, so that when your binary gets executed
+it can use it to easily locate the project's autoloader.
+
+This global will not be available however when running binaries defined
+by the root package itself, so you need to have a fallback in place.
+
+This can look like this for example:
+
+```php
+ github API oauth tokens, typically {\"github.com\":\"\"}.",
+ "description": "An object of domain name => github API oauth tokens, typically {\"github.com\":\"\"}.",
"additionalProperties": {
"type": "string"
}
},
"gitlab-oauth": {
"type": "object",
- "description": "A hash of domain name => gitlab API oauth tokens, typically {\"gitlab.com\":\"\"}.",
+ "description": "An object of domain name => gitlab API oauth tokens, typically {\"gitlab.com\":\"\"}.",
"additionalProperties": {
"type": "string"
}
},
"gitlab-token": {
"type": "object",
- "description": "A hash of domain name => gitlab private tokens, typically {\"gitlab.com\":\"\"}.",
+ "description": "An object of domain name => gitlab private tokens, typically {\"gitlab.com\":\"\"}.",
"additionalProperties": {
"type": "string"
}
@@ -149,7 +358,7 @@
},
"bearer": {
"type": "object",
- "description": "A hash of domain name => bearer authentication token, for example {\"example.com\":\"\"}.",
+ "description": "An object of domain name => bearer authentication token, for example {\"example.com\":\"\"}.",
"additionalProperties": {
"type": "string"
}
@@ -179,7 +388,7 @@
},
"http-basic": {
"type": "object",
- "description": "A hash of domain name => {\"username\": \"...\", \"password\": \"...\"}.",
+ "description": "An object of domain name => {\"username\": \"...\", \"password\": \"...\"}.",
"additionalProperties": {
"type": "object",
"required": ["username", "password"],
@@ -199,13 +408,6 @@
"type": ["string", "boolean"],
"description": "What to do after prompting for authentication, one of: true (store), false (do not store) or \"prompt\" (ask every time), defaults to prompt."
},
- "platform": {
- "type": "object",
- "description": "This is a hash of package name (keys) and version (values) that will be used to mock the platform packages on this machine.",
- "additionalProperties": {
- "type": "string"
- }
- },
"vendor-dir": {
"type": "string",
"description": "The location where all packages are installed, defaults to \"vendor\"."
@@ -251,8 +453,8 @@
"description": "Whether to use the Composer cache in read-only mode."
},
"bin-compat": {
- "enum": ["auto", "full", "symlink"],
- "description": "The compatibility of the binaries, defaults to \"auto\" (automatically guessed), can be \"full\" (compatible with both Windows and Unix-based systems) and \"symlink\" (symlink also for WSL)."
+ "enum": ["auto", "full", "proxy", "symlink"],
+ "description": "The compatibility of the binaries, defaults to \"auto\" (automatically guessed), can be \"full\" (compatible with both Windows and Unix-based systems) and \"proxy\" (only bash-style proxy)."
},
"discard-changes": {
"type": ["string", "boolean"],
@@ -296,6 +498,24 @@
"type": "string"
}
},
+ "bitbucket-oauth": {
+ "type": "object",
+ "description": "An object of domain name => {\"consumer-key\": \"...\", \"consumer-secret\": \"...\"}.",
+ "additionalProperties": {
+ "type": "object",
+ "required": ["consumer-key", "consumer-secret"],
+ "properties": {
+ "consumer-key": {
+ "type": "string",
+ "description": "The consumer-key used for OAuth authentication"
+ },
+ "consumer-secret": {
+ "type": "string",
+ "description": "The consumer-secret used for OAuth authentication"
+ }
+ }
+ }
+ },
"use-github-api": {
"type": "boolean",
"description": "Defaults to true. If set to false, globally disables the use of the GitHub API for all GitHub repositories and clones the repository as it would for any other repository."
@@ -331,101 +551,6 @@
"description": "Arbitrary extra data that can be used by plugins, for example, package of type composer-plugin may have a 'class' key defining an installer class name.",
"additionalProperties": true
},
- "autoload": {
- "$ref": "#/definitions/autoload"
- },
- "autoload-dev": {
- "type": "object",
- "description": "Description of additional autoload rules for development purpose (eg. a test suite).",
- "properties": {
- "psr-0": {
- "type": "object",
- "description": "This is a hash of namespaces (keys) and the directories they can be found into (values, can be arrays of paths) by the autoloader.",
- "additionalProperties": {
- "type": ["string", "array"],
- "items": {
- "type": "string"
- }
- }
- },
- "psr-4": {
- "type": "object",
- "description": "This is a hash of namespaces (keys) and the PSR-4 directories they can map to (values, can be arrays of paths) by the autoloader.",
- "additionalProperties": {
- "type": ["string", "array"],
- "items": {
- "type": "string"
- }
- }
- },
- "classmap": {
- "type": "array",
- "description": "This is an array of paths that contain classes to be included in the class-map generation process."
- },
- "files": {
- "type": "array",
- "description": "This is an array of files that are always required on every request."
- }
- }
- },
- "archive": {
- "type": ["object"],
- "description": "Options for creating package archives for distribution.",
- "properties": {
- "name": {
- "type": "string",
- "description": "A base name for archive."
- },
- "exclude": {
- "type": "array",
- "description": "A list of patterns for paths to exclude or include if prefixed with an exclamation mark."
- }
- }
- },
- "repositories": {
- "type": ["object", "array"],
- "description": "A set of additional repositories where packages can be found.",
- "additionalProperties": {
- "anyOf": [
- { "$ref": "#/definitions/repository" },
- { "type": "boolean", "enum": [false] }
- ]
- },
- "items": {
- "anyOf": [
- { "$ref": "#/definitions/repository" },
- {
- "type": "object",
- "additionalProperties": { "type": "boolean", "enum": [false] },
- "minProperties": 1,
- "maxProperties": 1
- }
- ]
- }
- },
- "minimum-stability": {
- "type": ["string"],
- "description": "The minimum stability the packages must have to be install-able. Possible values are: dev, alpha, beta, RC, stable.",
- "enum": ["dev", "alpha", "beta", "rc", "RC", "stable"]
- },
- "prefer-stable": {
- "type": ["boolean"],
- "description": "If set to true, stable packages will be preferred to dev packages when possible, even if the minimum-stability allows unstable packages."
- },
- "bin": {
- "type": ["string", "array"],
- "description": "A set of files, or a single file, that should be treated as binaries and symlinked into bin-dir (from config).",
- "items": {
- "type": "string"
- }
- },
- "include-path": {
- "type": ["array"],
- "description": "DEPRECATED: A list of directories which should get added to PHP's include path. This is only present to support legacy projects, and all new code should preferably use autoloading.",
- "items": {
- "type": "string"
- }
- },
"scripts": {
"type": ["object"],
"description": "Script listeners that will be executed before/after some events.",
@@ -502,93 +627,6 @@
"additionalProperties": {
"type": "string"
}
- },
- "support": {
- "type": "object",
- "properties": {
- "email": {
- "type": "string",
- "description": "Email address for support.",
- "format": "email"
- },
- "issues": {
- "type": "string",
- "description": "URL to the issue tracker.",
- "format": "uri"
- },
- "forum": {
- "type": "string",
- "description": "URL to the forum.",
- "format": "uri"
- },
- "wiki": {
- "type": "string",
- "description": "URL to the wiki.",
- "format": "uri"
- },
- "irc": {
- "type": "string",
- "description": "IRC channel for support, as irc://server/channel.",
- "format": "uri"
- },
- "chat": {
- "type": "string",
- "description": "URL to the support chat.",
- "format": "uri"
- },
- "source": {
- "type": "string",
- "description": "URL to browse or download the sources.",
- "format": "uri"
- },
- "docs": {
- "type": "string",
- "description": "URL to the documentation.",
- "format": "uri"
- },
- "rss": {
- "type": "string",
- "description": "URL to the RSS feed.",
- "format": "uri"
- }
- }
- },
- "funding": {
- "type": "array",
- "description": "A list of options to fund the development and maintenance of the package.",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Type of funding or platform through which funding is possible."
- },
- "url": {
- "type": "string",
- "description": "URL to a website with details on funding and a way to fund the package.",
- "format": "uri"
- }
- }
- }
- },
- "non-feature-branches": {
- "type": ["array"],
- "description": "A set of string or regex patterns for non-numeric branch names that will not be handled as feature branches.",
- "items": {
- "type": "string"
- }
- },
- "default-branch": {
- "type": ["boolean"],
- "description": "Internal use only, do not specify this in composer.json. Indicates whether this version is the default branch of the linked VCS repository. Defaults to false."
- },
- "abandoned": {
- "type": ["boolean", "string"],
- "description": "Indicates whether this package has been abandoned, it can be boolean or a package name/URL pointing to a recommended alternative. Defaults to false."
- },
- "_comment": {
- "type": ["array", "string"],
- "description": "A key to store comments in"
}
},
"definitions": {
@@ -627,7 +665,7 @@
"properties": {
"psr-0": {
"type": "object",
- "description": "This is a hash of namespaces (keys) and the directories they can be found in (values, can be arrays of paths) by the autoloader.",
+ "description": "This is an object of namespaces (keys) and the directories they can be found in (values, can be arrays of paths) by the autoloader.",
"additionalProperties": {
"type": ["string", "array"],
"items": {
@@ -637,7 +675,7 @@
},
"psr-4": {
"type": "object",
- "description": "This is a hash of namespaces (keys) and the PSR-4 directories they can map to (values, can be arrays of paths) by the autoloader.",
+ "description": "This is an object of namespaces (keys) and the PSR-4 directories they can map to (values, can be arrays of paths) by the autoloader.",
"additionalProperties": {
"type": ["string", "array"],
"items": {
@@ -701,7 +739,7 @@
"type": "object",
"required": ["type", "url"],
"properties": {
- "type": { "type": "string", "enum": ["vcs", "github", "git", "gitlab", "git-bitbucket", "hg", "hg-bitbucket", "fossil", "perforce", "svn"] },
+ "type": { "type": "string", "enum": ["vcs", "github", "git", "gitlab", "bitbucket", "git-bitbucket", "hg", "fossil", "perforce", "svn"] },
"url": { "type": "string" },
"canonical": { "type": "boolean" },
"only": {
@@ -939,46 +977,52 @@
}
},
"source": {
- "type": "object",
- "required": ["type", "url", "reference"],
- "properties": {
- "type": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "reference": {
- "type": "string"
- },
- "mirrors": {
- "type": "array"
- }
- }
+ "$ref": "#/definitions/source"
},
"dist": {
- "type": "object",
- "required": ["type", "url"],
- "properties": {
- "type": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "reference": {
- "type": "string"
- },
- "shasum": {
- "type": "string"
- },
- "mirrors": {
- "type": "array"
- }
- }
+ "$ref": "#/definitions/dist"
}
},
"additionalProperties": true
+ },
+ "source": {
+ "type": "object",
+ "required": ["type", "url", "reference"],
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "mirrors": {
+ "type": "array"
+ }
+ }
+ },
+ "dist": {
+ "type": "object",
+ "required": ["type", "url"],
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "shasum": {
+ "type": "string"
+ },
+ "mirrors": {
+ "type": "array"
+ }
+ }
}
}
}
diff --git a/app/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php b/app/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php
index 482dc0c21..3496e1dc4 100644
--- a/app/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php
+++ b/app/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php
@@ -1,4 +1,4 @@
-eventDispatcher = $eventDispatcher;
$this->io = $io;
+
+ $this->platformRequirementFilter = PlatformRequirementFilterFactory::ignoreNothing();
}
/**
* @param bool $devMode
* @return void
*/
- public function setDevMode($devMode = true)
+ public function setDevMode(bool $devMode = true)
{
- $this->devMode = (bool) $devMode;
+ $this->devMode = $devMode;
}
/**
@@ -95,9 +100,9 @@ public function setDevMode($devMode = true)
* @param bool $classMapAuthoritative
* @return void
*/
- public function setClassMapAuthoritative($classMapAuthoritative)
+ public function setClassMapAuthoritative(bool $classMapAuthoritative)
{
- $this->classMapAuthoritative = (bool) $classMapAuthoritative;
+ $this->classMapAuthoritative = $classMapAuthoritative;
}
/**
@@ -107,10 +112,10 @@ public function setClassMapAuthoritative($classMapAuthoritative)
* @param string|null $apcuPrefix
* @return void
*/
- public function setApcu($apcu, $apcuPrefix = null)
+ public function setApcu(bool $apcu, ?string $apcuPrefix = null)
{
- $this->apcu = (bool) $apcu;
- $this->apcuPrefix = $apcuPrefix !== null ? (string) $apcuPrefix : $apcuPrefix;
+ $this->apcu = $apcu;
+ $this->apcuPrefix = $apcuPrefix !== null ? $apcuPrefix : $apcuPrefix;
}
/**
@@ -119,9 +124,9 @@ public function setApcu($apcu, $apcuPrefix = null)
* @param bool $runScripts
* @return void
*/
- public function setRunScripts($runScripts = true)
+ public function setRunScripts(bool $runScripts = true)
{
- $this->runScripts = (bool) $runScripts;
+ $this->runScripts = $runScripts;
}
/**
@@ -133,26 +138,32 @@ public function setRunScripts($runScripts = true)
*
* @param bool|string[] $ignorePlatformReqs
* @return void
+ *
+ * @deprecated use setPlatformRequirementFilter instead
*/
public function setIgnorePlatformRequirements($ignorePlatformReqs)
{
- if (is_array($ignorePlatformReqs)) {
- $this->ignorePlatformReqs = array_filter($ignorePlatformReqs, function ($req) {
- return PlatformRepository::isPlatformPackage($req);
- });
- } else {
- $this->ignorePlatformReqs = (bool) $ignorePlatformReqs;
- }
+ trigger_error('AutoloadGenerator::setIgnorePlatformRequirements is deprecated since Composer 2.2, use setPlatformRequirementFilter instead.', E_USER_DEPRECATED);
+
+ $this->setPlatformRequirementFilter(PlatformRequirementFilterFactory::fromBoolOrList($ignorePlatformReqs));
+ }
+
+ /**
+ * @return void
+ */
+ public function setPlatformRequirementFilter(PlatformRequirementFilterInterface $platformRequirementFilter)
+ {
+ $this->platformRequirementFilter = $platformRequirementFilter;
}
/**
* @param string $targetDir
* @param bool $scanPsrPackages
- * @param string $suffix
* @return int
* @throws \Seld\JsonLint\ParsingException
+ * @throws \RuntimeException
*/
- public function dump(Config $config, InstalledRepositoryInterface $localRepo, RootPackageInterface $rootPackage, InstallationManager $installationManager, $targetDir, $scanPsrPackages = false, $suffix = '')
+ public function dump(Config $config, InstalledRepositoryInterface $localRepo, RootPackageInterface $rootPackage, InstallationManager $installationManager, string $targetDir, bool $scanPsrPackages = false, ?string $suffix = null)
{
if ($this->classMapAuthoritative) {
// Force scanPsrPackages when classmap is authoritative
@@ -180,7 +191,7 @@ public function dump(Config $config, InstalledRepositoryInterface $localRepo, Ro
}
$this->eventDispatcher->dispatchScript(ScriptEvents::PRE_AUTOLOAD_DUMP, $this->devMode, array(), array(
- 'optimize' => (bool) $scanPsrPackages,
+ 'optimize' => $scanPsrPackages,
));
}
@@ -189,7 +200,7 @@ public function dump(Config $config, InstalledRepositoryInterface $localRepo, Ro
// Do not remove double realpath() calls.
// Fixes failing Windows realpath() implementation.
// See https://bugs.php.net/bug.php?id=72738
- $basePath = $filesystem->normalizePath(realpath(realpath(getcwd())));
+ $basePath = $filesystem->normalizePath(realpath(realpath(Platform::getCwd())));
$vendorPath = $filesystem->normalizePath(realpath(realpath($config->get('vendor-dir'))));
$useGlobalIncludePath = (bool) $config->get('use-include-path');
$prependAutoloader = $config->get('prepend-autoloader') === false ? 'false' : 'true';
@@ -197,7 +208,6 @@ public function dump(Config $config, InstalledRepositoryInterface $localRepo, Ro
$filesystem->ensureDirectoryExists($targetDir);
$vendorPathCode = $filesystem->findShortestPathCode(realpath($targetDir), $vendorPath, true);
- $vendorPathCode52 = str_replace('__DIR__', 'dirname(__FILE__)', $vendorPathCode);
$vendorPathToTargetDirCode = $filesystem->findShortestPathCode($vendorPath, realpath($targetDir), true);
$appBaseDirCode = $filesystem->findShortestPathCode($vendorPath, $basePath, true);
@@ -208,7 +218,7 @@ public function dump(Config $config, InstalledRepositoryInterface $localRepo, Ro
// autoload_namespaces.php @generated by Composer
-\$vendorDir = $vendorPathCode52;
+\$vendorDir = $vendorPathCode;
\$baseDir = $appBaseDirCode;
return array(
@@ -220,7 +230,7 @@ public function dump(Config $config, InstalledRepositoryInterface $localRepo, Ro
// autoload_psr4.php @generated by Composer
-\$vendorDir = $vendorPathCode52;
+\$vendorDir = $vendorPathCode;
\$baseDir = $appBaseDirCode;
return array(
@@ -268,7 +278,7 @@ public function dump(Config $config, InstalledRepositoryInterface $localRepo, Ro
// autoload_classmap.php @generated by Composer
-\$vendorDir = $vendorPathCode52;
+\$vendorDir = $vendorPathCode;
\$baseDir = $appBaseDirCode;
return array(
@@ -280,7 +290,7 @@ public function dump(Config $config, InstalledRepositoryInterface $localRepo, Ro
$mainAutoload = $rootPackage->getAutoload();
if ($rootPackage->getTargetDir() && !empty($mainAutoload['psr-0'])) {
$levels = substr_count($filesystem->normalizePath($rootPackage->getTargetDir()), '/') + 1;
- $prefixes = implode(', ', array_map(function ($prefix) {
+ $prefixes = implode(', ', array_map(function ($prefix): string {
return var_export($prefix, true);
}, array_keys($mainAutoload['psr-0'])));
$baseDirFromTargetDirCode = $filesystem->findShortestPathCode($targetDir, $basePath, true);
@@ -346,12 +356,12 @@ public static function autoload(\$class)
}
}
- foreach ($ambiguousClasses as $className => $ambigiousPaths) {
+ foreach ($ambiguousClasses as $className => $ambiguousPaths) {
$cleanPath = str_replace(array('$vendorDir . \'', '$baseDir . \'', "',\n"), array($vendorPath, $basePath, ''), $classMap[$className]);
$this->io->writeError(
'Warning: Ambiguous class resolution, "'.$className.'"'.
- ' was found '. (count($ambigiousPaths) + 1) .'x: in "'.$cleanPath.'" and "'. implode('", "', $ambigiousPaths) .'", the first will be used.'
+ ' was found '. (count($ambiguousPaths) + 1) .'x: in "'.$cleanPath.'" and "'. implode('", "', $ambiguousPaths) .'", the first will be used.'
);
}
@@ -362,16 +372,23 @@ public static function autoload(\$class)
}
$classmapFile .= ");\n";
- if (!$suffix) {
- if (!$config->get('autoloader-suffix') && Filesystem::isReadable($vendorPath.'/autoload.php')) {
+ if ('' === $suffix) {
+ $suffix = null;
+ }
+ if (null === $suffix) {
+ $suffix = $config->get('autoloader-suffix');
+
+ // carry over existing autoload.php's suffix if possible and none is configured
+ if (null === $suffix && Filesystem::isReadable($vendorPath.'/autoload.php')) {
$content = file_get_contents($vendorPath.'/autoload.php');
- if (preg_match('{ComposerAutoloaderInit([^:\s]+)::}', $content, $match)) {
+ if (Preg::isMatch('{ComposerAutoloaderInit([^:\s]+)::}', $content, $match)) {
$suffix = $match[1];
}
}
- if (!$suffix) {
- $suffix = $config->get('autoloader-suffix') ?: md5(uniqid('', true));
+ // generate one if we still haven't got a suffix
+ if (null === $suffix) {
+ $suffix = md5(uniqid('', true));
}
}
@@ -379,22 +396,22 @@ public static function autoload(\$class)
$filesystem->filePutContentsIfModified($targetDir.'/autoload_psr4.php', $psr4File);
$filesystem->filePutContentsIfModified($targetDir.'/autoload_classmap.php', $classmapFile);
$includePathFilePath = $targetDir.'/include_paths.php';
- if ($includePathFileContents = $this->getIncludePathsFile($packageMap, $filesystem, $basePath, $vendorPath, $vendorPathCode52, $appBaseDirCode)) {
+ if ($includePathFileContents = $this->getIncludePathsFile($packageMap, $filesystem, $basePath, $vendorPath, $vendorPathCode, $appBaseDirCode)) {
$filesystem->filePutContentsIfModified($includePathFilePath, $includePathFileContents);
} elseif (file_exists($includePathFilePath)) {
unlink($includePathFilePath);
}
$includeFilesFilePath = $targetDir.'/autoload_files.php';
- if ($includeFilesFileContents = $this->getIncludeFilesFile($autoloads['files'], $filesystem, $basePath, $vendorPath, $vendorPathCode52, $appBaseDirCode)) {
+ if ($includeFilesFileContents = $this->getIncludeFilesFile($autoloads['files'], $filesystem, $basePath, $vendorPath, $vendorPathCode, $appBaseDirCode)) {
$filesystem->filePutContentsIfModified($includeFilesFilePath, $includeFilesFileContents);
} elseif (file_exists($includeFilesFilePath)) {
unlink($includeFilesFilePath);
}
- $filesystem->filePutContentsIfModified($targetDir.'/autoload_static.php', $this->getStaticFile($suffix, $targetDir, $vendorPath, $basePath, $staticPhpVersion));
- $checkPlatform = $config->get('platform-check') && $this->ignorePlatformReqs !== true;
+ $filesystem->filePutContentsIfModified($targetDir.'/autoload_static.php', $this->getStaticFile($suffix, $targetDir, $vendorPath, $basePath));
+ $checkPlatform = $config->get('platform-check') && !($this->platformRequirementFilter instanceof IgnoreAllPlatformRequirementFilter);
$platformCheckContent = null;
if ($checkPlatform) {
- $platformCheckContent = $this->getPlatformCheck($packageMap, $this->ignorePlatformReqs ?: array(), $config->get('platform-check'), $devPackageNames);
+ $platformCheckContent = $this->getPlatformCheck($packageMap, $config->get('platform-check'), $devPackageNames);
if (null === $platformCheckContent) {
$checkPlatform = false;
}
@@ -405,7 +422,7 @@ public static function autoload(\$class)
unlink($targetDir.'/platform_check.php');
}
$filesystem->filePutContentsIfModified($vendorPath.'/autoload.php', $this->getAutoloadFile($vendorPathToTargetDirCode, $suffix));
- $filesystem->filePutContentsIfModified($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion, $checkPlatform));
+ $filesystem->filePutContentsIfModified($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $checkPlatform));
$filesystem->safeCopy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php');
$filesystem->safeCopy(__DIR__.'/../../../LICENSE', $targetDir.'/LICENSE');
@@ -423,21 +440,21 @@ public static function autoload(\$class)
* @param string $basePath
* @param string $vendorPath
* @param string $dir
- * @param ?array $excluded
- * @param ?string $namespaceFilter
- * @param ?string $autoloadType
+ * @param null|array $excluded
+ * @param null|string $namespaceFilter
+ * @param null|string $autoloadType
* @param array $classMap
* @param array> $ambiguousClasses
* @param array $scannedFiles
* @return array
*/
- private function addClassMapCode(Filesystem $filesystem, $basePath, $vendorPath, $dir, $excluded, $namespaceFilter, $autoloadType, array $classMap, array &$ambiguousClasses, array &$scannedFiles)
+ private function addClassMapCode(Filesystem $filesystem, string $basePath, string $vendorPath, string $dir, ?array $excluded, ?string $namespaceFilter, ?string $autoloadType, array $classMap, array &$ambiguousClasses, array &$scannedFiles): array
{
foreach ($this->generateClassMap($dir, $excluded, $namespaceFilter, $autoloadType, true, $scannedFiles) as $class => $path) {
$pathCode = $this->getPathCode($filesystem, $basePath, $vendorPath, $path).",\n";
if (!isset($classMap[$class])) {
$classMap[$class] = $pathCode;
- } elseif ($this->io && $classMap[$class] !== $pathCode && !preg_match('{/(test|fixture|example|stub)s?/}i', strtr($classMap[$class].' '.$path, '\\', '/'))) {
+ } elseif ($this->io && $classMap[$class] !== $pathCode && !Preg::isMatch('{/(test|fixture|example|stub)s?/}i', strtr($classMap[$class].' '.$path, '\\', '/'))) {
$ambiguousClasses[$class][] = $path;
}
}
@@ -447,14 +464,14 @@ private function addClassMapCode(Filesystem $filesystem, $basePath, $vendorPath,
/**
* @param string $dir
- * @param ?array $excluded
- * @param ?string $namespaceFilter
- * @param ?string $autoloadType
+ * @param null|array $excluded
+ * @param null|string $namespaceFilter
+ * @param null|string $autoloadType
* @param bool $showAmbiguousWarning
* @param array $scannedFiles
* @return array
*/
- private function generateClassMap($dir, $excluded, $namespaceFilter, $autoloadType, $showAmbiguousWarning, array &$scannedFiles)
+ private function generateClassMap(string $dir, ?array $excluded, ?string $namespaceFilter, ?string $autoloadType, bool $showAmbiguousWarning, array &$scannedFiles): array
{
if ($excluded) {
// filter excluded patterns here to only use those matching $dir
@@ -465,7 +482,7 @@ private function generateClassMap($dir, $excluded, $namespaceFilter, $autoloadTy
$dirMatch = preg_quote(strtr(realpath($dir), '\\', '/'));
foreach ($excluded as $index => $pattern) {
// extract the constant string prefix of the pattern here, until we reach a non-escaped regex special character
- $pattern = preg_replace('{^(([^.+*?\[^\]$(){}=!<>|:\\\\#-]+|\\\\[.+*?\[^\]$(){}=!<>|:#-])*).*}', '$1', $pattern);
+ $pattern = Preg::replace('{^(([^.+*?\[^\]$(){}=!<>|:\\\\#-]+|\\\\[.+*?\[^\]$(){}=!<>|:#-])*).*}', '$1', $pattern);
// if the pattern is not a subset or superset of $dir, it is unrelated and we skip it
if (0 !== strpos($pattern, $dirMatch) && 0 !== strpos($dirMatch, $pattern)) {
unset($excluded[$index]);
@@ -544,7 +561,7 @@ public function parseAutoloads(array $packageMap, PackageInterface $rootPackage,
{
$rootPackageMap = array_shift($packageMap);
if (is_array($filteredDevPackages)) {
- $packageMap = array_filter($packageMap, function ($item) use ($filteredDevPackages) {
+ $packageMap = array_filter($packageMap, function ($item) use ($filteredDevPackages): bool {
return !in_array($item[0]->getName(), $filteredDevPackages, true);
});
} elseif ($filteredDevPackages) {
@@ -575,11 +592,11 @@ public function parseAutoloads(array $packageMap, PackageInterface $rootPackage,
/**
* Registers an autoloader based on an autoload-map returned by parseAutoloads
*
- * @param array $autoloads see parseAutoloads return value
- * @param ?string $vendorDir
+ * @param array $autoloads see parseAutoloads return value
+ * @param null|string $vendorDir
* @return ClassLoader
*/
- public function createLoader(array $autoloads, $vendorDir = null)
+ public function createLoader(array $autoloads, ?string $vendorDir = null)
{
$loader = new ClassLoader($vendorDir);
@@ -622,7 +639,7 @@ public function createLoader(array $autoloads, $vendorDir = null)
* @param string $appBaseDirCode
* @return ?string
*/
- protected function getIncludePathsFile(array $packageMap, Filesystem $filesystem, $basePath, $vendorPath, $vendorPathCode, $appBaseDirCode)
+ protected function getIncludePathsFile(array $packageMap, Filesystem $filesystem, string $basePath, string $vendorPath, string $vendorPathCode, string $appBaseDirCode)
{
$includePaths = array();
@@ -670,7 +687,7 @@ protected function getIncludePathsFile(array $packageMap, Filesystem $filesystem
* @param string $appBaseDirCode
* @return ?string
*/
- protected function getIncludeFilesFile(array $files, Filesystem $filesystem, $basePath, $vendorPath, $vendorPathCode, $appBaseDirCode)
+ protected function getIncludeFilesFile(array $files, Filesystem $filesystem, string $basePath, string $vendorPath, string $vendorPathCode, string $appBaseDirCode)
{
$filesCode = '';
foreach ($files as $fileIdentifier => $functionFile) {
@@ -702,7 +719,7 @@ protected function getIncludeFilesFile(array $files, Filesystem $filesystem, $ba
* @param string $path
* @return string
*/
- protected function getPathCode(Filesystem $filesystem, $basePath, $vendorPath, $path)
+ protected function getPathCode(Filesystem $filesystem, string $basePath, string $vendorPath, string $path)
{
if (!$filesystem->isAbsolutePath($path)) {
$path = $basePath . '/' . $path;
@@ -711,12 +728,8 @@ protected function getPathCode(Filesystem $filesystem, $basePath, $vendorPath, $
$baseDir = '';
if (strpos($path.'/', $vendorPath.'/') === 0) {
- $path = substr($path, strlen($vendorPath));
- $baseDir = '$vendorDir';
-
- if ($path !== false) {
- $baseDir .= " . ";
- }
+ $path = (string) substr($path, strlen($vendorPath));
+ $baseDir = '$vendorDir . ';
} else {
$path = $filesystem->normalizePath($filesystem->findShortestPath($basePath, $path, true));
if (!$filesystem->isAbsolutePath($path)) {
@@ -734,12 +747,11 @@ protected function getPathCode(Filesystem $filesystem, $basePath, $vendorPath, $
/**
* @param array $packageMap
- * @param string[] $ignorePlatformReqs
- * @param bool $checkPlatform
+ * @param bool|'php-only' $checkPlatform
* @param string[] $devPackageNames
* @return ?string
*/
- protected function getPlatformCheck(array $packageMap, array $ignorePlatformReqs, $checkPlatform, array $devPackageNames)
+ protected function getPlatformCheck(array $packageMap, $checkPlatform, array $devPackageNames)
{
$lowestPhpVersion = Bound::zero();
$requiredExtensions = array();
@@ -748,7 +760,7 @@ protected function getPlatformCheck(array $packageMap, array $ignorePlatformReqs
foreach ($packageMap as $item) {
$package = $item[0];
foreach (array_merge($package->getReplaces(), $package->getProvides()) as $link) {
- if (preg_match('{^ext-(.+)$}iD', $link->getTarget(), $match)) {
+ if (Preg::isMatch('{^ext-(.+)$}iD', $link->getTarget(), $match)) {
$extensionProviders[$match[1]][] = $link->getConstraint();
}
}
@@ -762,7 +774,7 @@ protected function getPlatformCheck(array $packageMap, array $ignorePlatformReqs
}
foreach ($package->getRequires() as $link) {
- if (in_array($link->getTarget(), $ignorePlatformReqs, true)) {
+ if ($this->platformRequirementFilter->isIgnored($link->getTarget())) {
continue;
}
@@ -773,7 +785,7 @@ protected function getPlatformCheck(array $packageMap, array $ignorePlatformReqs
}
}
- if ($checkPlatform === true && preg_match('{^ext-(.+)$}iD', $link->getTarget(), $match)) {
+ if ($checkPlatform === true && Preg::isMatch('{^ext-(.+)$}iD', $link->getTarget(), $match)) {
// skip extension checks if they have a valid provider/replacer
if (isset($extensionProviders[$match[1]])) {
foreach ($extensionProviders[$match[1]] as $provided) {
@@ -799,7 +811,7 @@ protected function getPlatformCheck(array $packageMap, array $ignorePlatformReqs
ksort($requiredExtensions);
- $formatToPhpVersionId = function (Bound $bound) {
+ $formatToPhpVersionId = function (Bound $bound): int {
if ($bound->isZero()) {
return 0;
}
@@ -897,7 +909,7 @@ protected function getPlatformCheck(array $packageMap, array $ignorePlatformReqs
* @param string $suffix
* @return string
*/
- protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix)
+ protected function getAutoloadFile(string $vendorPathToTargetDirCode, string $suffix)
{
$lastChar = $vendorPathToTargetDirCode[strlen($vendorPathToTargetDirCode) - 1];
if ("'" === $lastChar || '"' === $lastChar) {
@@ -911,6 +923,11 @@ protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix)
// autoload.php @generated by Composer
+if (PHP_VERSION_ID < 50600) {
+ echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+ exit(1);
+}
+
require_once $vendorPathToTargetDirCode;
return ComposerAutoloaderInit$suffix::getLoader();
@@ -921,18 +938,17 @@ protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix)
/**
* @param bool $useClassMap
* @param bool $useIncludePath
- * @param ?string $targetDirLoader
+ * @param null|string $targetDirLoader
* @param bool $useIncludeFiles
* @param string $vendorPathCode unused in this method
* @param string $appBaseDirCode unused in this method
* @param string $suffix
* @param bool $useGlobalIncludePath
* @param string $prependAutoloader 'true'|'false'
- * @param string $staticPhpVersion
* @param bool $checkPlatform
* @return string
*/
- protected function getAutoloadRealFile($useClassMap, $useIncludePath, $targetDirLoader, $useIncludeFiles, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion, $checkPlatform)
+ protected function getAutoloadRealFile(bool $useClassMap, bool $useIncludePath, ?string $targetDirLoader, bool $useIncludeFiles, string $vendorPathCode, string $appBaseDirCode, string $suffix, bool $useGlobalIncludePath, string $prependAutoloader, bool $checkPlatform)
{
$file = <<= $staticPhpVersion && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
- if (\$useStaticLoader) {
- require __DIR__ . '/autoload_static.php';
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInit$suffix::getInitializer(\$loader));
- call_user_func(\Composer\Autoload\ComposerStaticInit$suffix::getInitializer(\$loader));
- } else {
STATIC_INIT;
- if (!$this->classMapAuthoritative) {
- $file .= <<<'PSR04'
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
-
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
-
-
-PSR04;
- }
-
- if ($useClassMap) {
- $file .= <<<'CLASSMAP'
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
- }
-
-CLASSMAP;
- }
-
- $file .= " }\n\n";
-
if ($this->classMapAuthoritative) {
$file .= <<<'CLASSMAPAUTHORITATIVE'
$loader->setClassMapAuthoritative(true);
@@ -1064,11 +1050,7 @@ public static function getLoader()
if ($useIncludeFiles) {
$file .= << \$file) {
composerRequire$suffix(\$fileIdentifier, \$file);
}
@@ -1089,12 +1071,17 @@ public static function getLoader()
return $file . <<