From d547de059f94b3c28d3f9c38c83f513432b8bbf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Demonchaux?= Date: Sun, 16 Oct 2022 17:52:34 +0200 Subject: [PATCH] Drop support php 7, add php 8.2 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Demonchaux --- .../install-sqlsrv-extension-via-pecl.sh | 14 + .laminas-ci/pre-install.sh | 19 + composer.json | 12 +- composer.lock | 563 ++++-------------- phpcs.xml.dist | 4 + src/Sql/AbstractExpression.php | 3 +- src/Sql/Combine.php | 3 +- src/Sql/Select.php | 5 +- src/Sql/TableIdentifier.php | 5 +- test/unit/Sql/Ddl/Column/FloatTest.php | 27 - 10 files changed, 169 insertions(+), 486 deletions(-) create mode 100755 .laminas-ci/install-sqlsrv-extension-via-pecl.sh create mode 100755 .laminas-ci/pre-install.sh delete mode 100644 test/unit/Sql/Ddl/Column/FloatTest.php diff --git a/.laminas-ci/install-sqlsrv-extension-via-pecl.sh b/.laminas-ci/install-sqlsrv-extension-via-pecl.sh new file mode 100755 index 00000000..58016d57 --- /dev/null +++ b/.laminas-ci/install-sqlsrv-extension-via-pecl.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +PHP_VERSION="$1" + +if ! [[ "${PHP_VERSION}" =~ 8\.2 ]]; then + echo "sqlsrv is only installed from pecl for PHP 8.2, ${PHP_VERSION} detected." + exit 0; +fi + +set +e + +pecl install sqlsrv +echo "extension=sqlsrv.so" > /etc/php/${PHP_VERSION}/mods-available/sqlsrv.ini +phpenmod -v ${PHP} -s cli sqlsrv diff --git a/.laminas-ci/pre-install.sh b/.laminas-ci/pre-install.sh new file mode 100755 index 00000000..f02237a2 --- /dev/null +++ b/.laminas-ci/pre-install.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +WORKING_DIRECTORY=$2 +JOB=$3 +PHP_VERSION=$(echo "${JOB}" | jq -r '.php') + + +if [ ! -z "$GITHUB_BASE_REF" ] && [[ "$GITHUB_BASE_REF" =~ ^[0-9]+\.[0-9] ]]; then + readarray -td. TARGET_BRANCH_VERSION_PARTS <<<"${GITHUB_BASE_REF}."; + unset 'TARGET_BRANCH_VERSION_PARTS[-1]'; + declare -a TARGET_BRANCH_VERSION_PARTS + MAJOR_OF_TARGET_BRANCH=${TARGET_BRANCH_VERSION_PARTS[0]} + MINOR_OF_TARGET_BRANCH=${TARGET_BRANCH_VERSION_PARTS[1]} + + export COMPOSER_ROOT_VERISON="${MAJOR_OF_TARGET_BRANCH}.${MINOR_OF_TARGET_BRANCH}.99" + echo "Exported COMPOSER_ROOT_VERISON as ${COMPOSER_ROOT_VERISON}" +fi + +${WORKING_DIRECTORY}/.laminas-ci/install-sqlsrv-extension-via-pecl.sh "${PHP_VERSION}" || exit 1 diff --git a/composer.json b/composer.json index e4139acf..3973d9e8 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "config": { "sort-packages": true, "platform": { - "php": "7.4.99" + "php": "8.0.99" }, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true @@ -31,15 +31,15 @@ } }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0|| ~8.2.0", "laminas/laminas-stdlib": "^3.7.1" }, "require-dev": { "laminas/laminas-coding-standard": "^2.4.0", - "laminas/laminas-eventmanager": "^3.4.0", - "laminas/laminas-hydrator": "^4.3", - "laminas/laminas-servicemanager": "^3.7.0", - "phpunit/phpunit": "^9.5.19" + "laminas/laminas-eventmanager": "^3.6.0", + "laminas/laminas-hydrator": "^4.7", + "laminas/laminas-servicemanager": "^3.19.0", + "phpunit/phpunit": "^9.5.25" }, "suggest": { "laminas/laminas-eventmanager": "Laminas\\EventManager component", diff --git a/composer.lock b/composer.lock index f7275ddf..1d72b379 100644 --- a/composer.lock +++ b/composer.lock @@ -4,35 +4,34 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6edb8b5c8b62c96ac581a2470a6e1b6d", + "content-hash": "3877d3932a0a008e912c0862551dd491", "packages": [ { "name": "laminas/laminas-stdlib", - "version": "3.13.0", + "version": "3.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76" + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/66a6d03c381f6c9f1dd988bf8244f9afb9380d76", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27", + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27", "shasum": "" }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-coding-standard": "^2.4.0", "phpbench/phpbench": "^1.2.6", - "phpstan/phpdoc-parser": "^0.5.4", - "phpunit/phpunit": "^9.5.23", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.26" + "vimeo/psalm": "^4.28" }, "type": "library", "autoload": { @@ -64,46 +63,10 @@ "type": "community_bridge" } ], - "time": "2022-08-24T13:56:50+00:00" + "time": "2022-10-10T19:10:24+00:00" } ], "packages-dev": [ - { - "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": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.2", @@ -307,35 +270,37 @@ }, { "name": "laminas/laminas-eventmanager", - "version": "3.4.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "a93fd278c97b2d41ebbce5ba048a24e3e6f580ba" + "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/a93fd278c97b2d41ebbce5ba048a24e3e6f580ba", - "reference": "a93fd278c97b2d41ebbce5ba048a24e3e6f580ba", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/3f1afbad86cd34a431fdc069f265cfe6f8fc8308", + "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { + "container-interop/container-interop": "<1.2", "zendframework/zend-eventmanager": "*" }, "require-dev": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-stdlib": "^3.6", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5" + "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", + "psr/container": "^1.1.2 || ^2.0.2", + "vimeo/psalm": "^4.28" }, "suggest": { - "container-interop/container-interop": "^1.1, to use the lazy listeners feature", - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" + "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", + "psr/container": "^1.1.2 || ^2.0.2, to use the lazy listeners feature" }, "type": "library", "autoload": { @@ -369,46 +334,46 @@ "type": "community_bridge" } ], - "time": "2021-09-07T22:35:32+00:00" + "time": "2022-10-11T12:46:13+00:00" }, { "name": "laminas/laminas-hydrator", - "version": "4.3.2", + "version": "4.7.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-hydrator.git", - "reference": "38d29dc88fdb090c85780239e5cdf8c5c4905431" + "reference": "6455f15ff3ba6588d20d68173e656d2dffc531aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/38d29dc88fdb090c85780239e5cdf8c5c4905431", - "reference": "38d29dc88fdb090c85780239e5cdf8c5c4905431", + "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/6455f15ff3ba6588d20d68173e656d2dffc531aa", + "reference": "6455f15ff3ba6588d20d68173e656d2dffc531aa", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.3", - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "webmozart/assert": "^1.10" }, "conflict": { + "laminas/laminas-servicemanager": "<3.14.0", "zendframework/zend-hydrator": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-eventmanager": "^3.2.1", - "laminas/laminas-modulemanager": "^2.8", - "laminas/laminas-serializer": "^2.9", - "laminas/laminas-servicemanager": "^3.3.2", - "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "~9.5.5", - "psalm/plugin-phpunit": "^0.16.1", - "psr/cache": "1.0.1", - "vimeo/psalm": "^4.8.1" + "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-servicemanager": "^3.19", + "phpbench/phpbench": "^1.2.6", + "phpunit/phpunit": "^9.5.25", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.29" }, "suggest": { "laminas/laminas-eventmanager": "^3.2, to support aggregate hydrator usage", "laminas/laminas-serializer": "^2.9, to use the SerializableStrategy", - "laminas/laminas-servicemanager": "^3.3, to support hydrator plugin manager usage" + "laminas/laminas-servicemanager": "^3.14, to support hydrator plugin manager usage" }, "type": "library", "extra": { @@ -446,52 +411,50 @@ "type": "community_bridge" } ], - "time": "2021-12-21T10:06:25+00:00" + "time": "2022-10-15T11:11:46+00:00" }, { "name": "laminas/laminas-servicemanager", - "version": "3.7.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "2b0aee477fdbd3191af7c302b93dbc5fda0626f4" + "reference": "ed160729bb8721127efdaac799f9a298963345b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/2b0aee477fdbd3191af7c302b93dbc5fda0626f4", - "reference": "2b0aee477fdbd3191af7c302b93dbc5fda0626f4", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/ed160729bb8721127efdaac799f9a298963345b1", + "reference": "ed160729bb8721127efdaac799f9a298963345b1", "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", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0" }, "conflict": { + "ext-psr": "*", "laminas/laminas-code": "<3.3.1", - "zendframework/zend-code": "<3.3.1" + "zendframework/zend-code": "<3.3.1", + "zendframework/zend-servicemanager": "*" }, "provide": { - "container-interop/container-interop-implementation": "^1.2", "psr/container-implementation": "^1.0" }, "replace": { - "zendframework/zend-servicemanager": "^3.4.0" + "container-interop/container-interop": "^1.2.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" + "composer/package-versions-deprecated": "^1.11.99.5", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-container-config-test": "^0.7", + "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" }, "suggest": { "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -502,6 +465,9 @@ ], "type": "library", "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { "Laminas\\ServiceManager\\": "src/" } @@ -535,69 +501,7 @@ "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" + "time": "2022-10-10T20:59:22+00:00" }, { "name": "myclabs/deep-copy", @@ -660,16 +564,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -710,9 +614,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "phar-io/manifest", @@ -825,233 +729,6 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, { "name": "phpstan/phpdoc-parser", "version": "1.5.1", @@ -1098,16 +775,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.16", + "version": "9.2.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073" + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2593003befdcc10db5e213f9f28814f5aa8ac073", - "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", "shasum": "" }, "require": { @@ -1163,7 +840,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.16" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" }, "funding": [ { @@ -1171,7 +848,7 @@ "type": "github" } ], - "time": "2022-08-20T05:26:47+00:00" + "time": "2022-08-30T12:24:04+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1416,16 +1093,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.22", + "version": "9.5.25", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e329ac6e8744f461518272612a479fde958752fe" + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e329ac6e8744f461518272612a479fde958752fe", - "reference": "e329ac6e8744f461518272612a479fde958752fe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", "shasum": "" }, "require": { @@ -1440,7 +1117,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -1448,19 +1124,16 @@ "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -1502,7 +1175,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.22" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" }, "funding": [ { @@ -1512,26 +1185,30 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-08-20T08:25:46+00:00" + "time": "2022-09-25T03:44:45+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": { @@ -1560,9 +1237,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": "sebastian/cli-parser", @@ -1733,16 +1410,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -1795,7 +1472,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -1803,7 +1480,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -1993,16 +1670,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -2058,7 +1735,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -2066,7 +1743,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -2421,16 +2098,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -2442,7 +2119,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2465,7 +2142,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -2473,7 +2150,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -2815,11 +2492,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0|| ~8.2.0" }, "platform-dev": [], "platform-overrides": { - "php": "7.4.99" + "php": "8.0.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index cd6a44ac..9f8eda43 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -28,4 +28,8 @@ */test/unit/Adapter/Driver/IbmDb2/StatementTest.php + + src/Adapter/AdapterServiceFactory.php + src/Adapter/AdapterAbstractServiceFactory.php + diff --git a/src/Sql/AbstractExpression.php b/src/Sql/AbstractExpression.php index 2624213d..745aea59 100644 --- a/src/Sql/AbstractExpression.php +++ b/src/Sql/AbstractExpression.php @@ -6,7 +6,6 @@ use Laminas\Db\Sql\SqlInterface; use function current; -use function get_class; use function gettype; use function implode; use function in_array; @@ -68,7 +67,7 @@ protected function normalizeArgument($argument, $defaultType = self::TYPE_VALUE) 'array', ExpressionInterface::class, SqlInterface::class, - is_object($argument) ? get_class($argument) : gettype($argument) + is_object($argument) ? $argument::class : gettype($argument) )); } diff --git a/src/Sql/Combine.php b/src/Sql/Combine.php index 22c2625a..5b7f5500 100644 --- a/src/Sql/Combine.php +++ b/src/Sql/Combine.php @@ -8,7 +8,6 @@ use function array_key_exists; use function array_merge; -use function get_class; use function gettype; use function is_array; use function is_object; @@ -76,7 +75,7 @@ public function combine($select, $type = self::COMBINE_UNION, $modifier = '') if (! $select instanceof Select) { throw new Exception\InvalidArgumentException(sprintf( '$select must be a array or instance of Select, "%s" given', - is_object($select) ? get_class($select) : gettype($select) + is_object($select) ? $select::class : gettype($select) )); } diff --git a/src/Sql/Select.php b/src/Sql/Select.php index 20524ea7..4ab03551 100644 --- a/src/Sql/Select.php +++ b/src/Sql/Select.php @@ -10,7 +10,6 @@ use function array_key_exists; use function count; use function current; -use function get_class; use function gettype; use function is_array; use function is_int; @@ -353,7 +352,7 @@ public function limit($limit) throw new Exception\InvalidArgumentException(sprintf( '%s expects parameter to be numeric, "%s" given', __METHOD__, - is_object($limit) ? get_class($limit) : gettype($limit) + is_object($limit) ? $limit::class : gettype($limit) )); } @@ -372,7 +371,7 @@ public function offset($offset) throw new Exception\InvalidArgumentException(sprintf( '%s expects parameter to be numeric, "%s" given', __METHOD__, - is_object($offset) ? get_class($offset) : gettype($offset) + is_object($offset) ? $offset::class : gettype($offset) )); } diff --git a/src/Sql/TableIdentifier.php b/src/Sql/TableIdentifier.php index 225c79f5..ff69c53e 100644 --- a/src/Sql/TableIdentifier.php +++ b/src/Sql/TableIdentifier.php @@ -2,7 +2,6 @@ namespace Laminas\Db\Sql; -use function get_class; use function gettype; use function is_callable; use function is_object; @@ -26,7 +25,7 @@ public function __construct($table, $schema = null) if (! (is_string($table) || is_callable([$table, '__toString']))) { throw new Exception\InvalidArgumentException(sprintf( '$table must be a valid table name, parameter of type %s given', - is_object($table) ? get_class($table) : gettype($table) + is_object($table) ? $table::class : gettype($table) )); } @@ -42,7 +41,7 @@ public function __construct($table, $schema = null) if (! (is_string($schema) || is_callable([$schema, '__toString']))) { throw new Exception\InvalidArgumentException(sprintf( '$schema must be a valid schema name, parameter of type %s given', - is_object($schema) ? get_class($schema) : gettype($schema) + is_object($schema) ? $schema::class : gettype($schema) )); } diff --git a/test/unit/Sql/Ddl/Column/FloatTest.php b/test/unit/Sql/Ddl/Column/FloatTest.php deleted file mode 100644 index 017a8293..00000000 --- a/test/unit/Sql/Ddl/Column/FloatTest.php +++ /dev/null @@ -1,27 +0,0 @@ -=')) { - $this->markTestSkipped('Cannot test Float column under PHP 7; reserved keyword'); - } - } - - public function testRaisesDeprecationNoticeOnInstantiation() - { - $this->expectException(Deprecated::class); - new FloatColumn('foo', 10, 5); - } -}