Update psalm to 4.27 fixing newly discovered issues
MODIFY
composer.json
composer.json
},
"require-dev": {
"laminas/laminas-coding-standard": "^2.4.0",
- "laminas/laminas-db": "^2.7",
- "laminas/laminas-filter": "^2.14.0",
- "laminas/laminas-http": "^2.14.2",
- "laminas/laminas-i18n": "^2.15.0",
- "laminas/laminas-session": "^2.12.1",
+ "laminas/laminas-db": "^2.15.0",
+ "laminas/laminas-filter": "^2.18.0",
+ "laminas/laminas-http": "^2.16.0",
+ "laminas/laminas-i18n": "^2.17.0",
+ "laminas/laminas-session": "^2.13.0",
"laminas/laminas-uri": "^2.9.1",
"phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.5.21",
+ "phpunit/phpunit": "^9.5.24",
"psalm/plugin-phpunit": "^0.17.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
- "vimeo/psalm": "^4.24.0"
+ "vimeo/psalm": "^4.27.0"
},
"suggest": {
"laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator",

MODIFY
composer.lock
composer.lock
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "b99de6e42a0689e2cc05c918c3bd2b66",
+ "content-hash": "692419bd211c070dc48def1f401530d0",
"packages": [
{
"name": "laminas/laminas-servicemanager",
},
{
"name": "laminas/laminas-filter",
- "version": "2.17.0",
+ "version": "2.18.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-filter.git",
- "reference": "7c78483f22e118fbc98be41dc24b39e8c17cdcae"
+ "reference": "8d352d8d031af69a366ba5eb5b812a5d33e97c3c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/7c78483f22e118fbc98be41dc24b39e8c17cdcae",
- "reference": "7c78483f22e118fbc98be41dc24b39e8c17cdcae",
+ "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/8d352d8d031af69a366ba5eb5b812a5d33e97c3c",
+ "reference": "8d352d8d031af69a366ba5eb5b812a5d33e97c3c",
"shasum": ""
},
"require": {
"type": "community_bridge"
}
],
- "time": "2022-07-17T11:58:06+00:00"
+ "time": "2022-09-09T05:08:45+00:00"
},
{
"name": "laminas/laminas-http",
},
{
"name": "nikic/php-parser",
- "version": "v4.14.0",
+ "version": "v4.15.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
+ "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
- "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
+ "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1"
},
- "time": "2022-05-31T20:59:12+00:00"
+ "time": "2022-09-04T07:30:47+00:00"
},
{
"name": "openlss/lib-array2xml",
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.16",
+ "version": "9.2.17",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073"
+ "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2593003befdcc10db5e213f9f28814f5aa8ac073",
- "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8",
+ "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.16"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17"
},
"funding": [
{
"type": "github"
}
],
- "time": "2022-08-20T05:26:47+00:00"
+ "time": "2022-08-30T12:24:04+00:00"
},
{
"name": "phpunit/php-file-iterator",
},
{
"name": "phpunit/phpunit",
- "version": "9.5.23",
+ "version": "9.5.24",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "888556852e7e9bbeeedb9656afe46118765ade34"
+ "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/888556852e7e9bbeeedb9656afe46118765ade34",
- "reference": "888556852e7e9bbeeedb9656afe46118765ade34",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
+ "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
"shasum": ""
},
"require": {
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^3.0",
+ "sebastian/type": "^3.1",
"sebastian/version": "^3.0.2"
},
"suggest": {
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.23"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24"
},
"funding": [
{
"type": "github"
}
],
- "time": "2022-08-22T14:01:36+00:00"
+ "time": "2022-08-30T07:42:16+00:00"
},
{
"name": "psalm/plugin-phpunit",
},
{
"name": "sebastian/type",
- "version": "3.0.0",
+ "version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad"
+ "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
- "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
+ "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
"shasum": ""
},
"require": {
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "3.2-dev"
}
},
"autoload": {
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.0.0"
+ "source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
},
"funding": [
{
"type": "github"
}
],
- "time": "2022-03-15T09:54:48+00:00"
+ "time": "2022-09-12T14:47:03+00:00"
},
{
"name": "sebastian/version",
},
{
"name": "symfony/console",
- "version": "v5.4.11",
+ "version": "v5.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "535846c7ee6bc4dd027ca0d93220601456734b10"
+ "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/535846c7ee6bc4dd027ca0d93220601456734b10",
- "reference": "535846c7ee6bc4dd027ca0d93220601456734b10",
+ "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1",
+ "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1",
"shasum": ""
},
"require": {
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v5.4.11"
+ "source": "https://github.com/symfony/console/tree/v5.4.12"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2022-07-22T10:42:43+00:00"
+ "time": "2022-08-17T13:18:05+00:00"
},
{
"name": "symfony/deprecation-contracts",
},
{
"name": "symfony/string",
- "version": "v5.4.11",
+ "version": "v5.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322"
+ "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/5eb661e49ad389e4ae2b6e4df8d783a8a6548322",
- "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322",
+ "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058",
+ "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058",
"shasum": ""
},
"require": {
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v5.4.11"
+ "source": "https://github.com/symfony/string/tree/v5.4.12"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2022-07-24T16:15:25+00:00"
+ "time": "2022-08-12T17:03:11+00:00"
},
{
"name": "theseer/tokenizer",
},
{
"name": "vimeo/psalm",
- "version": "4.26.0",
+ "version": "4.27.0",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
- "reference": "6998fabb2bf528b65777bf9941920888d23c03ac"
+ "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/vimeo/psalm/zipball/6998fabb2bf528b65777bf9941920888d23c03ac",
- "reference": "6998fabb2bf528b65777bf9941920888d23c03ac",
+ "url": "https://api.github.com/repos/vimeo/psalm/zipball/faf106e717c37b8c81721845dba9de3d8deed8ff",
+ "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/vimeo/psalm/issues",
- "source": "https://github.com/vimeo/psalm/tree/4.26.0"
+ "source": "https://github.com/vimeo/psalm/tree/4.27.0"
},
- "time": "2022-07-31T13:10:26+00:00"
+ "time": "2022-08-31T13:47:09+00:00"
},
{
"name": "webimpress/coding-standard",

MODIFY
src/DateStep.php
src/DateStep.php
@@ -16,6 +16,7 @@ use function array_combine;
use function array_count_values;
use function array_map;
use function array_shift;
+use function assert;
use function ceil;
use function date_default_timezone_get;
use function explode;
@@ -408,6 +409,7 @@ class DateStep extends Date
} else {
$baseDate = $baseDate->sub($minimumInterval);
}
+ assert($baseDate !== false);
}
while (
@@ -420,6 +422,8 @@ class DateStep extends Date
$baseDate = $baseDate->sub($step);
}
+ assert($baseDate !== false);
+
// phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedEqualOperator
if ($baseDate == $valueDate) {
return true;

Update psalm to 4.27 fixing newly discovered issues

Signed-off-by: George Steel <george@net-glue.co.uk>