From 9b68801c3c50648570d1a1aeafd4d7e163c3b63f Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Fri, 4 Oct 2024 14:07:25 +0530 Subject: [PATCH] PHP8.4 Support Added Signed-off-by: Raj Mohan PHP8.4 Support Added PHPCS Signed-off-by: Raj Mohan Ignore PHP 8.4 Platform Requirements Signed-off-by: Raj Mohan Doc Lint Issue Fixes Signed-off-by: Raj Mohan Update Coding Standard and PHPUnit Signed-off-by: Raj Mohan Fix PHPUnit Issues Signed-off-by: Raj Mohan Upgrade Dev Dependencies Signed-off-by: Raj Mohan PHPUnit Fixes Signed-off-by: Raj Mohan PHPUnit Fix Signed-off-by: Raj Mohan PHPUnit Fix: Remove Attributes Signed-off-by: Raj Mohan Update PHPCS XML file Signed-off-by: Raj Mohan PHP CS error Fixes Signed-off-by: Raj Mohan PHPUnit Fixes: Type Issues Signed-off-by: Raj Mohan --- .laminas-ci.json | 5 + README.md | 16 +- composer.json | 12 +- composer.lock | 1221 +++++++++-------- phpcs.xml | 8 +- phpunit.xml.dist | 26 +- src/ClassFileLocator.php | 54 +- src/Exception/BadMethodCallException.php | 2 + src/Exception/ExceptionInterface.php | 2 + src/Exception/InvalidArgumentException.php | 2 + src/Exception/RuntimeException.php | 2 + src/PhpClassFile.php | 12 +- src/Transfer/Adapter/AbstractAdapter.php | 189 ++- src/Transfer/Adapter/FilterPluginManager.php | 31 +- src/Transfer/Adapter/Http.php | 98 +- .../Adapter/ValidatorPluginManager.php | 6 +- .../Exception/BadMethodCallException.php | 2 + src/Transfer/Exception/ExceptionInterface.php | 2 + .../Exception/InvalidArgumentException.php | 2 + .../Exception/PhpEnvironmentException.php | 2 + src/Transfer/Exception/RuntimeException.php | 2 + src/Transfer/Transfer.php | 14 +- test/ClassFileLocatorTest.php | 42 +- .../AbstractAdapterTestMockAdapter.php | 116 +- test/Transfer/Adapter/AbstractTest.php | 66 +- test/Transfer/Adapter/HttpTest.php | 73 +- test/Transfer/Adapter/HttpTestMockAdapter.php | 54 +- test/_files/locator-should-skip-this.php | 3 + 28 files changed, 1219 insertions(+), 845 deletions(-) create mode 100644 .laminas-ci.json diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 00000000..cc00d67d --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,5 @@ +{ + "ignore_php_platform_requirements": { + "8.4": true + } +} diff --git a/README.md b/README.md index b26e358d..d1dbb10f 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,25 @@ # laminas-file > ## πŸ‡·πŸ‡Ί Русским Π³Ρ€Π°ΠΆΠ΄Π°Π½Π°ΠΌ -> +> > ΠœΡ‹, участники Laminas, Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² Ρ€Π°Π·Π½Ρ‹Ρ… странах. Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ… ΠΈΠ· нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, родствСнники ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π² России, Ρ‚Π°ΠΊ ΠΈ Π² Π£ΠΊΡ€Π°ΠΈΠ½Π΅. НСкоторыС ΠΈΠ· нас Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ Π² России. НСкоторыС ΠΈΠ· нас ΠΆΠΈΠ²ΡƒΡ‚ Π² России. Π£ Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π±Π°Π±ΡƒΡˆΠΊΠΈ ΠΈ Π΄Π΅Π΄ΡƒΡˆΠΊΠΈ ΡΡ€Π°ΠΆΠ°Π»ΠΈΡΡŒ с Ρ„Π°ΡˆΠΈΡΡ‚Π°ΠΌΠΈ Π²ΠΎ Π’Ρ‚ΠΎΡ€ΠΎΠΉ ΠΌΠΈΡ€ΠΎΠ²ΠΎΠΉ Π²ΠΎΠΉΠ½Π΅. Π—Π΄Π΅ΡΡŒ Π½ΠΈΠΊΡ‚ΠΎ Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ Ρ„Π°ΡˆΠΈΠ·ΠΌ. -> +> > Π£ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· нас Π΅ΡΡ‚ΡŒ украинская родствСнница, которая спаслась ΠΈΠ· Π΄ΠΎΠΌΠ° вмСстС с сыном. ПоСзд задСрТался ΠΈΠ·-Π·Π° Π±ΠΎΠΌΠ±Π΅ΠΆΠΊΠΈ Π½Π° Π΄ΠΎΡ€ΠΎΠ³Π΅ Π²ΠΏΠ΅Ρ€Π΅Π΄ΠΈ. Π£ нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ прячутся Π² Π±ΠΎΠΌΠ±ΠΎΡƒΠ±Π΅ΠΆΠΈΡ‰Π°Ρ…. ΠœΡ‹ с Ρ‚Ρ€Π΅Π²ΠΎΠ³ΠΎΠΉ ΠΆΠ΄Π΅ΠΌ вСсточки ΠΎΡ‚ Π½ΠΈΡ… послС Π²ΠΎΠ·Π΄ΡƒΡˆΠ½Ρ‹Ρ… Π½Π°Π»Π΅Ρ‚ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ бСспорядочно наносят ΡƒΠ΄Π°Ρ€Ρ‹ ΠΈ ΠΏΠΎΠΏΠ°Π΄Π°ΡŽΡ‚ ΠΏΠΎ Π±ΠΎΠ»ΡŒΠ½ΠΈΡ†Π°ΠΌ, школам, дСтским садам ΠΈ Π΄ΠΎΠΌΠ°ΠΌ. ΠœΡ‹ Π½Π΅ Π±Π΅Ρ€Π΅ΠΌ это ΠΈΠ· ΠΊΠ°ΠΊΠΈΡ…-Π»ΠΈΠ±ΠΎ БМИ. ΠœΡ‹ наблюдаСм это Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ. -> +> > Π’Ρ‹ довСряСтС Π½Π°ΠΌ достаточно, Ρ‡Ρ‚ΠΎΠ± ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ наши ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, ΠΈ ΠΌΡ‹ просим вас Π΄ΠΎΠ²Π΅Ρ€ΠΈΡ‚ΡŒΡΡ Π½Π°ΠΌ вновь. ΠœΡ‹ нуТдаСмся Π² ΠΏΠΎΠΌΠΎΡ‰ΠΈ. Π’Ρ‹Ρ…ΠΎΠ΄ΠΈΡ‚Π΅ ΠΈ протСстуйтС ΠΏΡ€ΠΎΡ‚ΠΈΠ² этой бСсполСзной Π²ΠΎΠΉΠ½Ρ‹. ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚Π΅ ΠΊΡ€ΠΎΠ²ΠΎΠΏΡ€ΠΎΠ»ΠΈΡ‚ΠΈΠ΅. Π‘ΠΊΠ°ΠΆΠΈΡ‚Π΅ "НСт Π²ΠΎΠΉΠ½Π΅!" -> +> > ## πŸ‡ΊπŸ‡Έ To Citizens of Russia -> +> > We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. -> +> > One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. -> +> > You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!" - > This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only). > If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/). > If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D) - [![Build Status](https://github.com/laminas/laminas-file/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-file/actions?query=workflow%3A"Continuous+Integration") laminas-file provides a `ClassFileLocator` for locating PHP files containing diff --git a/composer.json b/composer.json index 023af646..db6e2fd5 100644 --- a/composer.json +++ b/composer.json @@ -25,18 +25,18 @@ } }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "laminas/laminas-stdlib": "^2.7.7 || ^3.15.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-filter": "^2.23.2", - "laminas/laminas-i18n": "^2.7.4", + "laminas/laminas-coding-standard": "^3.0", + "laminas/laminas-filter": "^2.39", + "laminas/laminas-i18n": "^2.29", "laminas/laminas-progressbar": "^2.5.2", "laminas/laminas-servicemanager": "^2.7.8 || ^3.3", - "laminas/laminas-session": "^2.8", + "laminas/laminas-session": "^2.22", "laminas/laminas-validator": "^2.10.1", - "phpunit/phpunit": "^9.5.10" + "phpunit/phpunit": "^10.5" }, "suggest": { "laminas/laminas-filter": "Laminas\\Filter component", diff --git a/composer.lock b/composer.lock index c9ddfb1e..ef0ea3bd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,34 +4,34 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "42f223b0211f613351cfb5d5f6426a2f", + "content-hash": "9001a01ed88250d87ad45fe0c1f6c201", "packages": [ { "name": "laminas/laminas-stdlib", - "version": "3.18.0", + "version": "3.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf" + "reference": "8974a1213be42c3e2f70b2c27b17f910291ab2f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/8974a1213be42c3e2f70b2c27b17f910291ab2f4", + "reference": "8974a1213be42c3e2f70b2c27b17f910291ab2f4", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "^2.5", - "phpbench/phpbench": "^1.2.14", - "phpunit/phpunit": "^10.3.3", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.15.0" + "laminas/laminas-coding-standard": "^3.0", + "phpbench/phpbench": "^1.3.1", + "phpunit/phpunit": "^10.5.38", + "psalm/plugin-phpunit": "^0.19.0", + "vimeo/psalm": "^5.26.1" }, "type": "library", "autoload": { @@ -63,41 +63,44 @@ "type": "community_bridge" } ], - "time": "2023-09-19T10:15:21+00:00" + "time": "2024-10-29T13:46:07+00:00" } ], "packages-dev": [ { - "name": "doctrine/instantiator", - "version": "2.0.0", + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { - "php": "^8.1" + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, - "type": "library", "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -106,64 +109,74 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", "keywords": [ - "constructor", - "instantiate" + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "laminas/laminas-coding-standard", - "version": "1.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539" + "reference": "ac809f5b27f0b22d0c1ec0cbc78cb67f92bfebcb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/08880ce2fbfe62d471cd3cb766a91da630b32539", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539", + "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/ac809f5b27f0b22d0c1ec0cbc78cb67f92bfebcb", + "reference": "ac809f5b27f0b22d0c1ec0cbc78cb67f92bfebcb", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "squizlabs/php_codesniffer": "^2.7" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", + "php": "^7.4 || ^8.0", + "slevomat/coding-standard": "^8.15.0", + "squizlabs/php_codesniffer": "^3.10", + "webimpress/coding-standard": "^1.3" }, - "replace": { - "zendframework/zend-coding-standard": "self.version" + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "LaminasCodingStandard\\": "src/LaminasCodingStandard/" + } }, - "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Laminas coding standard", + "description": "Laminas Coding Standard", "homepage": "https://laminas.dev", "keywords": [ "Coding Standard", @@ -177,20 +190,26 @@ "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", "source": "https://github.com/laminas/laminas-coding-standard" }, - "time": "2019-12-31T16:28:26+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2024-10-16T09:23:09+00:00" }, { "name": "laminas/laminas-eventmanager", - "version": "3.12.0", + "version": "3.13.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "4a576922c00cc7838d60d004a7bd6f5a02c23b57" + "reference": "933d1b5cf03fa4cf3016cebfd0555fa2ba3f2024" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/4a576922c00cc7838d60d004a7bd6f5a02c23b57", - "reference": "4a576922c00cc7838d60d004a7bd6f5a02c23b57", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/933d1b5cf03fa4cf3016cebfd0555fa2ba3f2024", + "reference": "933d1b5cf03fa4cf3016cebfd0555fa2ba3f2024", "shasum": "" }, "require": { @@ -202,12 +221,12 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-stdlib": "^3.17", - "phpbench/phpbench": "^1.2.10", - "phpunit/phpunit": "^10.4.1", + "laminas/laminas-stdlib": "^3.18", + "phpbench/phpbench": "^1.2.15", + "phpunit/phpunit": "^10.5.5", "psalm/plugin-phpunit": "^0.18.4", "psr/container": "^1.1.2 || ^2.0.2", - "vimeo/psalm": "^5.11" + "vimeo/psalm": "^5.18" }, "suggest": { "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", @@ -245,42 +264,42 @@ "type": "community_bridge" } ], - "time": "2023-10-18T16:36:45+00:00" + "time": "2024-06-24T14:01:06+00:00" }, { "name": "laminas/laminas-filter", - "version": "2.33.0", + "version": "2.39.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-filter.git", - "reference": "6ad64828d25ec4bdf226ec5096aabb04aa710324" + "reference": "515f081cdbea90721bfbffdd15184564b256478e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/6ad64828d25ec4bdf226ec5096aabb04aa710324", - "reference": "6ad64828d25ec4bdf226ec5096aabb04aa710324", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/515f081cdbea90721bfbffdd15184564b256478e", + "reference": "515f081cdbea90721bfbffdd15184564b256478e", "shasum": "" }, "require": { "ext-mbstring": "*", "laminas/laminas-servicemanager": "^3.21.0", - "laminas/laminas-stdlib": "^3.13.0", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "laminas/laminas-stdlib": "^3.19.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "laminas/laminas-validator": "<2.10.1", "zendframework/zend-filter": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-crypt": "^3.10", - "laminas/laminas-i18n": "^2.23.1", - "laminas/laminas-uri": "^2.11", - "pear/archive_tar": "^1.4.14", - "phpunit/phpunit": "^10.4.2", - "psalm/plugin-phpunit": "^0.18.4", - "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.15.0" + "laminas/laminas-coding-standard": "~3.0", + "laminas/laminas-crypt": "^3.12", + "laminas/laminas-i18n": "^2.28.1", + "laminas/laminas-uri": "^2.12", + "pear/archive_tar": "^1.5.0", + "phpunit/phpunit": "^10.5.36", + "psalm/plugin-phpunit": "^0.19.0", + "psr/http-factory": "^1.1.0", + "vimeo/psalm": "^5.26.1" }, "suggest": { "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters", @@ -324,45 +343,46 @@ "type": "community_bridge" } ], - "time": "2023-11-03T13:29:10+00:00" + "time": "2024-10-31T21:18:49+00:00" }, { "name": "laminas/laminas-i18n", - "version": "2.24.1", + "version": "2.29.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-i18n.git", - "reference": "dafb5eddfb43575befd29aeb195c55f92834fd32" + "reference": "9aa7ef6073556e9b4cfd8d9a0cb8e41cd3883454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/dafb5eddfb43575befd29aeb195c55f92834fd32", - "reference": "dafb5eddfb43575befd29aeb195c55f92834fd32", + "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/9aa7ef6073556e9b4cfd8d9a0cb8e41cd3883454", + "reference": "9aa7ef6073556e9b4cfd8d9a0cb8e41cd3883454", "shasum": "" }, "require": { "ext-intl": "*", "laminas/laminas-servicemanager": "^3.21.0", "laminas/laminas-stdlib": "^3.0", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "laminas/laminas-translator": "^1.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "laminas/laminas-view": "<2.20.0", "zendframework/zend-i18n": "*" }, "require-dev": { - "laminas/laminas-cache": "^3.11.0", + "laminas/laminas-cache": "^3.12.1", "laminas/laminas-cache-storage-adapter-memory": "^2.3.0", - "laminas/laminas-cache-storage-deprecated-factory": "^1.1", + "laminas/laminas-cache-storage-deprecated-factory": "^1.2", "laminas/laminas-coding-standard": "~2.5.0", "laminas/laminas-config": "^3.9.0", - "laminas/laminas-eventmanager": "^3.12", - "laminas/laminas-filter": "^2.33", - "laminas/laminas-validator": "^2.41", - "laminas/laminas-view": "^2.32", - "phpunit/phpunit": "^10.4.2", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.15.0" + "laminas/laminas-eventmanager": "^3.13", + "laminas/laminas-filter": "^2.34", + "laminas/laminas-validator": "^2.49", + "laminas/laminas-view": "^2.34", + "phpunit/phpunit": "^10.5.11", + "psalm/plugin-phpunit": "^0.19.0", + "vimeo/psalm": "^5.22.2" }, "suggest": { "laminas/laminas-cache": "You should install this package to cache the translations", @@ -409,7 +429,7 @@ "type": "community_bridge" } ], - "time": "2023-11-08T08:56:45+00:00" + "time": "2024-10-11T09:44:53+00:00" }, { "name": "laminas/laminas-progressbar", @@ -474,21 +494,21 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "3.22.1", + "version": "3.23.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "de98d297d4743956a0558a6d71616979ff779328" + "reference": "a8640182b892b99767d54404d19c5c3b3699f79b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/de98d297d4743956a0558a6d71616979ff779328", - "reference": "de98d297d4743956a0558a6d71616979ff779328", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/a8640182b892b99767d54404d19c5c3b3699f79b", + "reference": "a8640182b892b99767d54404d19c5c3b3699f79b", "shasum": "" }, "require": { - "laminas/laminas-stdlib": "^3.17", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "laminas/laminas-stdlib": "^3.19", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "psr/container": "^1.0" }, "conflict": { @@ -505,15 +525,15 @@ }, "require-dev": { "composer/package-versions-deprecated": "^1.11.99.5", - "friendsofphp/proxy-manager-lts": "^1.0.14", - "laminas/laminas-code": "^4.10.0", + "friendsofphp/proxy-manager-lts": "^1.0.18", + "laminas/laminas-code": "^4.14.0", "laminas/laminas-coding-standard": "~2.5.0", "laminas/laminas-container-config-test": "^0.8", - "mikey179/vfsstream": "^1.6.11", - "phpbench/phpbench": "^1.2.9", - "phpunit/phpunit": "^10.4", + "mikey179/vfsstream": "^1.6.12", + "phpbench/phpbench": "^1.3.1", + "phpunit/phpunit": "^10.5.36", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.8.0" + "vimeo/psalm": "^5.26.1" }, "suggest": { "friendsofphp/proxy-manager-lts": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -560,42 +580,44 @@ "type": "community_bridge" } ], - "time": "2023-10-24T11:19:47+00:00" + "time": "2024-10-28T21:32:16+00:00" }, { "name": "laminas/laminas-session", - "version": "2.17.0", + "version": "2.22.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-session.git", - "reference": "2f255f1b4349a9f330ba1a26dcf4e2773a6a8226" + "reference": "97639e1b2392730b24aa7563e8e09fd22f6f6b1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-session/zipball/2f255f1b4349a9f330ba1a26dcf4e2773a6a8226", - "reference": "2f255f1b4349a9f330ba1a26dcf4e2773a6a8226", + "url": "https://api.github.com/repos/laminas/laminas-session/zipball/97639e1b2392730b24aa7563e8e09fd22f6f6b1f", + "reference": "97639e1b2392730b24aa7563e8e09fd22f6f6b1f", "shasum": "" }, "require": { "laminas/laminas-eventmanager": "^3.12", "laminas/laminas-servicemanager": "^3.22", "laminas/laminas-stdlib": "^3.18", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { + "amphp/amp": "<2.6.4", "zendframework/zend-session": "*" }, "require-dev": { - "laminas/laminas-cache": "^3.10.1", + "ext-xdebug": "*", + "laminas/laminas-cache": "^3.12.2", "laminas/laminas-cache-storage-adapter-memory": "^2.3", - "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-db": "^2.18.0", - "laminas/laminas-http": "^2.18", - "laminas/laminas-validator": "^2.30.1", - "mongodb/mongodb": "~1.16.0", - "phpunit/phpunit": "^9.6.13", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.15" + "laminas/laminas-coding-standard": "~3.0.1", + "laminas/laminas-db": "^2.20.0", + "laminas/laminas-http": "^2.20", + "laminas/laminas-validator": "^2.64.1", + "mongodb/mongodb": "~1.20.0", + "phpunit/phpunit": "^10.5.38", + "psalm/plugin-phpunit": "^0.19.0", + "vimeo/psalm": "^5.26.1" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component", @@ -641,7 +663,60 @@ "type": "community_bridge" } ], - "time": "2023-11-10T12:20:40+00:00" + "time": "2024-11-17T00:02:53+00:00" + }, + { + "name": "laminas/laminas-translator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-translator.git", + "reference": "12897e710e21413c1f93fc38fe9dead6b51c5218" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-translator/zipball/12897e710e21413c1f93fc38fe9dead6b51c5218", + "reference": "12897e710e21413c1f93fc38fe9dead6b51c5218", + "shasum": "" + }, + "require": { + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~3.0.0", + "vimeo/psalm": "^5.24.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Translator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Interfaces for the Translator component of laminas-i18n", + "homepage": "https://laminas.dev", + "keywords": [ + "i18n", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-i18n/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-translator/issues", + "rss": "https://github.com/laminas/laminas-translator/releases.atom", + "source": "https://github.com/laminas/laminas-translator" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2024-10-21T15:33:01+00:00" }, { "name": "laminas/laminas-validator", @@ -727,80 +802,18 @@ ], "time": "2023-11-06T09:13:00+00:00" }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "5ef52e26392777a26dbb8f20fe24f91b406459f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/5ef52e26392777a26dbb8f20fe24f91b406459f6", - "reference": "5ef52e26392777a26dbb8f20fe24f91b406459f6", - "shasum": "" - }, - "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "squizlabs/php_codesniffer": "^3.7.1", - "vimeo/psalm": "^4.29.0" - }, - "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": "2022-12-12T11:44:10+00:00" - }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -808,11 +821,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -838,7 +852,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -846,29 +860,31 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -876,7 +892,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -900,26 +916,27 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-10-08T18:51:32+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -960,9 +977,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -1015,37 +1038,84 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.33.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "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" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "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.33.0" + }, + "time": "2024-10-13T11:25:22+00:00" + }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "10.1.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "7e308268858ed6baedc8704a304727d20bc07c77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", + "reference": "7e308268858ed6baedc8704a304727d20bc07c77", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-text-template": "^3.0.1", + "sebastian/code-unit-reverse-lookup": "^3.0.0", + "sebastian/complexity": "^3.2.0", + "sebastian/environment": "^6.1.0", + "sebastian/lines-of-code": "^2.0.2", + "sebastian/version": "^4.0.1", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1054,7 +1124,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1.x-dev" } }, "autoload": { @@ -1083,7 +1153,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" }, "funding": [ { @@ -1091,32 +1161,32 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2024-08-22T04:31:57+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1143,7 +1213,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -1151,28 +1222,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -1180,7 +1251,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1206,7 +1277,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -1214,32 +1285,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1265,7 +1336,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -1273,32 +1345,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1324,7 +1396,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -1332,54 +1404,52 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "10.5.38", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a86773b9e887a67bc53efa9da9ad6e3f2498c132", + "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.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.2", - "sebastian/version": "^3.0.2" + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.16", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.3", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.2", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.0", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -1387,7 +1457,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -1419,7 +1489,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.38" }, "funding": [ { @@ -1435,7 +1505,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2024-10-28T13:06:21+00:00" }, { "name": "psr/container", @@ -1540,28 +1610,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1584,7 +1654,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -1592,32 +1663,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1640,7 +1711,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -1648,32 +1719,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1695,7 +1766,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -1703,34 +1774,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", + "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1769,7 +1842,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3" }, "funding": [ { @@ -1777,33 +1851,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2024-10-18T14:56:07+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -1826,7 +1900,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -1834,33 +1909,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1892,7 +1967,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -1900,27 +1976,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -1928,7 +2004,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -1947,7 +2023,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -1955,7 +2031,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -1963,34 +2040,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2032,7 +2109,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -2040,38 +2118,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2090,13 +2165,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -2104,33 +2180,33 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2153,7 +2229,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -2161,34 +2238,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2210,7 +2287,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -2218,32 +2295,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2265,7 +2342,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -2273,32 +2350,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2328,7 +2405,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -2336,32 +2413,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.3", + "name": "sebastian/type", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2376,14 +2453,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -2391,32 +2469,29 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { - "name": "sebastian/type", - "version": "3.2.1", + "name": "sebastian/version", + "version": "4.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2435,11 +2510,11 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -2447,121 +2522,106 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { - "name": "sebastian/version", - "version": "3.0.2", + "name": "slevomat/coding-standard", + "version": "8.15.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "7d1d957421618a3803b593ec31ace470177d7817" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/7d1d957421618a3803b593ec31ace470177d7817", + "reference": "7d1d957421618a3803b593ec31ace470177d7817", "shasum": "" }, "require": { - "php": ">=7.3" + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.23.1", + "squizlabs/php_codesniffer": "^3.9.0" }, - "type": "library", + "require-dev": { + "phing/phing": "2.17.4", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.10.60", + "phpstan/phpstan-deprecation-rules": "1.1.4", + "phpstan/phpstan-phpunit": "1.3.16", + "phpstan/phpstan-strict-rules": "1.5.2", + "phpunit/phpunit": "8.5.21|9.6.8|10.5.11" + }, + "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "8.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "keywords": [ + "dev", + "phpcs" ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/8.15.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/kukulich", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2024-03-09T15:20:58+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.2", + "version": "3.11.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -2569,34 +2629,58 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2018-11-07T22:31:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-11-16T12:02:36+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -2625,7 +2709,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -2633,7 +2717,62 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" + }, + { + "name": "webimpress/coding-standard", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webimpress/coding-standard.git", + "reference": "6f6a1a90bd9e18fc8bee0660dd1d1ce68cf9fc53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/6f6a1a90bd9e18fc8bee0660dd1d1ce68cf9fc53", + "reference": "6f6a1a90bd9e18fc8bee0660dd1d1ce68cf9fc53", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0", + "squizlabs/php_codesniffer": "^3.10.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.15" + }, + "type": "phpcodesniffer-standard", + "extra": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + }, + "autoload": { + "psr-4": { + "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "Webimpress Coding Standard", + "keywords": [ + "Coding Standard", + "PSR-2", + "phpcs", + "psr-12", + "webimpress" + ], + "support": { + "issues": "https://github.com/webimpress/coding-standard/issues", + "source": "https://github.com/webimpress/coding-standard/tree/1.4.0" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } + ], + "time": "2024-10-16T06:55:17+00:00" } ], "aliases": [], @@ -2642,11 +2781,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "platform-dev": [], "platform-overrides": { "php": "8.1.99" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.2.0" } diff --git a/phpcs.xml b/phpcs.xml index 8af4882e..7a37b3cb 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,7 +1,9 @@ ο»Ώ - - - + + src test diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d6b8283b..882a05fd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,17 @@ - - - - ./src - - - - - ./test - - + + + + ./src + + + + + ./test + + diff --git a/src/ClassFileLocator.php b/src/ClassFileLocator.php index b7061f3e..e007957a 100644 --- a/src/ClassFileLocator.php +++ b/src/ClassFileLocator.php @@ -1,5 +1,7 @@ getInnerIterator()->current(); @@ -67,15 +92,15 @@ public function accept() } // If not a PHP file, skip - if ($file->getBasename('.php') == $file->getBasename()) { + if ($file->getBasename('.php') === $file->getBasename()) { return false; } - $contents = file_get_contents($file->getRealPath()); - $tokens = token_get_all($contents); - $count = count($tokens); + $contents = file_get_contents($file->getRealPath()); + $tokens = token_get_all($contents); + $count = count($tokens); $inFunctionDeclaration = false; - $saveNamespace = false; + $saveNamespace = false; for ($i = 0; $i < $count; $i++) { $token = $tokens[$i]; @@ -108,8 +133,8 @@ public function accept() } continue; } - list($type, $content) = $token; - $types = [T_STRING, T_NS_SEPARATOR, T_NAME_FULLY_QUALIFIED, T_NAME_QUALIFIED]; + [$type, $content] = $token; + $types = [T_STRING, T_NS_SEPARATOR, T_NAME_FULLY_QUALIFIED, T_NAME_QUALIFIED]; if (in_array($type, $types, true)) { $namespace .= $content; } @@ -139,10 +164,11 @@ public function accept() } // ignore anonymous classes on PHP 7.1 and greater - if ($i >= 2 - && \is_array($tokens[$i - 1]) + if ( + $i >= 2 + && is_array($tokens[$i - 1]) && T_WHITESPACE === $tokens[$i - 1][0] - && \is_array($tokens[$i - 2]) + && is_array($tokens[$i - 2]) && T_NEW === $tokens[$i - 2][0] ) { break; @@ -165,8 +191,8 @@ public function accept() if (is_string($token)) { continue; } - list($type, $content, $line) = $token; - if (T_STRING == $type) { + [$type, $content, $line] = $token; + if (T_STRING === $type) { // If a classname was found, set it in the object, and // return boolean true (found) if (! isset($namespace) || null === $namespace) { @@ -176,7 +202,7 @@ public function accept() $namespace = null; } } - $class = (null === $namespace) ? $content : $namespace . '\\' . $content; + $class = null === $namespace ? $content : $namespace . '\\' . $content; $file->addClass($class); if ($namespace) { $file->addNamespace($namespace); diff --git a/src/Exception/BadMethodCallException.php b/src/Exception/BadMethodCallException.php index a314a991..33923347 100644 --- a/src/Exception/BadMethodCallException.php +++ b/src/Exception/BadMethodCallException.php @@ -1,5 +1,7 @@ false, 'useByteString' => true, 'magicFile' => null, @@ -219,7 +264,6 @@ abstract public function isFiltered($files = null); /** * Set the filter plugin manager instance * - * @param FilterPluginManager $filterManager * @return AbstractAdapter */ public function setFilterManager(FilterPluginManager $filterManager) @@ -244,7 +288,6 @@ public function getFilterManager() /** * Set the validator plugin manager instance * - * @param ValidatorPluginManager $validatorManager * @return AbstractAdapter */ public function setValidatorManager(ValidatorPluginManager $validatorManager) @@ -278,12 +321,12 @@ public function getValidatorManager() * @param string|array $options Options to set for the validator * @param string|array $files Files to limit this validator to * @return AbstractAdapter - * @throws Exception\InvalidArgumentException for invalid type + * @throws Exception\InvalidArgumentException For invalid type. */ public function addValidator($validator, $breakChainOnFailure = false, $options = null, $files = null) { if (is_string($validator)) { - $options = (null !== $options && is_scalar($options)) ? [$options] : $options; + $options = null !== $options && is_scalar($options) ? [$options] : $options; $validator = $this->getValidatorManager()->get($validator, $options); if (is_array($options) && isset($options['messages'])) { if (is_array($options['messages'])) { @@ -298,26 +341,26 @@ public function addValidator($validator, $breakChainOnFailure = false, $options if (! $validator instanceof Validator\ValidatorInterface) { throw new Exception\InvalidArgumentException( - 'Invalid validator provided to addValidator; ' . - 'must be string or Laminas\Validator\ValidatorInterface' + 'Invalid validator provided to addValidator; ' + . 'must be string or Laminas\Validator\ValidatorInterface' ); } - $name = get_class($validator); + $name = $validator::class; $this->validators[$name] = $validator; $this->break[$name] = $breakChainOnFailure; - $files = $this->getFiles($files, true, true); + $files = $this->getFiles($files, true, true); foreach ($files as $file) { - if ($name == 'NotEmpty') { - $temp = $this->files[$file]['validators']; + if ($name === 'NotEmpty') { + $temp = $this->files[$file]['validators']; $this->files[$file]['validators'] = [$name]; $this->files[$file]['validators'] += $temp; } else { $this->files[$file]['validators'][] = $name; } - $this->files[$file]['validated'] = false; + $this->files[$file]['validated'] = false; } return $this; @@ -326,10 +369,9 @@ public function addValidator($validator, $breakChainOnFailure = false, $options /** * Add Multiple validators at once * - * @param array $validators * @param string|array $files * @return AbstractAdapter - * @throws Exception\InvalidArgumentException for invalid type + * @throws Exception\InvalidArgumentException For invalid type. */ public function addValidators(array $validators, $files = null) { @@ -365,18 +407,18 @@ public function addValidators(array $validators, $files = null) } else { $file = $files; switch (true) { - case (0 == $argc): + case 0 === $argc: break; - case (1 <= $argc): - $validator = array_shift($validatorInfo); + case 1 <= $argc: + $validator = array_shift($validatorInfo); // fall-through - case (2 <= $argc): + case 2 <= $argc: $breakChainOnFailure = array_shift($validatorInfo); // fall-through - case (3 <= $argc): + case 3 <= $argc: $options = array_shift($validatorInfo); // fall-through - case (4 <= $argc): + case 4 <= $argc: if (! empty($validatorInfo)) { $file = array_shift($validatorInfo); } @@ -416,7 +458,7 @@ public function setValidators(array $validators, $files = null) */ public function hasValidator($name) { - return (false !== $this->getValidatorIdentifier($name)); + return false !== $this->getValidatorIdentifier($name); } /** @@ -581,12 +623,14 @@ public function isValid($files = null) return false; } - $translator = $this->getTranslator(); + $translator = $this->getTranslator(); $this->messages = []; - $break = false; + $break = false; foreach ($check as $content) { - if (array_key_exists('validators', $content) && - in_array(Validator\File\Count::class, $content['validators'])) { + if ( + array_key_exists('validators', $content) && + in_array(Validator\File\Count::class, $content['validators']) + ) { $validator = $this->validators[Validator\File\Count::class]; $count = $content; if (empty($content['tmp_name'])) { @@ -611,7 +655,7 @@ public function isValid($files = null) } foreach ($check as $key => $content) { - $fileerrors = []; + $fileerrors = []; if (array_key_exists('validators', $content) && $content['validated']) { continue; } @@ -623,7 +667,7 @@ public function isValid($files = null) $validator->setTranslator($translator); } - if (($class === 'Laminas\Validator\File\Upload') && (empty($content['tmp_name']))) { + if (($class === Upload::class) && (empty($content['tmp_name']))) { $tocheck = $key; } else { $tocheck = $content['tmp_name']; @@ -638,7 +682,7 @@ public function isValid($files = null) break; } - if (($class === 'Laminas\Validator\File\Upload') && (count($fileerrors) > 0)) { + if (($class === Upload::class) && (count($fileerrors) > 0)) { break; } @@ -695,7 +739,7 @@ public function getErrors() */ public function hasErrors() { - return (! empty($this->messages)); + return ! empty($this->messages); } /** @@ -705,20 +749,20 @@ public function hasErrors() * @param string|array $options Options to set for the filter * @param string|array $files Files to limit this filter to * @return AbstractAdapter - * @throws Exception\InvalidArgumentException for invalid type + * @throws Exception\InvalidArgumentException For invalid type. */ public function addFilter($filter, $options = null, $files = null) { if (is_string($filter)) { - $options = (null !== $options && is_scalar($options)) ? [$options] : $options; - $filter = $this->getFilterManager()->get($filter, $options); + $options = null !== $options && is_scalar($options) ? [$options] : $options; + $filter = $this->getFilterManager()->get($filter, $options); } if (! $filter instanceof Filter\FilterInterface) { throw new Exception\InvalidArgumentException('Invalid filter specified'); } - $class = get_class($filter); + $class = $filter::class; $this->filters[$class] = $filter; $files = $this->getFiles($files, true, true); foreach ($files as $file) { @@ -731,7 +775,6 @@ public function addFilter($filter, $options = null, $files = null) /** * Add Multiple filters at once * - * @param array $filters * @param string|array $files * @return AbstractAdapter */ @@ -793,7 +836,7 @@ public function setFilters(array $filters, $files = null) */ public function hasFilter($name) { - return (false !== $this->getFilterIdentifier($name)); + return false !== $this->getFilterIdentifier($name); } /** @@ -816,7 +859,7 @@ public function getFilter($name) * * @param string|array $files (Optional) Returns the filter for this files * @return array List of set filters - * @throws Exception\RuntimeException When file not found + * @throws Exception\RuntimeException When file not found. */ public function getFilters($files = null) { @@ -908,7 +951,7 @@ public function getFileName($file = null, $path = true) $result[$file] = $directory . $this->files[$file]['name']; } - if (count($result) == 1) { + if (count($result) === 1) { return current($result); } @@ -930,14 +973,15 @@ public function getFileInfo($file = null) * Sets a new destination for the given files * * @deprecated Will be changed to be a filter!!! + * * @param string $destination New destination directory * @param string|array $files Files to set the new destination for * @return AbstractAdapter - * @throws Exception\InvalidArgumentException when the given destination is not a directory or does not exist + * @throws Exception\InvalidArgumentException When the given destination is not a directory or does not exist. */ public function setDestination($destination, $files = null) { - $orig = $files; + $orig = $files; $destination = rtrim($destination, "/\\"); if (! is_dir($destination)) { throw new Exception\InvalidArgumentException('The given destination is not a directory or does not exist'); @@ -953,7 +997,7 @@ public function setDestination($destination, $files = null) } } else { $files = $this->getFiles($files, true, true); - if (empty($files) and is_string($orig)) { + if (empty($files) && is_string($orig)) { $this->files[$orig]['destination'] = $destination; } @@ -974,10 +1018,10 @@ public function setDestination($destination, $files = null) */ public function getDestination($files = null) { - $orig = $files; - $files = $this->getFiles($files, false, true); + $orig = $files; + $files = $this->getFiles($files, false, true); $destinations = []; - if (empty($files) and is_string($orig)) { + if (empty($files) && is_string($orig)) { if (isset($this->files[$orig]['destination'])) { $destinations[$orig] = $this->files[$orig]['destination']; } else { @@ -999,7 +1043,7 @@ public function getDestination($files = null) if (empty($destinations)) { $destinations = $this->getTmpDir(); - } elseif (count($destinations) == 1) { + } elseif (count($destinations) === 1) { $destinations = current($destinations); } @@ -1015,7 +1059,7 @@ public function getDestination($files = null) * Default is null, which skips setTranslatorTextDomain * @return AbstractAdapter */ - public function setTranslator(Translator $translator = null, $textDomain = null) + public function setTranslator(?Translator $translator = null, $textDomain = null) { $this->translator = $translator; if (null !== $textDomain) { @@ -1098,7 +1142,7 @@ public function getTranslatorTextDomain() * @param string $hash Hash algorithm to use * @param string|array $files Files to return the hash for * @return string|array Hashstring - * @throws Exception\InvalidArgumentException On unknown hash algorithm + * @throws Exception\InvalidArgumentException On unknown hash algorithm. */ public function getHash($hash = 'crc32', $files = null) { @@ -1118,7 +1162,7 @@ public function getHash($hash = 'crc32', $files = null) } } - if (count($result) == 1) { + if (count($result) === 1) { return current($result); } @@ -1130,7 +1174,7 @@ public function getHash($hash = 'crc32', $files = null) * * @param string|array $files Files to get the filesize from * @return string|array Filesize - * @throws Exception\InvalidArgumentException When the file does not exist + * @throws Exception\InvalidArgumentException When the file does not exist. */ public function getFileSize($files = null) { @@ -1150,7 +1194,7 @@ public function getFileSize($files = null) } } - if (count($result) == 1) { + if (count($result) === 1) { return current($result); } @@ -1189,7 +1233,7 @@ protected function detectFileSize($value) * * @param string|array $files Files to get the mimetype from * @return string|array MimeType - * @throws Exception\InvalidArgumentException When the file does not exist + * @throws Exception\InvalidArgumentException When the file does not exist. */ public function getMimeType($files = null) { @@ -1205,7 +1249,7 @@ public function getMimeType($files = null) } } - if (count($result) == 1) { + if (count($result) === 1) { return current($result); } @@ -1248,8 +1292,10 @@ protected function detectMimeType($value) unset($mime); } - if (empty($result) && (function_exists('mime_content_type') - && ini_get('mime_magic.magicfile'))) { + if ( + empty($result) && (function_exists('mime_content_type') + && ini_get('mime_magic.magicfile')) + ) { $result = mime_content_type($file); } @@ -1284,7 +1330,7 @@ protected static function toByteString($size) */ protected function filter($files = null) { - $check = $this->getFiles($files); + $check = $this->getFiles($files); foreach ($check as $name => $content) { if (array_key_exists('filters', $content)) { foreach ($content['filters'] as $class) { @@ -1312,7 +1358,7 @@ protected function filter($files = null) * Determine system TMP directory and detect if we have read access * * @return string - * @throws Exception\RuntimeException if unable to determine directory + * @throws Exception\RuntimeException If unable to determine directory. */ protected function getTmpDir() { @@ -1369,14 +1415,13 @@ protected function getTmpDir() */ protected function isPathWriteable($path) { - $tempFile = rtrim($path, "/\\"); - $tempFile .= '/' . 'test.1'; + $tempFile = rtrim($path, "/\\") . '/test.1'; ErrorHandler::start(); $result = file_put_contents($tempFile, 'TEST'); ErrorHandler::stop(); - if ($result == false) { + if ($result === false) { return false; } @@ -1384,7 +1429,7 @@ protected function isPathWriteable($path) $result = unlink($tempFile); ErrorHandler::stop(); - if ($result == false) { + if ($result === false) { return false; } @@ -1398,7 +1443,7 @@ protected function isPathWriteable($path) * @param bool $names (Optional) Returns only names on true, else complete info * @param bool $noexception (Optional) Allows throwing an exception, otherwise returns an empty array * @return array Found files - * @throws Exception\RuntimeException On false filename + * @throws Exception\RuntimeException On false filename. */ protected function getFiles($files, $names = false, $noexception = false) { diff --git a/src/Transfer/Adapter/FilterPluginManager.php b/src/Transfer/Adapter/FilterPluginManager.php index 2f338bfe..1158cec9 100644 --- a/src/Transfer/Adapter/FilterPluginManager.php +++ b/src/Transfer/Adapter/FilterPluginManager.php @@ -1,5 +1,7 @@ File\Decrypt::class, - 'Decrypt' => File\Decrypt::class, - 'encrypt' => File\Encrypt::class, - 'Encrypt' => File\Encrypt::class, - 'lowercase' => File\LowerCase::class, - 'lowerCase' => File\LowerCase::class, - 'LowerCase' => File\LowerCase::class, - 'rename' => File\Rename::class, - 'Rename' => File\Rename::class, - 'uppercase' => File\UpperCase::class, - 'upperCase' => File\UpperCase::class, - 'UpperCase' => File\UpperCase::class, + // @var string[] + protected array $defaultFileFilterAliases = [ + 'decrypt' => File\Decrypt::class, + 'Decrypt' => File\Decrypt::class, + 'encrypt' => File\Encrypt::class, + 'Encrypt' => File\Encrypt::class, + 'lowercase' => File\LowerCase::class, + 'lowerCase' => File\LowerCase::class, + 'LowerCase' => File\LowerCase::class, + 'rename' => File\Rename::class, + 'Rename' => File\Rename::class, + 'uppercase' => File\UpperCase::class, + 'upperCase' => File\UpperCase::class, + 'UpperCase' => File\UpperCase::class, ]; /** diff --git a/src/Transfer/Adapter/Http.php b/src/Transfer/Adapter/Http.php index 937f5087..d7df448b 100644 --- a/src/Transfer/Adapter/Http.php +++ b/src/Transfer/Adapter/Http.php @@ -1,13 +1,27 @@ [ - 'name' => $files, - 'error' => 1]]; + $temp = [ + $files => [ + 'name' => $files, + 'error' => 1, + ], + ]; $validator = $this->validators[Validator\File\Upload::class]; $validator->setTranslator($this->getTranslator()) ->setFiles($temp) @@ -149,15 +167,15 @@ public function receive($files = null) $rename = $this->getFilter('Rename'); if ($rename !== null) { $tmp = $rename->getNewName($content['tmp_name']); - if ($tmp != $content['tmp_name']) { + if ($tmp !== $content['tmp_name']) { $filename = $tmp; } - if (dirname($filename) == '.') { + if (dirname($filename) === '.') { $filename = $directory . $filename; } - $key = array_search(get_class($rename), $this->files[$file]['filters']); + $key = array_search($rename::class, $this->files[$file]['filters']); unset($this->files[$file]['filters'][$key]); } @@ -199,8 +217,8 @@ public function receive($files = null) * Checks if the file was already sent * * @param string|array $files Files to check - * @return bool - * @throws Exception\BadMethodCallException Not implemented + * @return void + * @throws Exception\BadMethodCallException Not implemented. */ public function isSent($files = null) { @@ -278,7 +296,7 @@ public function isUploaded($files = null) * * @param string|array $id The upload to get the progress for * @return array|null - * @throws Exception\PhpEnvironmentException whether APC nor UploadProgress extension installed + * @throws Exception\PhpEnvironmentException Whether APC nor UploadProgress extension installed. * @throws Exception\RuntimeException */ public static function getProgress($id = null) @@ -289,11 +307,11 @@ public static function getProgress($id = null) $session = 'Laminas\File\Transfer\Adapter\Http\ProgressBar'; $status = [ - 'total' => 0, - 'current' => 0, - 'rate' => 0, - 'message' => '', - 'done' => false + 'total' => 0, + 'current' => 0, + 'rate' => 0, + 'message' => '', + 'done' => false, ]; if (is_array($id)) { @@ -312,7 +330,7 @@ public static function getProgress($id = null) } } - if (! empty($id) && (($id instanceof Adapter\AbstractAdapter) || ($id instanceof ProgressBar\ProgressBar))) { + if (! empty($id) && ($id instanceof Adapter\AbstractAdapter || $id instanceof ProgressBar\ProgressBar)) { $adapter = $id; unset($id); } @@ -335,13 +353,11 @@ public static function getProgress($id = null) } elseif (self::isUploadProgressAvailable()) { $call = call_user_func(static::$callbackUploadProgress, $id); if (is_array($call)) { - $status = $call + $status; - $status['total'] = isset($status['bytes_total']) ? $status['bytes_total'] : $status['total']; - $status['current'] = isset($status['bytes_uploaded']) - ? $status['bytes_uploaded'] - : $status['current']; - $status['rate'] = isset($status['speed_average']) ? $status['speed_average'] : $status['rate']; - if ($status['total'] == $status['current']) { + $status = $call + $status; + $status['total'] = $status['bytes_total'] ?? $status['total']; + $status['current'] = $status['bytes_uploaded'] ?? $status['current']; + $status['rate'] = $status['speed_average'] ?? $status['rate']; + if ($status['total'] === $status['current']) { $status['done'] = true; } } @@ -366,7 +382,7 @@ public static function getProgress($id = null) $adapter = new ProgressBar\ProgressBar($adapter, 0, $status['total'], $session); } - if (! ($adapter instanceof ProgressBar\ProgressBar)) { + if (! $adapter instanceof ProgressBar\ProgressBar) { throw new Exception\RuntimeException('Unknown Adapter given'); } @@ -414,26 +430,26 @@ protected function prepareFiles() if (is_array($content['name'])) { foreach ($content as $param => $file) { foreach ($file as $number => $target) { - $this->files[$form . '_' . $number . '_'][$param] = $target; - $this->files[$form]['multifiles'][$number] = $form . '_' . $number . '_'; + $this->files[$form . '_' . $number . '_'][$param] = $target; + $this->files[$form]['multifiles'][$number] = $form . '_' . $number . '_'; } } $this->files[$form]['name'] = $form; foreach ($this->files[$form]['multifiles'] as $key => $value) { if ($this->files[$value]['tmp_name'] !== '') { - $this->files[$value]['name'] = basename($this->files[$value]['tmp_name']) - . '_' . $this->files[$value]['name']; + $this->files[$value]['name'] = basename($this->files[$value]['tmp_name']) + . '_' . $this->files[$value]['name']; } $this->files[$value]['options'] = $this->options; $this->files[$value]['validated'] = false; $this->files[$value]['received'] = false; $this->files[$value]['filtered'] = false; - $mimetype = $this->detectMimeType($this->files[$value]); + $mimetype = $this->detectMimeType($this->files[$value]); $this->files[$value]['type'] = $mimetype; - $filesize = $this->detectFileSize($this->files[$value]); + $filesize = $this->detectFileSize($this->files[$value]); $this->files[$value]['size'] = $filesize; if ($this->options['detectInfos']) { @@ -442,20 +458,20 @@ protected function prepareFiles() } } } else { - $this->files[$form] = $content; + $this->files[$form] = $content; if ($this->files[$form]['tmp_name'] !== '') { - $this->files[$form]['name'] = basename($this->files[$form]['tmp_name']) - . '_' . $this->files[$form]['name']; + $this->files[$form]['name'] = basename($this->files[$form]['tmp_name']) + . '_' . $this->files[$form]['name']; } $this->files[$form]['options'] = $this->options; $this->files[$form]['validated'] = false; $this->files[$form]['received'] = false; $this->files[$form]['filtered'] = false; - $mimetype = $this->detectMimeType($this->files[$form]); + $mimetype = $this->detectMimeType($this->files[$form]); $this->files[$form]['type'] = $mimetype; - $filesize = $this->detectFileSize($this->files[$form]); + $filesize = $this->detectFileSize($this->files[$form]); $this->files[$form]['size'] = $filesize; if ($this->options['detectInfos']) { diff --git a/src/Transfer/Adapter/ValidatorPluginManager.php b/src/Transfer/Adapter/ValidatorPluginManager.php index 54054b7e..777c8ff1 100644 --- a/src/Transfer/Adapter/ValidatorPluginManager.php +++ b/src/Transfer/Adapter/ValidatorPluginManager.php @@ -1,5 +1,7 @@ File\Count::class, 'Count' => File\Count::class, 'crc32' => File\Crc32::class, diff --git a/src/Transfer/Exception/BadMethodCallException.php b/src/Transfer/Exception/BadMethodCallException.php index caccf4d5..ac8cc18b 100644 --- a/src/Transfer/Exception/BadMethodCallException.php +++ b/src/Transfer/Exception/BadMethodCallException.php @@ -1,5 +1,7 @@ adapter[$direction] = new $adapter($options); if (! $this->adapter[$direction] instanceof Adapter\AbstractAdapter) { throw new Exception\InvalidArgumentException( @@ -82,7 +90,7 @@ public function getAdapter($direction = null) * * @param string $method Method to call * @param array $options Options for this method - * @throws Exception\BadMethodCallException if unknown method + * @throws Exception\BadMethodCallException If unknown method. * @return mixed */ public function __call($method, array $options) diff --git a/test/ClassFileLocatorTest.php b/test/ClassFileLocatorTest.php index 28c80ea4..63cf1f20 100644 --- a/test/ClassFileLocatorTest.php +++ b/test/ClassFileLocatorTest.php @@ -1,12 +1,22 @@ expectException(Exception\InvalidArgumentException::class); @@ -36,7 +46,7 @@ public function testIterationShouldReturnOnlyPhpFiles() public function testIterationShouldReturnOnlyPhpFilesContainingClasses() { $locator = new ClassFileLocator(__DIR__); - $found = false; + $found = false; foreach ($locator as $file) { if (preg_match('/locator-should-skip-this\.php$/', $file->getFilename())) { $found = true; @@ -48,7 +58,7 @@ public function testIterationShouldReturnOnlyPhpFilesContainingClasses() public function testIterationShouldReturnInterfaces() { $locator = new ClassFileLocator(__DIR__); - $found = false; + $found = false; foreach ($locator as $file) { if (preg_match('/LocatorShouldFindThis\.php$/', $file->getFilename())) { $found = true; @@ -60,7 +70,7 @@ public function testIterationShouldReturnInterfaces() public function testIterationShouldInjectNamespaceInFoundItems() { $locator = new ClassFileLocator(__DIR__); - $found = false; + $found = false; foreach ($locator as $file) { $classes = $file->getClasses(); foreach ($classes as $class) { @@ -84,7 +94,7 @@ public function testIterationShouldInjectNamespacesInFileInfo() public function testIterationShouldInjectClassInFoundItems() { $locator = new ClassFileLocator(__DIR__); - $found = false; + $found = false; foreach ($locator as $file) { $classes = $file->getClasses(); foreach ($classes as $class) { @@ -97,10 +107,10 @@ public function testIterationShouldInjectClassInFoundItems() public function testIterationShouldFindMultipleClassesInMultipleNamespacesInSinglePhpFile() { - $locator = new ClassFileLocator(__DIR__); - $foundFirst = false; + $locator = new ClassFileLocator(__DIR__); + $foundFirst = false; $foundSecond = false; - $foundThird = false; + $foundThird = false; $foundFourth = false; foreach ($locator as $file) { if (preg_match('/MultipleClassesInMultipleNamespaces\.php$/', $file->getFilename())) { @@ -133,7 +143,7 @@ public function testIterationShouldFindMultipleClassesInMultipleNamespacesInSing */ public function testIterationShouldNotCountFQCNScalarResolutionConstantAsClass() { - foreach (new ClassFileLocator(__DIR__ .'/TestAsset') as $file) { + foreach (new ClassFileLocator(__DIR__ . '/TestAsset') as $file) { if (! preg_match('/ClassNameResolutionCompatibility\.php$/', $file->getFilename())) { continue; } @@ -148,12 +158,12 @@ public function testIgnoresAnonymousClasses() { $classFileLocator = new ClassFileLocator(__DIR__ . '/TestAsset/Anonymous'); - $classFiles = \iterator_to_array($classFileLocator); + $classFiles = iterator_to_array($classFileLocator); $this->assertCount(1, $classFiles); - $classNames = \array_reduce($classFiles, function (array $classNames, PhpClassFile $classFile) { - return \array_merge( + $classNames = array_reduce($classFiles, function (array $classNames, PhpClassFile $classFile) { + return array_merge( $classNames, $classFile->getClasses() ); @@ -173,12 +183,12 @@ public function testIgnoresMethodsNamedAfterKeywords() { $classFileLocator = new ClassFileLocator(__DIR__ . '/TestAsset/WithMethodsNamedAfterKeywords'); - $classFiles = \iterator_to_array($classFileLocator); + $classFiles = iterator_to_array($classFileLocator); $this->assertCount(2, $classFiles); - $classNames = \array_reduce($classFiles, function (array $classNames, PhpClassFile $classFile) { - return \array_merge( + $classNames = array_reduce($classFiles, function (array $classNames, PhpClassFile $classFile) { + return array_merge( $classNames, $classFile->getClasses() ); @@ -198,7 +208,7 @@ public function testIgnoresMethodsNamedAfterKeywords() public function testIterationFindsClassInAFileWithUseFunction() { $locator = new ClassFileLocator(__DIR__); - $found = false; + $found = false; foreach ($locator as $file) { if (preg_match('/ContainsUseFunction\.php$/', $file->getFilename())) { diff --git a/test/Transfer/Adapter/AbstractAdapterTestMockAdapter.php b/test/Transfer/Adapter/AbstractAdapterTestMockAdapter.php index 3a5cd771..6dcbb079 100644 --- a/test/Transfer/Adapter/AbstractAdapterTestMockAdapter.php +++ b/test/Transfer/Adapter/AbstractAdapterTestMockAdapter.php @@ -1,5 +1,7 @@ files = [ - 'foo' => [ + 'foo' => [ 'name' => 'foo.jpg', 'type' => 'image/jpeg', 'size' => 126976, @@ -29,22 +36,22 @@ public function __construct() 'received' => false, 'filtered' => false, ], - 'bar' => [ - 'name' => 'bar.png', - 'type' => 'image/png', - 'size' => 91136, - 'tmp_name' => '/tmp/489128284b51f', - 'options' => ['ignoreNoFile' => false, 'useByteString' => true], + 'bar' => [ + 'name' => 'bar.png', + 'type' => 'image/png', + 'size' => 91136, + 'tmp_name' => '/tmp/489128284b51f', + 'options' => ['ignoreNoFile' => false, 'useByteString' => true], 'validated' => false, 'received' => false, 'filtered' => false, ], - 'baz' => [ - 'name' => 'baz.text', - 'type' => 'text/plain', - 'size' => 1172, - 'tmp_name' => $testfile, - 'options' => ['ignoreNoFile' => false, 'useByteString' => true], + 'baz' => [ + 'name' => 'baz.text', + 'type' => 'text/plain', + 'size' => 1172, + 'tmp_name' => $testfile, + 'options' => ['ignoreNoFile' => false, 'useByteString' => true], 'validated' => false, 'received' => false, 'filtered' => false, @@ -60,63 +67,110 @@ public function __construct() 'filtered' => false, ], 'file_1_' => [ - 'name' => 'baz.text', - 'type' => 'text/plain', - 'size' => 1172, - 'tmp_name' => $testfile, - 'options' => ['ignoreNoFile' => false, 'useByteString' => true], + 'name' => 'baz.text', + 'type' => 'text/plain', + 'size' => 1172, + 'tmp_name' => $testfile, + 'options' => ['ignoreNoFile' => false, 'useByteString' => true], 'validated' => false, 'received' => false, 'filtered' => false, ], - 'file' => [ - 'name' => 'foo.jpg', - 'multifiles' => [0 => 'file_0_', 1 => 'file_1_'] + 'file' => [ + 'name' => 'foo.jpg', + 'multifiles' => [0 => 'file_0_', 1 => 'file_1_'], ], ]; } - public function send($options = null) + /** + * Send Function + * + * @param mixed $options + */ + public function send($options = null): void { - return; + // No need for a return statement here since the return type is void } - public function receive($options = null) + /** + * Receive Function + * + * @param mixed $options + */ + public function receive($options = null): void { $this->received = true; - return; + // No need for a return statement here since the return type is void } + /** + * Is Sent + * + * @param mixed $file + * @return bool + */ public function isSent($file = null) { return false; } + /** + * Is Received + * + * @param mixed $file + * @return bool + */ public function isReceived($file = null) { return $this->received; } + /** + * Is Uploaded + * + * @param mixed $files + * @return bool + */ public function isUploaded($files = null) { return true; } - public function isFiltered($files = null) + /** + * Is Filtered + * + * @return bool + */ + public function isFiltered(mixed $files = null) { return true; } - public static function getProgress() + /** + * Get Progress + */ + public static function getProgress(): void { - return; + // No need for a return statement here since the return type is void } + /** + * Get Temp Dir + * + * @return void + */ public function getTmpDir() { $this->tmpDir = parent::getTmpDir(); } + /** + * Is Path Writeable + * + * @param string $path + * @return bool + */ public function isPathWriteable($path) { return parent::isPathWriteable($path); @@ -134,7 +188,7 @@ public function addInvalidFile() 'validated' => false, 'received' => false, 'filtered' => false, - ] + ], ]; } } diff --git a/test/Transfer/Adapter/AbstractTest.php b/test/Transfer/Adapter/AbstractTest.php index 397b7d50..bb66f141 100644 --- a/test/Transfer/Adapter/AbstractTest.php +++ b/test/Transfer/Adapter/AbstractTest.php @@ -1,8 +1,10 @@ createMock(ContainerInterface::class); - $manager = new File\Transfer\Adapter\FilterPluginManager($container); + $container = $this->createMock(containerinterface::class); + $manager = new File\Transfer\Adapter\FilterPluginManager($container); $this->adapter->setFilterManager($manager); $this->assertSame($manager, $this->adapter->getFilterManager()); } @@ -68,24 +79,24 @@ public function testAdapterhShouldRaiseExceptionWhenAddingInvalidValidatorType() $this->expectException(File\Transfer\Exception\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid validator provided to addValidator'); - $this->adapter->addValidator(new Filter\BaseName); + $this->adapter->addValidator(new Filter\BaseName()); } public function testAdapterShouldAllowAddingMultipleValidatorsAtOnceUsingBothInstancesAndPluginLoader() { $validators = [ - 'count' => ['min' => 1, 'max' => 1], + 'count' => ['min' => 1, 'max' => 1], 'Exists' => 'C:\temp', [ 'validator' => 'Upload', - 'options' => [realpath(__FILE__)] + 'options' => [realpath(__FILE__)], ], new FileValidator\Extension('jpg'), ]; $this->adapter->addValidators($validators); $test = $this->adapter->getValidators(); $this->assertIsArray($test); - $this->assertCount(4, $test, var_export($test, 1)); + $this->assertCount(4, $test, var_export($test, true)); $count = array_shift($test); $this->assertInstanceOf(Validator\File\Count::class, $count); $exists = array_shift($test); @@ -258,7 +269,6 @@ public function testAdapterShouldAllowAddingFilterViaPluginManager() $this->assertInstanceOf(Filter\StringTrim::class, $test); } - public function testAdapterhShouldRaiseExceptionWhenAddingInvalidFilterType() { $this->expectException(File\Transfer\Exception\InvalidArgumentException::class); @@ -272,15 +282,15 @@ public function testAdapterShouldAllowAddingMultipleFiltersAtOnceUsingBothInstan $filters = [ 'wordSeparatorToCamelCase' => ['separator' => ' '], [ - 'filter' => 'Boolean', - 'casting' => true + 'filter' => 'Boolean', + 'casting' => true, ], new Filter\BaseName(), ]; $this->adapter->addFilters($filters); $test = $this->adapter->getFilters(); $this->assertIsArray($test); - $this->assertCount(3, $test, var_export($test, 1)); + $this->assertCount(3, $test, var_export($test, true)); $count = array_shift($test); $this->assertInstanceOf(Filter\Word\SeparatorToCamelCase::class, $count); $size = array_shift($test); @@ -409,27 +419,27 @@ public function testAdapterShouldAllowRetrievingDestinationsForAnArrayOfSpecifie public function testSettingAndRetrievingOptions() { $this->assertEquals([ - 'bar' => ['ignoreNoFile' => false, 'useByteString' => true], - 'baz' => ['ignoreNoFile' => false, 'useByteString' => true], - 'foo' => ['ignoreNoFile' => false, 'useByteString' => true, 'detectInfos' => true], + 'bar' => ['ignoreNoFile' => false, 'useByteString' => true], + 'baz' => ['ignoreNoFile' => false, 'useByteString' => true], + 'foo' => ['ignoreNoFile' => false, 'useByteString' => true, 'detectInfos' => true], 'file_0_' => ['ignoreNoFile' => false, 'useByteString' => true], 'file_1_' => ['ignoreNoFile' => false, 'useByteString' => true], ], $this->adapter->getOptions()); $this->adapter->setOptions(['ignoreNoFile' => true]); $this->assertEquals([ - 'bar' => ['ignoreNoFile' => true, 'useByteString' => true], - 'baz' => ['ignoreNoFile' => true, 'useByteString' => true], - 'foo' => ['ignoreNoFile' => true, 'useByteString' => true, 'detectInfos' => true], + 'bar' => ['ignoreNoFile' => true, 'useByteString' => true], + 'baz' => ['ignoreNoFile' => true, 'useByteString' => true], + 'foo' => ['ignoreNoFile' => true, 'useByteString' => true, 'detectInfos' => true], 'file_0_' => ['ignoreNoFile' => true, 'useByteString' => true], 'file_1_' => ['ignoreNoFile' => true, 'useByteString' => true], ], $this->adapter->getOptions()); $this->adapter->setOptions(['ignoreNoFile' => false], 'foo'); $this->assertEquals([ - 'bar' => ['ignoreNoFile' => true, 'useByteString' => true], - 'baz' => ['ignoreNoFile' => true, 'useByteString' => true], - 'foo' => ['ignoreNoFile' => false, 'useByteString' => true, 'detectInfos' => true], + 'bar' => ['ignoreNoFile' => true, 'useByteString' => true], + 'baz' => ['ignoreNoFile' => true, 'useByteString' => true], + 'foo' => ['ignoreNoFile' => false, 'useByteString' => true, 'detectInfos' => true], 'file_0_' => ['ignoreNoFile' => true, 'useByteString' => true], 'file_1_' => ['ignoreNoFile' => true, 'useByteString' => true], ], $this->adapter->getOptions()); @@ -523,7 +533,7 @@ public function testTempDirectoryDetection() public function testTemporaryDirectoryAccessDetection() { $this->adapter->tmpDir = "."; - $path = "/NoPath/To/File"; + $path = "/NoPath/To/File"; $this->assertFalse($this->adapter->isPathWriteable($path)); $this->assertTrue($this->adapter->isPathWriteable($this->adapter->tmpDir)); } @@ -546,7 +556,7 @@ public function testIgnoreFileSize() public function testFileSizeByTmpName() { $expectedSize = sprintf("%.2fkB", 1.14); - $options = $this->adapter->getOptions(); + $options = $this->adapter->getOptions(); $this->assertTrue($options['baz']['useByteString']); $this->assertEquals($expectedSize, $this->adapter->getFileSize('baz.text')); $this->adapter->setOptions(['useByteString' => false]); @@ -660,14 +670,18 @@ public function testSettingAndRetrievingDetectInfosOption() { $this->assertEquals([ 'foo' => [ - 'ignoreNoFile' => false, + 'ignoreNoFile' => false, 'useByteString' => true, - 'detectInfos' => true]], $this->adapter->getOptions('foo')); + 'detectInfos' => true, + ], + ], $this->adapter->getOptions('foo')); $this->adapter->setOptions(['detectInfos' => false]); $this->assertEquals([ 'foo' => [ - 'ignoreNoFile' => false, + 'ignoreNoFile' => false, 'useByteString' => true, - 'detectInfos' => false]], $this->adapter->getOptions('foo')); + 'detectInfos' => false, + ], + ], $this->adapter->getOptions('foo')); } } diff --git a/test/Transfer/Adapter/HttpTest.php b/test/Transfer/Adapter/HttpTest.php index ae4243c5..5e9607f1 100644 --- a/test/Transfer/Adapter/HttpTest.php +++ b/test/Transfer/Adapter/HttpTest.php @@ -1,5 +1,7 @@ [ - 'name' => 'test.txt', - 'type' => 'plain/text', - 'size' => 8, + 'name' => 'test.txt', + 'type' => 'plain/text', + 'size' => 8, 'tmp_name' => __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'php0zgByO', - 'error' => 0, + 'error' => 0, ], ]; $this->adapter = new HttpTestMockAdapter(); @@ -106,13 +113,13 @@ public function testReceiveUnknownFile() public function testReceiveValidatedFile() { - $_FILES = [ + $_FILES = [ 'txt' => [ - 'name' => 'unknown.txt', - 'type' => 'plain/text', - 'size' => 8, + 'name' => 'unknown.txt', + 'type' => 'plain/text', + 'size' => 8, 'tmp_name' => 'unknown.txt', - 'error' => 0, + 'error' => 0, ], ]; $adapter = new HttpTestMockAdapter(); @@ -142,24 +149,24 @@ public function testReceiveWithRenameFilterButWithoutDirectory() public function testMultiFiles() { - $_FILES = [ + $_FILES = [ 'txt' => [ - 'name' => 'test.txt', - 'type' => 'plain/text', - 'size' => 8, + 'name' => 'test.txt', + 'type' => 'plain/text', + 'size' => 8, 'tmp_name' => __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'php0zgByO', - 'error' => 0, + 'error' => 0, ], 'exe' => [ - 'name' => [ + 'name' => [ 0 => 'file1.exe', 1 => 'file2.exe', ], - 'type' => [ + 'type' => [ 0 => 'plain/text', 1 => 'plain/text', ], - 'size' => [ + 'size' => [ 0 => 8, 1 => 8, ], @@ -167,7 +174,7 @@ public function testMultiFiles() 0 => __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'phpqBXGTg', 1 => __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'phpZqRDQF', ], - 'error' => [ + 'error' => [ 0 => 0, 1 => 0, ], @@ -184,24 +191,24 @@ public function testMultiFiles() public function testMultiFilesSameName() { - $_FILES = [ + $_FILES = [ 'txt' => [ - 'name' => 'test.txt', - 'type' => 'plain/text', - 'size' => 8, + 'name' => 'test.txt', + 'type' => 'plain/text', + 'size' => 8, 'tmp_name' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'php0zgByO', - 'error' => 0, + 'error' => 0, ], 'exe' => [ - 'name' => [ + 'name' => [ 0 => 'file.exe', 1 => 'file.exe', ], - 'type' => [ + 'type' => [ 0 => 'plain/text', 1 => 'plain/text', ], - 'size' => [ + 'size' => [ 0 => 8, 1 => 8, ], @@ -209,7 +216,7 @@ public function testMultiFilesSameName() 0 => dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'phpOOwDDc', 1 => dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'phpDlIxkx', ], - 'error' => [ + 'error' => [ 0 => 0, 1 => 0, ], @@ -241,7 +248,7 @@ public function testUploadProgressFailureForAPC() } $_GET['progress_key'] = 'mykey'; - $status = HttpTestMockAdapter::getProgress(); + $status = HttpTestMockAdapter::getProgress(); $this->assertEquals([ 'total' => 100, 'current' => 100, @@ -294,9 +301,9 @@ public function testUploadProgressAdapter() } $_GET['progress_key'] = 'mykey'; - $adapter = new ProgressBar\Adapter\Console(); - $status = ['progress' => $adapter, 'session' => 'upload']; - $status = HttpTestMockAdapter::getProgress($status); + $adapter = new ProgressBar\Adapter\Console(); + $status = ['progress' => $adapter, 'session' => 'upload']; + $status = HttpTestMockAdapter::getProgress($status); $this->assertArrayHasKey('total', $status); $this->assertArrayHasKey('current', $status); $this->assertArrayHasKey('rate', $status); @@ -320,7 +327,7 @@ public function testValidationOfPhpExtendsFormError() { $_SERVER['CONTENT_LENGTH'] = 10; - $_FILES = []; + $_FILES = []; $adapter = new HttpTestMockAdapter(); $this->assertFalse($adapter->isValidParent()); $this->assertStringContainsString('exceeds', current($adapter->getMessages())); diff --git a/test/Transfer/Adapter/HttpTestMockAdapter.php b/test/Transfer/Adapter/HttpTestMockAdapter.php index 5e27d855..f58d87cf 100644 --- a/test/Transfer/Adapter/HttpTestMockAdapter.php +++ b/test/Transfer/Adapter/HttpTestMockAdapter.php @@ -1,9 +1,13 @@ 100, + 'total' => 100, 'current' => 100, - 'rate' => 10, + 'rate' => 10, ]; } return [ - 'bytes_total' => 100, + 'bytes_total' => 100, 'bytes_uploaded' => 100, - 'speed_average' => 10, - 'cancel_upload' => true, + 'speed_average' => 10, + 'cancel_upload' => true, ]; } - public static function uPTest($id) + /** + * uPTest + * + * @param mixed $id + * @return int[] + */ + public static function uPTest($id): array { if (! self::$uploadProgressShouldFail) { return [ - 'total' => 100, + 'total' => 100, 'current' => 90, - 'rate' => 10, + 'rate' => 10, ]; } return [ - 'bytes_total' => 100, + 'bytes_total' => 100, 'bytes_uploaded' => 100, - 'speed_average' => 10, - 'cancel_upload' => true, + 'speed_average' => 10, + 'cancel_upload' => true, ]; } public function switchApcToUP() { - static::$callbackApc = null; - static::$callbackUploadProgress = [HttpTestMockAdapter::class, 'uPTest']; + static::$callbackApc = null; + static::$callbackUploadProgress = [self::class, 'uPTest']; } public function forceUPFailure() diff --git a/test/_files/locator-should-skip-this.php b/test/_files/locator-should-skip-this.php index eb2c4001..a050b146 100644 --- a/test/_files/locator-should-skip-this.php +++ b/test/_files/locator-should-skip-this.php @@ -1,2 +1,5 @@