From 88e4dcbc7a7fc22de7a7391be84c03480e291c0c Mon Sep 17 00:00:00 2001 From: Dave Liddament Date: Fri, 23 Dec 2022 10:50:58 +0000 Subject: [PATCH 1/7] ADD tests for PHP8.2 --- .github/workflows/full-checks.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/full-checks.yml b/.github/workflows/full-checks.yml index db7610e..4b7ec90 100644 --- a/.github/workflows/full-checks.yml +++ b/.github/workflows/full-checks.yml @@ -23,8 +23,9 @@ jobs: php-version: - "8.0" - "8.1" + - "8.2" operating-system: - - "ubuntu-18.04" + - "ubuntu-22.04" steps: - name: "Checkout" From 9ac76d1e8ffe8d90cbfbdbfc4c9bb8a10af7212b Mon Sep 17 00:00:00 2001 From: Dave Liddament Date: Fri, 23 Dec 2022 10:54:48 +0000 Subject: [PATCH 2/7] FIX PHP range in composer.json --- composer.json | 2 +- composer.lock | 390 +++++++++++++++++++++++++------------------------- 2 files changed, 197 insertions(+), 195 deletions(-) diff --git a/composer.json b/composer.json index da36dfa..92df8c5 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } }, "require" : { - "php": "^8" + "php": ">=8.0 <8.3" }, "require-dev": { "phpstan/phpstan": "^1.5", diff --git a/composer.lock b/composer.lock index 34bc1f2..659bea3 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": "0ec5a7862421544234d1d2645895f560", + "content-hash": "753d32ae940c65e3cb456ce1a0c64384", "packages": [], "packages-dev": [ { @@ -248,16 +248,16 @@ }, { "name": "composer/pcre", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "shasum": "" }, "require": { @@ -299,7 +299,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.0" + "source": "https://github.com/composer/pcre/tree/3.1.0" }, "funding": [ { @@ -315,7 +315,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T20:21:48+00:00" + "time": "2022-11-17T09:50:14+00:00" }, { "name": "composer/semver", @@ -503,32 +503,35 @@ }, { "name": "doctrine/annotations", - "version": "1.13.3", + "version": "1.14.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0" + "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", + "doctrine/lexer": "^1 || ^2", "ext-tokenizer": "*", "php": "^7.1 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", "vimeo/psalm": "^4.10" }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, "type": "library", "autoload": { "psr-4": { @@ -570,37 +573,82 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.3" + "source": "https://github.com/doctrine/annotations/tree/1.14.2" + }, + "time": "2022-12-15T06:48:22+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" }, - "time": "2022-07-02T10:48:51+00:00" + "time": "2022-05-02T15:47:09+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -632,7 +680,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, "funding": [ { @@ -648,7 +696,7 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2022-12-14T08:49:07+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -753,16 +801,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.9.5", + "version": "v3.13.1", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "4465d70ba776806857a1ac2a6f877e582445ff36" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "78d2251dd86b49c609a0fd37c20dcf0a00aea5a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/4465d70ba776806857a1ac2a6f877e582445ff36", - "reference": "4465d70ba776806857a1ac2a6f877e582445ff36", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/78d2251dd86b49c609a0fd37c20dcf0a00aea5a7", + "reference": "78d2251dd86b49c609a0fd37c20dcf0a00aea5a7", "shasum": "" }, "require": { @@ -772,7 +820,7 @@ "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", - "php-cs-fixer/diff": "^2.0", + "sebastian/diff": "^4.0", "symfony/console": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0", @@ -786,7 +834,7 @@ }, "require-dev": { "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.5", + "keradus/cli-executor": "^2.0", "mikey179/vfsstream": "^1.6.10", "php-coveralls/php-coveralls": "^2.5.2", "php-cs-fixer/accessible-object": "^1.1", @@ -795,8 +843,8 @@ "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", "symfony/phpunit-bridge": "^6.0", "symfony/yaml": "^5.4 || ^6.0" }, @@ -829,8 +877,8 @@ ], "description": "A tool to automatically fix PHP code style", "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.9.5" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.1" }, "funding": [ { @@ -838,20 +886,20 @@ "type": "github" } ], - "time": "2022-07-22T08:43:51+00:00" + "time": "2022-12-18T00:47:22+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.0.0", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" + "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", + "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", "shasum": "" }, "require": { @@ -887,22 +935,22 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.1.0" }, - "time": "2020-12-01T19:48:11+00:00" + "time": "2022-12-08T20:46:14+00:00" }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" }, "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/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", "shasum": "" }, "require": { @@ -943,9 +991,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.2" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-11-12T15:38:23+00:00" }, { "name": "openlss/lib-array2xml", @@ -1000,58 +1048,6 @@ }, "time": "2019-03-29T20:06:56+00:00" }, - { - "name": "php-cs-fixer/diff", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "sebastian/diff v3 backport support for PHP 5.6+", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" - }, - "time": "2020-10-14T08:32:19+00:00" - }, { "name": "php-parallel-lint/php-parallel-lint", "version": "v1.3.2", @@ -1221,25 +1217,30 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -1265,22 +1266,22 @@ "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" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { "name": "phpstan/phpstan", - "version": "1.8.2", + "version": "1.9.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c" + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c", - "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", "shasum": "" }, "require": { @@ -1304,9 +1305,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.2" + "source": "https://github.com/phpstan/phpstan/tree/1.9.4" }, "funding": [ { @@ -1317,16 +1322,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2022-07-20T09:57:31+00:00" + "time": "2022-12-17T13:33:52+00:00" }, { "name": "psr/cache", @@ -1598,16 +1599,16 @@ }, { "name": "symfony/console", - "version": "v6.0.11", + "version": "v6.0.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "09b8e50f09bf0e5bbde9b61b19d7f53751114725" + "reference": "be294423f337dda97c810733138c0caec1bb0575" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/09b8e50f09bf0e5bbde9b61b19d7f53751114725", - "reference": "09b8e50f09bf0e5bbde9b61b19d7f53751114725", + "url": "https://api.github.com/repos/symfony/console/zipball/be294423f337dda97c810733138c0caec1bb0575", + "reference": "be294423f337dda97c810733138c0caec1bb0575", "shasum": "" }, "require": { @@ -1673,7 +1674,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.11" + "source": "https://github.com/symfony/console/tree/v6.0.16" }, "funding": [ { @@ -1689,7 +1690,7 @@ "type": "tidelift" } ], - "time": "2022-07-22T14:17:38+00:00" + "time": "2022-11-25T18:58:46+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1922,16 +1923,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.0.11", + "version": "v6.0.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "33787a6b6e055245d5710697dfc4a9a2b896c032" + "reference": "3adca49133bd055ebe6011ed1e012be3c908af79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/33787a6b6e055245d5710697dfc4a9a2b896c032", - "reference": "33787a6b6e055245d5710697dfc4a9a2b896c032", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3adca49133bd055ebe6011ed1e012be3c908af79", + "reference": "3adca49133bd055ebe6011ed1e012be3c908af79", "shasum": "" }, "require": { @@ -1965,7 +1966,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.11" + "source": "https://github.com/symfony/filesystem/tree/v6.0.13" }, "funding": [ { @@ -1981,7 +1982,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T14:06:08+00:00" + "time": "2022-09-21T20:25:27+00:00" }, { "name": "symfony/finder", @@ -2113,16 +2114,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -2137,7 +2138,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2175,7 +2176,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -2191,20 +2192,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -2216,7 +2217,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2256,7 +2257,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -2272,20 +2273,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -2297,7 +2298,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2340,7 +2341,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -2356,20 +2357,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -2384,7 +2385,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2423,7 +2424,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -2439,20 +2440,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -2461,7 +2462,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2506,7 +2507,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -2522,20 +2523,20 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { @@ -2544,7 +2545,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2585,7 +2586,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, "funding": [ { @@ -2601,7 +2602,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", @@ -2748,16 +2749,16 @@ }, { "name": "symfony/stopwatch", - "version": "v6.0.5", + "version": "v6.0.13", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f2c1780607ec6502f2121d9729fd8150a655d337" + "reference": "7554fde6848af5ef1178f8ccbdbdb8ae1092c70a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f2c1780607ec6502f2121d9729fd8150a655d337", - "reference": "f2c1780607ec6502f2121d9729fd8150a655d337", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/7554fde6848af5ef1178f8ccbdbdb8ae1092c70a", + "reference": "7554fde6848af5ef1178f8ccbdbdb8ae1092c70a", "shasum": "" }, "require": { @@ -2790,7 +2791,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.0.5" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.13" }, "funding": [ { @@ -2806,20 +2807,20 @@ "type": "tidelift" } ], - "time": "2022-02-21T17:15:17+00:00" + "time": "2022-09-28T15:52:47+00:00" }, { "name": "symfony/string", - "version": "v6.0.11", + "version": "v6.0.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "042b6bf0f6ccca6d456a0572eb788cfb8b1ff809" + "reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/042b6bf0f6ccca6d456a0572eb788cfb8b1ff809", - "reference": "042b6bf0f6ccca6d456a0572eb788cfb8b1ff809", + "url": "https://api.github.com/repos/symfony/string/zipball/51ac0fa0ccf132a00519b87c97e8f775fa14e771", + "reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771", "shasum": "" }, "require": { @@ -2875,7 +2876,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.11" + "source": "https://github.com/symfony/string/tree/v6.0.15" }, "funding": [ { @@ -2891,20 +2892,20 @@ "type": "tidelift" } ], - "time": "2022-07-27T15:50:26+00:00" + "time": "2022-10-10T09:34:08+00:00" }, { "name": "vimeo/psalm", - "version": "4.26.0", + "version": "4.30.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "6998fabb2bf528b65777bf9941920888d23c03ac" + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/6998fabb2bf528b65777bf9941920888d23c03ac", - "reference": "6998fabb2bf528b65777bf9941920888d23c03ac", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", "shasum": "" }, "require": { @@ -2943,6 +2944,7 @@ "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", @@ -2996,9 +2998,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.26.0" + "source": "https://github.com/vimeo/psalm/tree/4.30.0" }, - "time": "2022-07-31T13:10:26+00:00" + "time": "2022-11-06T20:37:08+00:00" }, { "name": "webmozart/assert", @@ -3116,7 +3118,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8" + "php": ">=8.0 <8.3" }, "platform-dev": [], "plugin-api-version": "2.3.0" From 49af85e003cf96b4b9b579484d9a9268ffbddf38 Mon Sep 17 00:00:00 2001 From: Dave Liddament Date: Fri, 23 Dec 2022 10:55:45 +0000 Subject: [PATCH 3/7] FIX coding style (due to updates to PHPCS) --- src/CheckInjectableVersion.php | 2 +- src/Friend.php | 2 +- src/InjectableVersion.php | 2 +- src/Package.php | 2 +- src/Sealed.php | 2 +- src/TestTag.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CheckInjectableVersion.php b/src/CheckInjectableVersion.php index aa02181..b14a127 100644 --- a/src/CheckInjectableVersion.php +++ b/src/CheckInjectableVersion.php @@ -6,7 +6,7 @@ use Attribute; -#[Attribute(Attribute::TARGET_METHOD)] +#[\Attribute(\Attribute::TARGET_METHOD)] class CheckInjectableVersion { } diff --git a/src/Friend.php b/src/Friend.php index fff603e..5818244 100644 --- a/src/Friend.php +++ b/src/Friend.php @@ -9,7 +9,7 @@ /** * Limits calling methods to those listed as the method's or class's friends. */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] class Friend { /** @param class-string ...$friends */ diff --git a/src/InjectableVersion.php b/src/InjectableVersion.php index 81d18e4..1afb4a1 100644 --- a/src/InjectableVersion.php +++ b/src/InjectableVersion.php @@ -6,7 +6,7 @@ use Attribute; -#[Attribute(Attribute::TARGET_CLASS)] +#[\Attribute(\Attribute::TARGET_CLASS)] class InjectableVersion { } diff --git a/src/Package.php b/src/Package.php index c980680..4e813c5 100644 --- a/src/Package.php +++ b/src/Package.php @@ -9,7 +9,7 @@ /** * Limit calls to classes or methods with the Package attribute to calls from classes in the name namespace. */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] class Package { } diff --git a/src/Sealed.php b/src/Sealed.php index b45aac8..34c8413 100644 --- a/src/Sealed.php +++ b/src/Sealed.php @@ -9,7 +9,7 @@ /** * Limits the classes that can extend/implement to those listed in $permitted. */ -#[Attribute(Attribute::TARGET_CLASS)] +#[\Attribute(\Attribute::TARGET_CLASS)] class Sealed { /** @param class-string ...$permitted */ diff --git a/src/TestTag.php b/src/TestTag.php index adb29bc..374a7b8 100644 --- a/src/TestTag.php +++ b/src/TestTag.php @@ -9,7 +9,7 @@ /** * Add the TestTag attribute to a method that should only be called by test code. */ -#[Attribute(Attribute::TARGET_METHOD)] +#[\Attribute(\Attribute::TARGET_METHOD)] class TestTag { } From 68ee5ac45ccf7a23305ed15779b6057499d29574 Mon Sep 17 00:00:00 2001 From: Dave Liddament Date: Fri, 23 Dec 2022 11:15:30 +0000 Subject: [PATCH 4/7] UPDATE PHP range specification --- composer.json | 46 +++++++++++++++++++++++++++------------------- composer.lock | 4 ++-- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index 92df8c5..3023d53 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,13 @@ { "name": "dave-liddament/php-language-extensions", "description": "Attributes for extending the PHP language, using static analysis to enforce new language constructs", - "keywords": ["static analysis", "package attribute", "friend attribute", "sealed attribute"], - "type" : "library", + "keywords": [ + "static analysis", + "package attribute", + "friend attribute", + "sealed attribute" + ], + "type": "library", "minimum-stability": "stable", "license": "MIT", "authors": [ @@ -13,11 +18,11 @@ ], "autoload": { "psr-4": { - "DaveLiddament\\PhpLanguageExtensions\\" : "src/" + "DaveLiddament\\PhpLanguageExtensions\\": "src/" } }, - "require" : { - "php": ">=8.0 <8.3" + "require": { + "php": "^8.0 || ^8.1 || ^8.2" }, "require-dev": { "phpstan/phpstan": "^1.5", @@ -26,18 +31,21 @@ "vimeo/psalm": "^4.22" }, "scripts": { - "composer-validate" : "@composer validate --no-check-all --strict", - "cs-fix" : "php-cs-fixer fix", - "cs" : "php-cs-fixer fix --dry-run -v", - "phpstan" : "phpstan analyse", - "psalm" : "psalm", - "lint" : "parallel-lint src", - "ci" : [ - "@composer-validate", - "@lint", - "@cs", - "@phpstan", - "@psalm" - ] - } + "composer-validate": "@composer validate --no-check-all --strict", + "cs-fix": "php-cs-fixer fix", + "cs": [ + "@putenv @PHP_CS_FIXER_IGNORE_ENV=1", + "php-cs-fixer fix --dry-run -v" + ], + "phpstan": "phpstan analyse", + "psalm": "psalm", + "lint": "parallel-lint src", + "ci": [ + "@composer-validate", + "@lint", + "@cs", + "@phpstan", + "@psalm" + ] + } } diff --git a/composer.lock b/composer.lock index 659bea3..2d3f096 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": "753d32ae940c65e3cb456ce1a0c64384", + "content-hash": "1f18038243cffb58f13990ce6f006249", "packages": [], "packages-dev": [ { @@ -3118,7 +3118,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.0 <8.3" + "php": "^8.0 || ^8.1 || ^8.2" }, "platform-dev": [], "plugin-api-version": "2.3.0" From a82ee09fd30b563809b729818c3710c877d97d39 Mon Sep 17 00:00:00 2001 From: Dave Liddament Date: Fri, 23 Dec 2022 11:23:36 +0000 Subject: [PATCH 5/7] FIX ignore env flat for php cs fixer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3023d53..eeedead 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "composer-validate": "@composer validate --no-check-all --strict", "cs-fix": "php-cs-fixer fix", "cs": [ - "@putenv @PHP_CS_FIXER_IGNORE_ENV=1", + "@putenv PHP_CS_FIXER_IGNORE_ENV=1", "php-cs-fixer fix --dry-run -v" ], "phpstan": "phpstan analyse", From b2d88c6577a7380d848e1eb5d6aacd3292e5f645 Mon Sep 17 00:00:00 2001 From: Dave Liddament Date: Fri, 23 Dec 2022 11:36:41 +0000 Subject: [PATCH 6/7] REMOVE unused use statements --- .php-cs-fixer.php | 1 + src/CheckInjectableVersion.php | 2 -- src/Friend.php | 2 -- src/InjectableVersion.php | 2 -- src/Package.php | 2 -- src/Sealed.php | 2 -- src/TestTag.php | 2 -- 7 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 8ba341c..bdd0022 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -18,6 +18,7 @@ 'no_useless_return' => true, 'ordered_imports' => true, 'phpdoc_order' => true, + 'no_unused_imports' => true, 'strict_comparison' => true, 'phpdoc_align' => false, 'phpdoc_to_comment' => false, diff --git a/src/CheckInjectableVersion.php b/src/CheckInjectableVersion.php index b14a127..2e7d6a1 100644 --- a/src/CheckInjectableVersion.php +++ b/src/CheckInjectableVersion.php @@ -4,8 +4,6 @@ namespace DaveLiddament\PhpLanguageExtensions; -use Attribute; - #[\Attribute(\Attribute::TARGET_METHOD)] class CheckInjectableVersion { diff --git a/src/Friend.php b/src/Friend.php index 5818244..ea462aa 100644 --- a/src/Friend.php +++ b/src/Friend.php @@ -4,8 +4,6 @@ namespace DaveLiddament\PhpLanguageExtensions; -use Attribute; - /** * Limits calling methods to those listed as the method's or class's friends. */ diff --git a/src/InjectableVersion.php b/src/InjectableVersion.php index 1afb4a1..03555f8 100644 --- a/src/InjectableVersion.php +++ b/src/InjectableVersion.php @@ -4,8 +4,6 @@ namespace DaveLiddament\PhpLanguageExtensions; -use Attribute; - #[\Attribute(\Attribute::TARGET_CLASS)] class InjectableVersion { diff --git a/src/Package.php b/src/Package.php index 4e813c5..d5985be 100644 --- a/src/Package.php +++ b/src/Package.php @@ -4,8 +4,6 @@ namespace DaveLiddament\PhpLanguageExtensions; -use Attribute; - /** * Limit calls to classes or methods with the Package attribute to calls from classes in the name namespace. */ diff --git a/src/Sealed.php b/src/Sealed.php index 34c8413..f29f795 100644 --- a/src/Sealed.php +++ b/src/Sealed.php @@ -4,8 +4,6 @@ namespace DaveLiddament\PhpLanguageExtensions; -use Attribute; - /** * Limits the classes that can extend/implement to those listed in $permitted. */ diff --git a/src/TestTag.php b/src/TestTag.php index 374a7b8..adb0d41 100644 --- a/src/TestTag.php +++ b/src/TestTag.php @@ -4,8 +4,6 @@ namespace DaveLiddament\PhpLanguageExtensions; -use Attribute; - /** * Add the TestTag attribute to a method that should only be called by test code. */ From 16f7f5398495c369770f952169b6c5a403f76a37 Mon Sep 17 00:00:00 2001 From: Dave Liddament Date: Fri, 23 Dec 2022 11:45:34 +0000 Subject: [PATCH 7/7] ADD badges to README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 80ad84b..61f51b9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,16 @@ # PHP Language Extensions (currently in BETA) +[![PHP versions: 8.0 to 8.2](https://img.shields.io/badge/php-8.0|8.1|8.2-blue.svg)](https://packagist.org/packages/dave-liddament/php-language-extensions) +[![Latest Stable Version](https://poser.pugx.org/dave-liddament/php-language-extensions/v/stable)](https://packagist.org/packages/dave-liddament/php-language-extensions) +[![License](https://poser.pugx.org/dave-liddament/php-language-extensions/license)](https://github.com/DaveLiddament/php-language-extensions/blob/main/LICENSE.md) +[![Total Downloads](https://poser.pugx.org/dave-liddament/php-language-extensions/downloads)](https://packagist.org/packages/dave-liddament/php-language-extensions/stats) + +[![Continuous Integration](https://github.com/DaveLiddament/php-language-extensions/workflows/Full%20checks/badge.svg)](https://github.com/DaveLiddament/php-language-extensions/actions/workflows/full-checks.yml) +[![Psalm level 1](https://img.shields.io/badge/Psalm-max%20level-brightgreen.svg)](https://github.com/DaveLiddament/php-language-extensions/blob/main/psalm.xml) +[![PHPStan level 8](https://img.shields.io/badge/PHPStan-max%20level-brightgreen.svg)](https://github.com/DaveLiddament/php-language-extensions/blob/main/phpstan.neon) + + + This library provides attributes for extending the PHP language (e.g. adding `package` visibility). The intention, at least initially, is that these extra language features are enforced by static analysis tools (such as Psalm, PHPStan and, ideally, PhpStorm) and NOT at runtime.