From f4dadca99a44bb4e80ef45f39ed745672da923ad Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 01:44:25 +0000 Subject: [PATCH 1/3] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/composer.lock b/composer.lock index 3ebc4c5..b96f79e 100644 --- a/composer.lock +++ b/composer.lock @@ -345,16 +345,16 @@ }, { "name": "laminas/laminas-stdlib", - "version": "3.18.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf" + "reference": "6a192dd0882b514e45506f533b833b623b78fff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/6a192dd0882b514e45506f533b833b623b78fff3", + "reference": "6a192dd0882b514e45506f533b833b623b78fff3", "shasum": "" }, "require": { @@ -365,10 +365,10 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", - "phpbench/phpbench": "^1.2.14", - "phpunit/phpunit": "^10.3.3", + "phpbench/phpbench": "^1.2.15", + "phpunit/phpunit": "^10.5.8", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.15.0" + "vimeo/psalm": "^5.20.0" }, "type": "library", "autoload": { @@ -400,7 +400,7 @@ "type": "community_bridge" } ], - "time": "2023-09-19T10:15:21+00:00" + "time": "2024-01-19T12:39:49+00:00" }, { "name": "laminas/laminas-view", @@ -2649,16 +2649,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.7", + "version": "10.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8" + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e5c5b397a95cb0db013270a985726fcae93e61b8", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08f4fa74d5fbfff1ef22abffee47aaedcaea227e", + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e", "shasum": "" }, "require": { @@ -2730,7 +2730,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.7" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.8" }, "funding": [ { @@ -2746,7 +2746,7 @@ "type": "tidelift" } ], - "time": "2024-01-14T16:40:30+00:00" + "time": "2024-01-19T07:07:27+00:00" }, { "name": "psalm/plugin-phpunit", @@ -4751,16 +4751,16 @@ }, { "name": "vimeo/psalm", - "version": "5.19.0", + "version": "5.20.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b" + "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/06b71be009a6bd6d81b9811855d6629b9fe90e1b", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", + "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", "shasum": "" }, "require": { @@ -4857,7 +4857,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-01-09T21:02:43+00:00" + "time": "2024-01-18T12:15:06+00:00" }, { "name": "webimpress/coding-standard", From a3b9a722d00f443b06bbb5203770f536bc5dbca2 Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 6 Feb 2024 17:29:22 +0000 Subject: [PATCH 2/3] Bump dev deps, refresh lock Signed-off-by: George Steel --- composer.json | 4 +- composer.lock | 164 +++++++++++++++++++++++--------------------------- 2 files changed, 78 insertions(+), 90 deletions(-) diff --git a/composer.json b/composer.json index 102d1d3..5eed0b1 100644 --- a/composer.json +++ b/composer.json @@ -45,9 +45,9 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "phpunit/phpunit": "^10.5.5", + "phpunit/phpunit": "^10.5.10", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.18" + "vimeo/psalm": "^5.21.1" }, "conflict": { "container-interop/container-interop": "<1.2.0", diff --git a/composer.lock b/composer.lock index b96f79e..0f1c0c1 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": "bee61707ddb34b17686e8729737b4f20", + "content-hash": "234d57cc01f97c0f625214d0e01c9d54", "packages": [ { "name": "fig/http-message-util", @@ -404,16 +404,16 @@ }, { "name": "laminas/laminas-view", - "version": "2.33.0", + "version": "2.34.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-view.git", - "reference": "9b34f34eb69e839f4cbd64495c199c593565f166" + "reference": "53136a59622c8809c519b29dbbaa346aa39e834a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-view/zipball/9b34f34eb69e839f4cbd64495c199c593565f166", - "reference": "9b34f34eb69e839f4cbd64495c199c593565f166", + "url": "https://api.github.com/repos/laminas/laminas-view/zipball/53136a59622c8809c519b29dbbaa346aa39e834a", + "reference": "53136a59622c8809c519b29dbbaa346aa39e834a", "shasum": "" }, "require": { @@ -435,24 +435,24 @@ "zendframework/zend-view": "*" }, "require-dev": { - "laminas/laminas-authentication": "^2.15", + "laminas/laminas-authentication": "^2.16", "laminas/laminas-coding-standard": "~2.5.0", "laminas/laminas-feed": "^2.22", - "laminas/laminas-filter": "^2.32", + "laminas/laminas-filter": "^2.34", "laminas/laminas-http": "^2.19", - "laminas/laminas-i18n": "^2.23.1", + "laminas/laminas-i18n": "^2.26.0", "laminas/laminas-modulemanager": "^2.15", - "laminas/laminas-mvc": "^3.6.1", - "laminas/laminas-mvc-i18n": "^1.7", - "laminas/laminas-mvc-plugin-flashmessenger": "^1.9", - "laminas/laminas-navigation": "^2.18.1", - "laminas/laminas-paginator": "^2.17", + "laminas/laminas-mvc": "^3.7.0", + "laminas/laminas-mvc-i18n": "^1.8", + "laminas/laminas-mvc-plugin-flashmessenger": "^1.10.1", + "laminas/laminas-navigation": "^2.19.1", + "laminas/laminas-paginator": "^2.18.1", "laminas/laminas-permissions-acl": "^2.16", "laminas/laminas-router": "^3.12.0", "laminas/laminas-uri": "^2.11", - "phpunit/phpunit": "^10.4.2", + "phpunit/phpunit": "^10.5.9", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.15" + "vimeo/psalm": "^5.20" }, "suggest": { "laminas/laminas-authentication": "Laminas\\Authentication component", @@ -500,7 +500,7 @@ "type": "community_bridge" } ], - "time": "2024-01-03T14:59:52+00:00" + "time": "2024-01-25T11:26:39+00:00" }, { "name": "mezzio/mezzio-helpers", @@ -1901,16 +1901,16 @@ }, { "name": "netresearch/jsonmapper", - "version": "v4.2.0", + "version": "v4.4.1", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "shasum": "" }, "require": { @@ -1921,7 +1921,7 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -1946,9 +1946,9 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" }, - "time": "2023-04-09T17:37:40+00:00" + "time": "2024-01-31T06:18:54+00:00" }, { "name": "nikic/php-parser", @@ -2649,16 +2649,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.8", + "version": "10.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e" + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08f4fa74d5fbfff1ef22abffee47aaedcaea227e", - "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50b8e314b6d0dd06521dc31d1abffa73f25f850c", + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c", "shasum": "" }, "require": { @@ -2730,7 +2730,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.8" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.10" }, "funding": [ { @@ -2746,7 +2746,7 @@ "type": "tidelift" } ], - "time": "2024-01-19T07:07:27+00:00" + "time": "2024-02-04T09:07:51+00:00" }, { "name": "psalm/plugin-phpunit", @@ -3979,16 +3979,16 @@ }, { "name": "symfony/console", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", + "url": "https://api.github.com/repos/symfony/console/zipball/2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", "shasum": "" }, "require": { @@ -4053,7 +4053,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.2" + "source": "https://github.com/symfony/console/tree/v6.4.3" }, "funding": [ { @@ -4069,7 +4069,7 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:15:48+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4140,16 +4140,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59" + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/952a8cb588c3bc6ce76f6023000fb932f16a6e59", - "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", "shasum": "" }, "require": { @@ -4183,7 +4183,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.0" + "source": "https://github.com/symfony/filesystem/tree/v6.4.3" }, "funding": [ { @@ -4199,20 +4199,20 @@ "type": "tidelift" } ], - "time": "2023-07-26T17:27:13+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -4226,9 +4226,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4265,7 +4262,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -4281,20 +4278,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -4305,9 +4302,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4346,7 +4340,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -4362,20 +4356,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -4386,9 +4380,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4430,7 +4421,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -4446,20 +4437,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -4473,9 +4464,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4513,7 +4501,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -4529,7 +4517,7 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/service-contracts", @@ -4615,16 +4603,16 @@ }, { "name": "symfony/string", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" + "reference": "7a14736fb179876575464e4658fce0c304e8c15b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", - "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "url": "https://api.github.com/repos/symfony/string/zipball/7a14736fb179876575464e4658fce0c304e8c15b", + "reference": "7a14736fb179876575464e4658fce0c304e8c15b", "shasum": "" }, "require": { @@ -4681,7 +4669,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.2" + "source": "https://github.com/symfony/string/tree/v6.4.3" }, "funding": [ { @@ -4697,7 +4685,7 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:15:48+00:00" + "time": "2024-01-25T09:26:29+00:00" }, { "name": "theseer/tokenizer", @@ -4751,16 +4739,16 @@ }, { "name": "vimeo/psalm", - "version": "5.20.0", + "version": "5.21.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4" + "reference": "8c473e2437be8b6a8fd8f630f0f11a16b114c494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", - "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/8c473e2437be8b6a8fd8f630f0f11a16b114c494", + "reference": "8c473e2437be8b6a8fd8f630f0f11a16b114c494", "shasum": "" }, "require": { @@ -4857,7 +4845,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-01-18T12:15:06+00:00" + "time": "2024-02-01T01:04:32+00:00" }, { "name": "webimpress/coding-standard", From 978dbe9a0b3a808e905ebd364f7afe9fc2433022 Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 6 Feb 2024 17:29:51 +0000 Subject: [PATCH 3/3] Fix various `RiskyTruthyFalsyComparison` issues Signed-off-by: George Steel --- src/LaminasViewRenderer.php | 2 +- src/NamespacedPathStackResolver.php | 6 +++--- test/LaminasViewRendererFactoryTest.php | 6 +++--- test/LaminasViewRendererTest.php | 9 ++++----- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/LaminasViewRenderer.php b/src/LaminasViewRenderer.php index 5af2614..30251c2 100644 --- a/src/LaminasViewRenderer.php +++ b/src/LaminasViewRenderer.php @@ -76,7 +76,7 @@ public function __construct(?RendererInterface $renderer = null, $layout = null, } } - if ($layout && is_string($layout)) { + if (is_string($layout) && $layout !== '') { $model = new ViewModel(); $model->setTemplate($layout); $layout = $model; diff --git a/src/NamespacedPathStackResolver.php b/src/NamespacedPathStackResolver.php index 85dc8f7..66a739d 100644 --- a/src/NamespacedPathStackResolver.php +++ b/src/NamespacedPathStackResolver.php @@ -204,14 +204,14 @@ public function resolve($name, ?RendererInterface $renderer = null): ?string $template .= '.' . $defaultSuffix; } - $path = false; + $path = null; if ($namespace !== self::DEFAULT_NAMESPACE) { $path = $this->getPathFromNamespace($template, $namespace); } - $path = $path ?: $this->getPathFromNamespace($template, self::DEFAULT_NAMESPACE); + $path ??= $this->getPathFromNamespace($template, self::DEFAULT_NAMESPACE); - if ($path) { + if ($path !== null) { return $path; } diff --git a/test/LaminasViewRendererFactoryTest.php b/test/LaminasViewRendererFactoryTest.php index 0a7c412..5cd94c3 100644 --- a/test/LaminasViewRendererFactoryTest.php +++ b/test/LaminasViewRendererFactoryTest.php @@ -63,7 +63,7 @@ private function assertPathsHasNamespace( array $paths, ?string $message = null ): void { - $message = $message ?: sprintf('Paths do not contain namespace %s', $namespace ?: 'null'); + $message ??= sprintf('Paths do not contain namespace %s', $namespace ?? 'null'); $found = false; foreach ($paths as $path) { @@ -82,7 +82,7 @@ private function assertPathNamespaceCount( array $paths, ?string $message = null ): void { - $message = $message ?: sprintf('Did not find %d paths with namespace %s', $expected, $namespace ?: 'null'); + $message ??= sprintf('Did not find %d paths with namespace %s', $expected, $namespace ?? 'null'); $count = 0; foreach ($paths as $path) { @@ -100,7 +100,7 @@ private function assertPathNamespaceContains( array $paths, ?string $message = null ): void { - $message = $message ?: sprintf('Did not find path %s in namespace %s', (string) $expected, $namespace ?: ''); + $message ??= sprintf('Did not find path %s in namespace %s', (string) $expected, $namespace ?? ''); $found = []; foreach ($paths as $path) { diff --git a/test/LaminasViewRendererTest.php b/test/LaminasViewRendererTest.php index 87b2313..2397437 100644 --- a/test/LaminasViewRendererTest.php +++ b/test/LaminasViewRendererTest.php @@ -41,13 +41,13 @@ protected function setUp(): void public function assertTemplatePath(string $path, TemplatePath $templatePath, ?string $message = null): void { - $message = $message ?: sprintf('Failed to assert TemplatePath contained path %s', $path); + $message ??= sprintf('Failed to assert TemplatePath contained path %s', $path); $this->assertEquals($path, $templatePath->getPath(), $message); } public function assertTemplatePathString(string $path, TemplatePath $templatePath, ?string $message = null): void { - $message = $message ?: sprintf('Failed to assert TemplatePath casts to string path %s', $path); + $message ??= sprintf('Failed to assert TemplatePath casts to string path %s', $path); $this->assertEquals($path, (string) $templatePath, $message); } @@ -56,14 +56,13 @@ public function assertTemplatePathNamespace( TemplatePath $templatePath, ?string $message = null ): void { - $message = $message - ?: sprintf('Failed to assert TemplatePath namespace matched %s', var_export($namespace, true)); + $message ??= sprintf('Failed to assert TemplatePath namespace matched %s', var_export($namespace, true)); $this->assertEquals($namespace, $templatePath->getNamespace(), $message); } public function assertEmptyTemplatePathNamespace(TemplatePath $templatePath, ?string $message = null): void { - $message = $message ?: 'Failed to assert TemplatePath namespace was empty'; + $message ??= 'Failed to assert TemplatePath namespace was empty'; $this->assertEmpty($templatePath->getNamespace(), $message); }