diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php
index cac6d8c54..6de790ff9 100755
--- a/classes/feeditem/atom.php
+++ b/classes/feeditem/atom.php
@@ -43,7 +43,8 @@ class FeedItem_Atom extends FeedItem_Common {
$links = $this->elem->getElementsByTagName("link");
foreach ($links as $link) {
- if ($link && $link->hasAttribute("href") &&
+ /** @phpstan-ignore-next-line */
+ if ($link->hasAttribute("href") &&
(!$link->hasAttribute("rel")
|| $link->getAttribute("rel") == "alternate"
|| $link->getAttribute("rel") == "standout")) {
@@ -180,7 +181,8 @@ class FeedItem_Atom extends FeedItem_Common {
$encs = [];
foreach ($links as $link) {
- if ($link && $link->hasAttribute("href") && $link->hasAttribute("rel")) {
+ /** @phpstan-ignore-next-line */
+ if ($link->hasAttribute("href") && $link->hasAttribute("rel")) {
$base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)", $link);
if ($link->getAttribute("rel") == "enclosure") {
diff --git a/classes/feeds.php b/classes/feeds.php
index fee0a7708..8981d6f14 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -248,11 +248,12 @@ class Feeds extends Handler_Protected {
function ($result, $plugin) use (&$line, &$button_doc) {
if ($result && $button_doc->loadXML($result)) {
- /** @var DOMElement|null */
+ /** @var DOMElement|null $child */
$child = $button_doc->firstChild;
if ($child) {
do {
+ /** @var DOMElement|null $child */
$child->setAttribute('data-plugin-name', get_class($plugin));
} while ($child = $child->nextSibling);
@@ -271,11 +272,12 @@ class Feeds extends Handler_Protected {
function ($result, $plugin) use (&$line, &$button_doc) {
if ($result && $button_doc->loadXML($result)) {
- /** @var DOMElement|null */
+ /** @var DOMElement|null $child */
$child = $button_doc->firstChild;
if ($child) {
do {
+ /** @var DOMElement|null $child */
$child->setAttribute('data-plugin-name', get_class($plugin));
} while ($child = $child->nextSibling);
diff --git a/classes/pref/filters.php b/classes/pref/filters.php
index 8f1c578b6..e7c7877a7 100755
--- a/classes/pref/filters.php
+++ b/classes/pref/filters.php
@@ -115,6 +115,7 @@ class Pref_Filters extends Handler_Protected {
$glue = $filter['match_any_rule'] ? " OR " : " AND ";
$scope_qpart = join($glue, $scope_qparts);
+ /** @phpstan-ignore-next-line */
if (!$scope_qpart) $scope_qpart = "true";
$rv = array();
diff --git a/classes/rssutils.php b/classes/rssutils.php
index 384830556..e039284f2 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -662,7 +662,7 @@ class RSSUtils {
print_r($item);
}
- if (ini_get("max_execution_time") > 0 && time() - $tstart >= ini_get("max_execution_time") * 0.7) {
+ if (ini_get("max_execution_time") > 0 && time() - $tstart >= ((float)ini_get("max_execution_time") * 0.7)) {
Debug::log("looks like there's too many articles to process at once, breaking out.", Debug::LOG_VERBOSE);
$pdo->commit();
break;
diff --git a/composer.json b/composer.json
index 8d00077dc..4c93039ee 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,7 @@
"j4mie/idiorm": "dev-master"
},
"require-dev": {
- "phpstan/phpstan": "1.1.2",
+ "phpstan/phpstan": "1.8.2",
"phpunit/phpunit": "9.5.16"
}
}
diff --git a/composer.lock b/composer.lock
index df4c441c9..aa18e8ebc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "26f1906259c39e542432c57d76f16369",
+ "content-hash": "6beda4561e770d2f0c7c532c5e3693d3",
"packages": [
{
"name": "beberlei/assert",
@@ -75,20 +75,20 @@
},
{
"name": "chillerlan/php-qrcode",
- "version": "4.3.3",
+ "version": "4.3.4",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-qrcode.git",
- "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3"
+ "reference": "2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3",
- "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3",
+ "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d",
+ "reference": "2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d",
"shasum": ""
},
"require": {
- "chillerlan/php-settings-container": "^2.1",
+ "chillerlan/php-settings-container": "^2.1.4",
"ext-mbstring": "*",
"php": "^7.4 || ^8.0"
},
@@ -137,7 +137,7 @@
],
"support": {
"issues": "https://github.com/chillerlan/php-qrcode/issues",
- "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3"
+ "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.4"
},
"funding": [
{
@@ -149,7 +149,7 @@
"type": "ko_fi"
}
],
- "time": "2021-11-25T22:38:09+00:00"
+ "time": "2022-07-25T09:12:45+00:00"
},
{
"name": "chillerlan/php-settings-container",
@@ -467,16 +467,16 @@
},
{
"name": "thecodingmachine/safe",
- "version": "v2.2.1",
+ "version": "v2.2.2",
"source": {
"type": "git",
"url": "https://github.com/thecodingmachine/safe.git",
- "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c"
+ "reference": "440284f9592c9df402832452a6871a8b3c48d97e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/2a8d758fd17763faf86e4aa798193e17b9fac38c",
- "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c",
+ "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/440284f9592c9df402832452a6871a8b3c48d97e",
+ "reference": "440284f9592c9df402832452a6871a8b3c48d97e",
"shasum": ""
},
"require": {
@@ -599,9 +599,9 @@
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
"support": {
"issues": "https://github.com/thecodingmachine/safe/issues",
- "source": "https://github.com/thecodingmachine/safe/tree/v2.2.1"
+ "source": "https://github.com/thecodingmachine/safe/tree/v2.2.2"
},
- "time": "2022-06-09T15:36:45+00:00"
+ "time": "2022-07-20T17:46:34+00:00"
}
],
"packages-dev": [
@@ -1130,20 +1130,20 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.1.2",
+ "version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934"
+ "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bcea0ae85868a89d5789c75f012c93129f842934",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c",
+ "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c",
"shasum": ""
},
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -1153,11 +1153,6 @@
"phpstan.phar"
],
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"files": [
"bootstrap.php"
@@ -1170,7 +1165,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
- "source": "https://github.com/phpstan/phpstan/tree/1.1.2"
+ "source": "https://github.com/phpstan/phpstan/tree/1.8.2"
},
"funding": [
{
@@ -1190,7 +1185,7 @@
"type": "tidelift"
}
],
- "time": "2021-11-09T12:41:09+00:00"
+ "time": "2022-07-20T09:57:31+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -2695,5 +2690,5 @@
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
- "plugin-api-version": "2.1.0"
+ "plugin-api-version": "2.0.0"
}
diff --git a/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
index 07cf16cb7..9b26bb201 100644
--- a/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
+++ b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
@@ -24,7 +24,7 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
@@ -62,7 +62,7 @@ jobs:
# run: git config --global core.autocrlf false
- name: "Checkout"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
@@ -79,6 +79,4 @@ jobs:
run: php vendor/bin/phpunit --configuration=phpunit.xml
- name: "Send code coverage report to Codecov.io"
- uses: codecov/codecov-action@v1
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
+ uses: codecov/codecov-action@v3
diff --git a/vendor/chillerlan/php-qrcode/README.md b/vendor/chillerlan/php-qrcode/README.md
index 21df49dee..f266e9bd5 100644
--- a/vendor/chillerlan/php-qrcode/README.md
+++ b/vendor/chillerlan/php-qrcode/README.md
@@ -3,17 +3,19 @@
A PHP 7.4+ QR Code library based on the [implementation](https://github.com/kazuhikoarase/qrcode-generator) by [Kazuhiko Arase](https://github.com/kazuhikoarase),
namespaced, cleaned up, improved and other stuff.
+**Attention:** there is now also a javascript port: [chillerlan/js-qrcode](https://github.com/chillerlan/js-qrcode).
+
[![PHP Version Support][php-badge]][php]
[![Packagist version][packagist-badge]][packagist]
[![License][license-badge]][license]
[![CodeCov][coverage-badge]][coverage]
[![Scrunitizer CI][scrutinizer-badge]][scrutinizer]
[![Packagist downloads][downloads-badge]][downloads]
-[![Continuous Integration][gh-action-badge]][gh-action]
+[![Continuous Integration][gh-action-badge]][gh-action]
[php-badge]: https://img.shields.io/packagist/php-v/chillerlan/php-qrcode?logo=php&color=8892BF
[php]: https://www.php.net/supported-versions.php
-[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-qrcode.svg
+[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-qrcode.svg?logo=packagist
[packagist]: https://packagist.org/packages/chillerlan/php-qrcode
[license-badge]: https://img.shields.io/github/license/chillerlan/php-qrcode.svg
[license]: https://github.com/chillerlan/php-qrcode/blob/main/LICENSE
@@ -21,47 +23,48 @@ namespaced, cleaned up, improved and other stuff.
[coverage]: https://codecov.io/github/chillerlan/php-qrcode
[scrutinizer-badge]: https://img.shields.io/scrutinizer/g/chillerlan/php-qrcode.svg?logo=scrutinizer
[scrutinizer]: https://scrutinizer-ci.com/g/chillerlan/php-qrcode
-[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-qrcode.svg
+[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-qrcode.svg?logo=packagist
[downloads]: https://packagist.org/packages/chillerlan/php-qrcode/stats
[gh-action-badge]: https://github.com/chillerlan/php-qrcode/workflows/Continuous%20Integration/badge.svg
[gh-action]: https://github.com/chillerlan/php-qrcode/actions?query=workflow%3A%22Continuous+Integration%22+branch%3Av4.3.x
-## Documentation
+# Documentation
-See [the wiki](https://github.com/chillerlan/php-qrcode/wiki) for advanced documentation.
-An API documentation created with [phpDocumentor](https://www.phpdoc.org/) can be found at https://chillerlan.github.io/php-qrcode/ (WIP).
-
-### Requirements
+## Requirements
- PHP 7.4+
- `ext-mbstring`
- - optional:
+ - optional:
- `ext-json`, `ext-gd`
- `ext-imagick` with [ImageMagick](https://imagemagick.org) installed
- [`setasign/fpdf`](https://github.com/setasign/fpdf) for the PDF output module
-### Installation
+## Installation
**requires [composer](https://getcomposer.org)**
via terminal: `composer require chillerlan/php-qrcode`
-*composer.json*
+*composer.json*
```json
{
"require": {
- "php": "^7.4",
- "chillerlan/php-qrcode": "dev-main"
+ "php": "^7.4 || ^8.0",
+ "chillerlan/php-qrcode": "v4.3.x-dev"
}
}
```
-Note: replace `dev-main` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^3.2` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
-For PHP version ...
+Note: replace `v4.3.x-dev` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^4.3` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
+For PHP version ...
- 7.4+ use `^4.3`
- - 7.2+ use `^3.4.1` (PHP 7.2 is EOL and 7.3 soon! v3.4.1 also supports PHP8 - however, it's no longer supported)
- - 7.0+ use `^2.0` (PHP 7.0 and 7.1 are EOL!)
+ - 7.2+ use `^3.4.1` (v3.4.1 also supports PHP8)
+ - 7.0+ use `^2.0`
- 5.6+ use `^1.0` (please let PHP 5 die!)
-### Quickstart
+In case you want to keep using `v4.3.x-dev`, specify the hash of a commit to avoid running into unforseen issues like so: `v4.3.x-dev#c115f7bc51d466ccb24c544e88329804aad8c2a0`
+
+PSA: [PHP 7.0 - 7.3 are EOL](https://www.php.net/supported-versions.php) and therefore the respective `QRCode` versions are also no longer supported!
+
+## Quickstart
We want to encode this URI for a mobile authenticator into a QRcode image:
```php
$data = 'otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net';
@@ -71,33 +74,349 @@ echo '';
```
-
-
+
+
-
+
@@ -26,13 +26,13 @@ can be checked before you run the actual line.
-
+
-
+
@@ -40,9 +40,9 @@ can be checked before you run the actual line.
-
+
-
+
@@ -53,6 +53,14 @@ can be checked before you run the actual line.
+
+
+
+
+
+
+
+
[**You can now sponsor my open-source work on PHPStan through GitHub Sponsors.**](https://github.com/sponsors/ondrejmirtes)
@@ -69,6 +77,7 @@ All the documentation lives on the [phpstan.org website](https://phpstan.org/):
* [PHPDocs Basics](https://phpstan.org/writing-php-code/phpdocs-basics) &Â [PHPDoc Types](https://phpstan.org/writing-php-code/phpdoc-types)
* [Extension Library](https://phpstan.org/user-guide/extension-library)
* [Developing Extensions](https://phpstan.org/developing-extensions/extension-types)
+* [API Reference](https://apiref.phpstan.org/)
## PHPStan Pro
diff --git a/vendor/phpstan/phpstan/composer.json b/vendor/phpstan/phpstan/composer.json
index 2c9e27962..498cc3816 100644
--- a/vendor/phpstan/phpstan/composer.json
+++ b/vendor/phpstan/phpstan/composer.json
@@ -3,7 +3,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"license": ["MIT"],
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -12,11 +12,6 @@
"phpstan",
"phpstan.phar"
],
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"files": ["bootstrap.php"]
}
diff --git a/vendor/phpstan/phpstan/phpstan.phar b/vendor/phpstan/phpstan/phpstan.phar
index 306020e3a..d2a91a0d5 100755
Binary files a/vendor/phpstan/phpstan/phpstan.phar and b/vendor/phpstan/phpstan/phpstan.phar differ
diff --git a/vendor/phpstan/phpstan/phpstan.phar.asc b/vendor/phpstan/phpstan/phpstan.phar.asc
index 9110c4aa3..d6e96fbf5 100644
--- a/vendor/phpstan/phpstan/phpstan.phar.asc
+++ b/vendor/phpstan/phpstan/phpstan.phar.asc
@@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
-iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmGKbGQACgkQzxoQjQ56
-5yAy7BAAgT9+V81RuOMz6F16uqm4gXH1ebioWokEvVb6ZR2fk7p3/m14STmmRkwe
-MIkxzWKtx/wSC6VafqAtkBPNxpo2j5QU0pmfMAvkPHh79d2lWmUaJmF71I/DCNnh
-pcZNJLe5x+YTDKU6NnwMlyZEvdaWmyJ2MCf2apBZIJ7axefEJRVVin2pshhXwbtN
-dHhrT9yFYe/vqOkOLtGDWw+yT1I6he7IpoYZUTyO9b7eadC0ga6Bet7jibNL8JBE
-cGcB2MFg9bvif0PgIOio0jQXAWjf0ZBXPvoOwTRCqq/UOPTL8SRtiflAFiFOAzk/
-FRQVC0+26NsGx7R8kS5FZNOHYTIElY1ElyzFk8HWgqrYIvzDNLtkJ68178rDJ29f
-GyAax4P+gN13biyXQycQHhXDfHN1UytopldiRkitXVFGq92sz6BFgQDLF9yxQOm1
-iL5oxWSVf6rM8AOc3DV9Aa1kCpG6FrZPJ66NBgJLzTpKARzt7CM+M8VQNA/KnHB3
-8Mt0WmAeRORSnBWQksOlnA4VUkxWDGkZGVBWMRist7gghfG7n7HxTAUAk1oo7j2b
-/gTwbeOjv/330uZG31e+hCcaj/EcocHvglegWCPMmIhpXqn25TC+87QkGt2wb6z6
-dpzTdy3Pimr5BK2YrN1+Le33CYeHKlc+6XL34BEVebAQ/A9OB/M=
-=k3NZ
+iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmLX0XwACgkQzxoQjQ56
+5yAmDw/+KPoaY+vsYXrYjbNcYmXyH+9ca8Yl1WkgqMOAAiojQBAdN+PIeXqdM4P1
+ODJq7SGPqhR5j9dK3k4wxvTkmAVlFHWCbOQS0eCueoV2s0w0Sg9xkut7zTMwwBTp
+I+0TbU9W7DdnDk6k6xoNCNhT8OYpMElmwhS9nChoY2+cwdWJNZ0Lr5JeXwvb5R7W
+YnHUqO/zTIAjwJNdKwb27J9szwL3GQ4nB9gSoKXCFQTIONszfMYNwboy3VlD8m/F
+irh9ZZeZsMlCpEO9Rsqx4QyOvbLy0D2jEOKNYzXPQea9dx9gQvDiWJrVETsQBwkc
+iWJ/HJVhs3ng7iyUfMr8VAPn7rf+3fSqYeQUs5Z5/ubqABF2ZI9/4DIPGsXtqH7q
+b5OTOvSucvRpsxudnJElKWhkCjZUyjYzBqGdZ6erCh+GTiM4uFNB/en/QObfHmP2
+z4D41Dk9peLxstqlrwoLL0sJCHR4fQZFvPKrQ6sKlTKliu1zBc0HcEqq3BFalKF+
+XO2PT1QVNXx/9IqOruKm+M5siY63VKDwE/DXJZZTUPz7GN/Cr9j5Jz3pjq8jL0CR
+e4D+sEu7xXzlJa7MFqg2odZhLTRYuM/DHZCj3cOyQGlYUQ+tZMGsAiix9JyO7XhB
+1jzEMugtAglPAsmHr0HR/+oz+YDgwQEmQA4VO4l0swCNmjzLITA=
+=LM6h
-----END PGP SIGNATURE-----
diff --git a/vendor/thecodingmachine/safe/deprecated/array.php b/vendor/thecodingmachine/safe/deprecated/array.php
index f0b3a20b7..691ea7394 100644
--- a/vendor/thecodingmachine/safe/deprecated/array.php
+++ b/vendor/thecodingmachine/safe/deprecated/array.php
@@ -4,6 +4,79 @@ namespace Safe;
use Safe\Exceptions\ArrayException;
+/**
+ * array_replace_recursive replaces the values of
+ * array with the same values from all the following
+ * arrays. If a key from the first array exists in the second array, its value
+ * will be replaced by the value from the second array. If the key exists in the
+ * second array, and not the first, it will be created in the first array.
+ * If a key only exists in the first array, it will be left as is.
+ * If several arrays are passed for replacement, they will be processed
+ * in order, the later array overwriting the previous values.
+ *
+ * array_replace_recursive is recursive : it will recurse into
+ * arrays and apply the same process to the inner value.
+ *
+ * When the value in the first array is scalar, it will be replaced
+ * by the value in the second array, may it be scalar or array.
+ * When the value in the first array and the second array
+ * are both arrays, array_replace_recursive will replace
+ * their respective value recursively.
+ *
+ * @param array $array The array in which elements are replaced.
+ * @param array $replacements Arrays from which elements will be extracted.
+ * @return array Returns an array.
+ * @throws ArrayException
+ *
+ */
+function array_replace_recursive(array $array, array ...$replacements): array
+{
+ error_clear_last();
+ if ($replacements !== []) {
+ $result = \array_replace_recursive($array, ...$replacements);
+ } else {
+ $result = \array_replace_recursive($array);
+ }
+ if ($result === null) {
+ throw ArrayException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * array_replace replaces the values of
+ * array with values having the same keys in each of the following
+ * arrays. If a key from the first array exists in the second array, its value
+ * will be replaced by the value from the second array. If the key exists in the
+ * second array, and not the first, it will be created in the first array.
+ * If a key only exists in the first array, it will be left as is.
+ * If several arrays are passed for replacement, they will be processed
+ * in order, the later arrays overwriting the previous values.
+ *
+ * array_replace is not recursive : it will replace
+ * values in the first array by whatever type is in the second array.
+ *
+ * @param array $array The array in which elements are replaced.
+ * @param array $replacements Arrays from which elements will be extracted.
+ * Values from later arrays overwrite the previous values.
+ * @return array Returns an array.
+ * @throws ArrayException
+ *
+ */
+function array_replace(array $array, array ...$replacements): array
+{
+ error_clear_last();
+ if ($replacements !== []) {
+ $result = \array_replace($array, ...$replacements);
+ } else {
+ $result = \array_replace($array);
+ }
+ if ($result === null) {
+ throw ArrayException::createFromPhpError();
+ }
+ return $result;
+}
+
/**
* array_flip returns an array in flip
* order, i.e. keys from array become values and values
diff --git a/vendor/thecodingmachine/safe/deprecated/functionsList.php b/vendor/thecodingmachine/safe/deprecated/functionsList.php
index 6b39199c8..b75d7abb2 100644
--- a/vendor/thecodingmachine/safe/deprecated/functionsList.php
+++ b/vendor/thecodingmachine/safe/deprecated/functionsList.php
@@ -12,6 +12,8 @@ return [
'apc_load_constants',
'apc_sma_info',
'arsort',
+ 'array_replace',
+ 'array_replace_recursive',
'array_combine',
'array_flip',
'asort',
diff --git a/vendor/thecodingmachine/safe/generated/array.php b/vendor/thecodingmachine/safe/generated/array.php
index 37fa077a6..39a77b5e4 100644
--- a/vendor/thecodingmachine/safe/generated/array.php
+++ b/vendor/thecodingmachine/safe/generated/array.php
@@ -4,81 +4,6 @@ namespace Safe;
use Safe\Exceptions\ArrayException;
-/**
- * array_replace_recursive replaces the values of
- * array with the same values from all the following
- * arrays. If a key from the first array exists in the second array, its value
- * will be replaced by the value from the second array. If the key exists in the
- * second array, and not the first, it will be created in the first array.
- * If a key only exists in the first array, it will be left as is.
- * If several arrays are passed for replacement, they will be processed
- * in order, the later array overwriting the previous values.
- *
- * array_replace_recursive is recursive : it will recurse into
- * arrays and apply the same process to the inner value.
- *
- * When the value in the first array is scalar, it will be replaced
- * by the value in the second array, may it be scalar or array.
- * When the value in the first array and the second array
- * are both arrays, array_replace_recursive will replace
- * their respective value recursively.
- *
- * @param array $array The array in which elements are replaced.
- * @param array $replacements Arrays from which elements will be extracted.
- * @return array Returns an array.
- * @throws ArrayException
- *
- */
-function array_replace_recursive(array $array, array ...$replacements): array
-{
- error_clear_last();
- if ($replacements !== []) {
- $result = \array_replace_recursive($array, ...$replacements);
- } else {
- $result = \array_replace_recursive($array);
- }
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * array_replace replaces the values of
- * array with values having the same keys in each of the following
- * arrays. If a key from the first array exists in the second array, its value
- * will be replaced by the value from the second array. If the key exists in the
- * second array, and not the first, it will be created in the first array.
- * If a key only exists in the first array, it will be left as is.
- * If several arrays are passed for replacement, they will be processed
- * in order, the later arrays overwriting the previous values.
- *
- * array_replace is not recursive : it will replace
- * values in the first array by whatever type is in the second array.
- *
- * @param array $array The array in which elements are replaced.
- * @param array $replacements Arrays from which elements will be extracted.
- * Values from later arrays overwrite the previous values.
- * @return array Returns an array.
- * @throws ArrayException
- *
- */
-function array_replace(array $array, array ...$replacements): array
-{
- error_clear_last();
- if ($replacements !== []) {
- $result = \array_replace($array, ...$replacements);
- } else {
- $result = \array_replace($array);
- }
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-
/**
* Applies the user-defined callback function to each
* element of the array. This function will recurse
diff --git a/vendor/thecodingmachine/safe/generated/curl.php b/vendor/thecodingmachine/safe/generated/curl.php
index a85379a63..3c89871c3 100644
--- a/vendor/thecodingmachine/safe/generated/curl.php
+++ b/vendor/thecodingmachine/safe/generated/curl.php
@@ -18,7 +18,7 @@ function curl_copy_handle(\CurlHandle $handle): \CurlHandle
error_clear_last();
$result = \curl_copy_handle($handle);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -39,7 +39,7 @@ function curl_escape(\CurlHandle $handle, string $string): string
error_clear_last();
$result = \curl_escape($handle, $string);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -64,7 +64,7 @@ function curl_exec(\CurlHandle $handle)
error_clear_last();
$result = \curl_exec($handle);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -541,7 +541,7 @@ function curl_getinfo(\CurlHandle $handle, int $option = null)
$result = \curl_getinfo($handle);
}
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -627,7 +627,7 @@ function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_mess
error_clear_last();
$result = \curl_multi_info_read($multi_handle, $queued_messages);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($multi_handle);
}
return $result;
}
@@ -791,7 +791,7 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
error_clear_last();
$result = \curl_multi_setopt($multi_handle, $option, $value);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($multi_handle);
}
}
@@ -1284,6 +1284,18 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
*
*
*
+ * CURLOPT_SAFE_UPLOAD
+ *
+ * Always TRUE, what disables support for the @ prefix for
+ * uploading files in CURLOPT_POSTFIELDS, which
+ * means that values starting with @ can be safely
+ * passed as fields. CURLFile may be used for
+ * uploads instead.
+ *
+ *
+ *
+ *
+ *
* CURLOPT_SUPPRESS_CONNECT_HEADERS
*
* TRUE to suppress proxy CONNECT response headers from the user callback functions
@@ -2576,7 +2588,7 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
*
* CURLOPT_PROXY_TLSAUTH_USERNAME
*
- * Tusername to use for the HTTPS proxy TLS authentication method specified with the
+ * The username to use for the HTTPS proxy TLS authentication method specified with the
* CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the
* CURLOPT_PROXY_TLSAUTH_PASSWORD option to also be set.
*
@@ -3142,7 +3154,7 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void
error_clear_last();
$result = \curl_setopt($handle, $option, $value);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
}
@@ -3161,7 +3173,7 @@ function curl_share_errno(\CurlShareHandle $share_handle): int
error_clear_last();
$result = \curl_share_errno($share_handle);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($share_handle);
}
return $result;
}
@@ -3238,7 +3250,7 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value):
error_clear_last();
$result = \curl_share_setopt($share_handle, $option, $value);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($share_handle);
}
}
@@ -3258,7 +3270,7 @@ function curl_unescape(\CurlHandle $handle, string $string): string
error_clear_last();
$result = \curl_unescape($handle, $string);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
diff --git a/vendor/thecodingmachine/safe/generated/exec.php b/vendor/thecodingmachine/safe/generated/exec.php
index c4dd49114..126438d43 100644
--- a/vendor/thecodingmachine/safe/generated/exec.php
+++ b/vendor/thecodingmachine/safe/generated/exec.php
@@ -85,10 +85,10 @@ function passthru(string $command, ?int &$result_code = null): void
* @param int $priority The new priority value, the value of this may differ on platforms.
*
* On Unix, a low value, such as -20 means high priority
- * wheras a positive value have a lower priority.
+ * whereas positive values have a lower priority.
*
- * For Windows the priority parameter have the
- * following meanings:
+ * For Windows the priority parameter has the
+ * following meaning:
* @throws ExecException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/filesystem.php b/vendor/thecodingmachine/safe/generated/filesystem.php
index 7f1b08bb0..f3e5a2081 100644
--- a/vendor/thecodingmachine/safe/generated/filesystem.php
+++ b/vendor/thecodingmachine/safe/generated/filesystem.php
@@ -1240,6 +1240,13 @@ function lstat(string $filename): array
* Attempts to create the directory specified by directory.
*
* @param string $directory The directory path.
+ * A URL can be used as a
+ * filename with this function if the fopen wrappers have been enabled.
+ * See fopen for more details on how to specify the
+ * filename. See the for links to information
+ * about what abilities the various wrappers have, notes on their usage,
+ * and information on any predefined variables they may
+ * provide.
* @param int $permissions The permissions are 0777 by default, which means the widest possible
* access. For more information on permissions, read the details
* on the chmod page.
@@ -1250,8 +1257,8 @@ function lstat(string $filename): array
* which means it should have a leading zero. The permissions is also modified
* by the current umask, which you can change using
* umask.
- * @param bool $recursive Allows the creation of nested directories specified in the
- * directory.
+ * @param bool $recursive If TRUE, then any parent directories to the directory specified will
+ * also be created, with the same permissions.
* @param resource $context A context stream
* resource.
* @throws FilesystemException
diff --git a/vendor/thecodingmachine/safe/generated/functionsList.php b/vendor/thecodingmachine/safe/generated/functionsList.php
index 3c537d1f6..5a590058e 100644
--- a/vendor/thecodingmachine/safe/generated/functionsList.php
+++ b/vendor/thecodingmachine/safe/generated/functionsList.php
@@ -14,8 +14,6 @@ return [
'apcu_inc',
'apcu_sma_info',
'apc_fetch',
- 'array_replace',
- 'array_replace_recursive',
'array_walk_recursive',
'assert_options',
'base64_decode',
diff --git a/vendor/thecodingmachine/safe/generated/json.php b/vendor/thecodingmachine/safe/generated/json.php
index 76fc6c17e..e524c6178 100644
--- a/vendor/thecodingmachine/safe/generated/json.php
+++ b/vendor/thecodingmachine/safe/generated/json.php
@@ -6,7 +6,12 @@ use Safe\Exceptions\JsonException;
/**
* Returns a string containing the JSON representation of the supplied
- * value.
+ * value. If the parameter is an array or object,
+ * it will be serialized recursively.
+ *
+ * If a value to be serialized is an object, then by default only publicly visible
+ * properties will be included. Alternatively, a class may implement JsonSerializable
+ * to control how its values are serialized to JSON.
*
* The encoding is affected by the supplied flags
* and additionally the encoding of float values depends on the value of
diff --git a/vendor/thecodingmachine/safe/generated/ldap.php b/vendor/thecodingmachine/safe/generated/ldap.php
index 97b42e5a5..0bfaaaf2b 100644
--- a/vendor/thecodingmachine/safe/generated/ldap.php
+++ b/vendor/thecodingmachine/safe/generated/ldap.php
@@ -239,36 +239,36 @@ function ldap_exop_whoami($ldap)
/**
- * Performs an extended operation on the specified link with
- * reqoid the OID of the operation and
- * reqdata the data.
+ * Performs an extended operation on the specified ldap with
+ * request_oid the OID of the operation and
+ * request_data the data.
*
* @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
- * @param string $reqoid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.
- * @param string $reqdata The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.
- * @param array|null $serverctrls Array of LDAP Controls to send with the request.
- * @param string|null $retdata Will be filled with the extended operation response data if provided.
+ * @param string $request_oid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.
+ * @param string $request_data The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.
+ * @param array|null $controls Array of LDAP Controls to send with the request.
+ * @param string|null $response_data Will be filled with the extended operation response data if provided.
* If not provided you may use ldap_parse_exop on the result object
* later to get this data.
- * @param string|null $retoid Will be filled with the response OID if provided, usually equal to the request OID.
- * @return resource|bool When used with retdata, returns TRUE on success.
- * When used without retdata, returns a result identifier.
+ * @param string|null $response_oid Will be filled with the response OID if provided, usually equal to the request OID.
+ * @return resource|bool When used with response_data, returns TRUE on success.
+ * When used without response_data, returns a result identifier.
* @throws LdapException
*
*/
-function ldap_exop($ldap, string $reqoid, string $reqdata = null, ?array $serverctrls = null, ?string &$retdata = null, ?string &$retoid = null)
+function ldap_exop($ldap, string $request_oid, string $request_data = null, ?array $controls = null, ?string &$response_data = null, ?string &$response_oid = null)
{
error_clear_last();
- if ($retoid !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata, $retoid);
- } elseif ($retdata !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata);
- } elseif ($serverctrls !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls);
- } elseif ($reqdata !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata);
+ if ($response_oid !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid);
+ } elseif ($response_data !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data);
+ } elseif ($controls !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data, $controls);
+ } elseif ($request_data !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data);
} else {
- $result = \ldap_exop($ldap, $reqoid);
+ $result = \ldap_exop($ldap, $request_oid);
}
if ($result === false) {
throw LdapException::createFromPhpError();
diff --git a/vendor/thecodingmachine/safe/generated/pcntl.php b/vendor/thecodingmachine/safe/generated/pcntl.php
index 66cc28d46..d05f7ff3d 100644
--- a/vendor/thecodingmachine/safe/generated/pcntl.php
+++ b/vendor/thecodingmachine/safe/generated/pcntl.php
@@ -11,8 +11,9 @@ use Safe\Exceptions\PcntlException;
* man page for specific details.
*
* @param int $process_id If NULL, the process id of the current process is used.
- * @param int $mode One of PRIO_PGRP, PRIO_USER
- * or PRIO_PROCESS.
+ * @param int $mode One of PRIO_PGRP, PRIO_USER,
+ * PRIO_PROCESS,
+ * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD.
* @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable
* scheduling.
* @throws PcntlException
@@ -46,8 +47,9 @@ function pcntl_getpriority(int $process_id = null, int $mode = PRIO_PROCESS): in
* system types and kernel versions, please see your system's setpriority(2)
* man page for specific details.
* @param int $process_id If NULL, the process id of the current process is used.
- * @param int $mode One of PRIO_PGRP, PRIO_USER
- * or PRIO_PROCESS.
+ * @param int $mode One of PRIO_PGRP, PRIO_USER,
+ * PRIO_PROCESS,
+ * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD.
* @throws PcntlException
*
*/
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
index d0dbdb695..3401b57b8 100644
--- a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
+++ b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
@@ -8,8 +8,8 @@ class CurlException extends \Exception implements SafeExceptionInterface
/**
* @param \CurlHandle $ch
*/
- public static function createFromPhpError($ch): self
+ public static function createFromPhpError($ch = null): self
{
- return new self(\curl_error($ch), \curl_errno($ch));
+ return new self($ch ? \curl_error($ch) : '', $ch ? \curl_errno($ch) : 0);
}
}
diff --git a/vendor/thecodingmachine/safe/rector-migrate.php b/vendor/thecodingmachine/safe/rector-migrate.php
index efa2a2862..4f17de5e6 100644
--- a/vendor/thecodingmachine/safe/rector-migrate.php
+++ b/vendor/thecodingmachine/safe/rector-migrate.php
@@ -24,8 +24,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'apcu_inc' => 'Safe\apcu_inc',
'apcu_sma_info' => 'Safe\apcu_sma_info',
'apc_fetch' => 'Safe\apc_fetch',
- 'array_replace' => 'Safe\array_replace',
- 'array_replace_recursive' => 'Safe\array_replace_recursive',
'array_walk_recursive' => 'Safe\array_walk_recursive',
'assert_options' => 'Safe\assert_options',
'base64_decode' => 'Safe\base64_decode',