From 91d036579e052d840ea611459dadf5e7abe22c20 Mon Sep 17 00:00:00 2001 From: Alexander Volle Date: Mon, 16 Oct 2023 00:08:42 +0200 Subject: [PATCH] Add support for CakePHP 5 (#5) * Migrate phpunit configuration * Change CI version * Update phpstan * Use new fixture system * Change plugin class name in line with CakePHP 4.4 migration * Update PHP/CakePHP version map * Update test configuration * Update dependencies * Upgrades for CakePHP 5 and PHP 8.1 * Codesniff * Use actual collection class instead of function to prevent need of global functions * Various minor adjustments * Fix missing quote * Update phpstan job --- .github/workflows/ci.yml | 18 +- .gitignore | 1 + README.md | 10 +- composer.json | 17 +- composer.lock | 1881 ++++++++--------- phpstan.neon | 3 +- phpunit.xml.dist | 27 +- src/Command/Helper/ScanOutputHelper.php | 4 +- src/Command/ScanCommand.php | 12 +- src/Deadlinks/DeadLink.php | 48 +- src/Deadlinks/ResultSet.php | 6 +- src/Deadlinks/TableScanner.php | 33 +- src/Deadlinks/UrlScanner.php | 23 +- src/{Plugin.php => DeadlinksPlugin.php} | 9 +- src/Exception/MissingConfigException.php | 4 +- src/Mailer/ScanResultMailer.php | 10 +- templates/email/text/send_result.php | 4 +- tests/Fixture/FilesFixture.php | 20 - tests/Fixture/LinksFixture.php | 19 - tests/Fixture/ResourcesFixture.php | 19 - tests/TestCase/Command/ScanCommandTest.php | 12 +- tests/TestCase/DeadLinks/TableScannerTest.php | 4 +- tests/bootstrap.php | 55 +- tests/schema.sql | 24 + tests/test_app/config/routes.php | 12 + tests/test_app/src/Application.php | 9 +- tests/test_files/deadlinks_static.log | 2 +- 27 files changed, 1043 insertions(+), 1243 deletions(-) rename src/{Plugin.php => DeadlinksPlugin.php} (88%) create mode 100644 tests/schema.sql create mode 100644 tests/test_app/config/routes.php diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9358979..5aa3b05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,11 @@ on: jobs: testsuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - php-version: ['7.4', '8.0'] + php-version: ['8.1'] name: PHP ${{ matrix.php-version }} steps: @@ -29,11 +29,7 @@ jobs: - name: Composer install run: | - if [[ ${{ matrix.php-version }} == '8.0' ]]; then - composer install --ignore-platform-reqs - else composer install - fi - name: Run PHPUnit run: | @@ -41,7 +37,7 @@ jobs: coding-standard: name: Coding Standard - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -49,7 +45,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' extensions: mbstring coverage: none @@ -61,7 +57,7 @@ jobs: static-analysis: name: Static Analysis - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -69,12 +65,12 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' extensions: mbstring coverage: none - name: Composer install - run: composer require --dev phpstan/phpstan:^0.12 + run: composer require --dev phpstan/phpstan:^1.9 - name: Run phpstan run: vendor/bin/phpstan.phar analyse diff --git a/.gitignore b/.gitignore index cb54968..1973750 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /composer.phar /phpunit.xml /.phpunit.result.cache +/.phpunit.cache /phpunit.phar /config/Migrations/schema-dump-default.lock /vendor/ diff --git a/README.md b/README.md index 735b432..30ab62d 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@ Output methods: * Log file * Mail -Works with: -Type | Version ----- | ---- -CakePHP | 4.2 -PHP | 7.4 +## Version map: +| Plugin | Branch | Cake | PHP | +|--------|--------|------|--------------| +| 2.x | main | 5.x | ^8.1 | +| 1.x | 1.x | 4.x | ^7.4 \| ^8.0 | ## Installation `composer require avolle/cakephp-deadlinks` diff --git a/composer.json b/composer.json index e202bfc..cb958b6 100644 --- a/composer.json +++ b/composer.json @@ -10,14 +10,14 @@ } ], "require": { - "php": ">=7.4", - "cakephp/cakephp": "^4.0", + "php": "^8.1", + "cakephp/cakephp": "^5.0.0", "ext-curl": "*" }, "require-dev": { - "phpunit/phpunit": "^8.0", - "cakephp/cakephp-codesniffer": "~4.1.0", - "phpstan/phpstan": "^0.12" + "phpunit/phpunit": "^10.0.0", + "cakephp/cakephp-codesniffer": "^5.0", + "phpstan/phpstan": "^1.9" }, "autoload": { "psr-4": { @@ -40,5 +40,12 @@ "cs-fix": "phpcbf ./src ./tests", "stan": "phpstan analyze", "test": "phpunit --colors=always" + }, + "minimum-stability": "stable", + "prefer-stable": true, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/composer.lock b/composer.lock index 6459a77..d718c76 100644 --- a/composer.lock +++ b/composer.lock @@ -4,37 +4,49 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bf1c1fdd6ab46dc8647c6c0f062a467e", + "content-hash": "40f2d08b2d8ce0d907f591a81388a1f7", "packages": [ { "name": "cakephp/cakephp", - "version": "4.2.7", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/cakephp/cakephp.git", - "reference": "bd2d476e0b14b21c6103eca789667a016ec14458" + "reference": "2aa6661a093bc9d7980320f1aa2b5353b397d785" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp/zipball/bd2d476e0b14b21c6103eca789667a016ec14458", - "reference": "bd2d476e0b14b21c6103eca789667a016ec14458", + "url": "https://api.github.com/repos/cakephp/cakephp/zipball/2aa6661a093bc9d7980320f1aa2b5353b397d785", + "reference": "2aa6661a093bc9d7980320f1aa2b5353b397d785", "shasum": "" }, "require": { - "cakephp/chronos": "^2.0", + "cakephp/chronos": "^3.0.2", "composer/ca-bundle": "^1.2", "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", - "laminas/laminas-diactoros": "^2.2.2", - "laminas/laminas-httphandlerrunner": "^1.1", - "league/container": "^3.2", - "php": ">=7.2.0", - "psr/http-client": "^1.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0", - "psr/log": "^1.0.0", - "psr/simple-cache": "^1.0.0" + "laminas/laminas-diactoros": "^3.0", + "laminas/laminas-httphandlerrunner": "^2.6", + "league/container": "^4.2", + "php": ">=8.1", + "psr/container": "^2.0", + "psr/http-client": "^1.0.2", + "psr/http-factory": "^1.0.2", + "psr/http-message": "^2.0", + "psr/http-server-handler": "^1.0.2", + "psr/http-server-middleware": "^1.0.2", + "psr/log": "^3.0", + "psr/simple-cache": "^3.0" + }, + "provide": { + "psr/container-implementation": "^2.0", + "psr/http-client-implementation": "^1.0", + "psr/http-factory-implementation": "^1.0", + "psr/http-server-handler-implementation": "^1.0", + "psr/http-server-middleware-implementation": "^1.0", + "psr/log-implementation": "^3.0", + "psr/simple-cache-implementation": "^3.0" }, "replace": { "cakephp/cache": "self.version", @@ -44,7 +56,6 @@ "cakephp/database": "self.version", "cakephp/datasource": "self.version", "cakephp/event": "self.version", - "cakephp/filesystem": "self.version", "cakephp/form": "self.version", "cakephp/http": "self.version", "cakephp/i18n": "self.version", @@ -54,29 +65,32 @@ "cakephp/validation": "self.version" }, "require-dev": { - "cakephp/cakephp-codesniffer": "^4.0", - "mikey179/vfsstream": "^1.6", + "cakephp/cakephp-codesniffer": "^5.0", + "mikey179/vfsstream": "^1.6.10", + "mockery/mockery": "^1.6", "paragonie/csp-builder": "^2.3", - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^10.1.0" }, "suggest": { "ext-curl": "To enable more efficient network calls in Http\\Client.", "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", - "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()", + "lib-ICU": "To use locale-aware features in the I18n and Database packages", "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" }, "type": "library", "autoload": { - "psr-4": { - "Cake\\": "src/" - }, "files": [ "src/Core/functions.php", + "src/Error/functions.php", "src/Collection/functions.php", "src/I18n/functions.php", + "src/ORM/bootstrap.php", "src/Routing/functions.php", "src/Utility/bootstrap.php" - ] + ], + "psr-4": { + "Cake\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -107,37 +121,34 @@ "issues": "https://github.com/cakephp/cakephp/issues", "source": "https://github.com/cakephp/cakephp" }, - "time": "2021-06-16T21:23:42+00:00" + "time": "2023-09-29T23:31:30+00:00" }, { "name": "cakephp/chronos", - "version": "2.2.0", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "556e14da67307ffc2e68beeb7df0694dc8d1207d" + "reference": "54164f6775ae5c8a930583983d62c9ee0815fcf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/556e14da67307ffc2e68beeb7df0694dc8d1207d", - "reference": "556e14da67307ffc2e68beeb7df0694dc8d1207d", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/54164f6775ae5c8a930583983d62c9ee0815fcf0", + "reference": "54164f6775ae5c8a930583983d62c9ee0815fcf0", "shasum": "" }, "require": { - "php": ">=7.2" + "php": ">=8.1" }, "require-dev": { - "cakephp/cakephp-codesniffer": "^4.5", - "phpunit/phpunit": "^8.0 || ^9.0" + "cakephp/cakephp-codesniffer": "^5.0", + "phpunit/phpunit": "^10.1.0" }, "type": "library", "autoload": { "psr-4": { "Cake\\Chronos\\": "src/" - }, - "files": [ - "src/carbon_compat.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -151,35 +162,34 @@ }, { "name": "The CakePHP Team", - "homepage": "http://cakephp.org" + "homepage": "https://cakephp.org" } ], "description": "A simple API extension for DateTime.", - "homepage": "http://cakephp.org", + "homepage": "https://cakephp.org", "keywords": [ "date", "datetime", "time" ], "support": { - "irc": "irc://irc.freenode.org/cakephp", "issues": "https://github.com/cakephp/chronos/issues", "source": "https://github.com/cakephp/chronos" }, - "time": "2021-06-17T13:49:10+00:00" + "time": "2023-10-02T16:47:43+00:00" }, { "name": "composer/ca-bundle", - "version": "1.2.10", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", "shasum": "" }, "require": { @@ -191,7 +201,7 @@ "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" }, "type": "library", "extra": { @@ -226,7 +236,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.10" + "source": "https://github.com/composer/ca-bundle/tree/1.3.7" }, "funding": [ { @@ -242,34 +252,30 @@ "type": "tidelift" } ], - "time": "2021-06-07T13:58:28+00:00" + "time": "2023-08-30T09:31:38+00:00" }, { "name": "laminas/laminas-diactoros", - "version": "2.13.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "34ba65010be9aa74e159d168c5ecfa5c01e4d956" + "reference": "aca73646e658dce3f079f6b8648c651e193e331e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/34ba65010be9aa74e159d168c5ecfa5c01e4d956", - "reference": "34ba65010be9aa74e159d168c5ecfa5c01e4d956", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/aca73646e658dce3f079f6b8648c651e193e331e", + "reference": "aca73646e658dce3f079f6b8648c651e193e331e", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "conflict": { - "phpspec/prophecy": "<1.9.0", - "zendframework/zend-diactoros": "*" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "psr/http-factory": "^1.0.2", + "psr/http-message": "^1.1 || ^2.0" }, "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "psr/http-factory-implementation": "^1.1 || ^2.0", + "psr/http-message-implementation": "^1.1 || ^2.0" }, "require-dev": { "ext-curl": "*", @@ -277,12 +283,11 @@ "ext-gd": "*", "ext-libxml": "*", "http-interop/http-factory-tests": "^0.9.0", - "laminas/laminas-coding-standard": "~2.3.0", - "php-http/psr7-integration-tests": "^1.1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.24.0" + "laminas/laminas-coding-standard": "~2.5.0", + "php-http/psr7-integration-tests": "^1.3", + "phpunit/phpunit": "^9.5.28", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.9" }, "type": "library", "extra": { @@ -297,18 +302,9 @@ "src/functions/marshal_headers_from_sapi.php", "src/functions/marshal_method_from_sapi.php", "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", "src/functions/normalize_server.php", "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php", - "src/functions/create_uploaded_file.legacy.php", - "src/functions/marshal_headers_from_sapi.legacy.php", - "src/functions/marshal_method_from_sapi.legacy.php", - "src/functions/marshal_protocol_version_from_sapi.legacy.php", - "src/functions/marshal_uri_from_sapi.legacy.php", - "src/functions/normalize_server.legacy.php", - "src/functions/normalize_uploaded_files.legacy.php", - "src/functions/parse_cookie_header.legacy.php" + "src/functions/parse_cookie_header.php" ], "psr-4": { "Laminas\\Diactoros\\": "src/" @@ -341,38 +337,34 @@ "type": "community_bridge" } ], - "time": "2022-07-07T12:31:03+00:00" + "time": "2023-09-03T13:11:37+00:00" }, { "name": "laminas/laminas-httphandlerrunner", - "version": "1.4.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-httphandlerrunner.git", - "reference": "6a2dd33e4166469ade07ad1283b45924383b224b" + "reference": "d3e84755a17e563b1c5f8290cbfb150210501a77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/6a2dd33e4166469ade07ad1283b45924383b224b", - "reference": "6a2dd33e4166469ade07ad1283b45924383b224b", + "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/d3e84755a17e563b1c5f8290cbfb150210501a77", + "reference": "d3e84755a17e563b1c5f8290cbfb150210501a77", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0", - "psr/http-message": "^1.0", - "psr/http-message-implementation": "^1.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/http-message-implementation": "^1.0 || ^2.0", "psr/http-server-handler": "^1.0" }, - "replace": { - "zendframework/zend-httphandlerrunner": "^1.1.0" - }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-diactoros": "^2.1.1", - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.6" + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-diactoros": "^3.0.0", + "phpunit/phpunit": "^10.1.2", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.11" }, "type": "library", "extra": { @@ -412,87 +404,25 @@ "type": "community_bridge" } ], - "time": "2021-04-08T13:52:56+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "d74d2da21beae5aceff1e8c07b901066b0e1b719" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/d74d2da21beae5aceff1e8c07b901066b0e1b719", - "reference": "d74d2da21beae5aceff1e8c07b901066b0e1b719", - "shasum": "" - }, - "require": { - "php": ">=7.4, <8.2" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.14", - "psalm/plugin-phpunit": "^0.15.2", - "squizlabs/php_codesniffer": "^3.6.2", - "vimeo/psalm": "^4.21.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-07-14T16:30:30+00:00" + "time": "2023-09-04T10:43:03+00:00" }, { "name": "league/container", - "version": "3.4.1", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/thephpleague/container.git", - "reference": "84ecbc2dbecc31bd23faf759a0e329ee49abddbd" + "reference": "375d13cb828649599ef5d48a339c4af7a26cd0ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/container/zipball/84ecbc2dbecc31bd23faf759a0e329ee49abddbd", - "reference": "84ecbc2dbecc31bd23faf759a0e329ee49abddbd", + "url": "https://api.github.com/repos/thephpleague/container/zipball/375d13cb828649599ef5d48a339c4af7a26cd0ab", + "reference": "375d13cb828649599ef5d48a339c4af7a26cd0ab", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "psr/container": "^1.0.0" + "php": "^7.2 || ^8.0", + "psr/container": "^1.1 || ^2.0" }, "provide": { "psr/container-implementation": "^1.0" @@ -501,15 +431,19 @@ "orno/di": "~2.0" }, "require-dev": { - "phpunit/phpunit": "^6.0 || ^7.0", + "nette/php-generator": "^3.4", + "nikic/php-parser": "^4.10", + "phpstan/phpstan": "^0.12.47", + "phpunit/phpunit": "^8.5.17", "roave/security-advisories": "dev-latest", "scrutinizer/ocular": "^1.8", - "squizlabs/php_codesniffer": "^3.5" + "squizlabs/php_codesniffer": "^3.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev", + "dev-master": "4.x-dev", + "dev-4.x": "4.x-dev", "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" @@ -527,8 +461,7 @@ "authors": [ { "name": "Phil Bennett", - "email": "philipobenito@gmail.com", - "homepage": "http://www.philipobenito.com", + "email": "mail@philbennett.co.uk", "role": "Developer" } ], @@ -545,7 +478,7 @@ ], "support": { "issues": "https://github.com/thephpleague/container/issues", - "source": "https://github.com/thephpleague/container/tree/3.4.1" + "source": "https://github.com/thephpleague/container/tree/4.2.0" }, "funding": [ { @@ -553,26 +486,31 @@ "type": "github" } ], - "time": "2021-07-09T08:23:52+00:00" + "time": "2021-11-16T10:29:06+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -599,27 +537,27 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -639,7 +577,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -651,27 +589,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -691,7 +629,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -706,31 +644,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -745,7 +683,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -759,27 +697,27 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/http-server-handler", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", "shasum": "" }, "require": { "php": ">=7.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -799,7 +737,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP server-side request handler", @@ -815,28 +753,27 @@ "server" ], "support": { - "issues": "https://github.com/php-fig/http-server-handler/issues", - "source": "https://github.com/php-fig/http-server-handler/tree/master" + "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" }, - "time": "2018-10-30T16:46:14+00:00" + "time": "2023-04-10T20:06:20+00:00" }, { "name": "psr/http-server-middleware", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", "shasum": "" }, "require": { "php": ">=7.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "psr/http-server-handler": "^1.0" }, "type": "library", @@ -857,7 +794,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP server-side middleware", @@ -873,36 +810,36 @@ ], "support": { "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/master" + "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" }, - "time": "2018-10-30T17:12:04+00:00" + "time": "2023-04-11T06:14:47+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -923,31 +860,31 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "psr/simple-cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -962,7 +899,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -974,30 +911,31 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "time": "2017-10-23T01:57:42+00:00" + "time": "2021-10-29T13:26:27+00:00" } ], "packages-dev": [ { "name": "cakephp/cakephp-codesniffer", - "version": "4.1.1", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/cakephp/cakephp-codesniffer.git", - "reference": "efde994335214c996b6b7c35ce50a1b88279ed12" + "reference": "3227936e698774025a16fb808c28f92688672306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/efde994335214c996b6b7c35ce50a1b88279ed12", - "reference": "efde994335214c996b6b7c35ce50a1b88279ed12", + "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/3227936e698774025a16fb808c28f92688672306", + "reference": "3227936e698774025a16fb808c28f92688672306", "shasum": "" }, "require": { - "php": "^7.2", - "slevomat/coding-standard": ">=6.0 <6.2", - "squizlabs/php_codesniffer": "~3.5.3" + "php": ">=8.1.0", + "phpstan/phpdoc-parser": "^1.4.5", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { "phpunit/phpunit": "^7.1" @@ -1030,38 +968,42 @@ "issues": "https://github.com/cakephp/cakephp-codesniffer/issues", "source": "https://github.com/cakephp/cakephp-codesniffer" }, - "time": "2020-04-20T15:16:49+00:00" + "time": "2023-04-09T13:00:25+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.4.0", + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "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": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "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/", @@ -1070,70 +1012,76 @@ ], "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/1.4.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": "2020-11-10T18:47:58+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1149,7 +1097,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -1157,20 +1105,76 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.17.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + }, + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { @@ -1215,22 +1219,22 @@ "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/master" + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2020-06-27T14:33:11+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -1266,388 +1270,286 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", + "name": "phpstan/phpdoc-parser", + "version": "1.24.2", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "bcad8d995980440892759db0c32acae7c8e79442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", + "reference": "bcad8d995980440892759db0c32acae7c8e79442", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } + "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": { - "phpDocumentor\\Reflection\\": "src/" + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" }, - "time": "2020-06-27T09:03:43+00:00" + "time": "2023-09-26T12:28:12+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "name": "phpstan/phpstan", + "version": "1.10.38", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "url": "https://github.com/phpstan/phpstan.git", + "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691", + "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" + "php": "^7.2|^8.0" }, - "require-dev": { - "mockery/mockery": "~1.3.2" + "conflict": { + "phpstan/phpstan-shim": "*" }, + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "url": "https://github.com/phpstan", + "type": "github" }, { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2023-10-06T14:19:14+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "name": "phpunit/php-code-coverage", + "version": "10.1.7", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e", + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "ext-tokenizer": "*" + "phpunit/phpunit": "^10.1" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-main": "10.1-dev" } }, "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + "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/10.1.7" }, - "time": "2020-09-17T18:55:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-10-04T15:34:17+00:00" }, { - "name": "phpspec/prophecy", - "version": "1.13.0", + "name": "phpunit/php-file-iterator", + "version": "4.1.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "php": ">=8.1" }, "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-main": "4.0-dev" } }, "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" - }, - "time": "2021-03-17T13:42:18+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "0.4.3", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "928179efc5368145a8b03cb20d58cb3f3136afae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/928179efc5368145a8b03cb20d58cb3f3136afae", - "reference": "928179efc5368145a8b03cb20d58cb3f3136afae", - "shasum": "" - }, - "require": { - "php": "~7.1" - }, - "require-dev": { - "consistence/coding-standard": "^3.5", - "ergebnis/composer-normalize": "^2.0.2", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^4.7.2", - "symfony/process": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, - "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/master" - }, - "time": "2020-01-25T20:42:48+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "0.12.92", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/64d4c5dc8ea96972bc18432d137a330239a5d2b2", - "reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "filesystem", + "iterator" ], - "description": "PHPStan - PHP Static Analysis Tool", "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.92" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2021-07-10T13:53:49+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "7.0.14", + "name": "phpunit/php-invoker", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c", - "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": ">=7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1 || ^4.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "ext-pcntl": "*", + "phpunit/phpunit": "^10.0" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcntl": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1666,16 +1568,14 @@ "role": "lead" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "coverage", - "testing", - "xunit" + "process" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.14" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -1683,32 +1583,32 @@ "type": "github" } ], - "time": "2020-12-02T13:39:03+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "2.0.3", + "name": "phpunit/php-text-template", + "version": "3.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1727,15 +1627,15 @@ "role": "lead" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "filesystem", - "iterator" + "template" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -1743,26 +1643,34 @@ "type": "github" } ], - "time": "2020-11-30T08:25:21+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-timer", + "version": "6.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1779,44 +1687,81 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "template" + "timer" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:57:52+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.3", + "name": "phpunit/phpunit", + "version": "10.4.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "62bd7af13d282deeb95650077d28ba3600ca321c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/62bd7af13d282deeb95650077d28ba3600ca321c", + "reference": "62bd7af13d282deeb95650077d28ba3600ca321c", "shasum": "" }, "require": { - "php": ">=7.1" + "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": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, - "require-dev": { - "phpunit/phpunit": "^8.5" + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" }, + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "10.4-dev" } }, "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], "classmap": [ "src/" ] @@ -1832,48 +1777,58 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "timer" + "phpunit", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.1" }, "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2020-11-30T08:20:02+00:00" + "time": "2023-10-08T05:01:11+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "4.0.4", + "name": "sebastian/cli-parser", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1888,17 +1843,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -1906,65 +1859,32 @@ "type": "github" } ], - "abandoned": true, - "time": "2020-08-04T08:28:15+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { - "name": "phpunit/phpunit", - "version": "8.5.17", + "name": "sebastian/code-unit", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "79067856d85421c56d413bd238d4e2cd6b0e54da" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/79067856d85421c56d413bd238d4e2cd6b0e54da", - "reference": "79067856d85421c56d413bd238d4e2cd6b0e54da", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.1", - "phar-io/version": "^3.0.2", - "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "php": ">=8.1" }, "require-dev": { - "ext-pdo": "*" + "phpunit/phpunit": "^10.0" }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" - }, - "bin": [ - "phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1983,53 +1903,44 @@ "role": "lead" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.17" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2021-06-23T05:12:43+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2051,7 +1962,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/1.0.2" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -2059,34 +1970,36 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2125,7 +2038,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -2133,33 +2047,91 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2023-08-14T13:18:12+00:00" + }, + { + "name": "sebastian/complexity", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.10", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", - "version": "3.0.3", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^10.0", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2191,7 +2163,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -2199,27 +2172,27 @@ "type": "github" } ], - "time": "2020-11-30T07:59:04+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "4.2.4", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -2227,7 +2200,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2246,7 +2219,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", @@ -2254,7 +2227,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -2262,34 +2236,34 @@ "type": "github" } ], - "time": "2020-11-30T07:53:42+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.3", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2324,14 +2298,15 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -2339,38 +2314,35 @@ "type": "github" } ], - "time": "2020-11-30T07:47:53+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.1", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2395,7 +2367,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -2403,34 +2376,33 @@ "type": "github" } ], - "time": "2020-11-30T07:43:24+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.4", + "name": "sebastian/lines-of-code", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2445,14 +2417,16 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" }, "funding": [ { @@ -2460,32 +2434,34 @@ "type": "github" } ], - "time": "2020-11-30T07:40:27+00:00" + "time": "2023-08-31T09:25:50+00:00" }, { - "name": "sebastian/object-reflector", - "version": "1.1.2", + "name": "sebastian/object-enumerator", + "version": "5.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2503,11 +2479,11 @@ "email": "sebastian@phpunit.de" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -2515,32 +2491,32 @@ "type": "github" } ], - "time": "2020-11-30T07:37:18+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { - "name": "sebastian/recursion-context", - "version": "3.0.1", + "name": "sebastian/object-reflector", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2556,21 +2532,13 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -2578,29 +2546,32 @@ "type": "github" } ], - "time": "2020-11-30T07:34:24+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { - "name": "sebastian/resource-operations", - "version": "2.0.2", + "name": "sebastian/recursion-context", + "version": "5.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2616,13 +2587,21 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -2630,32 +2609,32 @@ "type": "github" } ], - "time": "2020-11-30T07:30:19+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "1.1.4", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.2" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2678,7 +2657,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -2686,29 +2665,29 @@ "type": "github" } ], - "time": "2020-11-30T07:25:11+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2731,42 +2710,54 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-07T11:34:05+00:00" }, { "name": "slevomat/coding-standard", - "version": "6.1.5", + "version": "8.14.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "d767b5e302ff096327466c97fec3cb57f6d16086" + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/d767b5e302ff096327466c97fec3cb57f6d16086", - "reference": "d767b5e302ff096327466c97fec3cb57f6d16086", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926", + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926", "shasum": "" }, "require": { - "php": "^7.1", - "phpstan/phpdoc-parser": "0.3.5 - 0.4.3", - "squizlabs/php_codesniffer": "^3.5.4" + "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.7.1" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "0.6.2", - "grogy/php-parallel-lint": "1.1.0", - "phing/phing": "2.16.3", - "phpstan/phpstan": "0.11.19|0.12.9", - "phpstan/phpstan-phpunit": "0.11.2|0.12.6", - "phpstan/phpstan-strict-rules": "0.11.1|0.12.2", - "phpunit/phpunit": "7.5.18|8.5.2" + "phing/phing": "2.17.4", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.10.37", + "phpstan/phpstan-deprecation-rules": "1.1.4", + "phpstan/phpstan-phpunit": "1.3.14", + "phpstan/phpstan-strict-rules": "1.5.1", + "phpunit/phpunit": "8.5.21|9.6.8|10.3.5" }, "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, "autoload": { "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" + "SlevomatCodingStandard\\": "SlevomatCodingStandard/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2774,24 +2765,38 @@ "MIT" ], "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "keywords": [ + "dev", + "phpcs" + ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/master" + "source": "https://github.com/slevomat/coding-standard/tree/8.14.1" }, - "time": "2020-02-05T21:17:34+00:00" + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2023-10-08T07:28:08+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.8", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -2827,106 +2832,28 @@ "homepage": "https://github.com/squizlabs/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" }, - "time": "2020-10-23T02:01:07+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -2955,7 +2882,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/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, "funding": [ { @@ -2963,76 +2890,18 @@ "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2021-07-28T10:34:58+00:00" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.4", + "php": "^8.1", "ext-curl": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/phpstan.neon b/phpstan.neon index adb1cd6..72ac781 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,9 +2,8 @@ parameters: level: 6 bootstrapFiles: - tests/bootstrap.php - - vendor/cakephp/cakephp/src/basics.php + - vendor/cakephp/cakephp/src/functions.php checkGenericClassInNonGenericObjectType: false checkMissingIterableValueType: false paths: - src - diff --git a/phpunit.xml.dist b/phpunit.xml.dist index aadc9fe..d263d3c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,35 +1,30 @@ + - tests/TestCase/ - - - - - - - - - - - - + + + + + src/ - - - + + diff --git a/src/Command/Helper/ScanOutputHelper.php b/src/Command/Helper/ScanOutputHelper.php index 5d53138..af45b8f 100644 --- a/src/Command/Helper/ScanOutputHelper.php +++ b/src/Command/Helper/ScanOutputHelper.php @@ -19,7 +19,7 @@ class ScanOutputHelper extends Helper */ public function output(array $args): void { - $this->_io->out("The following tables have dead links: "); + $this->_io->out('The following tables have dead links: '); foreach ($args as $tableResult) { $this->outputTable($tableResult); } @@ -56,7 +56,7 @@ protected function outputTable(ResultSet $tableResult): void /** * Add headers to table output * - * @return string[][] + * @return array */ protected function createHeaders(): array { diff --git a/src/Command/ScanCommand.php b/src/Command/ScanCommand.php index 3e7df39..353971d 100644 --- a/src/Command/ScanCommand.php +++ b/src/Command/ScanCommand.php @@ -5,6 +5,7 @@ use Avolle\Deadlinks\Deadlinks\ResultSet; use Avolle\Deadlinks\Deadlinks\TableScanner; +use Cake\Collection\Collection; use Cake\Command\Command; use Cake\Console\Arguments; use Cake\Console\ConsoleIo; @@ -75,7 +76,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int $result = $this->scanTables($tables); // No dead links found in any table scans. Give feedback to user and exit - $hasDeadlinks = collection($result)->filter(fn (ResultSet $resultSet) => !$resultSet->isEmpty()); + $hasDeadlinks = (new Collection($result))->filter(fn (ResultSet $resultSet) => !$resultSet->isEmpty()); if ($hasDeadlinks->isEmpty()) { return $io->success('No links were found to be dead.'); } @@ -98,7 +99,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int * Scan the specified tables and return the results * * @param array $tables Tables to scan - * @return \Avolle\Deadlinks\Deadlinks\ResultSet[] + * @return array<\Avolle\Deadlinks\Deadlinks\ResultSet> */ protected function scanTables(array $tables): array { @@ -114,8 +115,9 @@ protected function scanTables(array $tables): array /** * Output results into the terminal * - * @param \Avolle\Deadlinks\Deadlinks\ResultSet[] $result Scanned results + * @param array<\Avolle\Deadlinks\Deadlinks\ResultSet> $result Scanned results * @return void + * @uses \Avolle\Deadlinks\Command\Helper\ScanOutputHelper */ protected function outputTerminal(array $result): void { @@ -125,7 +127,7 @@ protected function outputTerminal(array $result): void /** * Output results into a log file * - * @param \Avolle\Deadlinks\Deadlinks\ResultSet[] $result Scanned results + * @param array<\Avolle\Deadlinks\Deadlinks\ResultSet> $result Scanned results * @return void */ protected function outputLog(array $result): void @@ -152,7 +154,7 @@ protected function outputLog(array $result): void /** * Output the results into an email * - * @param \Avolle\Deadlinks\Deadlinks\ResultSet[] $result Scanned results + * @param array<\Avolle\Deadlinks\Deadlinks\ResultSet> $result Scanned results * @return array */ protected function sendEmail(array $result): array diff --git a/src/Deadlinks/DeadLink.php b/src/Deadlinks/DeadLink.php index 23054b5..12cca36 100644 --- a/src/Deadlinks/DeadLink.php +++ b/src/Deadlinks/DeadLink.php @@ -10,48 +10,20 @@ */ class DeadLink { - /** - * Field that was scanned - * - * @var string - */ - protected string $field = ""; - - /** - * Value (URL) that was scanned - * - * @var string - */ - protected string $value = ""; - - /** - * Primary key of the dead link row - * - * @var string|string[] - */ - protected $primaryKey = ""; - - /** - * Primary key value of the dead link row - * - * @var string|string[]|int|int[] - */ - protected $primaryKeyValue; - /** * DeadLink constructor. * * @param string $field Field of scanned link * @param mixed $value Value of scannede link - * @param string|string[] $primaryKey Primary key of row with link scanned - * @param string|string[]|int|int[] $primaryKeyValue Primary key value of row with link scanned + * @param array|string $primaryKey Primary key of row with link scanned + * @param array|array|string|int $primaryKeyValue Primary key value of row with link scanned */ - public function __construct(string $field, $value, $primaryKey, $primaryKeyValue) - { - $this->field = $field; - $this->value = $value; - $this->primaryKey = $primaryKey; - $this->primaryKeyValue = $primaryKeyValue; + public function __construct( + protected string $field, + protected mixed $value, + protected array|string $primaryKey, + protected array|int|string $primaryKeyValue, + ) { } /** @@ -87,9 +59,9 @@ public function getPrimaryKey(): string /** * Get primary key value of row that was scanned * - * @return int|int[]|string|string[] + * @return array|array|string|int */ - public function getPrimaryKeyValue() + public function getPrimaryKeyValue(): array|int|string { return $this->primaryKeyValue; } diff --git a/src/Deadlinks/ResultSet.php b/src/Deadlinks/ResultSet.php index 5f637e9..0f9cc91 100644 --- a/src/Deadlinks/ResultSet.php +++ b/src/Deadlinks/ResultSet.php @@ -11,7 +11,7 @@ class ResultSet /** * Results * - * @var array + * @var array<\Avolle\Deadlinks\Deadlinks\DeadLink> */ protected array $results = []; @@ -20,7 +20,7 @@ class ResultSet * * @var string */ - protected string $tableName = ""; + protected string $tableName = ''; /** * ResultSet constructor. @@ -35,7 +35,7 @@ public function __construct(string $tableName) /** * Get the results * - * @return \Avolle\Deadlinks\Deadlinks\DeadLink[] + * @return array<\Avolle\Deadlinks\Deadlinks\DeadLink> */ public function getResults(): array { diff --git a/src/Deadlinks/TableScanner.php b/src/Deadlinks/TableScanner.php index aa4dc55..7c136ef 100644 --- a/src/Deadlinks/TableScanner.php +++ b/src/Deadlinks/TableScanner.php @@ -3,8 +3,8 @@ namespace Avolle\Deadlinks\Deadlinks; -use Cake\Database\Query; use Cake\ORM\Locator\LocatorInterface; +use Cake\ORM\Query\SelectQuery; use Cake\ORM\Table; use Cake\ORM\TableRegistry; @@ -20,32 +20,15 @@ class TableScanner */ protected LocatorInterface $tableLocator; - /** - * Table name to scan - * - * @var string - */ - protected string $tableName; - - /** - * Fields to scan - * - * @var string[] - */ - protected array $fields; - /** * TableScanner constructor. * * @param string $tableName Table to scan - * @param array $fields Fields to scan + * @param array $fields Fields to scan * @return void */ - public function __construct(string $tableName, array $fields) + public function __construct(protected string $tableName, protected array $fields) { - $this->tableName = $tableName; - $this->fields = $fields; - $this->tableLocator = TableRegistry::getTableLocator(); } @@ -53,7 +36,7 @@ public function __construct(string $tableName, array $fields) * Scan table for dead links, with the given fields * * @param string $tableName Table to scan - * @param string[] $fields Fields to scan + * @param array $fields Fields to scan * @return \Avolle\Deadlinks\Deadlinks\ResultSet */ public static function scanTable(string $tableName, array $fields): ResultSet @@ -88,10 +71,10 @@ public function scan(): ResultSet /** * Fields to select in the built query * - * @param string|array $primaryKey Primary Key + * @param array|string $primaryKey Primary Key * @return array */ - protected function selectFields($primaryKey): array + protected function selectFields(array|string $primaryKey): array { return array_merge($this->fields, (array)$primaryKey); } @@ -100,9 +83,9 @@ protected function selectFields($primaryKey): array * Find entities in the given model, selecting the fields to scan * * @param \Cake\ORM\Table $model Model - * @return \Cake\Database\Query + * @return \Cake\ORM\Query\SelectQuery */ - protected function findEntities(Table $model): Query + protected function findEntities(Table $model): SelectQuery { $selectFields = $this->selectFields($model->getPrimaryKey()); diff --git a/src/Deadlinks/UrlScanner.php b/src/Deadlinks/UrlScanner.php index c4ac137..b8b4bf3 100644 --- a/src/Deadlinks/UrlScanner.php +++ b/src/Deadlinks/UrlScanner.php @@ -3,7 +3,9 @@ namespace Avolle\Deadlinks\Deadlinks; +use Cake\Core\Configure; use Cake\Core\InstanceConfigTrait; +use CurlHandle; /** * Class UrlScanner @@ -15,9 +17,9 @@ class UrlScanner /** * Config * - * - timeout - In milliseconds, this setting determines when to give up an URL scan. Defaults to 1000 ms + * - timeout - In milliseconds, this setting determines when to give up a URL scan. Defaults to 1000 ms * - * @var int[] + * @var array */ protected array $_defaultConfig = [ 'timeout' => 1000, // milliseconds @@ -34,7 +36,7 @@ public function __construct(array $config = []) } /** - * Scan an URL to see if it's an "OK" status + * Scan a URL to see if it's an "OK" status * * @param string $url Url to scan * @return bool @@ -51,7 +53,7 @@ public function isAlive(string $url): bool } /** - * Scan an URL to see if it's not an "OK" status + * Scan a URL to see if it's not an "OK" status * * @param string $url Url to scan * @return bool @@ -65,18 +67,21 @@ public function isDead(string $url): bool * Create a curl resource handler * * @param string $url Url to create resource for - * @return false|resource + * @return \CurlHandle|false */ - protected function createCurlResource(string $url) + protected function createCurlResource(string $url): CurlHandle|false { $ch = curl_init($url); curl_setopt($ch, CURLOPT_TIMEOUT_MS, $this->getConfig('timeout')); - curl_setopt($ch, CONNECTION_TIMEOUT, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'User-Agent: Dead Links URL scanner', ]); + if (Configure::read('debug')) { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + } return $ch; } @@ -84,10 +89,10 @@ protected function createCurlResource(string $url) /** * Check if the curl resource is "OK" * - * @param resource $ch Curl resource handler + * @param \CurlHandle $ch Curl resource handler * @return bool */ - protected function httpOk($ch): bool + protected function httpOk(CurlHandle $ch): bool { $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); diff --git a/src/Plugin.php b/src/DeadlinksPlugin.php similarity index 88% rename from src/Plugin.php rename to src/DeadlinksPlugin.php index 0a3e800..9fd966d 100644 --- a/src/Plugin.php +++ b/src/DeadlinksPlugin.php @@ -15,12 +15,13 @@ /** * Plugin for CakePHP Deadlinks */ -class Plugin extends BasePlugin +class DeadlinksPlugin extends BasePlugin { /** * Plugin constructor. * * @param array $options Plugin options + * @throws \Avolle\Deadlinks\Exception\MissingConfigException */ public function __construct(array $options = []) { @@ -28,10 +29,9 @@ public function __construct(array $options = []) try { Configure::load('deadlinks'); - } catch (CakeException $ex) { + } catch (CakeException) { throw new MissingConfigException( - 'Configuration key `Deadlinks` was not found. Please add a `deadlinks.php` ' - . 'file to your config folder.' + 'Configuration key `Deadlinks` was not found. Please add a `deadlinks.php` file to your config folder.', ); } @@ -41,7 +41,6 @@ public function __construct(array $options = []) 'className' => FileLog::class, 'path' => LOGS, 'file' => 'deadlinks', - 'url' => env('LOG_DEBUG_URL'), 'scopes' => ['deadlinks'], ]); } diff --git a/src/Exception/MissingConfigException.php b/src/Exception/MissingConfigException.php index 25be97f..7f531af 100644 --- a/src/Exception/MissingConfigException.php +++ b/src/Exception/MissingConfigException.php @@ -3,13 +3,13 @@ namespace Avolle\Deadlinks\Exception; -use Cake\Core\Exception\Exception; +use Cake\Core\Exception\CakeException; /** * Class MissingConfigException * * @package Avolle\Deadlinks\Exception */ -class MissingConfigException extends Exception +class MissingConfigException extends CakeException { } diff --git a/src/Mailer/ScanResultMailer.php b/src/Mailer/ScanResultMailer.php index 1abb873..4167e90 100644 --- a/src/Mailer/ScanResultMailer.php +++ b/src/Mailer/ScanResultMailer.php @@ -4,7 +4,7 @@ namespace Avolle\Deadlinks\Mailer; use Cake\Core\Configure; -use Cake\I18n\FrozenDate; +use Cake\I18n\Date; use Cake\Mailer\Mailer; /** @@ -17,14 +17,14 @@ class ScanResultMailer extends Mailer * * @var string */ - public static $name = 'ScanResult'; + public static string $name = 'ScanResult'; /** * ScanResultMailer constructor. * * @param array|null $config Mailer Config */ - public function __construct($config = null) + public function __construct(?array $config = null) { parent::__construct($config); $this->setTransport('default'); @@ -40,10 +40,10 @@ public function sendResult(array $result): void { $this ->setTo(Configure::readOrFail('Deadlinks.mailRecipient')) - ->setSubject('Dead Links Report - ' . FrozenDate::now()->format("Y-m-d")) + ->setSubject('Dead Links Report - ' . Date::now()->format('Y-m-d')) ->setEmailFormat('text') ->setViewVars(compact('result')) ->viewBuilder() - ->setTemplate('Avolle/Deadlinks.send_result'); + ->setTemplate('Avolle/Deadlinks.send_result'); } } diff --git a/templates/email/text/send_result.php b/templates/email/text/send_result.php index 38a1b0d..2fb789e 100644 --- a/templates/email/text/send_result.php +++ b/templates/email/text/send_result.php @@ -3,8 +3,10 @@ * @var \Cake\View\View $this * @var \Avolle\Deadlinks\Deadlinks\ResultSet[] $result */ + +use Cake\I18n\DateTime; ?> -Dead Links Scan Results run format('Y-m-d H:i'); ?> +Dead Links Scan Results run format('Y-m-d H:i'); ?> A total of tables were scanned. diff --git a/tests/Fixture/FilesFixture.php b/tests/Fixture/FilesFixture.php index 8235925..aec5d8b 100644 --- a/tests/Fixture/FilesFixture.php +++ b/tests/Fixture/FilesFixture.php @@ -10,26 +10,6 @@ */ class FilesFixture extends TestFixture { - /** - * Fields - * - * @var array - */ - // phpcs:disable - public $fields = [ - 'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null], - 'name' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null], - 'linkOne' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null], - 'linkTwo' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null], - '_constraints' => [ - 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], - ], - '_options' => [ - 'engine' => 'InnoDB', - 'collation' => 'utf8mb4_general_ci' - ], - ]; - // phpcs:enable /** * Init method * diff --git a/tests/Fixture/LinksFixture.php b/tests/Fixture/LinksFixture.php index 45d472d..c62055f 100644 --- a/tests/Fixture/LinksFixture.php +++ b/tests/Fixture/LinksFixture.php @@ -10,25 +10,6 @@ */ class LinksFixture extends TestFixture { - /** - * Fields - * - * @var array - */ - // phpcs:disable - public $fields = [ - 'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null], - 'name' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null], - 'link' => ['type' => 'string', 'length' => 255, 'null' => true, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null], - '_constraints' => [ - 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], - ], - '_options' => [ - 'engine' => 'InnoDB', - 'collation' => 'utf8mb4_general_ci' - ], - ]; - // phpcs:enable /** * Init method * diff --git a/tests/Fixture/ResourcesFixture.php b/tests/Fixture/ResourcesFixture.php index 63e33e2..cdc5826 100644 --- a/tests/Fixture/ResourcesFixture.php +++ b/tests/Fixture/ResourcesFixture.php @@ -10,25 +10,6 @@ */ class ResourcesFixture extends TestFixture { - /** - * Fields - * - * @var array - */ - // phpcs:disable - public $fields = [ - 'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null], - 'name' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null], - 'link' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8mb4_general_ci', 'comment' => '', 'precision' => null], - '_constraints' => [ - 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], - ], - '_options' => [ - 'engine' => 'InnoDB', - 'collation' => 'utf8mb4_general_ci' - ], - ]; - // phpcs:enable /** * Init method * diff --git a/tests/TestCase/Command/ScanCommandTest.php b/tests/TestCase/Command/ScanCommandTest.php index d1726be..dfb0cbb 100644 --- a/tests/TestCase/Command/ScanCommandTest.php +++ b/tests/TestCase/Command/ScanCommandTest.php @@ -4,7 +4,7 @@ namespace Command; use Avolle\Deadlinks\Exception\MissingConfigException; -use Cake\TestSuite\ConsoleIntegrationTestTrait; +use Cake\Console\TestSuite\ConsoleIntegrationTestTrait; use Cake\TestSuite\EmailTrait; use Cake\TestSuite\TestCase; use DateTimeImmutable; @@ -22,20 +22,14 @@ class ScanCommandTest extends TestCase /** * Fixtures * - * @var array + * @var array */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Avolle/Deadlinks.Files', 'plugin.Avolle/Deadlinks.Links', 'plugin.Avolle/Deadlinks.Resources', ]; - protected function setUp(): void - { - parent::setUp(); - $this->useCommandRunner(); - } - /** * Test buildOptionParser method * Assert help messages diff --git a/tests/TestCase/DeadLinks/TableScannerTest.php b/tests/TestCase/DeadLinks/TableScannerTest.php index 7fe4146..38a1f87 100644 --- a/tests/TestCase/DeadLinks/TableScannerTest.php +++ b/tests/TestCase/DeadLinks/TableScannerTest.php @@ -20,9 +20,9 @@ class TableScannerTest extends TestCase /** * Fixtures * - * @var string[] Fixtures + * @var array Fixtures */ - protected $fixtures = [ + protected array $fixtures = [ 'plugin.Avolle/Deadlinks.Files', 'plugin.Avolle/Deadlinks.Links', 'plugin.Avolle/Deadlinks.Resources', diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 39f42f8..e7dfae6 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -3,9 +3,12 @@ use Cake\Cache\Cache; use Cake\Core\Configure; +use Cake\Database\Connection; +use Cake\Database\Driver\Sqlite; use Cake\Datasource\ConnectionManager; -use Cake\I18n\FrozenDate; +use Cake\I18n\DateTime; use Cake\Mailer\TransportFactory; +use Cake\TestSuite\Fixture\SchemaLoader; if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); @@ -26,7 +29,7 @@ const TESTS = __DIR__ . DS; const TEST_FILES = TESTS . 'test_files' . DS; -ini_set('intl.default_locale', 'de-DE'); +ini_set('intl.default_locale', 'nb_NO'); require PLUGIN_ROOT . '/vendor/autoload.php'; require CORE_PATH . 'config/bootstrap.php'; @@ -36,8 +39,28 @@ Configure::write('App', [ 'namespace' => 'TestApp', 'encoding' => 'UTF-8', - 'defaultLocale' => env('APP_DEFAULT_LOCALE', 'nb_NO'), - 'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'Europe/Oslo'), + 'defaultLocale' => 'nb_NO', + 'defaultTimezone' => 'APP_DEFAULT_TIMEZONE', 'Europe/Oslo', +]); + +if (!getenv('db_dsn')) { + putenv('db_dsn=sqlite:///:memory:'); +} + +ConnectionManager::setConfig('test', [ + 'url' => getenv('db_dsn'), + 'username' => 'root', + 'password' => 'root', + 'database' => 'title', + 'className' => Connection::class, + 'driver' => Sqlite::class, + 'persistent' => false, + 'timezone' => 'UTC', + 'encoding' => 'utf8', + 'flags' => [], + 'cacheMetadata' => true, + 'quoteIdentifiers' => false, + 'log' => false, ]); Configure::write('EmailTransport', [ @@ -83,25 +106,7 @@ 'duration' => '+10 seconds', ], ]); +(new SchemaLoader())->loadSqlFiles(PLUGIN_ROOT . DS . 'tests' . DS . 'schema.sql'); -if (!getenv('DB_CLASS') && getenv('DB_URL')) { - ConnectionManager::setConfig('test', ['url' => getenv('DB_URL')]); - - return; -} - -if (!getenv('DB_CLASS')) { - putenv('DB_CLASS=Cake\Database\Driver\Sqlite'); - putenv('DB_URL=sqlite::memory:'); -} - -ConnectionManager::setConfig('test', [ - 'className' => 'Cake\Database\Connection', - 'driver' => getenv('DB_CLASS') ?: null, - 'dsn' => getenv('DB_URL') ?: null, - 'timezone' => 'UTC', - 'quoteIdentifiers' => false, - 'cacheMetadata' => true, -]); - -FrozenDate::setTestNow('2021-07-10 23:11:11'); +DateTime::setTestNow('2021-07-10 23:11:11'); +session_id('cli'); diff --git a/tests/schema.sql b/tests/schema.sql new file mode 100644 index 0000000..1e6d7a1 --- /dev/null +++ b/tests/schema.sql @@ -0,0 +1,24 @@ +CREATE TABLE `files` +( + `id` INT NULL, + `name` VARCHAR(255) NULL DEFAULT NULL, + `linkOne` VARCHAR(255) NULL DEFAULT NULL, + `linkTwo` VARCHAR(255) NULL DEFAULT NULL, + PRIMARY KEY (`id`) +); + +CREATE TABLE `links` +( + `id` INT NULL, + `name` VARCHAR(255) NULL DEFAULT NULL, + `link` VARCHAR(255) NULL DEFAULT NULL, + PRIMARY KEY (`id`) +); + +CREATE TABLE `resources` +( + `id` INT NULL, + `name` VARCHAR(255) NULL DEFAULT NULL, + `link` VARCHAR(255) NULL DEFAULT NULL, + PRIMARY KEY (`id`) +); diff --git a/tests/test_app/config/routes.php b/tests/test_app/config/routes.php new file mode 100644 index 0000000..697fddb --- /dev/null +++ b/tests/test_app/config/routes.php @@ -0,0 +1,12 @@ +prefix('Admin', function (RouteBuilder $builder) { + return $builder->fallbacks(); +}); + +$routes->scope('/', function (RouteBuilder $builder) { + $builder->fallbacks(); +}); diff --git a/tests/test_app/src/Application.php b/tests/test_app/src/Application.php index d989ead..48198a8 100644 --- a/tests/test_app/src/Application.php +++ b/tests/test_app/src/Application.php @@ -3,11 +3,9 @@ namespace TestApp; -use Avolle\Deadlinks\Plugin as DeadlinksPlugin; +use Avolle\Deadlinks\DeadlinksPlugin; use Cake\Http\BaseApplication; use Cake\Http\MiddlewareQueue; -use Cake\Routing\RouteBuilder; -use Cake\Routing\Router; class Application extends BaseApplication { @@ -18,11 +16,6 @@ public function bootstrap(): void $this->addPlugin(DeadlinksPlugin::class); } - public function routes(RouteBuilder $routes): void - { - Router::connect('/meh', ['controller' => 'Pages', 'action' => 'home']); - } - /** * Middleware * diff --git a/tests/test_files/deadlinks_static.log b/tests/test_files/deadlinks_static.log index 5469b82..ff4ca39 100644 --- a/tests/test_files/deadlinks_static.log +++ b/tests/test_files/deadlinks_static.log @@ -1,4 +1,4 @@ -__DATETIME__PLACEHOLDER__ Info: A scan of dead links was performed. 3 tables were scanned. +__DATETIME__PLACEHOLDER__ info: A scan of dead links was performed. 3 tables were scanned. ========================================== ----- Files -----