diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1e51d3..12fa9fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,6 @@ jobs: fail-fast: false matrix: php_version: - - "7.4" - "8.0" - "8.1.0RC6" include: diff --git a/.github/workflows/updated.yml b/.github/workflows/updated.yml index 2bdae8c..5fa3409 100644 --- a/.github/workflows/updated.yml +++ b/.github/workflows/updated.yml @@ -29,7 +29,6 @@ jobs: fail-fast: false matrix: php_version: - - "7.4" - "8.0" - "8.1.0RC6" include: diff --git a/composer.json b/composer.json index 9605aad..78d615e 100644 --- a/composer.json +++ b/composer.json @@ -23,16 +23,16 @@ } }, "require": { - "php": ">=7.4" + "php": ">=8.0" }, "suggest": { "symfony/cache": "Cache results to improve performance (or any PSR-6 implementation)" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "1.3.*", - "phpmd/phpmd": "2.10.*", + "phpmd/phpmd": "2.11.*", "phpunit/phpunit": "9.5.*", - "psr/cache": "1.0.*", + "psr/cache": "3.0.*", "sebastian/phpcpd": "6.0.*", "slevomat/coding-standard": "7.0.*", "squizlabs/php_codesniffer": "3.6.*" @@ -57,8 +57,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.5.x-dev", - "dev-release": "1.4.x-dev" + "dev-main": "1.5.x-dev" } } } diff --git a/composer.lock b/composer.lock index 1d8e21f..27494bf 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": "4ec23ae75a6dfc7dd8b73969020c1e95", + "content-hash": "c49d4f52f1bee5eed7d256bbb1282b98", "packages": [], "packages-dev": [ { @@ -326,16 +326,16 @@ }, { "name": "pdepend/pdepend", - "version": "2.10.1", + "version": "2.10.2", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "30452fdabb3dfca89f4bf977abc44adc5391e062" + "reference": "c8c1d2af43fb8c2b5387d50e9c42a9c56de13686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/30452fdabb3dfca89f4bf977abc44adc5391e062", - "reference": "30452fdabb3dfca89f4bf977abc44adc5391e062", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/c8c1d2af43fb8c2b5387d50e9c42a9c56de13686", + "reference": "c8c1d2af43fb8c2b5387d50e9c42a9c56de13686", "shasum": "" }, "require": { @@ -371,7 +371,7 @@ "description": "Official version of pdepend to be handled with Composer", "support": { "issues": "https://github.com/pdepend/pdepend/issues", - "source": "https://github.com/pdepend/pdepend/tree/2.10.1" + "source": "https://github.com/pdepend/pdepend/tree/2.10.2" }, "funding": [ { @@ -379,7 +379,7 @@ "type": "tidelift" } ], - "time": "2021-10-11T12:15:18+00:00" + "time": "2021-11-16T20:05:32+00:00" }, { "name": "phar-io/manifest", @@ -711,22 +711,22 @@ }, { "name": "phpmd/phpmd", - "version": "2.10.2", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "1bc74db7cf834662d83abebae265be11bb2eec3a" + "reference": "3637949092e6471aeaeca66bc6c016f45e459e24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/1bc74db7cf834662d83abebae265be11bb2eec3a", - "reference": "1bc74db7cf834662d83abebae265be11bb2eec3a", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/3637949092e6471aeaeca66bc6c016f45e459e24", + "reference": "3637949092e6471aeaeca66bc6c016f45e459e24", "shasum": "" }, "require": { "composer/xdebug-handler": "^1.0 || ^2.0", "ext-xml": "*", - "pdepend/pdepend": "^2.10.0", + "pdepend/pdepend": "^2.10.2", "php": ">=5.3.9" }, "require-dev": { @@ -782,7 +782,7 @@ "support": { "irc": "irc://irc.freenode.org/phpmd", "issues": "https://github.com/phpmd/phpmd/issues", - "source": "https://github.com/phpmd/phpmd/tree/2.10.2" + "source": "https://github.com/phpmd/phpmd/tree/2.11.0" }, "funding": [ { @@ -790,7 +790,7 @@ "type": "tidelift" } ], - "time": "2021-07-22T09:56:23+00:00" + "time": "2021-11-29T14:05:52+00:00" }, { "name": "phpspec/prophecy", @@ -910,16 +910,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.8", + "version": "9.2.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e" + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", "shasum": "" }, "require": { @@ -975,7 +975,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9" }, "funding": [ { @@ -983,7 +983,7 @@ "type": "github" } ], - "time": "2021-10-30T08:01:38+00:00" + "time": "2021-11-19T15:21:02+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1331,20 +1331,20 @@ }, { "name": "psr/cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { @@ -1364,7 +1364,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for caching libraries", @@ -1374,9 +1374,9 @@ "psr-6" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { "name": "psr/container", @@ -1428,30 +1428,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/", @@ -1472,9 +1472,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", @@ -1905,16 +1905,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { @@ -1963,14 +1963,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -1978,7 +1978,7 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", @@ -2620,22 +2620,22 @@ }, { "name": "symfony/config", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4" + "reference": "e39cf688c80fd79ab0a6a2d05a9facac9b2d534b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ac23c2f24d5634966d665d836c3933d54347e5d4", - "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4", + "url": "https://api.github.com/repos/symfony/config/zipball/e39cf688c80fd79ab0a6a2d05a9facac9b2d534b", + "reference": "e39cf688c80fd79ab0a6a2d05a9facac9b2d534b", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/filesystem": "^4.4|^5.0", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^4.4|^5.0|^6.0", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-php80": "^1.16", "symfony/polyfill-php81": "^1.22" @@ -2644,11 +2644,11 @@ "symfony/finder": "<4.4" }, "require-dev": { - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/messenger": "^4.4|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/yaml": "^4.4|^5.0" + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/messenger": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -2679,7 +2679,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.3.10" + "source": "https://github.com/symfony/config/tree/v5.4.0" }, "funding": [ { @@ -2695,27 +2695,28 @@ "type": "tidelift" } ], - "time": "2021-10-22T09:06:52+00:00" + "time": "2021-11-28T15:25:38+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.3.10", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "be833dd336c248ef2bdabf24665351455f52afdb" + "reference": "69c398723857bb19fdea78496cedea0f756decab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/be833dd336c248ef2bdabf24665351455f52afdb", - "reference": "be833dd336c248ef2bdabf24665351455f52afdb", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/69c398723857bb19fdea78496cedea0f756decab", + "reference": "69c398723857bb19fdea78496cedea0f756decab", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/container": "^1.1.1", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22", "symfony/service-contracts": "^1.1.6|^2" }, "conflict": { @@ -2730,9 +2731,9 @@ "symfony/service-implementation": "1.0|2.0" }, "require-dev": { - "symfony/config": "^5.3", - "symfony/expression-language": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0" + "symfony/config": "^5.3|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/config": "", @@ -2767,7 +2768,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.3.10" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.0" }, "funding": [ { @@ -2783,29 +2784,29 @@ "type": "tidelift" } ], - "time": "2021-10-22T18:11:05+00:00" + "time": "2021-11-29T15:30:56+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.4.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -2834,7 +2835,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.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" }, "funding": [ { @@ -2850,25 +2851,26 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-11-01T23:48:49+00:00" }, { "name": "symfony/filesystem", - "version": "v5.3.4", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" + "reference": "731f917dc31edcffec2c6a777f3698c33bea8f01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/731f917dc31edcffec2c6a777f3698c33bea8f01", + "reference": "731f917dc31edcffec2c6a777f3698c33bea8f01", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -2897,7 +2899,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.3.4" + "source": "https://github.com/symfony/filesystem/tree/v5.4.0" }, "funding": [ { @@ -2913,7 +2915,7 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:40:44+00:00" + "time": "2021-10-28T13:39:27+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2994,6 +2996,86 @@ ], "time": "2021-02-19T12:13:01+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.23.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, + "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": "2021-05-27T12:26:48+00:00" + }, { "name": "symfony/polyfill-php80", "version": "v1.23.1", @@ -3158,22 +3240,25 @@ }, { "name": "symfony/service-contracts", - "version": "v2.4.0", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "reference": "d664541b99d6fb0247ec5ff32e87238582236204" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d664541b99d6fb0247ec5ff32e87238582236204", + "reference": "d664541b99d6fb0247ec5ff32e87238582236204", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/container": "^1.1" }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, "suggest": { "symfony/service-implementation": "" }, @@ -3217,7 +3302,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.4.1" }, "funding": [ { @@ -3233,7 +3318,7 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2021-11-04T16:37:19+00:00" }, { "name": "theseer/tokenizer", @@ -3350,7 +3435,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4" + "php": ">=8.0" }, "platform-dev": [], "plugin-api-version": "2.1.0" diff --git a/docker-compose.yml b/docker-compose.yml index c607597..553deb9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: build: context: "." args: - PHP_VERSION: "${PHP_VERSION:-7.4}" + PHP_VERSION: "${PHP_VERSION:-8.0}" volumes: - ".:/app" user: "${UID:-1000}:${GID:-1000}" diff --git a/src/Filter/IntToRoman.php b/src/Filter/IntToRoman.php index 463dc40..dedade5 100644 --- a/src/Filter/IntToRoman.php +++ b/src/Filter/IntToRoman.php @@ -35,7 +35,7 @@ public function __construct(?Grammar $grammar = null) private function cache(int $value, string $result): void { if ($this->hasCache()) { - $item = $this->getCache()->getItem($value)->set($result); + $item = $this->getCache()->getItem((string) $value)->set($result); $this->getCache()->save($item); } } @@ -52,8 +52,8 @@ public function filter(int $value): string throw new Exception(sprintf('Invalid integer: %d', $value), Exception::INVALID_INTEGER); } - if ($this->hasCache() && $this->getCache()->hasItem($value)) { - return $this->getCache()->getItem($value)->get(); + if ($this->hasCache() && $this->getCache()->hasItem((string) $value)) { + return $this->getCache()->getItem((string) $value)->get(); } $tokens = $this->getGrammar()->getTokens();