From 7db9c0e001b9c7e7e9fe5f5ec78a5f15c2cc83e6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Dec 2022 00:20:51 +0000 Subject: [PATCH 1/7] Update dependency vimeo/psalm to v5 | datasource | package | from | to | | ---------- | ----------- | ------ | ----- | | packagist | vimeo/psalm | 4.30.0 | 5.1.0 | Signed-off-by: Renovate Bot --- composer.json | 2 +- composer.lock | 176 ++++++++++++++++++++++++++------------------------ 2 files changed, 93 insertions(+), 85 deletions(-) diff --git a/composer.json b/composer.json index 43f2e2152..2aead8cca 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "laminas/laminas-view": "^2.24", "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^4.29" + "vimeo/psalm": "^5.0" }, "suggest": { "doctrine/annotations": "^1.12, required to use laminas-form annotations support", diff --git a/composer.lock b/composer.lock index ea1045e5b..694f5b847 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": "2adf8709f5369fb979db124f3866dd5a", + "content-hash": "2fc93395c3282403fb78273f838aa5a4", "packages": [ { "name": "laminas/laminas-filter", @@ -5025,6 +5025,69 @@ ], "time": "2022-01-02T09:55:41+00:00" }, + { + "name": "symfony/filesystem", + "version": "v6.0.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "3adca49133bd055ebe6011ed1e012be3c908af79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3adca49133bd055ebe6011ed1e012be3c908af79", + "reference": "3adca49133bd055ebe6011ed1e012be3c908af79", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.0.13" + }, + "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-09-21T20:25:27+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.27.0", @@ -5658,24 +5721,24 @@ }, { "name": "vimeo/psalm", - "version": "4.30.0", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" + "reference": "4defa177c89397c5e14737a80fe4896584130674" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/4defa177c89397c5e14737a80fe4896584130674", + "reference": "4defa177c89397c5e14737a80fe4896584130674", "shasum": "" }, "require": { "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", + "composer/package-versions-deprecated": "^1.10.0", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -5684,35 +5747,34 @@ "ext-mbstring": "*", "ext-simplexml": "*", "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", + "felixfbecker/advanced-json-rpc": "^3.1", + "felixfbecker/language-server-protocol": "^1.5.2", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.13", "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "sebastian/diff": "^4.0", + "symfony/console": "^4.1.6 || ^5.0 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/polyfill-php80": "^1.25" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", + "bamarni/composer-bin-plugin": "^1.4", + "brianium/paratest": "^6.0", "ext-curl": "*", + "mockery/mockery": "^1.5", + "nunomaduro/mock-final-classes": "^1.1", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpstan/phpdoc-parser": "1.2.* || 1.6.4", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" + "phpstan/phpdoc-parser": "^1.6", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/process": "^4.4 || ^5.0 || ^6.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -5728,17 +5790,14 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev", + "dev-master": "5.x-dev", + "dev-4.x": "4.x-dev", "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } }, "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], "psr-4": { "Psalm\\": "src/Psalm/" } @@ -5760,9 +5819,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.30.0" + "source": "https://github.com/vimeo/psalm/tree/5.1.0" }, - "time": "2022-11-06T20:37:08+00:00" + "time": "2022-12-02T01:23:35+00:00" }, { "name": "webimpress/coding-standard", @@ -5877,57 +5936,6 @@ } ], "time": "2021-04-19T16:34:45+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], From 6aa8c66936e1d0e1a261f4a1b0b2b78df4e86eea Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 5 Dec 2022 16:52:15 +0000 Subject: [PATCH 2/7] Added service manager array shapes Signed-off-by: George Steel --- src/ConfigProvider.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 352e25536..cec5efd5e 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -5,14 +5,20 @@ namespace Laminas\Form; use Laminas\Form\View\Helper\Factory\FormElementErrorsFactory; +use Laminas\ServiceManager\ConfigInterface; use Laminas\ServiceManager\Factory\InvokableFactory; +/** @psalm-import-type ServiceManagerConfigurationType from ConfigInterface */ final class ConfigProvider { /** * Return general-purpose laminas-i18n configuration. * - * @return array + * @return array{ + * dependencies: ServiceManagerConfigurationType, + * view_helpers: ServiceManagerConfigurationType, + * ... + * } */ public function __invoke(): array { @@ -25,7 +31,7 @@ public function __invoke(): array /** * Return application-level dependency configuration. * - * @return array + * @return ServiceManagerConfigurationType */ public function getDependencyConfig(): array { @@ -51,7 +57,7 @@ public function getDependencyConfig(): array * * Obsoletes View\HelperConfig. * - * @return array + * @return ServiceManagerConfigurationType */ public function getViewHelperConfig(): array { From 50d12909042bbfb38ffd6d81f237974747db6cf6 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 5 Dec 2022 16:52:55 +0000 Subject: [PATCH 3/7] Added required and missing templates Signed-off-by: George Steel --- test/TestAsset/CustomCollection.php | 6 ++++++ test/TestAsset/CustomTraversable.php | 6 ++++++ test/TestAsset/IteratorAggregate.php | 5 +++++ test/TestAsset/StringToArrayFilter.php | 3 +++ 4 files changed, 20 insertions(+) diff --git a/test/TestAsset/CustomCollection.php b/test/TestAsset/CustomCollection.php index e4194a52d..56b103bb0 100644 --- a/test/TestAsset/CustomCollection.php +++ b/test/TestAsset/CustomCollection.php @@ -6,8 +6,14 @@ use Laminas\Stdlib\ArrayObject; +/** + * @template TKey of array-key + * @template TValue + * @extends ArrayObject + */ class CustomCollection extends ArrayObject { + /** @return array */ public function toArray(): array { $ret = []; diff --git a/test/TestAsset/CustomTraversable.php b/test/TestAsset/CustomTraversable.php index 1c3c6a906..91d88638f 100644 --- a/test/TestAsset/CustomTraversable.php +++ b/test/TestAsset/CustomTraversable.php @@ -12,8 +12,14 @@ use function next; use function reset; +/** + * @template TKey + * @template TValue + * @implements Iterator + */ class CustomTraversable implements Iterator { + /** @param array $data */ public function __construct(private array $data) { } diff --git a/test/TestAsset/IteratorAggregate.php b/test/TestAsset/IteratorAggregate.php index ebffecbca..efc0cf9bf 100644 --- a/test/TestAsset/IteratorAggregate.php +++ b/test/TestAsset/IteratorAggregate.php @@ -7,6 +7,11 @@ use IteratorAggregate as IteratorAggregateInterface; use Traversable; +/** + * @template TKey + * @template TValue + * @implements IteratorAggregateInterface + */ class IteratorAggregate implements IteratorAggregateInterface { public function __construct(protected Traversable $iterator) diff --git a/test/TestAsset/StringToArrayFilter.php b/test/TestAsset/StringToArrayFilter.php index d97242d80..fa0a66961 100644 --- a/test/TestAsset/StringToArrayFilter.php +++ b/test/TestAsset/StringToArrayFilter.php @@ -9,6 +9,9 @@ use function explode; use function is_array; +/** + * @extends AbstractFilter + */ class StringToArrayFilter extends AbstractFilter { /** From 999e1a9749d796b59a4d5d0c843195297fade347 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 5 Dec 2022 16:53:42 +0000 Subject: [PATCH 4/7] Instruct psalm about config related types/array shapes Signed-off-by: George Steel --- src/FormElementManagerFactory.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/FormElementManagerFactory.php b/src/FormElementManagerFactory.php index 0e2913472..824cbb97e 100644 --- a/src/FormElementManagerFactory.php +++ b/src/FormElementManagerFactory.php @@ -7,19 +7,25 @@ use Laminas\ServiceManager\AbstractPluginManager; use Laminas\ServiceManager\Config; use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceManager; use Psr\Container\ContainerInterface; use function is_array; +/** @psalm-import-type ServiceManagerConfiguration from ServiceManager */ final class FormElementManagerFactory implements FactoryInterface { /** * @inheritDoc + * @param string|null $requestedName + * @param ServiceManagerConfiguration|null $options * @return AbstractPluginManager */ - public function __invoke(ContainerInterface $container, $name, ?array $options = null): AbstractPluginManager + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): AbstractPluginManager { - $pluginManager = new FormElementManager($container, $options ?: []); + /** @psalm-var ServiceManagerConfiguration $options */ + $options = is_array($options) ? $options : []; + $pluginManager = new FormElementManager($container, $options); // If this is in a laminas-mvc application, the ServiceListener will inject // merged configuration during bootstrap. @@ -39,6 +45,8 @@ public function __invoke(ContainerInterface $container, $name, ?array $options = return $pluginManager; } + /** @psalm-var ServiceManagerConfiguration $config['form_elements'] */ + // Wire service configuration for forms and elements (new Config($config['form_elements']))->configureServiceManager($pluginManager); From 60ec8f835fd604d71b4ee9e752c1207f46653c04 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 5 Dec 2022 16:54:14 +0000 Subject: [PATCH 5/7] Bump dev deps and refresh lock Signed-off-by: George Steel --- composer.json | 26 +++++----- composer.lock | 140 +++++++++++++++++++++++++------------------------- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/composer.json b/composer.json index 2aead8cca..101341f73 100644 --- a/composer.json +++ b/composer.json @@ -25,23 +25,23 @@ "require-dev": { "ext-intl": "*", "doctrine/annotations": "^1.13.3", - "laminas/laminas-captcha": "^2.13", + "laminas/laminas-captcha": "^2.15", "laminas/laminas-coding-standard": "^2.4", - "laminas/laminas-db": "^2.15", + "laminas/laminas-db": "^2.16", "laminas/laminas-escaper": "^2.12", - "laminas/laminas-eventmanager": "^3.6", - "laminas/laminas-filter": "^2.23", - "laminas/laminas-i18n": "^2.19", + "laminas/laminas-eventmanager": "^3.8", + "laminas/laminas-filter": "^2.29", + "laminas/laminas-i18n": "^2.21", "laminas/laminas-modulemanager": "^2.14.0", - "laminas/laminas-recaptcha": "^3.4.0", - "laminas/laminas-servicemanager": "^3.19", - "laminas/laminas-session": "^2.13", + "laminas/laminas-recaptcha": "^3.5", + "laminas/laminas-servicemanager": "^3.20", + "laminas/laminas-session": "^2.16", "laminas/laminas-text": "^2.9.0", - "laminas/laminas-validator": "^2.26", - "laminas/laminas-view": "^2.24", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.0" + "laminas/laminas-validator": "^2.28", + "laminas/laminas-view": "^2.25", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.1" }, "suggest": { "doctrine/annotations": "^1.12, required to use laminas-form annotations support", diff --git a/composer.lock b/composer.lock index 694f5b847..6e01203d6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2fc93395c3282403fb78273f838aa5a4", + "content-hash": "e956e8d3365311bee04c43bda7230ec9", "packages": [ { "name": "laminas/laminas-filter", - "version": "2.28.1", + "version": "2.29.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-filter.git", - "reference": "336b7571820c1d1d2443c34fa46f39884885e67c" + "reference": "166e28123d19ebab7edddb9671a8376143c543c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/336b7571820c1d1d2443c34fa46f39884885e67c", - "reference": "336b7571820c1d1d2443c34fa46f39884885e67c", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/166e28123d19ebab7edddb9671a8376143c543c7", + "reference": "166e28123d19ebab7edddb9671a8376143c543c7", "shasum": "" }, "require": { @@ -38,7 +38,7 @@ "phpunit/phpunit": "^9.5.26", "psalm/plugin-phpunit": "^0.18.3", "psr/http-factory": "^1.0.1", - "vimeo/psalm": "^4.30" + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters", @@ -82,20 +82,20 @@ "type": "community_bridge" } ], - "time": "2022-11-19T15:13:44+00:00" + "time": "2022-12-05T13:53:32+00:00" }, { "name": "laminas/laminas-hydrator", - "version": "4.8.0", + "version": "4.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-hydrator.git", - "reference": "eae638f4912769b7336daf32fccb03c89e243ed6" + "reference": "49ab61ee0f2352cc147569544bffe4671ca8e4de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/eae638f4912769b7336daf32fccb03c89e243ed6", - "reference": "eae638f4912769b7336daf32fccb03c89e243ed6", + "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/49ab61ee0f2352cc147569544bffe4671ca8e4de", + "reference": "49ab61ee0f2352cc147569544bffe4671ca8e4de", "shasum": "" }, "require": { @@ -110,13 +110,13 @@ "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-eventmanager": "^3.6", - "laminas/laminas-modulemanager": "^2.12", - "laminas/laminas-serializer": "^2.13.0", + "laminas/laminas-modulemanager": "^2.14.0", + "laminas/laminas-serializer": "^2.14.0", "laminas/laminas-servicemanager": "^3.19", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.29" + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-eventmanager": "^3.2, to support aggregate hydrator usage", @@ -159,7 +159,7 @@ "type": "community_bridge" } ], - "time": "2022-10-24T15:56:12+00:00" + "time": "2022-12-03T22:20:37+00:00" }, { "name": "laminas/laminas-inputfilter", @@ -237,16 +237,16 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "3.19.0", + "version": "3.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "ed160729bb8721127efdaac799f9a298963345b1" + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/ed160729bb8721127efdaac799f9a298963345b1", - "reference": "ed160729bb8721127efdaac799f9a298963345b1", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", "shasum": "" }, "require": { @@ -269,14 +269,14 @@ "require-dev": { "composer/package-versions-deprecated": "^1.11.99.5", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-container-config-test": "^0.7", + "laminas/laminas-container-config-test": "^0.8", "laminas/laminas-dependency-plugin": "^2.2", "mikey179/vfsstream": "^1.6.11@alpha", "ocramius/proxy-manager": "^2.14.1", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -323,20 +323,20 @@ "type": "community_bridge" } ], - "time": "2022-10-10T20:59:22+00:00" + "time": "2022-12-01T17:03:38+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.16.0", + "version": "3.16.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "0880e3dd88eca01eeda9dfdb5a05c38e56902c2c" + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/0880e3dd88eca01eeda9dfdb5a05c38e56902c2c", - "reference": "0880e3dd88eca01eeda9dfdb5a05c38e56902c2c", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/f4f773641807c7ccee59b758bfe4ac4ba33ecb17", + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17", "shasum": "" }, "require": { @@ -382,7 +382,7 @@ "type": "community_bridge" } ], - "time": "2022-11-30T23:45:45+00:00" + "time": "2022-12-03T18:48:01+00:00" }, { "name": "laminas/laminas-validator", @@ -1894,16 +1894,16 @@ }, { "name": "laminas/laminas-eventmanager", - "version": "3.6.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308" + "reference": "51e73899f14026fdf2626569a7ff04ae93554b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/3f1afbad86cd34a431fdc069f265cfe6f8fc8308", - "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/51e73899f14026fdf2626569a7ff04ae93554b0b", + "reference": "51e73899f14026fdf2626569a7ff04ae93554b0b", "shasum": "" }, "require": { @@ -1916,11 +1916,11 @@ "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-stdlib": "^3.15", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", "psr/container": "^1.1.2 || ^2.0.2", - "vimeo/psalm": "^4.28" + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", @@ -1958,7 +1958,7 @@ "type": "community_bridge" } ], - "time": "2022-10-11T12:46:13+00:00" + "time": "2022-12-03T06:30:11+00:00" }, { "name": "laminas/laminas-http", @@ -2027,16 +2027,16 @@ }, { "name": "laminas/laminas-i18n", - "version": "2.19.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-i18n.git", - "reference": "ebabca3a6398fc872127bc69a51bda5afc720d67" + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/ebabca3a6398fc872127bc69a51bda5afc720d67", - "reference": "ebabca3a6398fc872127bc69a51bda5afc720d67", + "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/fbd2d0373aaced4769cba2bf3d1425d55f68abb1", + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1", "shasum": "" }, "require": { @@ -2051,18 +2051,18 @@ "zendframework/zend-i18n": "*" }, "require-dev": { - "laminas/laminas-cache": "^3.6", - "laminas/laminas-cache-storage-adapter-memory": "^2.1", + "laminas/laminas-cache": "^3.8", + "laminas/laminas-cache-storage-adapter-memory": "^2.2.0", "laminas/laminas-cache-storage-deprecated-factory": "^1.0.1", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-config": "^3.7", - "laminas/laminas-eventmanager": "^3.5.0", - "laminas/laminas-filter": "^2.21", - "laminas/laminas-validator": "^2.25", - "laminas/laminas-view": "^2.23", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "laminas/laminas-config": "^3.8.0", + "laminas/laminas-eventmanager": "^3.7", + "laminas/laminas-filter": "^2.28.1", + "laminas/laminas-validator": "^2.28", + "laminas/laminas-view": "^2.25", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-cache": "You should install this package to cache the translations", @@ -2109,7 +2109,7 @@ "type": "community_bridge" } ], - "time": "2022-10-10T15:48:56+00:00" + "time": "2022-12-02T17:15:52+00:00" }, { "name": "laminas/laminas-json", @@ -2368,16 +2368,16 @@ }, { "name": "laminas/laminas-session", - "version": "2.15.0", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-session.git", - "reference": "175957825cb7a43bcb6e132a5fad89800c12884f" + "reference": "9c845a0361625d5775cad6f043716196201ad41f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-session/zipball/175957825cb7a43bcb6e132a5fad89800c12884f", - "reference": "175957825cb7a43bcb6e132a5fad89800c12884f", + "url": "https://api.github.com/repos/laminas/laminas-session/zipball/9c845a0361625d5775cad6f043716196201ad41f", + "reference": "9c845a0361625d5775cad6f043716196201ad41f", "shasum": "" }, "require": { @@ -2399,7 +2399,7 @@ "mongodb/mongodb": "~1.13.0", "phpunit/phpunit": "^9.5.26", "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^4.30" + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component", @@ -2445,7 +2445,7 @@ "type": "community_bridge" } ], - "time": "2022-11-15T20:01:10+00:00" + "time": "2022-12-04T11:15:36+00:00" }, { "name": "laminas/laminas-text", @@ -3625,16 +3625,16 @@ }, { "name": "psalm/plugin-phpunit", - "version": "0.18.3", + "version": "0.18.4", "source": { "type": "git", "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "057c1cdf7546c1e427f6fd83b635d0cc18c252bf" + "reference": "e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/057c1cdf7546c1e427f6fd83b635d0cc18c252bf", - "reference": "057c1cdf7546c1e427f6fd83b635d0cc18c252bf", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc", + "reference": "e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc", "shasum": "" }, "require": { @@ -3642,7 +3642,7 @@ "composer/semver": "^1.4 || ^2.0 || ^3.0", "ext-simplexml": "*", "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.5 || ^5@beta" + "vimeo/psalm": "dev-master || dev-4.x || ^4.7.1 || ^5@beta || ^5.0" }, "conflict": { "phpunit/phpunit": "<7.5" @@ -3679,9 +3679,9 @@ "description": "Psalm plugin for PHPUnit", "support": { "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.18.3" + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.18.4" }, - "time": "2022-11-03T18:17:28+00:00" + "time": "2022-12-03T07:47:07+00:00" }, { "name": "psr/cache", From 40fb2f4973e7482d317d1d67c88d2f4e1972d018 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 5 Dec 2022 16:55:08 +0000 Subject: [PATCH 6/7] Reset baseline with new psalm issues uncovered in v5.0 Signed-off-by: George Steel --- psalm-baseline.xml | 99 ++++++++++++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 38 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index a062acaa2..4ac57ccdf 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + ! is_string($entity) @@ -56,7 +56,23 @@ - + + $this + $this + $this + $this + $this + $this + $this + $this + $this + $this + $this + $this + $this + $this + $this + $this $this $this $this @@ -121,6 +137,9 @@ gettype($spec) + + $spec + $this->create($spec) $this->create($spec) @@ -142,7 +161,11 @@ gettype($elementOrFieldset) is_object($object) - + + $this + $this + $this + $this $this $this @@ -155,25 +178,39 @@ is_object($elementOrFieldset) - - bindValues - + + + + IteratorAggregate + $childFieldset $filter - + + $spec + + + $values[$cKey] + + + $this + $this + $this $this $this $this + + $cKey + $collectionInputFilter->get($name) $input $inputFilter - $spec + $inputFilter->get($name) $this->data @@ -182,20 +219,7 @@ $data $validationGroup - - add - add - add - add - add - add - get - get - has - has - has - has - has + merge merge @@ -221,20 +245,12 @@ $factories $instanceOf - - $services - $services - $services + $services $services $services - - - $name - - setFormFactory @@ -294,6 +310,12 @@ getView + + $elementHelper($elementOrFieldset) + $elementHelper($elementOrFieldset) + $fieldsetHelper($elementOrFieldset, $this->shouldWrap()) + $fieldsetHelper($elementOrFieldset, $this->shouldWrap()) + assert(is_callable($elementHelper)) assert(is_callable($elementHelper)) @@ -324,16 +346,9 @@ - - $element - render - - hasAttribute - hasAttribute - @@ -376,6 +391,14 @@ + + $obj2 + $obj3 + + + $data[$index] + $names[$i] + null From dc7934575037898b43c4d7321e9ead34a57487b6 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 5 Dec 2022 16:56:01 +0000 Subject: [PATCH 7/7] CS Fixes Signed-off-by: George Steel --- src/FormElementManagerFactory.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/FormElementManagerFactory.php b/src/FormElementManagerFactory.php index 824cbb97e..0dbbb0f13 100644 --- a/src/FormElementManagerFactory.php +++ b/src/FormElementManagerFactory.php @@ -21,10 +21,13 @@ final class FormElementManagerFactory implements FactoryInterface * @param ServiceManagerConfiguration|null $options * @return AbstractPluginManager */ - public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): AbstractPluginManager - { + public function __invoke( + ContainerInterface $container, + $requestedName, + ?array $options = null + ): AbstractPluginManager { /** @psalm-var ServiceManagerConfiguration $options */ - $options = is_array($options) ? $options : []; + $options = is_array($options) ? $options : []; $pluginManager = new FormElementManager($container, $options); // If this is in a laminas-mvc application, the ServiceListener will inject