Adds PHP 8.1 compatability (#671)

Adds PHP 8.1 compatability
This commit is contained in:
celestora 2022-08-19 20:22:32 +03:00 committed by GitHub
parent 6e17c446bf
commit d3ded41386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 127 additions and 105 deletions

View file

@ -102,7 +102,7 @@ function tr(string $stringId, ...$variables): string
}
for($i = 0; $i < sizeof($variables); $i++)
$output = preg_replace("%(?<!\\\\)(\\$)" . ($i + 1) . "%", $variables[$i], $output);
$output = preg_replace("%(?<!\\\\)(\\$)" . ($i + 1) . "%", (string) $variables[$i], $output);
}
return $output;

View file

@ -1,6 +1,6 @@
{
"require": {
"php": "~7.3",
"php": "~7.3||~8.1",
"guzzlehttp/guzzle": "^6.5",
"komeiji-satori/curl": "dev-master",
"whichbrowser/parser": "dev-master",

228
composer.lock generated
View file

@ -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": "ef138eb5561446039021ea091dae0b58",
"content-hash": "bf1e1680113afcac0e766daba5e899e0",
"packages": [
{
"name": "al/emoji-detector",
@ -107,16 +107,16 @@
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-qrcode.git",
"reference": "cde2af576b6b829b1a30e3042eba488c90d94478"
"reference": "c43715795d0fbcc913a2e9c5f8c757062ce0e8c7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/cde2af576b6b829b1a30e3042eba488c90d94478",
"reference": "cde2af576b6b829b1a30e3042eba488c90d94478",
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/c43715795d0fbcc913a2e9c5f8c757062ce0e8c7",
"reference": "c43715795d0fbcc913a2e9c5f8c757062ce0e8c7",
"shasum": ""
},
"require": {
"chillerlan/php-settings-container": "^2.1",
"chillerlan/php-settings-container": "^2.1.4",
"ext-mbstring": "*",
"php": "^7.4 || ^8.0"
},
@ -139,7 +139,8 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
"MIT",
"Apache-2.0"
],
"authors": [
{
@ -164,12 +165,13 @@
"homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors"
}
],
"description": "A QR code generator. PHP 7.4+",
"description": "A QR code generator and reader with a user friendly API. PHP 7.4+",
"homepage": "https://github.com/chillerlan/php-qrcode",
"keywords": [
"phpqrcode",
"qr",
"qr code",
"qr-reader",
"qrcode",
"qrcode-generator",
"qrcode-reader"
@ -188,20 +190,20 @@
"type": "ko_fi"
}
],
"time": "2022-06-06T21:09:20+00:00"
"time": "2022-08-09T13:01:31+00:00"
},
{
"name": "chillerlan/php-settings-container",
"version": "2.1.3",
"version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-settings-container.git",
"reference": "125dd573b45ffc7cabecf385986a356ba2c6f602"
"reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/125dd573b45ffc7cabecf385986a356ba2c6f602",
"reference": "125dd573b45ffc7cabecf385986a356ba2c6f602",
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
"reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
"shasum": ""
},
"require": {
@ -252,7 +254,7 @@
"type": "ko_fi"
}
],
"time": "2022-03-09T13:18:58+00:00"
"time": "2022-07-05T22:32:14+00:00"
},
{
"name": "erusev/parsedown",
@ -311,12 +313,12 @@
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "1db36fb09d4ab1bce79722014e70e7a96ad76165"
"reference": "dff4746e133777583fbf43d2b95372e8d818df1f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/1db36fb09d4ab1bce79722014e70e7a96ad76165",
"reference": "1db36fb09d4ab1bce79722014e70e7a96ad76165",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/dff4746e133777583fbf43d2b95372e8d818df1f",
"reference": "dff4746e133777583fbf43d2b95372e8d818df1f",
"shasum": ""
},
"require": {
@ -361,7 +363,7 @@
"issues": "https://github.com/ezyang/htmlpurifier/issues",
"source": "https://github.com/ezyang/htmlpurifier/tree/master"
},
"time": "2022-06-10T20:30:01+00:00"
"time": "2022-08-16T02:59:31+00:00"
},
{
"name": "guzzlehttp/guzzle",
@ -369,20 +371,20 @@
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "724562fa861e21a4071c652c8a159934e4f05592"
"reference": "a52f0440530b54fa079ce76e8c5d196a42cad981"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/724562fa861e21a4071c652c8a159934e4f05592",
"reference": "724562fa861e21a4071c652c8a159934e4f05592",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981",
"reference": "a52f0440530b54fa079ce76e8c5d196a42cad981",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.6.1",
"guzzlehttp/psr7": "^1.9",
"php": ">=5.5",
"symfony/polyfill-intl-idn": "^1.17.0"
"symfony/polyfill-intl-idn": "^1.17"
},
"require-dev": {
"ext-curl": "*",
@ -460,7 +462,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/6.5"
"source": "https://github.com/guzzle/guzzle/tree/6.5.8"
},
"funding": [
{
@ -476,7 +478,7 @@
"type": "tidelift"
}
],
"time": "2022-06-09T21:36:50+00:00"
"time": "2022-06-20T22:16:07+00:00"
},
{
"name": "guzzlehttp/promises",
@ -484,12 +486,12 @@
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
"reference": "a872440174bcdfd3392831de339656ac56122e26"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a872440174bcdfd3392831de339656ac56122e26",
"reference": "a872440174bcdfd3392831de339656ac56122e26",
"shasum": ""
},
"require": {
@ -545,7 +547,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.5.1"
"source": "https://github.com/guzzle/promises/tree/master"
},
"funding": [
{
@ -561,7 +563,7 @@
"type": "tidelift"
}
],
"time": "2021-10-22T20:56:57+00:00"
"time": "2022-07-31T08:57:45+00:00"
},
{
"name": "guzzlehttp/psr7",
@ -569,12 +571,12 @@
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "337e3ad8e5716c15f9657bd214d16cc5e69df268"
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/337e3ad8e5716c15f9657bd214d16cc5e69df268",
"reference": "337e3ad8e5716c15f9657bd214d16cc5e69df268",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
"shasum": ""
},
"require": {
@ -595,7 +597,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.7-dev"
"dev-master": "1.9-dev"
}
},
"autoload": {
@ -655,7 +657,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.x"
"source": "https://github.com/guzzle/psr7/tree/1.9.0"
},
"funding": [
{
@ -671,7 +673,7 @@
"type": "tidelift"
}
],
"time": "2022-03-20T21:51:18+00:00"
"time": "2022-06-20T21:43:03+00:00"
},
{
"name": "james-heinrich/getid3",
@ -679,12 +681,12 @@
"source": {
"type": "git",
"url": "https://github.com/JamesHeinrich/getID3.git",
"reference": "f8740d287b3efce78845f8646d3933345f1fb375"
"reference": "59439c58bfeedcfac551bef0d0ec9a2050b1a374"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/f8740d287b3efce78845f8646d3933345f1fb375",
"reference": "f8740d287b3efce78845f8646d3933345f1fb375",
"url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/59439c58bfeedcfac551bef0d0ec9a2050b1a374",
"reference": "59439c58bfeedcfac551bef0d0ec9a2050b1a374",
"shasum": ""
},
"require": {
@ -739,7 +741,7 @@
"issues": "https://github.com/JamesHeinrich/getID3/issues",
"source": "https://github.com/JamesHeinrich/getID3/tree/master"
},
"time": "2022-05-01T19:51:55+00:00"
"time": "2022-07-16T20:48:42+00:00"
},
{
"name": "komeiji-satori/curl",
@ -835,25 +837,29 @@
},
{
"name": "psr/cache",
"version": "1.0.1",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-fig/cache.git",
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
"reference": "0a7c67d0d1c8167b342eb74339d6f961663826ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
"url": "https://api.github.com/repos/php-fig/cache/zipball/0a7c67d0d1c8167b342eb74339d6f961663826ce",
"reference": "0a7c67d0d1c8167b342eb74339d6f961663826ce",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"php": ">=8.0.0"
},
"suggest": {
"fig/cache-util": "Provides some useful PSR-6 utilities"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "3.0.x-dev"
}
},
"autoload": {
@ -868,7 +874,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for caching libraries",
@ -880,26 +886,32 @@
"support": {
"source": "https://github.com/php-fig/cache/tree/master"
},
"time": "2016-08-06T20:24:11+00:00"
"time": "2021-02-24T03:25:37+00:00"
},
{
"name": "psr/container",
"version": "1.x-dev",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
"reference": "90db7b9ac2a2c5b849fcb69dde58f3ae182c68f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"url": "https://api.github.com/repos/php-fig/container/zipball/90db7b9ac2a2c5b849fcb69dde58f3ae182c68f5",
"reference": "90db7b9ac2a2c5b849fcb69dde58f3ae182c68f5",
"shasum": ""
},
"require": {
"php": ">=7.4.0"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@ -926,9 +938,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.2"
"source": "https://github.com/php-fig/container/tree/master"
},
"time": "2021-11-05T16:50:12+00:00"
"time": "2022-07-19T17:36:59+00:00"
},
{
"name": "psr/http-message",
@ -1097,12 +1109,12 @@
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "5757e662b9b4110420cf23ffbd92444f40c2e046"
"reference": "c54b0a33d296807bc44ca1305882b2d9f49a3632"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5757e662b9b4110420cf23ffbd92444f40c2e046",
"reference": "5757e662b9b4110420cf23ffbd92444f40c2e046",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/c54b0a33d296807bc44ca1305882b2d9f49a3632",
"reference": "c54b0a33d296807bc44ca1305882b2d9f49a3632",
"shasum": ""
},
"require": {
@ -1127,6 +1139,12 @@
},
"default-branch": true,
"type": "library",
"extra": {
"bamarni-bin": {
"forward-command": false,
"bin-links": false
}
},
"autoload": {
"psr-4": {
"ScssPhp\\ScssPhp\\": "src/"
@ -1161,7 +1179,7 @@
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/master"
},
"time": "2022-05-24T11:38:22+00:00"
"time": "2022-07-27T16:35:37+00:00"
},
{
"name": "symfony/console",
@ -1169,12 +1187,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "56f40c96d6619cd87717a066f7ce65054bfd38b1"
"reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/56f40c96d6619cd87717a066f7ce65054bfd38b1",
"reference": "56f40c96d6619cd87717a066f7ce65054bfd38b1",
"url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1",
"reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1",
"shasum": ""
},
"require": {
@ -1260,29 +1278,30 @@
"type": "tidelift"
}
],
"time": "2022-06-07T04:48:21+00:00"
"time": "2022-08-17T13:18:05+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "2.5.x-dev",
"version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
"reference": "4912000e79dc2d6df029d35d8755be1ed79b6691"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/4912000e79dc2d6df029d35d8755be1ed79b6691",
"reference": "4912000e79dc2d6df029d35d8755be1ed79b6691",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": ">=8.1"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
"dev-main": "3.2-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -1311,7 +1330,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/2.5"
"source": "https://github.com/symfony/deprecation-contracts/tree/main"
},
"funding": [
{
@ -1327,7 +1346,7 @@
"type": "tidelift"
}
],
"time": "2022-01-02T09:53:40+00:00"
"time": "2022-05-20T13:56:22+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -1994,22 +2013,21 @@
},
{
"name": "symfony/service-contracts",
"version": "2.5.x-dev",
"version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c"
"reference": "cb82f217a2029131afbcbd220c511d0d77ebed19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c",
"reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/cb82f217a2029131afbcbd220c511d0d77ebed19",
"reference": "cb82f217a2029131afbcbd220c511d0d77ebed19",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.1",
"symfony/deprecation-contracts": "^2.1|^3"
"php": ">=8.1",
"psr/container": "^2.0"
},
"conflict": {
"ext-psr": "<1.1|>=2"
@ -2017,10 +2035,11 @@
"suggest": {
"symfony/service-implementation": ""
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
"dev-main": "3.2-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -2030,7 +2049,10 @@
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
}
},
"exclude-from-classmap": [
"/Test/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -2057,7 +2079,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/service-contracts/tree/2.5"
"source": "https://github.com/symfony/service-contracts/tree/main"
},
"funding": [
{
@ -2073,40 +2095,39 @@
"type": "tidelift"
}
],
"time": "2022-03-13T20:07:29+00:00"
"time": "2022-05-30T19:19:18+00:00"
},
{
"name": "symfony/string",
"version": "5.4.x-dev",
"version": "6.2.x-dev",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "985e6a9703ef5ce32ba617c9c7d97873bb7b2a99"
"reference": "921ef9254d086d19c6332b390770b474fbb225c4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/985e6a9703ef5ce32ba617c9c7d97873bb7b2a99",
"reference": "985e6a9703ef5ce32ba617c9c7d97873bb7b2a99",
"url": "https://api.github.com/repos/symfony/string/zipball/921ef9254d086d19c6332b390770b474fbb225c4",
"reference": "921ef9254d086d19c6332b390770b474fbb225c4",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"php": ">=8.1",
"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"
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/translation-contracts": ">=3.0"
"symfony/translation-contracts": "<2.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"
"symfony/error-handler": "^5.4|^6.0",
"symfony/http-client": "^5.4|^6.0",
"symfony/intl": "^6.2",
"symfony/translation-contracts": "^2.0|^3.0",
"symfony/var-exporter": "^5.4|^6.0"
},
"default-branch": true,
"type": "library",
"autoload": {
"files": [
@ -2144,7 +2165,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.4.9"
"source": "https://github.com/symfony/string/tree/6.2"
},
"funding": [
{
@ -2160,7 +2181,7 @@
"type": "tidelift"
}
],
"time": "2022-04-19T10:40:37+00:00"
"time": "2022-08-17T12:37:54+00:00"
},
{
"name": "vearutop/php-obscene-censor-rus",
@ -2265,12 +2286,12 @@
"source": {
"type": "git",
"url": "https://github.com/wapmorgan/Morphos.git",
"reference": "ec18034d4a439139902c769a64bb67e59e3402a8"
"reference": "5550474d1cc6c8936bca66e86fee43f19c73a41a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wapmorgan/Morphos/zipball/ec18034d4a439139902c769a64bb67e59e3402a8",
"reference": "ec18034d4a439139902c769a64bb67e59e3402a8",
"url": "https://api.github.com/repos/wapmorgan/Morphos/zipball/5550474d1cc6c8936bca66e86fee43f19c73a41a",
"reference": "5550474d1cc6c8936bca66e86fee43f19c73a41a",
"shasum": ""
},
"require": {
@ -2278,7 +2299,8 @@
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
"php": ">=7.3",
"phpunit/phpunit": "~9.5.20"
},
"suggest": {
"ext-readline": "For using interactive version of script"
@ -2329,9 +2351,9 @@
],
"support": {
"issues": "https://github.com/wapmorgan/Morphos/issues",
"source": "https://github.com/wapmorgan/Morphos/tree/master"
"source": "https://github.com/wapmorgan/Morphos/tree/3.2.26"
},
"time": "2021-11-22T09:15:18+00:00"
"time": "2022-07-10T00:41:40+00:00"
},
{
"name": "whichbrowser/parser",
@ -2473,10 +2495,10 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "~7.3",
"php": "~7.3||~8.1",
"ext-simplexml": "*",
"ext-sodium": "*"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.3.0"
}