diff --git a/composer.json b/composer.json index 077ed77c..2bf66e06 100644 --- a/composer.json +++ b/composer.json @@ -8,32 +8,29 @@ "homepage": "https://laminas.dev", "license": "BSD-3-Clause", "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0", "ext-iconv": "*", - "laminas/laminas-loader": "^2.8", + "laminas/laminas-loader": "^2.8.0", "laminas/laminas-mime": "^2.9.1", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-validator": "^2.15", - "symfony/polyfill-mbstring": "^1.12.0", - "webmozart/assert": "^1.10", - "symfony/polyfill-intl-idn": "^1.24.0" - }, - "conflict": { - "zendframework/zend-mail": "*" + "laminas/laminas-stdlib": "^3.11.0", + "laminas/laminas-validator": "^2.23.0", + "symfony/polyfill-mbstring": "^1.16.0", + "webmozart/assert": "^1.11.0", + "symfony/polyfill-intl-idn": "^1.26.0" }, "require-dev": { "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-crypt": "^2.6 || ^3.4", - "laminas/laminas-db": "^2.13.3", - "laminas/laminas-servicemanager": "^3.7", - "phpunit/phpunit": "^9.5.5", + "laminas/laminas-crypt": "^3.8.0", + "laminas/laminas-db": "^2.15.0", + "laminas/laminas-servicemanager": "^3.16.0", + "phpunit/phpunit": "^9.5.21", "psalm/plugin-phpunit": "^0.17.0", - "symfony/process": "^5.4.11 || ^6.0.11", - "vimeo/psalm": "^4.7" + "symfony/process": "^6.0.11", + "vimeo/psalm": "^4.26.0" }, "suggest": { - "laminas/laminas-crypt": "Crammd5 support in SMTP Auth", - "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" + "laminas/laminas-crypt": "^3.8 Crammd5 support in SMTP Auth", + "laminas/laminas-servicemanager": "^3.16 when using SMTP to deliver messages" }, "config": { "sort-packages": true, @@ -42,7 +39,7 @@ "dealerdirect/phpcodesniffer-composer-installer": true }, "platform": { - "php": "7.3.99" + "php": "8.0.99" } }, "extra": { diff --git a/composer.lock b/composer.lock index b807cbd3..29679190 100644 --- a/composer.lock +++ b/composer.lock @@ -4,44 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0197599c9278f573f41e2d60dd28a731", + "content-hash": "d707df735a4058c3f7ca83e2a93bef3f", "packages": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "support": { - "issues": "https://github.com/container-interop/container-interop/issues", - "source": "https://github.com/container-interop/container-interop/tree/master" - }, - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" - }, { "name": "laminas/laminas-loader", "version": "2.8.0", @@ -159,6 +123,97 @@ ], "time": "2021-09-20T21:19:24+00:00" }, + { + "name": "laminas/laminas-servicemanager", + "version": "3.16.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-servicemanager.git", + "reference": "863c66733740cd36ebf5e700f4258ef2c68a2a24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/863c66733740cd36ebf5e700f4258ef2c68a2a24", + "reference": "863c66733740cd36ebf5e700f4258ef2c68a2a24", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^3.2.1", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0", + "psr/container": "^1.0" + }, + "conflict": { + "ext-psr": "*", + "laminas/laminas-code": "<3.3.1", + "zendframework/zend-code": "<3.3.1", + "zendframework/zend-servicemanager": "*" + }, + "provide": { + "psr/container-implementation": "^1.0" + }, + "replace": { + "container-interop/container-interop": "^1.2.0" + }, + "require-dev": { + "composer/package-versions-deprecated": "^1.0", + "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-container-config-test": "^0.7", + "laminas/laminas-dependency-plugin": "^2.1.2", + "mikey179/vfsstream": "^1.6.10@alpha", + "ocramius/proxy-manager": "^2.11", + "phpbench/phpbench": "^1.1", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5.5", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.8" + }, + "suggest": { + "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" + }, + "bin": [ + "bin/generate-deps-for-config-factory", + "bin/generate-factory-for-class" + ], + "type": "library", + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ServiceManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Factory-Driven Dependency Injection Container", + "homepage": "https://laminas.dev", + "keywords": [ + "PSR-11", + "dependency-injection", + "di", + "dic", + "laminas", + "service-manager", + "servicemanager" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-servicemanager/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-servicemanager/issues", + "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", + "source": "https://github.com/laminas/laminas-servicemanager" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-07-27T14:58:17+00:00" + }, { "name": "laminas/laminas-stdlib", "version": "3.11.0", @@ -220,51 +275,47 @@ }, { "name": "laminas/laminas-validator", - "version": "2.19.0", + "version": "2.23.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "4875d4e58b6f728981bb767a60530540f82ee1df" + "reference": "6d61b6cc3b222f13807a18d9247cdfb084958b03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/4875d4e58b6f728981bb767a60530540f82ee1df", - "reference": "4875d4e58b6f728981bb767a60530540f82ee1df", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/6d61b6cc3b222f13807a18d9247cdfb084958b03", + "reference": "6d61b6cc3b222f13807a18d9247cdfb084958b03", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.1", + "laminas/laminas-servicemanager": "^3.12.0", "laminas/laminas-stdlib": "^3.10", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "^7.4 || ~8.0.0 || ~8.1.0" }, "conflict": { "zendframework/zend-validator": "*" }, "require-dev": { - "laminas/laminas-cache": "^2.6.1", - "laminas/laminas-coding-standard": "~2.2.1", + "laminas/laminas-coding-standard": "~2.3.0", "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.6", + "laminas/laminas-filter": "^2.14.0", "laminas/laminas-http": "^2.14.2", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-math": "^2.6", - "laminas/laminas-servicemanager": "^2.7.11 || ^3.0.3", - "laminas/laminas-session": "^2.8", - "laminas/laminas-uri": "^2.7", + "laminas/laminas-i18n": "^2.15.0", + "laminas/laminas-session": "^2.12.1", + "laminas/laminas-uri": "^2.9.1", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.0", + "phpunit/phpunit": "^9.5.21", + "psalm/plugin-phpunit": "^0.17.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0", - "vimeo/psalm": "^4.3" + "vimeo/psalm": "^4.24.0" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-math": "Laminas\\Math component, required by the Csrf validator", "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", @@ -306,24 +357,24 @@ "type": "community_bridge" } ], - "time": "2022-06-09T21:49:40+00:00" + "time": "2022-07-27T19:17:59+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -352,9 +403,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "symfony/polyfill-intl-idn", @@ -987,20 +1038,20 @@ }, { "name": "composer/pcre", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe" + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/c8e9d27cfc5ed22643c19c160455b473ffd8aabe", - "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe", + "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", @@ -1010,7 +1061,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -1038,7 +1089,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/2.0.0" + "source": "https://github.com/composer/pcre/tree/3.0.0" }, "funding": [ { @@ -1054,7 +1105,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T20:05:29+00:00" + "time": "2022-02-25T20:21:48+00:00" }, { "name": "composer/semver", @@ -1541,31 +1592,32 @@ }, { "name": "laminas/laminas-crypt", - "version": "3.6.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-crypt.git", - "reference": "ad2c29c289a4bc837b37a7650f5178edda0fc548" + "reference": "0972bb907fd555c16e2a65309b66720acf2b8699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/ad2c29c289a4bc837b37a7650f5178edda0fc548", - "reference": "ad2c29c289a4bc837b37a7650f5178edda0fc548", + "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/0972bb907fd555c16e2a65309b66720acf2b8699", + "reference": "0972bb907fd555c16e2a65309b66720acf2b8699", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", "ext-mbstring": "*", "laminas/laminas-math": "^3.4", + "laminas/laminas-servicemanager": "^3.11.2", "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "^7.4 || ~8.0.0 || ~8.1.0", + "psr/container": "^1.1" }, "conflict": { "zendframework/zend-crypt": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.3" + "laminas/laminas-coding-standard": "~2.3.0", + "phpunit/phpunit": "^9.5.11" }, "suggest": { "ext-openssl": "Required for most features of Laminas\\Crypt" @@ -1600,7 +1652,7 @@ "type": "community_bridge" } ], - "time": "2021-12-06T01:25:27+00:00" + "time": "2022-04-12T14:28:29+00:00" }, { "name": "laminas/laminas-db", @@ -1740,157 +1792,6 @@ ], "time": "2021-12-06T02:02:07+00:00" }, - { - "name": "laminas/laminas-servicemanager", - "version": "3.7.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "2b0aee477fdbd3191af7c302b93dbc5fda0626f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/2b0aee477fdbd3191af7c302b93dbc5fda0626f4", - "reference": "2b0aee477fdbd3191af7c302b93dbc5fda0626f4", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0", - "psr/container": "^1.0" - }, - "conflict": { - "laminas/laminas-code": "<3.3.1", - "zendframework/zend-code": "<3.3.1" - }, - "provide": { - "container-interop/container-interop-implementation": "^1.2", - "psr/container-implementation": "^1.0" - }, - "replace": { - "zendframework/zend-servicemanager": "^3.4.0" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.0", - "laminas/laminas-coding-standard": "~2.2.0", - "laminas/laminas-container-config-test": "^0.3", - "laminas/laminas-dependency-plugin": "^2.1.2", - "mikey179/vfsstream": "^1.6.8", - "ocramius/proxy-manager": "^2.2.3", - "phpbench/phpbench": "^1.0.4", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.4", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.8" - }, - "suggest": { - "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" - }, - "bin": [ - "bin/generate-deps-for-config-factory", - "bin/generate-factory-for-class" - ], - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Factory-Driven Dependency Injection Container", - "homepage": "https://laminas.dev", - "keywords": [ - "PSR-11", - "dependency-injection", - "di", - "dic", - "laminas", - "service-manager", - "servicemanager" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-servicemanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-servicemanager/issues", - "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", - "source": "https://github.com/laminas/laminas-servicemanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-07-24T19:33:07+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "88bf037259869891afce6504cacc4f8a07b24d0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f", - "reference": "88bf037259869891afce6504cacc4f8a07b24d0f", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-12-21T14:34:37+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.11.0", @@ -2450,16 +2351,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.5.1", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "981cc368a216c988e862a75e526b6076987d1b50" + "reference": "135607f9ccc297d6923d49c2bcf309f509413215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", - "reference": "981cc368a216c988e862a75e526b6076987d1b50", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", + "reference": "135607f9ccc297d6923d49c2bcf309f509413215", "shasum": "" }, "require": { @@ -2469,6 +2370,7 @@ "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5", "symfony/process": "^5.2" @@ -2488,9 +2390,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" }, - "time": "2022-05-05T11:32:40+00:00" + "time": "2022-06-26T13:09:08+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2974,30 +2876,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3018,9 +2920,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "sebastian/cli-parser", @@ -4105,46 +4007,42 @@ }, { "name": "symfony/console", - "version": "v5.4.11", + "version": "v6.0.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10" + "reference": "09b8e50f09bf0e5bbde9b61b19d7f53751114725" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/535846c7ee6bc4dd027ca0d93220601456734b10", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10", + "url": "https://api.github.com/repos/symfony/console/zipball/09b8e50f09bf0e5bbde9b61b19d7f53751114725", + "reference": "09b8e50f09bf0e5bbde9b61b19d7f53751114725", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -4184,7 +4082,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.11" + "source": "https://github.com/symfony/console/tree/v6.0.11" }, "funding": [ { @@ -4200,29 +4098,29 @@ "type": "tidelift" } ], - "time": "2022-07-22T10:42:43+00:00" + "time": "2022-07-22T14:17:38+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4251,7 +4149,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -4267,7 +4165,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4432,85 +4330,6 @@ ], "time": "2022-05-24T11:49:31+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "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-05-24T11:49:31+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.26.0", @@ -4596,21 +4415,20 @@ }, { "name": "symfony/process", - "version": "v5.4.11", + "version": "v6.0.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" + "reference": "44270a08ccb664143dede554ff1c00aaa2247a43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", + "url": "https://api.github.com/repos/symfony/process/zipball/44270a08ccb664143dede554ff1c00aaa2247a43", + "reference": "44270a08ccb664143dede554ff1c00aaa2247a43", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -4638,7 +4456,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.11" + "source": "https://github.com/symfony/process/tree/v6.0.11" }, "funding": [ { @@ -4654,7 +4472,7 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2022-06-27T17:10:44+00:00" }, { "name": "symfony/service-contracts", @@ -4741,34 +4559,33 @@ }, { "name": "symfony/string", - "version": "v5.4.11", + "version": "v6.0.11", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322" + "reference": "042b6bf0f6ccca6d456a0572eb788cfb8b1ff809" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5eb661e49ad389e4ae2b6e4df8d783a8a6548322", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322", + "url": "https://api.github.com/repos/symfony/string/zipball/042b6bf0f6ccca6d456a0572eb788cfb8b1ff809", + "reference": "042b6bf0f6ccca6d456a0572eb788cfb8b1ff809", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -4807,7 +4624,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.11" + "source": "https://github.com/symfony/string/tree/v6.0.11" }, "funding": [ { @@ -4823,7 +4640,7 @@ "type": "tidelift" } ], - "time": "2022-07-24T16:15:25+00:00" + "time": "2022-07-27T15:50:26+00:00" }, { "name": "theseer/tokenizer", @@ -5095,12 +4912,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0", "ext-iconv": "*" }, "platform-dev": [], "platform-overrides": { - "php": "7.3.99" + "php": "8.0.99" }, "plugin-api-version": "2.3.0" } diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 79cc8e89..56aed729 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + ! is_string($email) @@ -54,6 +54,12 @@ is_object($emailOrAddress) + + + + SmtpPluginManager + + null === $this->addressList @@ -862,27 +868,20 @@ - - gettype($instance) - - - - FactoriesConfigurationType from ConfigInterface - validatePlugin - + + $aliases - $factories $instanceOf - - is_object($instance) - - - SmtpPluginManager - + + Crammd5 + Login + Plain + \Zend\Mail\Protocol\Smtp + @@ -896,6 +895,9 @@ $name $requestedName + + $options + $container @@ -1707,9 +1709,6 @@ null === $this->callback null === $this->path - - $callback - $callback $path @@ -1736,9 +1735,6 @@ mailHandler - - $callable - $param @@ -1995,18 +1991,14 @@ - - $header - $header $headers - + $headers - $multiHeader @@ -2158,9 +2150,6 @@ null - - $return - current getFieldValue diff --git a/src/AddressList.php b/src/AddressList.php index 8a0e5bb6..2a1cd16f 100644 --- a/src/AddressList.php +++ b/src/AddressList.php @@ -8,7 +8,6 @@ use function count; use function current; -use function get_class; use function gettype; use function is_int; use function is_numeric; @@ -49,7 +48,7 @@ public function add($emailOrAddress, $name = null) '%s expects an email address or %s\Address object as its first argument; received "%s"', __METHOD__, __NAMESPACE__, - is_object($emailOrAddress) ? get_class($emailOrAddress) : gettype($emailOrAddress) + is_object($emailOrAddress) ? $emailOrAddress::class : gettype($emailOrAddress) )); } @@ -84,7 +83,7 @@ public function addMany(array $addresses) if (! is_string($key)) { throw new Exception\RuntimeException(sprintf( 'Invalid key type in provided addresses array ("%s")', - is_object($key) ? get_class($key) : var_export($key, true) + is_object($key) ? $key::class : var_export($key, true) )); } diff --git a/src/Header/HeaderWrap.php b/src/Header/HeaderWrap.php index 228aeba4..f33e0633 100644 --- a/src/Header/HeaderWrap.php +++ b/src/Header/HeaderWrap.php @@ -21,7 +21,7 @@ * Utility class used for creating wrapped or MIME-encoded versions of header * values. */ -// phpcs:disable WebimpressCodingStandard.NamingConventions.AbstractClass.Prefix +// phpcs:ignore WebimpressCodingStandard.NamingConventions.AbstractClass.Prefix abstract class HeaderWrap { /** diff --git a/src/Header/IdentificationField.php b/src/Header/IdentificationField.php index eca54ba5..b8664120 100644 --- a/src/Header/IdentificationField.php +++ b/src/Header/IdentificationField.php @@ -15,7 +15,7 @@ /** * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 */ -// phpcs:disable WebimpressCodingStandard.NamingConventions.AbstractClass.Prefix +// phpcs:ignore WebimpressCodingStandard.NamingConventions.AbstractClass.Prefix abstract class IdentificationField implements HeaderInterface { /** @var string lower case field name */ diff --git a/src/Header/Sender.php b/src/Header/Sender.php index 841f7fcb..c298bcad 100644 --- a/src/Header/Sender.php +++ b/src/Header/Sender.php @@ -6,7 +6,6 @@ use Laminas\Mail\Address\AddressInterface; use Laminas\Mime\Mime; -use function get_class; use function gettype; use function is_object; use function is_string; @@ -157,7 +156,7 @@ public function setAddress($emailOrAddress, $name = null) throw new Exception\InvalidArgumentException(sprintf( '%s expects a string or AddressInterface object; received "%s"', __METHOD__, - is_object($emailOrAddress) ? get_class($emailOrAddress) : gettype($emailOrAddress) + is_object($emailOrAddress) ? $emailOrAddress::class : gettype($emailOrAddress) )); } $this->address = $emailOrAddress; diff --git a/src/Headers.php b/src/Headers.php index 28a67feb..3e516639 100644 --- a/src/Headers.php +++ b/src/Headers.php @@ -18,7 +18,6 @@ use function count; use function current; use function explode; -use function get_class; use function gettype; use function in_array; use function is_array; @@ -251,7 +250,7 @@ public function addHeaders($headers) if (! is_array($headers) && ! $headers instanceof Traversable) { throw new Exception\InvalidArgumentException(sprintf( 'Expected array or Traversable; received "%s"', - is_object($headers) ? get_class($headers) : gettype($headers) + is_object($headers) ? $headers::class : gettype($headers) )); } @@ -292,7 +291,7 @@ public function addHeaderLine($headerFieldNameOrLine, $fieldValue = null) '%s expects its first argument to be a string; received "%s"', __METHOD__, is_object($headerFieldNameOrLine) - ? get_class($headerFieldNameOrLine) + ? $headerFieldNameOrLine::class : gettype($headerFieldNameOrLine) )); } @@ -343,7 +342,7 @@ public function removeHeader($instanceOrFieldName) '%s requires a string or %s instance; received %s', __METHOD__, HeaderInterface::class, - is_object($instanceOrFieldName) ? get_class($instanceOrFieldName) : gettype($instanceOrFieldName) + is_object($instanceOrFieldName) ? $instanceOrFieldName::class : gettype($instanceOrFieldName) )); } @@ -544,7 +543,7 @@ public function toArray($format = HeaderInterface::FORMAT_RAW) */ public function forceLoading() { - // phpcs:disable Generic.CodeAnalysis.EmptyStatement.DetectedForeach + // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedForeach foreach ($this as $item) { // $item should now be loaded } diff --git a/src/Message.php b/src/Message.php index 7014619e..eda49a69 100644 --- a/src/Message.php +++ b/src/Message.php @@ -17,7 +17,6 @@ use function array_shift; use function count; use function date; -use function get_class; use function gettype; use function is_array; use function is_object; @@ -394,7 +393,7 @@ public function setBody($body) . ' object of type "%s" received', __METHOD__, Mime\Message::class, - get_class($body) + $body::class )); } } @@ -501,7 +500,7 @@ protected function getAddressListFromHeader($headerName, $headerClass) if (! $header instanceof Header\AbstractAddressList) { throw new Exception\DomainException(sprintf( 'Cannot grab address list from header of type "%s"; not an AbstractAddressList implementation', - get_class($header) + $header::class )); } return $header->getAddressList(); @@ -534,7 +533,7 @@ protected function updateAddressList(AddressList $addressList, $emailOrAddressOr '%s expects a string, AddressInterface, array, AddressList, or Traversable as its first argument;' . ' received "%s"', $callingMethod, - is_object($emailOrAddressOrList) ? get_class($emailOrAddressOrList) : gettype($emailOrAddressOrList) + is_object($emailOrAddressOrList) ? $emailOrAddressOrList::class : gettype($emailOrAddressOrList) )); } diff --git a/src/MessageFactory.php b/src/MessageFactory.php index 7bf0df8b..e5ebcda1 100644 --- a/src/MessageFactory.php +++ b/src/MessageFactory.php @@ -4,7 +4,6 @@ use Traversable; -use function get_class; use function gettype; use function is_array; use function is_object; @@ -26,7 +25,7 @@ public static function getInstance($options = []) throw new Exception\InvalidArgumentException(sprintf( '"%s" expects an array or Traversable; received "%s"', __METHOD__, - is_object($options) ? get_class($options) : gettype($options) + is_object($options) ? $options::class : gettype($options) )); } diff --git a/src/Protocol/Imap.php b/src/Protocol/Imap.php index db4706a7..8f75911e 100644 --- a/src/Protocol/Imap.php +++ b/src/Protocol/Imap.php @@ -622,7 +622,7 @@ public function fetch($items, $from, $to = null, $uid = false) // if we want only one message we can ignore everything else and just return if ($to === null && ! is_array($from) && ($uid ? $tokens[2][$uidKey] == $from : $tokens[0] == $from)) { // we still need to read all lines - // phpcs:disable Generic.CodeAnalysis.EmptyStatement.DetectedWhile + // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedWhile while (! $this->readLine($tokens, $tag)) { } return $data; diff --git a/src/Protocol/SmtpPluginManager.php b/src/Protocol/SmtpPluginManager.php index 28259046..51c7c008 100644 --- a/src/Protocol/SmtpPluginManager.php +++ b/src/Protocol/SmtpPluginManager.php @@ -10,7 +10,6 @@ use Zend\Mail\Protocol\Smtp\Auth\Login; use Zend\Mail\Protocol\Smtp\Auth\Plain; -use function get_class; use function gettype; use function is_object; use function sprintf; @@ -97,7 +96,7 @@ public function validate($instance) if (! $instance instanceof $this->instanceOf) { throw new InvalidServiceException(sprintf( 'Plugin of type %s is invalid; must extend %s', - is_object($instance) ? get_class($instance) : gettype($instance), + is_object($instance) ? $instance::class : gettype($instance), $this->instanceOf )); } diff --git a/src/Protocol/SmtpPluginManagerFactory.php b/src/Protocol/SmtpPluginManagerFactory.php index b06aa8d1..956855f9 100644 --- a/src/Protocol/SmtpPluginManagerFactory.php +++ b/src/Protocol/SmtpPluginManagerFactory.php @@ -2,22 +2,31 @@ namespace Laminas\Mail\Protocol; +// phpcs:ignore WebimpressCodingStandard.PHP.CorrectClassNameCase.Invalid use Interop\Container\ContainerInterface; use Laminas\ServiceManager\FactoryInterface; use Laminas\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\ServiceManager; +/** + * @link ServiceManager + * + * @psalm-import-type ServiceManagerConfiguration from ServiceManager + */ class SmtpPluginManagerFactory implements FactoryInterface { /** * laminas-servicemanager v2 support for invocation options. * * @var array + * @psalm-var ServiceManagerConfiguration */ protected $creationOptions; /** * {@inheritDoc} * + * @psalm-param ServiceManagerConfiguration $options * @return SmtpPluginManager */ public function __invoke(ContainerInterface $container, $name, ?array $options = null) @@ -39,6 +48,7 @@ public function createService(ServiceLocatorInterface $container, $name = null, * laminas-servicemanager v2 support for invocation options. * * @param array $options + * @psalm-param ServiceManagerConfiguration $options * @return void */ public function setCreationOptions(array $options) diff --git a/src/Storage/Mbox.php b/src/Storage/Mbox.php index 55a14e0f..d0f219cf 100644 --- a/src/Storage/Mbox.php +++ b/src/Storage/Mbox.php @@ -69,7 +69,7 @@ class Mbox extends AbstractStorage * * @var string|null */ - // phpcs:disable WebimpressCodingStandard.NamingConventions.ValidVariableName.NotCamelCapsProperty + // phpcs:ignore WebimpressCodingStandard.NamingConventions.ValidVariableName.NotCamelCapsProperty protected $messageEOL; /** diff --git a/src/Transport/Factory.php b/src/Transport/Factory.php index 35d06769..e2f10b69 100644 --- a/src/Transport/Factory.php +++ b/src/Transport/Factory.php @@ -6,14 +6,13 @@ use Traversable; use function class_exists; -use function get_class; use function gettype; use function is_array; use function is_object; use function sprintf; use function strtolower; -// phpcs:disable WebimpressCodingStandard.NamingConventions.AbstractClass.Prefix +// phpcs:ignore WebimpressCodingStandard.NamingConventions.AbstractClass.Prefix abstract class Factory { /** @var array Known transport types */ @@ -42,7 +41,7 @@ public static function create($spec = []) throw new Exception\InvalidArgumentException(sprintf( '%s expects an array or Traversable argument; received "%s"', __METHOD__, - is_object($spec) ? get_class($spec) : gettype($spec) + is_object($spec) ? $spec::class : gettype($spec) )); } diff --git a/src/Transport/FileOptions.php b/src/Transport/FileOptions.php index 88d11c11..fd1c0289 100644 --- a/src/Transport/FileOptions.php +++ b/src/Transport/FileOptions.php @@ -6,7 +6,6 @@ use Laminas\Mail\Exception\InvalidArgumentException; use Laminas\Stdlib\AbstractOptions; -use function get_class; use function gettype; use function is_callable; use function is_dir; @@ -73,7 +72,7 @@ public function setCallback($callback) throw new Exception\InvalidArgumentException(sprintf( '%s expects a valid callback; received "%s"', __METHOD__, - is_object($callback) ? get_class($callback) : gettype($callback) + is_object($callback) ? $callback::class : gettype($callback) )); } $this->callback = $callback; diff --git a/src/Transport/Sendmail.php b/src/Transport/Sendmail.php index c5eeb148..76fc6763 100644 --- a/src/Transport/Sendmail.php +++ b/src/Transport/Sendmail.php @@ -11,7 +11,6 @@ use function count; use function escapeshellarg; -use function get_class; use function gettype; use function implode; use function is_array; @@ -92,7 +91,7 @@ public function setParameters($parameters) throw new InvalidArgumentException(sprintf( '%s expects a string, array, or Traversable object of parameters; received "%s"', __METHOD__, - is_object($parameters) ? get_class($parameters) : gettype($parameters) + is_object($parameters) ? $parameters::class : gettype($parameters) )); } @@ -120,7 +119,7 @@ public function setCallable($callable) throw new InvalidArgumentException(sprintf( '%s expects a callable argument; received "%s"', __METHOD__, - is_object($callable) ? get_class($callable) : gettype($callable) + is_object($callable) ? $callable::class : gettype($callable) )); } $this->callable = $callable; diff --git a/src/Transport/SmtpOptions.php b/src/Transport/SmtpOptions.php index 9daad97c..71690ebc 100644 --- a/src/Transport/SmtpOptions.php +++ b/src/Transport/SmtpOptions.php @@ -6,7 +6,6 @@ use Laminas\Mail\Exception\InvalidArgumentException; use Laminas\Stdlib\AbstractOptions; -use function get_class; use function gettype; use function is_object; use function is_string; @@ -64,7 +63,7 @@ public function setName($name) if (! is_string($name) && $name !== null) { throw new Exception\InvalidArgumentException(sprintf( 'Name must be a string or null; argument of type "%s" provided', - is_object($name) ? get_class($name) : gettype($name) + is_object($name) ? $name::class : gettype($name) )); } $this->name = $name; @@ -97,7 +96,7 @@ public function setConnectionClass($connectionClass) if (! is_string($connectionClass) && $connectionClass !== null) { throw new Exception\InvalidArgumentException(sprintf( 'Connection class must be a string or null; argument of type "%s" provided', - is_object($connectionClass) ? get_class($connectionClass) : gettype($connectionClass) + is_object($connectionClass) ? $connectionClass::class : gettype($connectionClass) )); } $this->connectionClass = $connectionClass; diff --git a/test/Header/GenericMultiHeaderTest.php b/test/Header/GenericMultiHeaderTest.php index 91fb008a..5c9de879 100644 --- a/test/Header/GenericMultiHeaderTest.php +++ b/test/Header/GenericMultiHeaderTest.php @@ -7,7 +7,6 @@ use PHPUnit\Framework\TestCase; use function count; -use function get_class; /** * @covers Laminas\Mail\Header\GenericMultiHeader @@ -17,7 +16,7 @@ class GenericMultiHeaderTest extends TestCase public function testFromStringSingle(): void { $multiHeader = GenericMultiHeader::fromString('x-custom: test'); - $this->assertSame(GenericMultiHeader::class, get_class($multiHeader)); + $this->assertSame(GenericMultiHeader::class, $multiHeader::class); } public function testFromStringMultiple(): void @@ -25,7 +24,7 @@ public function testFromStringMultiple(): void $headers = GenericMultiHeader::fromString('x-custom: foo,bar'); $this->assertSame(2, count($headers)); foreach ($headers as $header) { - $this->assertSame(GenericMultiHeader::class, get_class($header)); + $this->assertSame(GenericMultiHeader::class, $header::class); } } diff --git a/test/HeadersTest.php b/test/HeadersTest.php index c8fefb67..d0762b0d 100644 --- a/test/HeadersTest.php +++ b/test/HeadersTest.php @@ -15,7 +15,6 @@ use PHPUnit\Framework\TestCase; use stdClass; -use function get_class; use function implode; use function restore_error_handler; use function set_error_handler; @@ -403,7 +402,7 @@ public function testGetReturnsArrayIterator(): void $headers->addHeader($received); $return = $headers->get('Received'); - $this->assertSame(ArrayIterator::class, get_class($return)); + $this->assertSame(ArrayIterator::class, $return::class); } /** diff --git a/test/Protocol/SmtpPluginManagerFactoryTest.php b/test/Protocol/SmtpPluginManagerFactoryTest.php index 3356b947..7fa37f76 100644 --- a/test/Protocol/SmtpPluginManagerFactoryTest.php +++ b/test/Protocol/SmtpPluginManagerFactoryTest.php @@ -2,6 +2,7 @@ namespace LaminasTest\Mail\Protocol; +// phpcs:ignore WebimpressCodingStandard.PHP.CorrectClassNameCase.Invalid use Interop\Container\ContainerInterface; use Laminas\Mail\Protocol\Smtp; use Laminas\Mail\Protocol\SmtpPluginManager; diff --git a/test/Storage/MaildirFolderTest.php b/test/Storage/MaildirFolderTest.php index bad05ab3..680649e8 100644 --- a/test/Storage/MaildirFolderTest.php +++ b/test/Storage/MaildirFolderTest.php @@ -16,7 +16,6 @@ use function closedir; use function copy; use function file_exists; -use function get_class; use function getenv; use function is_dir; use function is_file; @@ -147,13 +146,13 @@ public function tearDown(): void public function testLoadOk(): void { $mail = new Folder\Maildir($this->params); - $this->assertSame(Folder\Maildir::class, get_class($mail)); + $this->assertSame(Folder\Maildir::class, $mail::class); } public function testLoadConfig(): void { $mail = new Folder\Maildir(new ArrayObject($this->params)); - $this->assertSame(Folder\Maildir::class, get_class($mail)); + $this->assertSame(Folder\Maildir::class, $mail::class); } public function testNoParams(): void diff --git a/test/Storage/MaildirTest.php b/test/Storage/MaildirTest.php index 92d7f384..e3b27941 100644 --- a/test/Storage/MaildirTest.php +++ b/test/Storage/MaildirTest.php @@ -14,7 +14,6 @@ use function copy; use function explode; use function file_exists; -use function get_class; use function getenv; use function is_dir; use function is_file; @@ -134,13 +133,13 @@ public function tearDown(): void public function testLoadOk(): void { $mail = new Storage\Maildir(['dirname' => $this->maildir]); - $this->assertSame(Storage\Maildir::class, get_class($mail)); + $this->assertSame(Storage\Maildir::class, $mail::class); } public function testLoadConfig(): void { $mail = new Storage\Maildir(new ArrayObject(['dirname' => $this->maildir])); - $this->assertSame(Storage\Maildir::class, get_class($mail)); + $this->assertSame(Storage\Maildir::class, $mail::class); } public function testLoadFailure(): void